/* ============================================================
   SOV Consulting — styles
   Éditorial, épuré : blanc généreux, filets fins, or en touches.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

::selection { background: var(--gold); color: var(--bg); }

a { color: inherit; }

/* Grain de papier — matière subtile sur tout le site */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}

/* ---------- Primitives ---------- */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--gold);
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
}

.rule {
  border: none;
  height: 1px;
  width: 52px;
  margin: 0;
  background: var(--rule);
}

.chev { /* chevrons du logo, en inline */
  font-family: var(--font-mono);
  font-weight: 300;
  color: var(--gold);
}

/* ---------- Barre de navigation ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: var(--track-serif);
  line-height: 1;
}
.brand .chev { font-size: 0.72em; transform: translateY(-0.06em); }

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1.5vw, 1rem);
}

.topnav a {
  position: relative;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.5rem 0.6rem;
  transition: color 0.35s var(--ease);
}
/* Au survol, le lien devient un lockup SOV : les chevrons du logo sortent
   du mot et se posent de part et d'autre. Ils logent dans le rembourrage —
   aucun voisin ne bouge. La page courante porte les siens en permanence. */
.topnav a::before,
.topnav a::after {
  position: absolute;
  top: 50%;
  color: var(--gold);
  font-family: var(--font-mono);
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.topnav a::before {
  content: "<";
  left: -0.15rem;
  transform: translateY(-50%) translateX(7px);
}
.topnav a::after {
  content: "/>";
  right: -0.45rem;
  transform: translateY(-50%) translateX(-7px);
}
.topnav a:hover { color: var(--gold); }
.topnav a:hover::before,
.topnav a:hover::after,
.topnav a.active::before,
.topnav a.active::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.themebtn {
  appearance: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.themebtn:hover { color: var(--gold); border-color: var(--gold); }

.burger {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  width: 2.1rem;
  height: 2.1rem;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.burger:hover { color: var(--gold); border-color: var(--gold); }

.navmenu {
  position: absolute;
  top: calc(100% + 8px);
  right: clamp(1rem, 4vw, 2.5rem);
  display: none;
  flex-direction: column;
  min-width: 12.5rem;
  padding: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.3);
  z-index: 60;
}
.navmenu.open { display: flex; }
.navmenu a {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.85rem 1rem;
  transition: color 0.2s;
}
.navmenu a:hover { color: var(--gold); }

/* ---------- Hero ---------- */

/* Deux colonnes : le discours à gauche, la sphère de compétences à droite.
   En dessous de 900px la sphère passe sous le texte. */
/* Titre, puis sphère, puis texte — même rythme éditorial que la page
   Engagements. Tout doit tenir dans le premier écran, appel à l'action
   compris : c'est lui qui borne la hauteur de la sphère. */
.hero {
  position: relative;
  z-index: 0; /* contexte d'empilement : les filigranes ::before/::after passent derrière le contenu */
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  /* haut allégé, bas chargé : le contenu centré remonte d'autant.
     6rem en haut = ~2rem d'air sous la barre fixe (qui en fait ~4) ;
     en dessous le titre venait la toucher sur grand écran. */
  padding: calc(var(--space-6) + var(--space-2)) clamp(1rem, 5vw, var(--space-6)) calc(var(--space-6) + var(--space-3));
  /* fond nu : la sphère est le seul événement visuel du hero */
}

/* Composition sur un axe unique : la sphère est centrée, donc tout l'est.
   Du texte aligné à gauche autour d'un objet centré déséquilibrait la page
   — c'est ce qui faisait paraître le bouton « mal placé ». */
.hero-head {
  width: 100%;
  max-width: 30em;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-head .kicker { margin-bottom: var(--space-3); }

/* L'accroche et le bouton, juste sous la ligne : ils se découvrent au
   premier geste de défilement, avec la place qu'ils méritent. */
.hero-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  max-width: 52rem;
  margin: 0 auto;
  padding: var(--space-5) clamp(1rem, 5vw, var(--space-6)) var(--space-6);
}
/* (le lede de cette section a rejoint le hero : voir .hero-note) */

/* La dédicace sous la sphère : l'idée de la boîte, en italique Cormorant
   (la vraie, auto-hébergée) — délicate, comme une ligne manuscrite */
.hero-note {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
  /* max-width en em : le point de retour suit le corps, donc la phrase
     reste sur DEUX lignes quelle que soit la taille rendue */
  max-width: 33em;
  margin: 0;
}

/* L'accroche porte l'invitation ; le bouton reste court, sinon il se coupe
   en deux lignes (même motif qu'au pied de la page Engagements) */
/* L'invitation entre deux filets d'or — le geste du logo (le trait sous SOV,
   CONSULTING encadré) repris à l'échelle de la page. Les filets transforment
   la phrase orpheline en bande composée. */
.intro-band {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-3), 4vw, var(--space-4));
  width: 100%;
}
.intro-band::before,
.intro-band::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  opacity: 0.55;
}

.hero-accroche {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}
.hero-accroche em { font-style: italic; color: var(--gold); }

@media (max-width: 560px) {
  .hero-accroche { white-space: normal; }
}

/* Le cadre de la sphère : carré, borné pour ne jamais déborder du hero */
/* La sphère absorbe l'espace qui RESTE une fois le titre, l'accroche et
   l'appel à l'action posés : elle s'adapte donc à toutes les hauteurs
   d'écran, là où des paliers fixes laissaient le CTA passer sous la ligne. */
/* La sphère est l'événement de la page : elle prend tout l'espace laissé
   par le texte, et on lui garantit un plancher généreux. */
.hero-sphere {
  position: relative;
  flex: 1 1 auto;
  min-height: 17rem;
  max-height: 32rem;
  aspect-ratio: 1;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  touch-action: pan-y;   /* le doigt fait défiler la page, pas la sphère */
}
.hero-head { flex: 0 0 auto; }

/* Sur grand écran, le hero fait EXACTEMENT une hauteur d'écran : sans ce
   plafond, `min-height` laissait le bloc grandir, donc la sphère n'avait
   jamais d'espace négatif à absorber et poussait le CTA sous la ligne. */
@media (min-width: 901px) {
  .hero { max-height: 100svh; }
}
@media (max-width: 900px) {
  /* mobile : c'est la largeur qui borne la sphère. On la laisse déduire sa
     hauteur de sa largeur, sinon la boîte s'étire et le canvas se remplit de vide */
  .hero { padding-top: var(--space-6); gap: var(--space-3); }
  .hero-sphere { flex: 0 0 auto; width: 100%; height: auto; max-height: none; }
}
/* Écrans courts : on resserre les marges, la sphère suit d'elle-même */
@media (max-height: 800px) {
  .hero {
    padding-top: var(--space-6);
    padding-bottom: var(--space-3);
    gap: var(--space-3);
  }
}

/* L'étoffe de code a été retirée du hero : la sphère porte seule le fond.
   Le code du tissage reste dans js/main.js, inactif faute de <canvas id="silk">. */

.logo-mark {
  width: clamp(150px, 22vw, 190px);
  aspect-ratio: 1;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  transition: border-color 0.5s var(--ease);
}

.logo-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
}
.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-row .chev { font-size: 1.15rem; transform: translateY(2px); }
.logo-sov {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2.4rem;
  letter-spacing: var(--track-serif);
  margin-right: calc(-1 * var(--track-serif));
  line-height: 1;
}
.logo-sub {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: var(--track-wide);
  margin-right: calc(-1 * var(--track-wide));
  color: var(--ink-soft);
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  /* Le titre annonce, il ne doit pas voler la vedette à la sphère : chaque
     ligne gagnée sur le texte lui revient. */
  font-size: clamp(1.9rem, 2.7vw, 2.55rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: none;
}
@media (max-width: 900px) {
  .hero h1 { font-size: clamp(1.9rem, 5.4vw, 2.5rem); }
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero .lede {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 0 var(--space-5);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-sm);
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.95rem 1.7rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px -12px var(--gold);
  transition: background-color 0.25s, border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.hero-cta:hover {
  background: var(--gold-strong);
  border-color: var(--gold-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px var(--gold);
}
.hero-cta span { transition: transform 0.25s var(--ease); }
.hero-cta:hover span { transform: translateX(4px); }

/* ---------- Sections ---------- */

.section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
  border-top: 1px solid var(--hairline);
}
.section.wide { max-width: 58rem; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1.2;
  margin: 0;
}

.section p { color: var(--ink-soft); }
.section p strong { color: var(--ink); font-weight: 400; }

/* ---------- Missions ---------- */

.mission {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--hairline);
}
.mission:first-of-type { border-top: none; padding-top: 0; }

.mission-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.mission-head > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.mission .mission-meta { color: var(--gold); letter-spacing: 0.12em; }

/* Pictogramme au trait à côté de chaque étude de cas */
.mission-icon {
  width: 50px;
  height: 50px;
  flex: none;
  color: var(--gold);
}
@media (max-width: 560px) {
  .mission-icon { display: none; }
}

/* Ligne de stack en fin d'étude de cas — discrète, façon invite de commande */
.stack {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  margin: var(--space-3) 0 0;
}

/* Détails techniques repliés — pour les lecteurs qui veulent ouvrir le capot */
.tech { margin-top: var(--space-3); }
.tech summary {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.2s;
}
.tech summary::-webkit-details-marker { display: none; }
.tech summary::before {
  content: "+";
  font-size: 1.05rem;
  line-height: 1;
  color: var(--gold);
  transition: transform 0.3s var(--ease);
}
.tech[open] summary::before { content: "−"; }
.tech summary:hover { color: var(--gold); }
.tech-body {
  margin-top: var(--space-2);
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  border-left: 1px solid var(--hairline-strong);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.tech-body p { margin: 0 0 var(--space-2); }
.tech-body .stack { margin: 0; }

/* L'encart CV : une carte composée, adressée aux recruteurs — visible
   sans être un bouton nu posé entre deux filets */
.cv-card {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-3), 3vw, var(--space-5));
  border: 1px solid var(--hairline);
  background: var(--gold-wash);
  border-radius: var(--radius);
  padding: var(--space-4) clamp(var(--space-4), 4vw, var(--space-5));
  margin-top: var(--space-5);
}

.cv-icon {
  width: 48px;
  height: 48px;
  flex: none;
  color: var(--gold);
}

.cv-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cv-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0;
}
.cv-body p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.cv-card .hero-cta { margin-left: auto; flex: none; }

@media (max-width: 700px) {
  .cv-card { flex-direction: column; align-items: flex-start; }
  .cv-card .hero-cta { margin-left: 0; }
}

/* Phrase de clôture après les études de cas */
.mission-coda {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink-faint);
  line-height: 1.6;
  margin: var(--space-5) 0 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--hairline);
}
/* Le CV se télécharge depuis la phrase même — pas de bouton orphelin */
.mission-coda a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
  transition: color 0.2s;
}
.mission-coda a:hover { color: var(--gold); }

.mission h3,
.eng-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.25;
  margin: 0;
}

.mission-meta {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.mission > p {
  margin: var(--space-2) 0 var(--space-3);
  font-size: 0.95rem;
}

.mission ul {
  margin: 0 0 var(--space-3);
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.mission li { margin: 0.3rem 0; }
.mission li::marker { color: var(--gold); }

/* ---------- Liens dans le corps du texte ----------
   `a { color: inherit }` les rendait invisibles au milieu d'un paragraphe.
   Ciblé sur les <p> de <main> : la nav, les boutons et les pieds de page
   ont déjà leurs propres règles et ne sont pas repeints. */

main p a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--hairline-strong);
  transition: color 0.2s, text-decoration-color 0.2s;
}
main p a:hover { color: var(--gold-strong); text-decoration-color: var(--gold); }

/* ---------- Passions ----------
   Surtout pas de pastille : un fond + une bordure + un survol, ça se lit
   comme un bouton. Une ligne de texte, scandée par les barres obliques
   du logo — même geste que `< SOV />`, et rien de cliquable à l'œil. */

.passions-list {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.55;
  margin: var(--space-3) 0 0;
  max-width: 24em;
}
.passions-list .sep {
  color: var(--gold);
  font-style: italic;
  margin: 0 0.42em;
}

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  background: var(--gold-wash);
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chips.small .chip { font-size: var(--text-xs); padding: 0.22rem 0.7rem; }

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: var(--space-7);
  background: radial-gradient(55% 65% at 50% 42%, var(--gold-wash), transparent 75%);
}
.contact .section-head { align-items: center; }
.contact .lede { color: var(--ink-soft); margin: 0; }

/* L'adresse e-mail est la pièce maîtresse de la section */
.contact-mail {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 5vw, 3.1rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  margin: var(--space-4) 0 var(--space-5);
  padding-bottom: 0.15em;
  background: linear-gradient(var(--gold), var(--gold)) no-repeat center bottom / 100% 1px;
  transition: color 0.3s, background-size 0.35s var(--ease);
}
.contact-mail:hover {
  color: var(--gold);
  background-size: 100% 2px;
}
.contact-mail .chev { font-size: 0.75em; }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}
.contact-row a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  background: var(--gold-wash);
  transition: color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.contact-row a:hover {
  color: var(--ink);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.contact-row svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }

.contact-place {
  margin: var(--space-5) 0 0;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- Pied de page ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: var(--space-6);
}

/* Même geste que la bande signée du hero : la phrase entre deux filets d'or,
   centrée, le bouton en dessous. */
.footer-close {
  max-width: 52rem;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

.footer-line {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem); /* aligné sur l'accroche du hero */
  line-height: 1.2;
  margin: 0;
}
.footer-line em { font-style: italic; color: var(--gold); }

.footer-meta {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.footer-meta a { color: inherit; text-decoration: none; transition: color 0.2s; }
.footer-meta a:hover { color: var(--gold); }

/* La sobriété technique, revendiquée — le site prouve la promesse */
.footer-note {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- Finitions globales ---------- */

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

/* Barre de défilement neutre : l'or y dessinait une bande dorée sur le bord droit. */
html { scrollbar-color: rgba(128, 122, 112, 0.35) transparent; scrollbar-width: thin; }
[data-theme="dark"] html,
:root[data-theme="dark"] { scrollbar-color: rgba(160, 154, 144, 0.28) transparent; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128, 122, 112, 0.35); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(128, 122, 112, 0.55); }

/* Utilitaire d'espacement — remplace l'unique style inline du site,
   prérequis de la CSP stricte (style-src 'self' sans 'unsafe-inline') */
.mt-5 { margin-top: var(--space-5); }

/* ---------- Mentions légales ---------- */

.legal > div { margin-top: var(--space-5); }
.legal > div:first-child { margin-top: 0; }
.legal h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  margin: 0 0 var(--space-2);
}
.legal p { color: var(--ink-soft); margin: 0 0 var(--space-2); }
.legal p strong { color: var(--ink); font-weight: 400; }
.legal a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; transition: color 0.2s; }
.legal a:hover { color: var(--gold); }

/* ---------- Apparition au défilement ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* Cascade interne : les portes entrent l'une après l'autre */
.reveal .porte {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in .porte { opacity: 1; transform: none; }
.reveal.in .porte:nth-child(2) { transition-delay: 0.1s; }
.reveal.in .porte:nth-child(3) { transition-delay: 0.2s; }
.reveal.in .porte:nth-child(4) { transition-delay: 0.3s; }

/* Cascade interne : médaillon puis texte sur les engagements */
.reveal .eng-body {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s 0.15s var(--ease), transform 0.8s 0.15s var(--ease);
}
.reveal.in .eng-body { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .reveal .porte,
  .reveal .eng-body { opacity: 1; transform: none; transition: none; }
}

/* ---------- Logo animé (accueil) ---------- */
/* Séquence : le cercle se trace → < s'écrit → S·O·V émergent → /> ferme
   la balise → le filet s'étend → CONSULTING s'espace jusqu'au 0.38em. */

.logo-anim {
  position: relative;
  border: none;           /* le cercle est dessiné par le SVG animé */
  background: var(--bg);  /* occulte l'étoffe de code qui passe derrière */
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.5s var(--ease);
}

.logo-circle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);   /* départ du tracé à midi */
}
.logo-circle circle {
  fill: none;
  stroke: var(--hairline-strong);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke 0.5s var(--ease);
  animation: logo-draw 1.1s var(--ease) forwards;
}

.logo-anim .chev-open,
.logo-anim .chev-close {
  opacity: 0;
  animation: logo-appear 0.5s var(--ease) forwards;
}
.logo-anim .chev-open { animation-delay: 0.85s; }
.logo-anim .chev-close { animation-delay: 1.8s; }

.logo-anim .logo-sov .l {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(4px);
  animation: logo-emerge 0.7s var(--ease) forwards;
}
.logo-anim .logo-sov .l:nth-child(1) { animation-delay: 1.1s; }
.logo-anim .logo-sov .l:nth-child(2) { animation-delay: 1.3s; }
.logo-anim .logo-sov .l:nth-child(3) { animation-delay: 1.5s; }

.logo-anim .rule {
  transform: scaleX(0);
  animation: logo-rule 0.7s 2.05s var(--ease) forwards;
}

.logo-anim .logo-sub {
  opacity: 0;
  letter-spacing: 0.08em;
  animation: logo-track 1.2s 2.3s var(--ease) forwards;
}

@keyframes logo-draw   { to { stroke-dashoffset: 0; } }
@keyframes logo-appear { to { opacity: 1; } }
@keyframes logo-emerge { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes logo-rule   { to { transform: scaleX(1); } }
@keyframes logo-track  { to { opacity: 1; letter-spacing: var(--track-wide); } }

@media (prefers-reduced-motion: reduce) {
  .logo-circle circle,
  .logo-anim .chev-open, .logo-anim .chev-close,
  .logo-anim .logo-sov .l,
  .logo-anim .rule,
  .logo-anim .logo-sub { animation: none; }
  .logo-circle circle { stroke-dashoffset: 0; }
  .logo-anim .chev-open, .logo-anim .chev-close { opacity: 1; }
  .logo-anim .logo-sov .l { opacity: 1; filter: none; transform: none; }
  .logo-anim .rule { transform: none; }
  .logo-anim .logo-sub { opacity: 1; letter-spacing: var(--track-wide); }
}

/* ---------- Portes d'entrée (accueil) ---------- */

.portes {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 4 portes : carré 2×2 */
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
@media (max-width: 560px) {
  .portes { grid-template-columns: 1fr; }
}

.porte {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--bg);
  padding: var(--space-5) var(--space-4) var(--space-4);
  text-decoration: none;
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.porte:hover {
  background: var(--gold-wash);
  box-shadow: inset 0 2px 0 var(--gold); /* liseré d'or, comme les offres */
}

/* Numéro à gauche, pictogramme au trait à droite — le langage des autres pages */
.porte-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.porte .num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 2.3rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.55;
  transition: opacity 0.3s;
}
.porte:hover .num { opacity: 1; }

.porte-icon {
  width: 44px;
  height: 44px;
  flex: none;
  color: var(--gold);
  opacity: 0.6;
  transition: opacity 0.35s, transform 0.45s var(--ease);
}
.porte:hover .porte-icon { opacity: 1; transform: rotate(-4deg) scale(1.06); }

.porte h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0;
  transition: color 0.25s;
}
.porte:hover h3 { color: var(--gold); }

.porte p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  flex: 1;
}

.porte .go {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-sm);
  color: var(--gold);
  transition: transform 0.25s var(--ease);
}
.porte:hover .go { transform: translateX(4px); }

/* ---------- Pages intérieures ---------- */

.page-head {
  border-top: none;
  padding-top: calc(var(--space-7) + var(--space-4));
  background: radial-gradient(55% 70% at 28% 45%, var(--gold-wash), transparent 75%);
}
/* Page sans titre d'accroche : le chapô prend le relais et porte l'ouverture,
   le kicker devient le titre (h2) sans changer d'apparence. */
h2.kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  line-height: 1.4;
}
.page-head.lead-only .lede {
  font-size: clamp(1.3rem, 2.3vw, 1.7rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 24em;
}

.page-head .lede {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 36em;
  margin: 0;
}

.topnav a.active { color: var(--gold); }

/* Contexte d'une étude de cas — en italique serif, comme une dédicace */
.mission .context,
.eng-body .context {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: var(--space-2) 0 var(--space-2);
}

/* Numéro italique en tête de mission, même motif que portes et engagements */
.mnum {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.65;
  margin-right: 0.55rem;
}

/* Note discrète (contenu provisoire, mentions) */
.note {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* ---------- Engagements : compositions médaillon + texte ---------- */

.engagement {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--space-4) clamp(var(--space-5), 6vw, var(--space-7));
  align-items: center;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--hairline);
}
.engagement:first-of-type { border-top: none; padding-top: var(--space-4); }

/* Alternance gauche / droite, une composition sur deux */
.engagement:nth-of-type(even) { grid-template-columns: 1fr 250px; }
.engagement:nth-of-type(even) .eng-figure { order: 2; }

.eng-figure {
  position: relative;
  width: min(230px, 56vw);
  margin: 0 auto;
}

.eng-visual {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--gold-wash), transparent 90%), var(--bg);
  display: grid;
  place-items: center;
  color: var(--gold);
  transition: border-color 0.35s var(--ease), transform 0.45s var(--ease);
}
.engagement:hover .eng-visual { border-color: var(--gold); transform: rotate(-3deg); }
.eng-visual svg { width: 60%; height: 60%; }

/* ---------- L'Arbre (engagements) ---------- */
/* Une bande pleine largeur qui ouvre le chapitre : l'arbre se construit
   quand le visiteur arrive dessus, et l'oiseau vit dedans. */
/* Titre, puis arbre, puis texte. L'ensemble titre + arbre doit tenir dans
   le premier écran : le titre est donc resserré et l'arbre borné. */
.arbre-titre {
  padding-top: calc(var(--space-6) + var(--space-3));   /* dégage la barre fixe */
  padding-bottom: 0;
}
.arbre-titre .section-head { margin-bottom: 0; }

.arbre-scene {
  position: relative;
  margin: var(--space-3) 0 0;
}
.arbre-canvas {
  width: 100%;
  height: min(56vh, 34rem);
  touch-action: pan-y;   /* le doigt fait défiler la page */
}

.arbre-texte {
  border-top: none;
  padding-top: var(--space-3);
}

@media (max-width: 640px) {
  /* le titre passe sur trois lignes : l'arbre se resserre d'autant */
  .arbre-titre { padding-top: var(--space-6); }
  .arbre-canvas { height: min(46vh, 22rem); }
}

.eng-body h3 { font-size: 2rem; }
.eng-body .mission-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: var(--space-3);
}
.eng-body .mission-meta { color: var(--gold); letter-spacing: 0.12em; }
.eng-body > p { font-size: 1rem; margin: 0 0 var(--space-3); line-height: 1.8; }
.eng-body .context {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.eng-body ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}
.eng-body li { margin: 0.55rem 0; }
.eng-body li::marker { color: var(--gold); }

@media (max-width: 700px) {
  .engagement, .engagement:nth-of-type(even) { grid-template-columns: 1fr; }
  .engagement:nth-of-type(even) .eng-figure { order: 0; }
}

/* ---------- Offres (expertise) : grille 2×2 ---------- */

.offers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6) var(--space-6);
}

.offer {
  border-top: 1px solid var(--hairline-strong);
  padding-top: var(--space-4);
  transition: border-color 0.35s;
}
.offer:hover { border-top-color: var(--gold); }

.offer-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.offer-icon {
  width: 52px;
  height: 52px;
  flex: none;
  color: var(--gold);
}

.offer-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.65;
  margin-left: auto;
}

.offer h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}
.offer h3 .chev { font-size: 0.7em; }

.offer > p {
  margin: 0 0 var(--space-3);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Nombre impair d'offres : la dernière prend toute la largeur plutôt que de
   rester orpheline dans sa colonne. */
.offers .offer:last-child:nth-child(odd) { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .offers { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .topnav a:not(.always) { display: none; }
  .burger { display: inline-flex; }
  .mission-meta { white-space: normal; }
}
