/* ==========================================================================
   Djamila Azouane — Direction A « Le Dossier de Spécification »
   Système × Voix : chaque section est en mode système (rail numéroté,
   IBM Plex Sans/Mono, accent ardoise) ou en mode voix (colonne asymétrique,
   Besley, accent rouille). La bascule d'une section à l'autre EST le
   dispositif qui rend visible la double identité SAP × Produit.
   ========================================================================== */

/* ---- Fonts (self-hosted, latin + latin-ext) ---- */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plex-sans-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plex-sans-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plex-sans-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plex-sans-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plex-sans-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plex-sans-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plex-sans-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plex-sans-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plex-mono-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plex-mono-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plex-mono-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plex-mono-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Besley'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/besley-400-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Besley'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/besley-400-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Besley'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/besley-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Besley'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/besley-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Besley'; font-style: italic; font-weight: 600; font-display: swap; src: url('../fonts/besley-600-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Besley'; font-style: italic; font-weight: 600; font-display: swap; src: url('../fonts/besley-600-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Besley'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/besley-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Besley'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/besley-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Besley'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/besley-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Besley'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/besley-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---- Design tokens ---- */
:root {
  --paper: #F3F4F1;
  --paper-2: #E7E9E2;
  --paper-3: #DCDFD6;
  --ink: #14171A;
  --ink-2: #4B524D;
  --border: #D9DCD2;
  --border-2: #7E8577;

  --accent-system: #24344A;
  --accent-system-hover: #33496A;
  --accent-voice: #A03F29;
  --accent-voice-hover: #C2573C;
  /* Troisième accent, dérivé du fond turquoise réel de la photo (teinte 184°),
     assombri pour rester AA sur papier (4.54:1 texte, 4.54:1 fond de bouton).
     Rôle : action/interactivité (CTA, chatbot, contrôles) — distinct du système
     (ardoise = fait/chiffré) et de la voix (rouille = narration). */
  --accent-photo: #157B83;
  --accent-photo-hover: #1D96A0;

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-voice: 'Besley', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;

  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  --radius-sm: 2px;

  --transition: 220ms ease;
  --container-max: 1200px;
  --section-x: clamp(1.5rem, 4vw, 4rem);
  --rail-w: 200px;

  /* Échelle typographique documentée — tout le composant y fait référence,
     plus de tailles ad hoc dispersées. */
  --h1: clamp(2rem, 1.3rem + 2.8vw, 3.25rem);     /* ~52px desktop (réduit) */
  --h2: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);  /* ~36px desktop (réduit) */
  --h3: clamp(1.125rem, 1.05rem + .3vw, 1.3125rem);
  --text-xl: 1.125rem;   /* 18px — titres de carte, question FAQ */
  --text-lg: 1.0625rem;  /* 17px — corps de texte principal */
  --body-lg: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  --text-base: 1rem;     /* 16px — corps secondaire */
  --text-sm: .875rem;    /* 14px — UI compacte (nav, footer) */
  --text-xs: .75rem;     /* 12px — labels mono, légendes, minimum absolu */
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; background: none; border: none; padding: 0; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-2); top: -60px;
  background: var(--accent-system); color: var(--paper);
  padding: .75rem 1.25rem; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-weight: 600; text-decoration: none;
  z-index: 1000; transition: top var(--transition);
}
.skip-link:focus { top: var(--space-2); }

:focus-visible { outline: 2px solid var(--accent-system); outline-offset: 3px; }

em { font-style: italic; }
.voice { font-family: var(--font-voice); font-style: italic; color: var(--accent-voice); font-weight: 400; }

h1, h2, h3 { font-family: var(--font-sans); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--text-xl); }
.voice-mode h2, .voice-mode h3 { font-family: var(--font-voice); font-weight: 400; font-style: normal; }

/* ---- Buttons (coin coupé — pas de pilule arrondie) ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 1.85rem; font-family: var(--font-sans); font-weight: 600; font-size: .9375rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.btn--primary { background: var(--accent-photo); color: var(--paper); }
.btn--primary:hover { background: var(--accent-photo-hover); transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(21,123,131,.5); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn--outline:hover { border-color: var(--accent-system); color: var(--accent-system); }
.btn--voice { background: var(--accent-voice); color: var(--paper); }
.btn--voice:hover { background: var(--accent-voice-hover); transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(160,63,41,.5); }
.btn--large { padding: 1.1rem 2.35rem; font-size: 1rem; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent-system); }

.tag {
  font-family: var(--font-mono); font-size: var(--text-xs); padding: .3rem .8rem;
  border: 1px solid var(--border-2); color: var(--ink-2); background: none; border-radius: var(--radius-sm);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.card:hover .tag { border-color: var(--accent-photo); color: var(--ink); }
button.tag { cursor: pointer; }
button.tag:hover { border-color: var(--accent-photo); color: var(--ink); }
button.tag.is-active { background: var(--accent-photo); border-color: var(--accent-photo); color: var(--paper); }
button.tag:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent-system); }

.realisations__filters { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-4) 0 var(--space-5); }
.realisations__filter-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.realisations__empty { color: var(--ink-2); padding: var(--space-4) 0; }

/* ---- Page de cas (détail) ---- */
.case-detail__back { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-2); text-decoration: none; }
.case-detail__back:hover { color: var(--accent-photo); }
.case-detail__hero { margin: var(--space-4) 0; border-radius: var(--radius-sm); }
.case-detail__hero img { width: 100%; height: auto; display: block; }
.case-detail__hero .case-visual__frame { height: auto; }
.case-detail__body { max-width: 42rem; }
.case-detail__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--space-3); margin: var(--space-5) 0; max-width: 42rem; }
.case-detail__fact dt { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent-system); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .3rem; }
.case-detail__fact dd { margin: 0; font-size: var(--text-base); }
.case-detail__result { max-width: 42rem; margin-top: var(--space-4); }
.case-detail__cta { margin-top: var(--space-6); }
h1:focus-visible { outline: none; }

/* ---- Carte unifiée : même filet, même rayon, même padding sur § 01/02/03 + témoignages ---- */
.card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: var(--space-4); display: flex; flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover, .card:focus-within {
  border-color: var(--accent-system); transform: translateY(-3px);
  box-shadow: 0 8px 20px -12px rgba(20,23,26,.25);
}
.voice-mode .card:hover, .voice-mode .card:focus-within, .card--voice:hover, .card--voice:focus-within {
  border-color: var(--accent-voice);
}

/* ---- Ancres de section : compense le header sticky pour le scroll (clic nav + scroll-to-hash) ---- */
section[id] { scroll-margin-top: 6rem; }

/* ---- Rail (mode système) / Voice (mode voix) layout primitives ---- */
/* ---- Slides (scroll-snap) — chaque section principale s'aligne en plein écran,
   le contenu qui dépasse scrolle normalement à l'intérieur avant de passer à la suivante ---- */
.slide { min-height: 100vh; scroll-snap-align: start; scroll-margin-top: 6rem; }
.hero.slide, .about.slide, .rail-section.slide { align-content: center; }
.stats.slide, .voice-section.slide, .testimonials.slide { display: flex; flex-direction: column; justify-content: center; }

.rail-section {
  max-width: var(--container-max); margin: 0 auto;
  padding: var(--space-7) var(--section-x);
  display: grid; grid-template-columns: var(--rail-w) 1fr; gap: var(--space-6);
}
.rail-section__rail { border-right: 1px solid var(--border); padding-right: var(--space-4); }
.rail__number { font-family: var(--font-mono); font-size: 2.25rem; font-weight: 500; color: var(--accent-system); line-height: 1; margin-bottom: var(--space-4); }
.rail__meta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-2); line-height: 2; }
.rail__meta span { display: block; }
.rail-section__content { min-width: 0; }
.rail-section__intro { font-size: var(--body-lg); color: var(--ink-2); max-width: 38rem; margin-top: var(--space-2); font-weight: 400; }
.section-kicker { font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: .04em; color: var(--accent-photo); margin-bottom: var(--space-2); text-transform: uppercase; }

.voice-section { padding: var(--space-7) var(--section-x); }
.voice-section__content { max-width: 40rem; margin-left: auto; margin-right: 0; }
.voice-section__content p { font-family: var(--font-voice); font-size: var(--body-lg); color: var(--ink-2); line-height: 1.75; margin-bottom: var(--space-3); }
.voice-section__content p strong { color: var(--ink); font-weight: 600; }

.section--alt {
  background-color: var(--paper-2);
  background-image: radial-gradient(rgba(20,23,26,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(243,244,241,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--container-max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-2) var(--section-x);
}
.nav__logo {
  font-family: var(--font-sans); font-size: 1.25rem; font-weight: 700;
  text-decoration: none; color: var(--ink); letter-spacing: -.01em;
}
.nav__logo-dot { color: var(--accent-voice); }
.nav__toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; cursor: pointer;
}
.nav__toggle-bar { width: 22px; height: 2px; background: var(--ink); transition: transform var(--transition), opacity var(--transition); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__list { display: flex; gap: var(--space-4); }
.nav__link {
  font-family: var(--font-sans); font-size: var(--text-base); font-weight: 500; text-decoration: none; color: var(--ink-2);
  transition: color var(--transition); position: relative; padding-bottom: 2px;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent-photo); transition: right var(--transition);
}
.nav__link:hover { color: var(--accent-photo); }
.nav__link:hover::after, .nav__link[aria-current="true"]::after { right: 0; }
.nav__link[aria-current="true"] { color: var(--accent-photo); font-weight: 600; }
.nav__lang-link {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600;
  border: 1px solid var(--border-2); padding: .3rem .55rem; letter-spacing: .04em;
}
.nav__lang-link::after { display: none; }
.nav__lang-link:hover { border-color: var(--accent-system); background: var(--paper-2); }
.nav__list-cta { display: none; }

.nav { transition: padding var(--transition); }
.site-header.is-scrolled .nav { padding-top: .5rem; padding-bottom: .5rem; }
.site-header.is-scrolled .nav__logo { font-size: 1.05rem; }
.nav__logo { transition: font-size var(--transition); }

.nav__item--dropdown { position: relative; }
.nav__dropdown-trigger {
  display: inline-flex; align-items: center; gap: .35rem;
  background: none; border: none; margin: 0; cursor: pointer;
}
.nav__dropdown-caret { font-size: .7em; transition: transform var(--transition); }
.nav__dropdown-trigger[aria-expanded="true"] .nav__dropdown-caret { transform: rotate(180deg); }
.nav__dropdown {
  position: absolute; top: calc(100% + var(--space-3)); left: 50%; transform: translateX(-50%);
  grid-template-columns: repeat(2, 14rem); gap: var(--space-4);
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: var(--space-4); box-shadow: 0 20px 40px -16px rgba(20,23,26,.35);
}
.nav__dropdown[hidden] { display: none; }
.nav__dropdown:not([hidden]) { display: grid; }
.nav__dropdown-heading { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em; color: var(--accent-photo); text-transform: uppercase; margin-bottom: var(--space-2); }
.nav__dropdown-col { display: flex; flex-direction: column; }
.nav__dropdown-link {
  display: block; font-family: var(--font-sans); font-size: var(--text-base); color: var(--ink);
  text-decoration: none; padding: .5rem 0; border-top: 1px solid var(--border);
}
.nav__dropdown-col .nav__dropdown-link:first-of-type { border-top: none; }
.nav__dropdown-link:hover, .nav__dropdown-link:focus-visible { color: var(--accent-photo); }

/* ---- Hero ---- */
.hero {
  max-width: var(--container-max); margin: 0 auto;
  padding: var(--space-6) var(--section-x) var(--space-6);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--space-6);
  align-items: start;
}
/* État initial de la timeline d'entrée du hero (identique SSR/client, pas de mismatch d'hydratation) —
   la classe est retirée en JS après montage, animée ou non selon prefers-reduced-motion. */
.hero-anim-init { opacity: 0; transform: translateY(16px); }
.hero__portrait { align-self: center; }
.hero__portrait .portrait-frame { max-width: 340px; }
.hero__eyebrow {
  font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: .04em;
  color: var(--accent-system); margin-bottom: var(--space-3);
  border-top: 1px solid var(--border); padding-top: var(--space-2);
}
.hero__title { font-size: var(--h1); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; margin-bottom: var(--space-3); }
.hero__subtitle { font-size: var(--body-lg); color: var(--ink-2); font-weight: 400; max-width: 38rem; margin-bottom: var(--space-4); }
.hero__actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.hero__microcopy { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-2); }
.hero__portrait { display: flex; justify-content: flex-end; }

/* Animation d'entrée du hero et des titres de slide pilotée par Anime.js (voir js/animations.js).
   Aucun état caché imposé par CSS : si le script échoue à charger, tout reste visible normalement. */

/* ---- Cadre portrait (repères d'angle façon marques de coupe) ---- */
.portrait-frame {
  position: relative; width: 100%; max-width: 300px; aspect-ratio: 4/5;
  background: repeating-linear-gradient(135deg, var(--paper-3), var(--paper-3) 5px, var(--paper-2) 5px, var(--paper-2) 10px);
  border: 1px solid var(--border);
}
.portrait-frame--sm { max-width: 220px; }
.portrait-frame picture { display: block; width: 100%; height: 100%; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-frame__corner { position: absolute; width: 14px; height: 14px; }
.portrait-frame__corner--tl { top: -9px; left: -9px; border-top: 1.5px solid var(--accent-photo); border-left: 1.5px solid var(--accent-photo); }
.portrait-frame__corner--tr { top: -9px; right: -9px; border-top: 1.5px solid var(--accent-photo); border-right: 1.5px solid var(--accent-photo); }
.portrait-frame__corner--bl { bottom: -9px; left: -9px; border-bottom: 1.5px solid var(--accent-photo); border-left: 1.5px solid var(--accent-photo); }
.portrait-frame__corner--br { bottom: -9px; right: -9px; border-bottom: 1.5px solid var(--accent-photo); border-right: 1.5px solid var(--accent-photo); }
.portrait-frame__caption {
  margin-top: .6rem; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-photo); text-align: right;
}
.portrait-frame-wrap { display: inline-block; }
.portrait-annotations {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-3);
  margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border);
}
.portrait-annotation {
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-2);
  text-align: right; line-height: 1.4;
}
.portrait-annotation strong {
  display: block; font-size: var(--text-lg); font-weight: 600; color: var(--accent-system); line-height: 1.2;
}

/* backward-compat alias used by JS-free placeholder markup */
.portrait-placeholder { display: none; }

/* ---- Marquee ---- */
.marquee { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: var(--space-3) 0; overflow: hidden; }
.marquee__track { display: flex; flex-wrap: nowrap; width: max-content; gap: var(--space-4); }
.marquee__item { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; padding: 0 var(--space-2); }
.js .marquee__track { animation: marquee-scroll 32s linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Stats ---- */
.stats { max-width: var(--container-max); margin: 0 auto; padding: var(--space-7) var(--section-x); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { padding: var(--space-4) 0; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat__number { font-family: var(--font-sans); font-size: clamp(2.25rem, 1.8rem + 1.8vw, 3.25rem); font-weight: 700; color: var(--accent-system); letter-spacing: -.02em; }
.stat__label { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-2); margin-top: .5rem; }
.sectors { text-align: center; }
.sectors__label {
  font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-2); margin-bottom: var(--space-2);
}
.sectors__list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }

/* ---- Promesse (mode voix) ---- */
.promise .voice-section__content { max-width: 34rem; }
.promise h2 { margin-bottom: var(--space-3); font-size: var(--h2); }
.promise .signed { font-family: var(--font-mono); font-size: .8125rem; color: var(--accent-voice); margin-top: var(--space-3); }

/* ---- Services (mode système) ---- */
.services__toggle { display: none; }
.js .services__toggle { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.services__toggle-btn {
  font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em;
  padding: .6rem 1.1rem; border: 1px solid var(--border-2); background: transparent; color: var(--ink-2);
  cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.services__toggle-btn:hover { border-color: var(--accent-photo); color: var(--ink); }
.services__toggle-btn.is-active { background: var(--accent-photo); border-color: var(--accent-photo); color: var(--paper); }
.services__toggle-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent-system); }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-top: var(--space-5); }
.services__grid--offers { grid-template-columns: repeat(2, 1fr); }
.service-card.is-emphasized { border-color: var(--accent-photo); box-shadow: 0 8px 20px -12px rgba(20,23,26,.25); }
.service-card__index { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent-system); letter-spacing: .06em; margin-bottom: var(--space-3); }
.service-card__visual { aspect-ratio: 16 / 10; margin-bottom: var(--space-3); border-radius: var(--radius-sm); overflow: hidden; }
.service-card__title { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.service-card__desc { color: var(--ink-2); font-size: var(--text-lg); font-weight: 400; line-height: 1.7; margin-bottom: var(--space-3); }
.service-card__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.service-card__link {
  display: inline-flex; align-items: center; gap: .35rem; margin-top: auto;
  font-family: var(--font-sans); font-weight: 600; font-size: var(--text-base);
  color: var(--accent-photo); text-decoration: none; transition: gap var(--transition), color var(--transition);
}
.service-card__link:hover { gap: .55rem; color: var(--accent-photo-hover); }

/* ---- About (mode voix, mise en page portrait+bio propre) ---- */
.about {
  max-width: var(--container-max); margin: 0 auto; padding: var(--space-7) var(--section-x);
  display: grid; grid-template-columns: .65fr 1.35fr; gap: var(--space-6); align-items: start;
}
.about__portrait { display: flex; flex-direction: column; align-items: flex-start; }
.about__badge {
  margin-top: var(--space-3); font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--ink-2); border: 1px solid var(--border); padding: .6rem .8rem; max-width: 220px; line-height: 1.6;
}
.about__manifesto {
  font-family: var(--font-voice); font-style: italic; font-size: var(--text-xl);
  color: var(--accent-voice); line-height: 1.5; margin: var(--space-3) 0 var(--space-4);
  border-left: 2px solid var(--accent-voice); padding-left: var(--space-3);
}
.about__bio { margin: var(--space-3) 0 var(--space-4); }
.about__bio p { font-family: var(--font-voice); font-size: var(--body-lg); color: var(--ink-2); line-height: 1.75; margin-bottom: var(--space-3); }
.about__skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.skill { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-2); display: flex; align-items: center; gap: .6rem; }
.skill::before { content: '—'; color: var(--accent-system); }

/* ---- Process (mode système) ---- */
.process__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-top: var(--space-5); }
.process-step__index { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--accent-system); margin-bottom: var(--space-2); }
.process-step__title { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.process-step__desc { font-size: var(--text-base); color: var(--ink-2); line-height: 1.7; }

/* ---- Portfolio (mode système, fiches techniques) ---- */
.portfolio__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-top: var(--space-5); }
.spec-card { padding: 0; overflow: hidden; }
.spec-card__meta {
  display: flex; justify-content: space-between; gap: var(--space-2);
  padding: .6rem var(--space-3); background: var(--accent-system); color: var(--paper);
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .04em; text-transform: uppercase;
}
.spec-card__title { padding: var(--space-3) var(--space-3) 0; font-size: var(--text-xl); margin-bottom: .5rem; }
.spec-card__desc { padding: 0 var(--space-3); font-size: var(--text-base); color: var(--ink-2); line-height: 1.6; flex-grow: 1; }
.spec-card__body { display: flex; flex-direction: column; flex-grow: 1; }
.spec-card__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--border); }
.spec-card__result { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent-system); font-weight: 600; }
.spec-card__vignette { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform var(--transition); }
.card:hover .spec-card__vignette { transform: scale(1.12); }
.spec-card__vignette-ring { background: conic-gradient(var(--accent-system) calc(var(--pct, 0) * 1%), var(--paper-3) 0); }
.spec-card__vignette-ring::after { content: ''; display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--paper); }
.spec-card__vignette-trend {
  border: 1.5px solid var(--accent-photo); position: relative;
}
.spec-card__vignette-trend::before {
  content: '↗'; color: var(--accent-photo); font-size: 1.125rem; font-weight: 700;
}

/* ---- Formulaire de capture email ---- */
.lead-form { max-width: 32rem; }
.lead-form__promise { color: var(--ink-2); margin-bottom: var(--space-3); }
.lead-form__row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.lead-form__input {
  flex: 1; min-width: 12rem; font-family: var(--font-sans); font-size: var(--text-base);
  padding: .75rem var(--space-3); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
}
.lead-form__input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent-system); border-color: var(--accent-system); }
.lead-form__input[aria-invalid="true"] { border-color: var(--accent-voice); }
.lead-form__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-form__consent { display: flex; align-items: flex-start; gap: .5rem; margin-top: var(--space-3); font-size: var(--text-sm); color: var(--ink-2); line-height: 1.5; }
.lead-form__consent input { margin-top: .2rem; flex-shrink: 0; }
.lead-form__consent a { color: var(--accent-system); text-decoration: underline; }
.lead-form__error { color: var(--accent-voice); font-size: var(--text-sm); margin-top: var(--space-2); }
.lead-form__success { font-family: var(--font-sans); font-weight: 600; color: var(--accent-photo); }

.newsletter-footer { max-width: var(--container-max); margin: 0 auto; padding: var(--space-5) var(--section-x); border-top: 1px solid var(--border); }
.newsletter-footer__title { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-2); margin-bottom: var(--space-3); }
.newsletter-footer .lead-form__promise { display: none; }

/* ---- Grille /notes ---- */
.note-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.note-card__footer { padding: 0 var(--space-3) var(--space-3); margin-top: auto; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-2); }
.notes__filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0 var(--space-5); }
.note-detail__date { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-2); margin-bottom: var(--space-4); }
.note-detail__body p { margin-bottom: var(--space-3); }
.note-detail__body blockquote {
  border-left: 3px solid var(--accent-voice); padding: var(--space-2) var(--space-3);
  background: var(--paper-2); color: var(--ink-2); margin: var(--space-4) 0; font-style: italic;
}
.note-detail__cta { margin: var(--space-6) 0; padding: var(--space-5); background: var(--paper-2); border-radius: var(--radius-sm); }
.note-detail__related { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.note-detail__related h2 { font-size: var(--h3); margin-bottom: var(--space-3); }
.note-detail__related ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.note-detail__related a { color: var(--accent-photo); text-decoration: none; font-weight: 600; }
.note-detail__related a:hover { text-decoration: underline; }

/* ---- Grille /realisations (cartes cliquables, portage Next.js) ---- */
.portfolio__grid-item { list-style: none; height: 100%; }
.spec-card__link-wrap { display: flex; height: 100%; text-decoration: none; color: inherit; }
.spec-card__link-wrap .spec-card { flex: 1; width: 100%; }
.spec-card__image-wrap { aspect-ratio: 16 / 10; }
.spec-card__image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-visual__frame { width: 100%; height: 100%; display: block; }
.case-visual__frame svg { width: 100%; height: 100%; display: block; }
.case-visual__caption {
  margin-top: .6rem; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-photo); text-align: right;
}
.case-card__cta {
  font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm);
  color: var(--accent-photo); margin: 0 var(--space-3) var(--space-3);
}
/* Sur tactile (pas de vrai hover), le CTA et le résultat restent visibles en permanence —
   pas d'info cachée derrière une interaction qui n'existe pas au doigt. */
@media not all and (hover: hover) and (pointer: fine) {
  .case-card__cta, .spec-card__result { opacity: 1 !important; transform: none !important; }
}

/* ---- Témoignages (mode voix) ---- */
.testimonials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); margin-top: var(--space-5); }
.testimonial { padding: var(--space-5); border-top: 2px solid var(--accent-voice); }
.testimonial__rating { color: var(--accent-voice); letter-spacing: .1em; margin-bottom: var(--space-3); font-size: var(--text-base); }
.testimonial__quote { font-family: var(--font-voice); font-style: italic; font-size: var(--text-lg); color: var(--ink-2); line-height: 1.7; margin-bottom: var(--space-3); flex-grow: 1; }
.testimonial__author { display: flex; align-items: center; gap: .875rem; padding-top: var(--space-3); border-top: 1px solid var(--border); margin-top: auto; }
.testimonial__avatar {
  width: 52px; height: 52px; background: var(--paper-3); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
  font-family: var(--font-sans); font-weight: 700; font-size: var(--text-base); border: 1px solid var(--border-2);
  transition: transform var(--transition), border-color var(--transition);
}
.testimonial:hover .testimonial__avatar { transform: scale(1.08); border-color: var(--accent-photo); }
.testimonial__avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial__name { font-family: var(--font-sans); font-weight: 700; font-size: var(--text-base); }
.testimonial__role { font-size: var(--text-xs); color: var(--ink-2); font-family: var(--font-mono); }

/* ---- FAQ (mode système) ---- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item__trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) 0; text-align: left; cursor: pointer;
}
.faq-item__trigger span:first-child {
  font-family: var(--font-sans); font-weight: 500; font-size: var(--text-xl);
  transition: color var(--transition);
}
.faq-item__trigger:hover span:first-child { color: var(--accent-system); }
.faq-item__icon {
  width: 28px; height: 28px; border: 1px solid var(--border-2); font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: var(--text-lg); color: var(--accent-photo);
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}
.faq-item__trigger:hover .faq-item__icon { border-color: var(--accent-photo); }
.faq-item__panel p { font-family: var(--font-sans); font-size: var(--text-lg); color: var(--ink-2); line-height: 1.7; font-weight: 400; }

.js .faq-item__panel { max-height: 0; overflow: hidden; padding-bottom: 0; transition: max-height .35s ease, padding-bottom .35s ease; }
.js .faq-item__panel.is-open { max-height: 20rem; padding-bottom: var(--space-3); }
.faq-item__trigger[aria-expanded="true"] .faq-item__icon { transform: rotate(45deg); background: var(--accent-photo); color: var(--paper); border-color: var(--accent-photo); }

/* ---- Pages formation (LinkedIn / WordPress) ---- */
.formation-hero__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-4); }
.formation-list { display: flex; flex-direction: column; gap: var(--space-2); }
.formation-list li { font-size: var(--text-lg); color: var(--ink-2); line-height: 1.6; padding-left: 1.1em; position: relative; }
.formation-list li::before { content: '—'; position: absolute; left: 0; color: var(--accent-photo); }
.formation-list strong { color: var(--ink); font-weight: 600; }
.formation-redirect { margin-top: var(--space-3); font-size: var(--text-base); color: var(--ink-2); font-style: italic; }
.formation-deliverables { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-4); border-top: 1px solid var(--border); padding-top: var(--space-4); }
.formation-deliverables__index { display: block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent-system); letter-spacing: .06em; margin-bottom: var(--space-2); }
.formation-deliverables p { font-size: var(--text-base); color: var(--ink); }
.formation-quote-card { justify-content: center; }
.formation-quote-card p { font-family: var(--font-voice); font-style: italic; font-size: var(--text-xl); color: var(--ink); line-height: 1.5; }

/* ---- CTA final (mode voix) ---- */
.cta-final .voice-section__content { max-width: 34rem; }
.cta-final h2 { margin-bottom: var(--space-3); font-size: var(--h2); }
.cta-final__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin: var(--space-4) 0; }
.voice-section__content p.cta-final__contact { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-2); }
.cta-final__contact a { text-decoration: none; }
.cta-final__contact a:hover { color: var(--accent-system); }

/* ---- Footer ---- */
.site-footer {
  max-width: var(--container-max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3);
  padding: var(--space-5) var(--section-x); border-top: 1px solid var(--border);
}
.footer__logo { font-family: var(--font-sans); font-size: 1.125rem; font-weight: 700; }
.footer__nav { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.footer__nav a { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--ink-2); text-decoration: none; transition: color var(--transition); }
.footer__nav a:hover { color: var(--accent-system); }
.footer__copyright { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-2); }

/* ---- CTA persistant mobile (apparaît au scroll, sous la ligne du hero) ---- */
.mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  padding: var(--space-2) var(--section-x); background: rgba(243,244,241,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  transform: translateY(100%); transition: transform var(--transition);
}
.mobile-cta.is-visible { transform: translateY(0); }
.mobile-cta .btn { width: 100%; justify-content: center; }
@media (max-width: 768px) { .mobile-cta { display: block; } }

/* ---- Assistant conversationnel (bot scripté, sans backend) ---- */
.chatbot { display: none; }
.js .chatbot { display: block; }

.chatbot__toggle {
  position: fixed; right: var(--space-3); bottom: 1.5rem; z-index: 600;
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-photo); color: var(--paper); border: none; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500;
  box-shadow: 0 8px 20px -8px rgba(20,23,26,.4);
  transition: background var(--transition), transform var(--transition);
}
.chatbot__toggle:hover { background: var(--accent-photo-hover); transform: translateY(-2px); }
.chatbot__toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent-photo); }
.chatbot__toggle[aria-expanded="true"] .chatbot__toggle-icon { transform: rotate(45deg); }
.chatbot__toggle-icon { display: inline-block; transition: transform var(--transition); line-height: 1; }

.chatbot__panel {
  position: fixed; right: var(--space-3); bottom: calc(1.5rem + 68px); z-index: 600;
  width: min(360px, calc(100vw - 2 * var(--space-3))); max-height: min(32rem, calc(100vh - 8rem));
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--border-2);
  box-shadow: 0 20px 40px -16px rgba(20,23,26,.35);
}
.chatbot__panel[hidden] { display: none; }
.chatbot__header {
  display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.chatbot__title { font-family: var(--font-sans); font-weight: 700; font-size: var(--text-sm); margin-right: auto; }
.chatbot__langs { display: flex; gap: .3rem; }
.chatbot__lang {
  font-family: var(--font-mono); font-size: var(--text-xs); padding: .25rem .5rem;
  border: 1px solid var(--border-2); background: transparent; color: var(--ink-2); cursor: pointer;
}
.chatbot__lang.is-active { background: var(--accent-photo); border-color: var(--accent-photo); color: var(--paper); }
.chatbot__lang:focus-visible, .chatbot__close:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent-photo); }
.chatbot__close {
  font-size: 1.25rem; line-height: 1; background: transparent; border: none; color: var(--ink-2);
  cursor: pointer; padding: .1rem .35rem;
}
.chatbot__close:hover { color: var(--ink); }
.chatbot__body { padding: var(--space-3); overflow-y: auto; flex-grow: 1; }
.chatbot__greeting { font-size: var(--text-sm); color: var(--ink-2); margin-bottom: var(--space-3); line-height: 1.6; }
.chatbot__response {
  font-size: var(--text-sm); color: var(--ink); line-height: 1.65; margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3); background: var(--paper-2); border-inline-start: 2px solid var(--accent-system);
}
.chatbot__menu { display: flex; flex-direction: column; gap: .5rem; }
.chatbot__option {
  font-family: var(--font-sans); font-size: var(--text-sm); text-align: left; padding: .7rem .9rem;
  border: 1px solid var(--border-2); background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.chatbot__option:hover { border-color: var(--accent-system); background: var(--paper-2); }
.chatbot__option:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent-system); }
.chatbot__option--cta { border-color: var(--accent-photo); color: var(--accent-photo); font-weight: 600; }
.chatbot__option--cta:hover { background: var(--accent-photo); color: var(--paper); }
.chatbot[dir="rtl"] .chatbot__option, .chatbot__panel[dir="rtl"] .chatbot__option { text-align: right; }

@media (max-width: 768px) {
  .chatbot__toggle { bottom: 6.25rem; }
  .chatbot__panel { bottom: calc(6.25rem + 68px); }
}

/* ---- Page 404 ---- */
.error-page {
  max-width: 40rem; margin: 0 auto; padding: var(--space-8) var(--section-x);
  min-height: 60vh; display: flex; flex-direction: column; justify-content: center;
}
.error-page__title { font-family: var(--font-sans); font-size: var(--h1); font-weight: 700; margin: var(--space-2) 0 var(--space-3); }
.error-page__text { font-size: var(--body-lg); color: var(--ink-2); margin-bottom: var(--space-4); }
.error-page__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ==========================================================================
   Responsive : le rail devient un bandeau horizontal, la colonne asymétrique
   repasse pleine largeur.
   ========================================================================== */

@media (max-width: 1120px) {
  .nav__toggle { display: flex; }
  .nav__cta { display: none; }
  .nav__list {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow-y: auto; opacity: 0;
    transition: max-height var(--transition), opacity var(--transition);
  }
  .nav__toggle[aria-expanded="true"] ~ .nav__list { max-height: calc(100vh - 65px); opacity: 1; }
  .nav__list .nav__link { display: block; padding: var(--space-2) var(--section-x); border-top: 1px solid var(--border); }
  .nav__list .nav__dropdown-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .nav__list-cta { display: block; margin: var(--space-2) var(--section-x) var(--space-3); }
  .nav__list-cta .btn { width: 100%; justify-content: center; }

  .nav__dropdown {
    position: static; transform: none; display: block; grid-template-columns: none;
    background: var(--paper-2); box-shadow: none; border: none; border-radius: 0;
    padding: 0 var(--section-x); max-height: 0; overflow: hidden; transition: max-height var(--transition);
  }
  .nav__dropdown[hidden] { display: block; }
  .nav__dropdown:not([hidden]) { display: block; max-height: 40rem; padding-top: var(--space-2); padding-bottom: var(--space-3); }
  .nav__dropdown-col + .nav__dropdown-col { margin-top: var(--space-3); }
  .nav__dropdown-link { border-top: 1px solid var(--border); }
  .nav__dropdown-col .nav__dropdown-link:first-of-type { border-top: none; }
}

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero__portrait { order: -1; justify-content: flex-start; margin-bottom: var(--space-4); }
  .portrait-frame { max-width: 220px; }
  .about { grid-template-columns: 1fr; }
  .about__portrait { flex-direction: row; align-items: flex-end; gap: var(--space-4); }
  .rail-section { grid-template-columns: 1fr; gap: var(--space-3); }
  .rail-section__rail { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: var(--space-3); display: flex; align-items: baseline; gap: var(--space-3); }
  .rail__number { margin-bottom: 0; }
  .rail__meta { display: flex; gap: var(--space-3); line-height: 1.4; }
  .services__grid { grid-template-columns: 1fr; }
  .portfolio__grid, .testimonials__grid { grid-template-columns: repeat(2, 1fr); }
  .process__steps { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-5); }
  .voice-section__content { max-width: 34rem; }
}

@media (max-width: 768px) {
  :root { --section-x: 1.25rem; }
  .rail-section, .hero, .stats, .promise, .about, .cta-final {
    padding-top: var(--space-6); padding-bottom: var(--space-6);
  }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border); }
  .stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat:nth-child(even) { border-right: none; }
  .portfolio__grid, .testimonials__grid { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: 1fr; row-gap: var(--space-4); }
  .about__skills { grid-template-columns: 1fr; }
  .about__portrait { flex-direction: column; align-items: flex-start; }
  .hero__actions { align-items: stretch; width: 100%; }
  .hero__actions .btn { justify-content: center; text-align: center; }
  .cta-final__actions { flex-direction: column; }
  .cta-final__actions .btn { justify-content: center; }
  .voice-section__content { max-width: 100%; margin-left: 0; }
  .site-footer { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .marquee__track { gap: var(--space-3); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}

/* ==========================================================================
   Reveal au scroll + compteurs (accordéon FAQ et marquee gérés ci-dessus)
   ========================================================================== */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js .reveal--d1.is-visible { transition-delay: .05s; }
.js .reveal--d2.is-visible { transition-delay: .15s; }
.js .reveal--d3.is-visible { transition-delay: .25s; }
.js .reveal--d4.is-visible { transition-delay: .35s; }
.js .reveal--d5.is-visible { transition-delay: .45s; }
.js .reveal--d6.is-visible { transition-delay: .55s; }
.js .reveal--d7.is-visible { transition-delay: .65s; }
.js .reveal--d8.is-visible { transition-delay: .75s; }
.js .reveal--d9.is-visible { transition-delay: .85s; }

/* ---- Popup de réservation (déclenché après un certain % de scroll, une fois par session) ---- */
.promo-modal[hidden] { display: none; }
.promo-modal { position: fixed; inset: 0; z-index: 800; display: flex; align-items: center; justify-content: center; padding: var(--space-3); }
.promo-modal__backdrop { position: absolute; inset: 0; background: rgba(20,23,26,.55); }
.promo-modal__dialog {
  position: relative; background: var(--paper); border: 1px solid var(--border-2);
  max-width: 26rem; width: 100%; padding: var(--space-5); box-shadow: 0 24px 48px -16px rgba(20,23,26,.4);
}
.promo-modal__close {
  position: absolute; top: var(--space-3); right: var(--space-3); background: transparent; border: none;
  font-size: 1.5rem; line-height: 1; color: var(--ink-2); cursor: pointer; padding: .2rem .5rem;
}
.promo-modal__close:hover { color: var(--ink); }
.promo-modal__eyebrow {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .04em;
  color: var(--accent-system); margin-bottom: var(--space-2);
}
.promo-modal__title { font-size: var(--h3); font-weight: 600; margin-bottom: var(--space-2); padding-right: var(--space-4); }
.promo-modal__text { color: var(--ink-2); font-size: var(--text-base); line-height: 1.6; margin-bottom: var(--space-4); }
.promo-modal__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.promo-modal__dismiss {
  font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-2); background: none;
  border: none; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.promo-modal__dismiss:hover { color: var(--ink); }
.promo-modal__dialog:focus-visible { outline: none; }
@media (prefers-reduced-motion: no-preference) {
  .promo-modal__dialog { animation: promo-modal-in .3s ease both; }
}
@keyframes promo-modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
