/* CGD Group : socle de la charte graphique (tokens, typographies, composants).
   Partagé par index.html et charte.html. */

:root {
  /* Palette tirée du logo : noir, anthracite, graphite, acier, argent, ivoire */
  --noir: #0B0C0E;
  --anthracite: #242626;
  --graphite: #434241;
  --acier: #736F6B;
  --argent: #B9B6B1;
  --ivoire: #F7F5F2;

  --ground: var(--ivoire);
  --surface: #EFECE7;
  --ink: var(--noir);
  --ink-soft: #55524E;
  --line: #D9D5CF;
  --rule: var(--argent);
  --btn-bg: var(--noir);
  --btn-ink: var(--ivoire);

  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-caps: "Cinzel", "Trajan Pro", "Cormorant Garamond", serif;
  --font-sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 10vw, 140px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E0F11;
    --surface: #17181B;
    --ink: #F1EEEA;
    --ink-soft: #A9A5A0;
    --line: #2B2C2F;
    --rule: #5A5855;
    --btn-bg: var(--ivoire);
    --btn-ink: var(--noir);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[id] { scroll-margin-top: 92px; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* Typographie */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.display em { font-style: italic; font-weight: 500; }
.caps {
  font-family: var(--font-caps);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.lede { color: var(--ink-soft); max-width: 60ch; }

/* Filet au losange, repris du logo */
.losange {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--rule);
  max-width: 320px;
}
.losange::before, .losange::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.losange i { width: 8px; height: 8px; background: currentColor; transform: rotate(45deg); flex: none; }
.losange.center { margin-inline: auto; }

/* Boutons : angles droits, capitales espacées */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  border: 1px solid var(--btn-bg);
  font-family: var(--font-caps);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: transparent; color: var(--ink); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--btn-bg); color: var(--btn-ink); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Logos : bascule clair / sombre */
.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .on-light { display: none; }
  .on-dark { display: block; }
}

/* En-tête */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.brand span { font-family: var(--font-caps); font-size: 16px; font-weight: 500; letter-spacing: 0.28em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.nav a:not(.btn) { font-size: 15px; text-decoration: none; color: var(--ink-soft); transition: color .2s var(--ease); }
.nav a:not(.btn):hover { color: var(--ink); }
.nav .btn { padding: 11px 18px; font-size: 11.5px; }
.nav a { white-space: nowrap; }
@media (max-width: 860px) { .nav > a:not(.btn) { display: none; } }
.nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 480px) { .brand span { display: none; } }

/* Pied de page */
.site-footer { padding-block: 48px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.site-footer .wrap { display: grid; gap: 28px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.footer-nav a:hover { color: var(--ink); }
.legal { color: var(--ink-soft); font-size: 14px; }
.legal summary { cursor: pointer; width: fit-content; }
.legal p { margin-top: 12px; max-width: 70ch; }

/* Sélecteur de langue */
.langs { display: inline-flex; align-items: center; gap: 12px; }
.langs a { font-size: 12px; letter-spacing: 0.08em; text-decoration: none; color: var(--ink-soft); transition: color .2s var(--ease); }
.langs a:hover, .langs a[aria-current="true"] { color: var(--ink); }
.langs a[aria-current="true"] { font-weight: 600; border-bottom: 1px solid currentColor; }
/* Menu déroulant des langues : visible à toutes les largeurs */
.lang-select { position: relative; display: inline-flex; align-items: center; }
.lang-select select {
  appearance: none; -webkit-appearance: none;
  font: 500 14px/1 var(--font-sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 11px 34px 11px 14px;
  cursor: pointer;
}
.lang-select::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 7px; height: 7px; margin-top: -6px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg); pointer-events: none;
}
.lang-select select:hover { background: var(--surface); }
.lang-select option { color: #0B0C0E; background: #FFFFFF; }
@media (max-width: 480px) { .nav { gap: 10px; } .lang-select select { padding: 10px 28px 10px 10px; font-size: 13px; } .lang-select::after { right: 10px; } .nav .btn { padding: 11px 12px; letter-spacing: 0.14em; } }
.langs-foot a { font-size: 13px; }

/* Chinois : polices système (les polices latines de la charte n'ont pas de glyphes CJK),
   pas d'italique ni de capitales espacées, qui n'existent pas dans cette écriture */
html[lang="zh-Hans"] {
  --font-display: "Cormorant Garamond", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --font-caps: "Cinzel", "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --font-sans: "Hanken Grotesk", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}
html[lang="zh-Hans"] .display { letter-spacing: 0; line-height: 1.25; font-weight: 600; }
html[lang="zh-Hans"] .display em, html[lang="zh-Hans"] .verbs, html[lang="zh-Hans"] .promise, html[lang="zh-Hans"] .frise .futur .an { font-style: normal; }
html[lang="zh-Hans"] .display em { color: var(--acier); }
html[lang="zh-Hans"] .caps, html[lang="zh-Hans"] .btn { letter-spacing: 0.12em; font-size: 13.5px; }
html[lang="zh-Hans"] .langs a { letter-spacing: 0.04em; }

.lang-select.langs-foot { justify-self: start; }
