/* ==============================================
   PORTFOLIO — BASTIEN GAUTHIER
   Design system v3 · Carnet de bord éditorial
   EB Garamond (serif display & body) + Special Elite (typewriter) + JetBrains Mono
   Palette : abysse + parchemin + ambre lampe de quart
   ============================================== */

@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/eb-garamond-normal-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: 'EB Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/eb-garamond-normal-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: 'EB Garamond';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/eb-garamond-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: 'EB Garamond';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/eb-garamond-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: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/special-elite-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: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/special-elite-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-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;
}

/* ==============================================
   TOKENS — palette navale subtile
   Le DS a une dominante dark (carnet de bord d'un poste de quart).
   Variables sémantiques au-dessus, palette brute en dessous.
   ============================================== */
:root {
  /* ── Palette brute (raw) ── */
  --raw-abysse:        #08172A;  /* fond profond, encre de poste */
  --raw-abysse-soft:   #0F2138;  /* surface secondaire */
  --raw-abysse-deep:   #050E1A;  /* contraste, footer */
  --raw-parchment:     #E8DFC8;  /* parchemin marin, texte principal */
  --raw-parchment-dim: #B8B0A0;  /* texte adouci */
  --raw-amber:         #C8B27A;  /* ambre lampe de quart, accent principal */
  --raw-amber-soft:    rgba(200, 178, 122, 0.18);
  --raw-amber-line:    rgba(200, 178, 122, 0.4);
  --raw-alert:         #B8442C;  /* rouge correcteur navy */
  --raw-alert-soft:    rgba(184, 68, 44, 0.3);
  --raw-steel:         #6F8499;  /* acier bleuté, texte secondaire */
  --raw-steel-dim:     #4A6178;  /* règles, séparateurs */

  /* ── Sémantique (utilisée dans les composants) ── */
  --bg:       var(--raw-abysse);
  --surface:  var(--raw-abysse-soft);
  --surface2: var(--raw-abysse-deep);

  --text:     var(--raw-parchment);
  --muted:    var(--raw-parchment-dim);
  --subtle:   var(--raw-steel);

  --border:        rgba(200, 178, 122, 0.18);
  --border-strong: rgba(200, 178, 122, 0.4);
  --rule:          rgba(111, 132, 153, 0.3);

  --accent:        var(--raw-amber);
  --accent-strong: #D4C089;
  --accent-light:  var(--raw-amber-soft);
  --accent-mid:    var(--raw-amber-line);

  --highlight:       var(--accent);
  --highlight-light: var(--raw-amber-soft);
  --on-accent:       var(--bg);

  --focus: rgba(200, 178, 122, 0.55);

  /* ── Typographie ── */
  --font-display:    'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body:       'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-typewriter: 'Special Elite', 'Courier New', monospace;
  --font-mono:       'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  --font-size-body: 16px;
  --font-size-card: 16px;
  --font-size-card-compact: 15px;
  --font-size-meta: 12px;
  --font-size-ui: 15px;
  --line-readable: 1.68;
  --line-card: 1.62;

  /* ── Radius — minimal, on est en typo, pas en cards ── */
  --radius-sm:  3px;
  --radius:     4px;
  --radius-lg:  6px;

  /* ── Shadows — pas d'ombre lourde, on n'est pas en SaaS ── */
  --shadow-sm: 0 1px 0 rgba(232, 223, 200, 0.04);
  --shadow:    0 2px 0 rgba(232, 223, 200, 0.05);
  --shadow-lg: 0 4px 0 rgba(232, 223, 200, 0.06);

  /* ── Layout ── */
  --maxw: 1100px;

  /* ── Transitions ── */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mode "papier" optionnel (jour) — basculement clair pour les utilisateurs qui le préfèrent */
[data-theme="light"] {
  --bg:       #F2EBD9;
  --surface:  #ECE4CF;
  --surface2: #E5DCC1;

  --text:     #1A1A1A;
  --muted:    #5A5249;
  --subtle:   #625844;

  --border:        rgba(26, 26, 26, 0.12);
  --border-strong: rgba(26, 26, 26, 0.25);
  --rule:          rgba(26, 26, 26, 0.18);

  --accent:        #76551F;       /* ambre profond accessible sur fond clair */
  --accent-strong: #5F4217;
  --accent-light:  rgba(118, 85, 31, 0.12);
  --accent-mid:    rgba(118, 85, 31, 0.35);

  --highlight:       var(--accent-strong);
  --highlight-light: rgba(95, 66, 23, 0.14);
  --on-accent:       var(--bg);

  --focus: rgba(118, 85, 31, 0.58);
}

/* ==============================================
   RESET & BASE
   ============================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-readable);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Grain texture global — papier marin sur fond d'encre.
   Dark by default = screen ; light = multiply. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: screen;
}
[data-theme="light"] body::before {
  opacity: 0.045;
  mix-blend-mode: multiply;
}
.site-header,
main,
footer {
  position: relative;
  z-index: 1;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
a:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Sélection */
::selection { background: var(--accent-mid); color: var(--text); }

/* ==============================================
   TYPOGRAPHIE — EB Garamond, voix éditoriale navale
   Italique mélangé au romain dans les titres,
   pas de variation-settings (EB Garamond est statique).
   ============================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-weight: 500;
  text-rendering: optimizeLegibility;
  color: var(--text);
}

h1 { font-size: clamp(36px, 5.5vw, 56px); font-weight: 500; }
h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 500; line-height: 1.15; }
h3 { font-size: 21px; font-weight: 500; line-height: 1.25; }
h4 { font-size: 18px; font-weight: 500; line-height: 1.3; }

/* Italique mélangé au romain — signature du DS éditorial */
h1 em, h2 em, h3 em,
.editorial-title em {
  font-style: italic;
  font-weight: 400;
  color: inherit; /* l'italique ne change pas la couleur, il change le rythme */
  letter-spacing: -0.03em;
}

/* Titres de page (.page-title sur les pages internes) */
.page-title {
  font-size: clamp(42px, 7vw, 80px);
  letter-spacing: -0.035em;
  line-height: 0.96;
  font-weight: 500;
  font-family: var(--font-display);
}
.page-title em {
  font-style: italic;
  font-weight: 400;
  color: inherit;
  letter-spacing: -0.04em;
}

/* ── Composants typographiques éditoriaux ── */

/* Eyebrow : italique petites caps, accent ambre, au-dessus du titre */
.editorial-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  display: inline-block;
}

/* Double règle horizontale courte sous le titre (signature Penguin Classics) */
.editorial-rule {
  width: 72px;
  height: 4px;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  margin: 22px 0;
}

/* Sous-titre italique secondaire */
.editorial-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 580px;
  margin: 0 0 28px;
}

/* Surlignage ambre subtil — sous un mot du titre */
.editorial-mark {
  position: relative;
  display: inline-block;
  padding: 0 2px;
}
.editorial-mark::after {
  content: "";
  position: absolute;
  left: -3px; right: -3px; bottom: 4px;
  height: 5px;
  background: linear-gradient(180deg, transparent 0 50%, var(--accent) 50% 95%, transparent 95%);
  opacity: 0.32;
  z-index: -1;
}

/* Tags en ligne typographique — séparés par astérisques, pas en pills */
.editorial-tags {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.02em;
  margin: 0 0 28px;
}
.editorial-tags em { font-style: italic; }
.editorial-tags .tag-sep {
  color: var(--accent);
  padding: 0 8px;
  font-size: 12px;
}

/* ==============================================
   LAYOUT
   ============================================== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 64px 0;
}
.section + .section {
  padding-top: 0;
}

/* ==============================================
   ANIMATIONS — SCROLL REVEAL
   ============================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  /* Filet de sécurité : si JS ne déclenche pas le reveal en 1.5s,
     l'animation CSS prend le relais. Garantit que le contenu reste
     toujours visible, même en cas d'erreur runtime ou cache obsolète. */
  animation: reveal-fallback 0.6s var(--ease) 1.5s forwards;
}
.reveal.visible {
  opacity: 1;
  transform: none;
  animation: none;
}
@keyframes reveal-fallback {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation-delay: 0s; animation-duration: 0.01s; transition: none; }
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Page load animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.85); }
}
@keyframes count-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ==============================================
   HEADER / NAV
   ============================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: rgba(8, 23, 42, 0.82);
  border-bottom: 0.5px solid var(--rule);
  transition: box-shadow 0.3s var(--ease);
}
[data-theme="light"] .site-header {
  background: rgba(242, 235, 217, 0.85);
}
.site-header.scrolled {
  box-shadow: 0 1px 0 var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}

.nav > * {
  min-width: 0;
}

/* Brand — monogramme éditorial sobre */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  flex-shrink: 0;
  min-width: 0;
}
.brand span:last-child {
  min-width: 0;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border: 0.5px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
  font-family: var(--font-display);
  flex-shrink: 0;
  position: relative;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 0.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0.35;
}

/* Nav links — italique éditorial */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.nav-links a {
  padding: 7px 14px;
  font-family: var(--font-display);
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--accent);
  font-style: italic;
}
.nav-links a.active::after,
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.mobile-nav-cta {
  display: none;
}
.nav-links .mobile-nav-cta .btn-primary,
.nav-links .mobile-nav-cta .btn-primary:visited {
  color: var(--on-accent);
}
.nav-links .mobile-nav-cta .btn-primary:hover,
.nav-links .mobile-nav-cta .btn-primary:focus-visible {
  color: var(--on-accent);
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Theme toggle — SVG centré, lune (default dark) ou soleil (light) */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0.5px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
  flex-shrink: 0;
  font-size: 0; /* annule tout retour à la ligne d'un emoji résiduel */
  line-height: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme-toggle .ti {
  width: 16px;
  height: 16px;
  display: none;
  stroke: currentColor;
  fill: none;
}
/* Default = dark : on montre le soleil (qui invite à passer en clair) */
:root:not([data-theme="light"]) .theme-toggle .ti-sun { display: block; }
:root:not([data-theme="light"]) .theme-toggle .ti-moon { display: none; }
/* Light : on montre la lune (qui invite à passer en sombre) */
[data-theme="light"] .theme-toggle .ti-sun { display: none; }
[data-theme="light"] .theme-toggle .ti-moon { display: block; }

/* Mobile menu */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}
.menu-toggle:hover { background: var(--surface2); }
.hamburger {
  width: 16px;
  height: 12px;
  position: relative;
  display: inline-block;
}
.hamburger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--text);
  border-radius: 99px;
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 5px; }
.hamburger span:nth-child(3) { top: 10px; }

/* ==============================================
   BUTTONS — éditoriaux, sans pill ni gradient
   ============================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 2px;
  border: 0.5px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--font-size-ui);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.btn:active { transform: translateY(1px); }

.with-chevron::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
  margin-left: 2px;
  transition: transform 0.18s var(--ease);
}

.with-chevron:hover::after {
  transform: translateX(2px) rotate(45deg);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  font-style: italic;
}
.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--on-accent);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 14px;
}

/* ==============================================
   CARDS
   ============================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

/* ==============================================
   KICKER / EYEBROW — italique éditorial, accent ambre
   ============================================== */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 20px;
}
.kicker-line {
  width: 28px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
}

/* ==============================================
   BADGES & TAGS
   ============================================== */
.badges, .tags, .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface2);
  letter-spacing: 0.01em;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 5px;
  font-size: var(--font-size-meta);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
}

.filter {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
}

/* ==============================================
   HERO
   ============================================== */

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Page titles */
.page-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.page-title em { font-style: italic; font-weight: 400; color: inherit; }

.page-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 580px;
  line-height: 1.55;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

/* ==============================================
   LISTS / TEXT UTILS
   ============================================== */
.mini-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.mini-list li {
  font-size: var(--font-size-card-compact);
  color: var(--muted);
  font-weight: 400;
  padding-left: 16px;
  position: relative;
}
.mini-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.mini-list li strong { color: var(--text); font-weight: 600; }

.small-muted { color: var(--muted); font-size: 14px; font-weight: 400; }
.m-0 { margin: 0; }
.mt-10 { margin-top: 10px; }
.mt-14 { margin-top: 14px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.cta-center {
  text-align: center;
  margin-top: 20px;
}

/* ==============================================
   CONTACT
   ============================================== */
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
  font-size: var(--font-size-card-compact);
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}
.contact-link > div {
  min-width: 0;
}
.contact-link .small-muted {
  overflow-wrap: anywhere;
}
.contact-link:hover {
  border-color: var(--accent-mid);
  background: var(--accent-light);
  transform: translateX(4px);
  text-decoration: none;
}
.contact-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.contact-icon svg,
.contact-icon svg * {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* ==============================================
   FOOTER — pied éditorial : asterism centré
   ============================================== */
.footer {
  border-top: 0.5px solid var(--rule);
  padding: 32px 0 44px;
  margin-top: 48px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.footer-inner::before {
  content: "⁂";
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 0.4em;
  text-align: center;
  line-height: 1;
}
.footer-copy {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--subtle);
  font-weight: 400;
  letter-spacing: 0.04em;
  grid-column: 1;
  grid-row: 1;
}
.footer-links {
  display: flex;
  gap: 18px;
  grid-column: 3;
  grid-row: 1;
  justify-content: flex-end;
}
.footer-links a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--subtle);
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  .footer-inner::before { grid-column: 1; grid-row: 2; }
  .footer-copy { grid-column: 1; grid-row: 1; text-align: center; }
  .footer-links { grid-column: 1; grid-row: 3; justify-content: center; }
}

/* ==============================================
   CONTACT — FAQ accordion, pill-fresh
   ============================================== */
.pill-fresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-left: 8px;
  min-height: 24px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Variante quand le pill est imbriqué dans un .btn-primary (fond accent) */
.btn-primary .pill-fresh {
  color: var(--on-accent);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}
.faq-list {
  display: grid;
  gap: 12px;
}
.faq-item {
  padding: 0;
  background: var(--surface2, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius, 14px);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.faq-item[open] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 3%, var(--surface2, var(--surface)));
}
.faq-item summary {
  list-style: none;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-serif, Georgia, serif);
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item summary:hover {
  color: var(--accent);
}
.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
  line-height: var(--line-card);
  font-size: var(--font-size-card);
}

/* Le mode sombre utilise uniquement les tokens par defaut :
   abysse, parchemin et ambre. Le mode clair reste opt-in via data-theme="light". */

/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 1024px) {
  .hero-bento {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }
  .bento-main { grid-column: span 6; }
  .bento-aside { grid-column: span 6; grid-row: auto; }
  .bento-metric { grid-column: span 2; padding: 22px 16px; }
  .bento-metric .metric-value { font-size: 36px; }
}

@media (max-width: 900px) {
  .grid-3, .metrics-grid, .grid-features { grid-template-columns: 1fr 1fr; }
  .featured-grid, .projects-grid, .grid-2 { grid-template-columns: 1fr; }
  .summary-list { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  /* Menu-toggle poussé à droite, juste avant le theme-toggle */
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
    order: 2;
  }
  .nav-actions {
    order: 3;
    margin-left: 0;
  }
  .nav-actions .btn { display: none; }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    gap: 4px;
    box-shadow: var(--shadow);
    z-index: 99;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.is-open a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
  }
  .nav-links.is-open .mobile-nav-cta {
    display: block;
    margin-top: 8px;
    padding: 10px 14px 4px;
  }
  .nav-links.is-open .mobile-nav-cta .btn {
    display: inline-flex;
    width: 100%;
  }

  .project-header { flex-direction: column; }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .hero { padding: 48px 0 32px; }
  .hero-bento-section { padding: 32px 0 32px; }
  .section { padding: 40px 0; }
  .btn { white-space: normal; }
  .card, .featured-card, .project-card, .content-card { padding: 20px; }
  .grid-3, .metrics-grid, .grid-features { grid-template-columns: 1fr; }
  .hero-h1 { font-size: clamp(34px, 9vw, 52px); }
  .page-title { font-size: clamp(36px, 9vw, 56px); }
  .hero-actions .btn { flex: 1; text-align: center; }
  .project-next-card { flex-direction: column; }
  .decisions-grid { grid-template-columns: 1fr; }
  .decision-card { padding: 20px; }
  .section-heading { gap: 10px; }
  .section-num { width: 30px; height: 30px; font-size: 14px; }
  .bento-main { padding: 28px 22px; }
  .bento-metric { grid-column: span 6; padding: 20px; }
  .bento-metric .metric-value { font-size: 40px; }
  .avail-photo { width: 72px; height: 72px; }
}

@media (max-width: 480px) {
  .nav { gap: 8px; }
  .brand {
    gap: 8px;
    font-size: 15px;
    max-width: calc(100% - 108px);
  }
  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand-mark {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .menu-toggle { padding: 8px 10px; }
  .u-min-220 { min-width: 0 !important; }
}

@media (max-width: 360px) {
  .brand span:last-child { display: none; }
}

/* ==============================================
   Section
   ============================================== */

/* ── AI card icon : reçoit un SVG inline ── */
.ai-card-icon {
  display: inline-flex;
  width: 32px; height: 32px;
  margin-bottom: 14px;
  color: var(--accent);
}
.ai-card-icon svg {
  width: 100%; height: 100%;
  stroke: currentColor;
  fill: none;
}

/* ── Numéros .icon-pill : redessinés en chiffres romains éditoriaux ── */
.icon-pill {
  width: auto;
  height: auto;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  line-height: 1;
  border-radius: 0;
  border: none;
  padding: 0 0 4px;
  margin: 0 0 12px;
  display: inline-block;
  border-bottom: 0.5px solid var(--accent);
  letter-spacing: 0.04em;
}

.work-icon {
  display: inline-flex !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 0 12px !important;
  color: var(--accent) !important;
}
.work-icon svg,
.work-icon svg * {
  fill: none !important;
  stroke: currentColor !important;
  vector-effect: non-scaling-stroke;
}
.work-icon svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ── Tags génériques (déjà dans le HTML) ── */
.tag {
  background: var(--accent-light) !important;
  color: var(--accent) !important;
  border: 0.5px solid var(--border) !important;
  font-family: var(--font-display) !important;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.badge {
  background: transparent !important;
  border: 0.5px solid var(--border) !important;
  color: var(--text) !important;
  font-family: var(--font-display) !important;
  font-style: italic;
  letter-spacing: 0.02em;
}

/* ── Status indicator (en recherche active) ── */
.status-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.status-dot {
  background: var(--accent) !important;
}

/* ── Avail card sur la home ── */
.avail-name {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
}
.avail-detail,
.avail-label {
  font-family: var(--font-display);
  color: var(--muted);
  font-style: italic;
  font-size: var(--font-size-card-compact);
}

/* ── Hero mesh : retirer le glow vert qui était fait pour le light mode ── */
.hero-mesh { opacity: 0.4 !important; }

/* ── Mini list (puces personnalisées) ── */
.mini-list { padding-left: 0; list-style: none; }
.mini-list li {
  position: relative;
  padding-left: 20px;
  font-family: var(--font-display);
  font-size: var(--font-size-card-compact);
  line-height: var(--line-card);
  color: var(--muted);
  margin-bottom: 6px;
}
.mini-list li::before {
  content: "·";
  position: absolute;
  left: 6px;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ── Footer (override final pour s'assurer du dark) ── */
.footer { background: transparent !important; }

/* ── Sélection de texte ── */
::selection { background: var(--accent-light); color: var(--text); }

/* ==============================================
   Section
   ============================================== */

/* ── Timeline (about / home) — alignement précis dot / ligne ── */
/* Ligne verticale centrée sur les dots de 10px (centre = 5px) */
.timeline::before {
  background: var(--rule) !important;
  left: 4.5px !important;
  width: 1px !important;
}
/* Dots calibrés pour s'aligner au pixel sur la ligne */
.t-dot, .timeline-dot {
  background: var(--accent) !important;
  border: none !important;
  box-shadow: none !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
}
/* Timeline grid (.t-item) : la première colonne fait 10px (taille du dot) + gap 14px */
.t-item {
  grid-template-columns: 10px 1fr !important;
  gap: 14px !important;
  align-items: start;
}
.t-dot { margin-top: 6px !important; }
/* Timeline absolute (.timeline-item dans about) : dot à gauche 0, top calé */
.timeline-item { padding-left: 26px !important; }
.timeline-dot { left: 0 !important; top: 8px !important; }
.t-title, .timeline-content h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
}
.t-desc, .timeline-content p {
  font-family: var(--font-display);
  color: var(--muted);
  font-size: 14px;
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ── Project nav (prev/next sur case studies) ── */

/* ── Section heads / toolbar ── */
.section-head-row h2,
.section-heading h2,
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
}

/* ── Cards features (parcours / méthode home) ── */
.grid-features { gap: 18px !important; }

/* ── Page title em : italique ambré sur les pages internes ── */
.page-title em {
  color: var(--accent) !important;
}

/* ── Hero h1 em ambre ── */
.hero-h1 em { color: var(--accent) !important; }

@media (max-width: 600px) {
  .sector-pill { width: 240px; padding: 18px; }
  .sectors-track { animation-duration: 36s; }
}


/* Utilities shared by pages. Prefer these over inline styles. */
.u-m-0 { margin: 0 !important; }
.u-mt-0 { margin-top: 0 !important; }
.u-mt-8 { margin-top: 8px !important; }
.u-mt-10 { margin-top: 10px !important; }
.u-mt-12 { margin-top: 12px !important; }
.u-mt-14 { margin-top: 14px !important; }
.u-mt-18 { margin-top: 18px !important; }
.u-mt-20 { margin-top: 20px !important; }
.u-mt-24 { margin-top: 24px !important; }
.u-mt-28 { margin-top: 28px !important; }
.u-mt-32 { margin-top: 32px !important; }
.u-mt-48 { margin-top: 48px !important; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mb-2 { margin-bottom: 2px !important; }
.u-mb-4 { margin-bottom: 4px !important; }
.u-mb-6 { margin-bottom: 6px !important; }
.u-mb-8 { margin-bottom: 8px !important; }
.u-mb-10 { margin-bottom: 10px !important; }
.u-mb-12 { margin-bottom: 12px !important; }
.u-mb-14 { margin-bottom: 14px !important; }
.u-mb-16 { margin-bottom: 16px !important; }
.u-mb-20 { margin-bottom: 20px !important; }
.u-mb-24 { margin-bottom: 24px !important; }
.u-mb-28 { margin-bottom: 28px !important; }
.u-mb-32 { margin-bottom: 32px !important; }
.u-mb-40 { margin-bottom: 40px !important; }
.u-my-40 { margin-top: 40px !important; margin-bottom: 40px !important; }
.u-pt-16 { padding-top: 16px !important; }
.u-pt-24 { padding-top: 24px !important; }
.u-pt-48 { padding-top: 48px !important; }
.u-py-32 { padding-top: 32px !important; padding-bottom: 32px !important; }
.u-py-page { padding-top: 56px !important; padding-bottom: 32px !important; }
.u-py-page-compact { padding-top: 32px !important; padding-bottom: 32px !important; }
.u-py-page-about { padding-top: 40px !important; padding-bottom: 32px !important; }
.u-max-520 { max-width: 520px !important; }
.u-max-560 { max-width: 560px !important; }
.u-max-600 { max-width: 600px !important; }
.u-max-640 { max-width: 640px !important; }
.u-max-680 { max-width: 680px !important; }
.u-max-720 { max-width: 720px !important; }
.u-max-760 { max-width: 760px !important; }
.u-text-center { text-align: center !important; }
.u-italic { font-style: italic !important; }
.u-flex { display: flex !important; }
.u-flex-1 { flex: 1 1 0 !important; }
.u-flex-column { flex-direction: column !important; }
.u-flex-wrap { flex-wrap: wrap !important; }
.u-align-center { align-items: center !important; }
.u-align-start { align-items: flex-start !important; }
.u-justify-between { justify-content: space-between !important; }
.u-gap-10 { gap: 10px !important; }
.u-gap-12 { gap: 12px !important; }
.u-gap-16 { gap: 16px !important; }
.u-gap-20 { gap: 20px !important; }
.u-gap-24 { gap: 24px !important; }
.u-min-220 { min-width: 220px !important; }
.u-font-semibold { font-weight: 600 !important; }
.u-fs-125 { font-size: 1.25rem !important; }
.u-border-note { border-left: 3px solid var(--accent); padding-left: 14px; }
.u-border-top-dashed { border-top: 1px dashed var(--border, #e8e4dc); }
.featured-empty { padding: 24px; text-align: center; grid-column: 1 / -1; }
.projects-all-shown { text-align: center; margin: 0; }
.project-nav-all { color: inherit; text-decoration: none; }


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .status-dot {
    animation: none !important;
  }
  .btn-primary::before,
  .featured-card::before {
    display: none !important;
  }
  .hero-mesh {
    animation: none !important;
  }
  .sectors-track {
    animation: none !important;
  }
  .sectors-marquee {
    overflow-x: auto;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}
