/* ==========================================================================
   Mnemosys — vitrine · design system
   Identité reprise de l'application : papier crème, terracotta, encre, graphiques bleu/vert.
   ========================================================================== */

@font-face {
  font-family: 'Inter Var';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces Var';
  src: url('/assets/fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces Var';
  src: url('/assets/fonts/fraunces-latin-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Polices de repli ajustées : limite le décalage de mise en page au chargement */
@font-face { font-family: 'Inter Fallback'; src: local('Arial'); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }
@font-face { font-family: 'Fraunces Fallback'; src: local('Georgia'); size-adjust: 104%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; }

@view-transition { navigation: auto; }

:root {
  --bg: #f7f2e8;
  --bg-2: #efe7d9;
  --paper: #fffdf8;
  --paper-2: #f4ecdf;
  --ink: #1f2933;
  --ink-2: #3f5367;
  --muted: #3e4b56;
  --terra: #945637;
  --terra-2: #b66a44;
  --terra-3: #d98a5f;
  --terra-deep: #7e462e;
  --terra-soft: #f4e2d7;
  --gold: #f2c477;
  --green: #2f7a5a;
  --blue: #2a6082;
  --red: #b1494b;
  --violet: #8b5cf6;
  --night: #12161c;
  --night-2: #1a2029;
  --night-3: #232b36;
  --border: rgba(31, 41, 51, .14);
  --border-strong: rgba(31, 41, 51, .24);
  --shadow: 0 18px 44px rgba(49, 38, 26, .13);
  --shadow-soft: 0 6px 18px rgba(49, 38, 26, .09);
  --shadow-glow: 0 18px 50px rgba(148, 86, 55, .28);
  --radius: 16px;
  --radius-lg: 28px;
  --container: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: 'Inter Var', 'Inter Fallback', Inter, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Fraunces Var', 'Fraunces Fallback', Georgia, 'Times New Roman', serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
html.reduced { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(182, 106, 68, .09), transparent 38%),
    radial-gradient(circle at 88% 14%, rgba(42, 96, 130, .08), transparent 32%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--terra); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--terra-deep); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--terra-2) 70%, white); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--terra-soft); color: var(--terra-deep); }
h1, h2, h3, h4 { line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; transition: top .2s; }
.skip:focus { top: 1rem; color: #fff; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container--wide { width: min(100% - 2.5rem, 1360px); }

/* ---------- Typographie ---------- */
.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.028em;
  line-height: 1.02;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
}
.display em, .h2 em, .grad {
  font-style: italic;
  font-weight: 500;
}
.grad, .display em {
  background: linear-gradient(100deg, var(--terra) 0%, var(--terra-3) 55%, #d6a35c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .06em;
}
.h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.022em;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.06;
}
.h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-weight: 750; letter-spacing: -.01em; }
.lead { font-size: clamp(1.08rem, 1.55vw, 1.28rem); color: var(--ink-2); max-width: 64ch; line-height: 1.6; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .65rem;
  text-transform: uppercase; letter-spacing: .15em; font-size: .78rem; font-weight: 800;
  color: #8a4f32; margin: 0 0 1.1rem;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; border-radius: 2px; background: currentColor; opacity: .7; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- Boutons ---------- */
.btn {
  --h: 3rem;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: var(--h); padding: 0 1.4rem;
  border-radius: 14px; font-weight: 700; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .35s var(--spring), box-shadow .3s var(--ease), background .25s, color .25s, border-color .25s;
  will-change: transform;
}
.btn svg { width: 1.15em; height: 1.15em; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn--sm { --h: 2.5rem; padding: 0 1.05rem; font-size: .93rem; border-radius: 12px; }
.btn--lg { --h: 3.5rem; padding: 0 1.9rem; font-size: 1.06rem; border-radius: 16px; }
.btn--block { width: 100%; }
.btn--primary {
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, var(--terra-2), var(--terra) 55%, var(--terra-deep));
  box-shadow: 0 8px 20px rgba(148, 86, 55, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn--primary:hover::after { transform: translateX(120%); }
.btn--ghost { background: rgba(255, 253, 248, .7); border-color: var(--border-strong); color: var(--ink); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: #fff; border-color: var(--terra-2); color: var(--terra-deep); transform: translateY(-2px); }
.btn--light { background: var(--paper); color: var(--terra-deep); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.btn--light:hover { background: #fff; color: var(--terra-deep); transform: translateY(-2px); }
.btn--outline-light { color: #fff; border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .06); }
.btn--outline-light:hover { color: #fff; background: rgba(255, 255, 255, .14); border-color: #fff; transform: translateY(-2px); }
.btn--success { background: linear-gradient(145deg, var(--green), #245f46); color: #fff; box-shadow: 0 6px 14px rgba(47, 122, 90, .3); }
.btn--danger { background: linear-gradient(145deg, var(--red), #99373e); color: #fff; box-shadow: 0 6px 14px rgba(177, 73, 75, .28); }
.btn--success:hover, .btn--danger:hover { color: #fff; transform: translateY(-2px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.actions--center { justify-content: center; }

.badge {
  display: inline-flex; align-items: center; gap: .3em;
  background: var(--bg, #eee); color: var(--fg, #333);
  padding: .22em .7em; border-radius: 999px; font-weight: 750; font-size: .84rem; line-height: 1.4; white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center; gap: .4em; padding: .3em .8em; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--border); font-size: .85rem; font-weight: 650; color: var(--ink-2);
}

/* ---------- En-tête & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 242, 232, .72);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.site-header.is-stuck { background: rgba(247, 242, 232, .92); border-bottom-color: var(--border); box-shadow: 0 6px 24px rgba(49, 38, 26, .06); }
.site-header__bar { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { width: 38px; height: 38px; filter: drop-shadow(0 4px 8px rgba(148, 86, 55, .3)); transition: transform .5s var(--spring); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.08); }
.brand__name { font-weight: 800; font-size: 1.25rem; letter-spacing: .01em; color: #1f2f3f; }
.brand--light .brand__name { color: #fff; }
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav__item { position: static; }
.nav__link {
  display: inline-flex; align-items: center; gap: .35rem; padding: .55rem .9rem; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: .96rem;
  transition: background .2s, color .2s;
}
.nav__link svg { width: .8rem; height: .8rem; transition: transform .25s var(--ease); }
.nav__link:hover, .nav__link[aria-expanded="true"] { background: rgba(148, 86, 55, .1); color: var(--terra-deep); }
.nav__link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__link[aria-current="page"] { color: var(--terra-deep); background: rgba(148, 86, 55, .12); }
.site-header__actions { display: flex; align-items: center; gap: .6rem; }
.site-header__bar > .site-header__actions { margin-left: 0; }

/* Le menu est révélé par JS (retrait de l'attribut hidden) ; sans JS il reste masqué et le lien mène à la page hub. */
.mega {
  position: absolute; left: 0; right: 0; top: calc(var(--header-h) - 6px);
  padding: 0 1.25rem; pointer-events: none;
  visibility: hidden; opacity: 0; transform: translateY(-8px) scale(.985); transform-origin: top center;
  transition: opacity .22s var(--ease), transform .28s var(--ease), visibility 0s linear .22s;
}
.mega.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }
.mega__grid, .mega__all {
  width: min(100%, 1040px); margin-inline: auto;
}
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 20px; }
.mega__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
  background: var(--paper); border: 1px solid var(--border); border-radius: 24px 24px 0 0; padding: 1.6rem 1.8rem 1rem;
  box-shadow: 0 30px 70px rgba(49, 38, 26, .2);
}
.mega__all {
  display: block; text-align: center; padding: .9rem; font-weight: 700; text-decoration: none; background: var(--paper-2);
  border: 1px solid var(--border); border-top: 0; border-radius: 0 0 24px 24px; box-shadow: 0 30px 70px rgba(49, 38, 26, .14);
}
.mega__title { text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; font-weight: 800; color: var(--muted); margin: 0 0 .7rem; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.mega__link { display: flex; gap: .8rem; padding: .6rem .7rem; border-radius: 14px; text-decoration: none; color: var(--ink); transition: background .2s, transform .25s var(--ease); }
.mega__link:hover { background: var(--terra-soft); transform: translateX(3px); color: var(--ink); }
.mega__link[aria-current="page"] { background: var(--terra-soft); }
.mega__icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--bg); font-size: 1.15rem; box-shadow: inset 0 0 0 1px var(--border); }
.mega__link strong { display: block; font-size: .96rem; line-height: 1.25; }
.mega__link small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: .1rem; }

.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(255, 253, 248, .8); position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease); }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 21px; } .burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.sheet {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(247, 242, 232, .98); backdrop-filter: blur(20px);
  opacity: 0; transform: translateY(-10px); transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.sheet[hidden] { display: none; }
.sheet.is-open { opacity: 1; transform: none; }
.sheet__inner { padding: 1rem 1.25rem calc(2rem + env(safe-area-inset-bottom)); display: grid; gap: .25rem; max-width: 560px; margin-inline: auto; }
.sheet__link, .sheet__group > summary {
  display: flex; align-items: center; justify-content: space-between; padding: 1rem .4rem; font-size: 1.25rem; font-weight: 750;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); list-style: none; cursor: pointer;
}
.sheet__group > summary::-webkit-details-marker { display: none; }
.sheet__group > summary::after { content: '+'; font-size: 1.5rem; color: var(--terra); transition: transform .25s; }
.sheet__group[open] > summary::after { transform: rotate(45deg); }
.sheet__sub { text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; font-weight: 800; color: var(--muted); margin: 1rem .4rem .3rem; }
.sheet__sublink { display: flex; align-items: center; gap: .8rem; padding: .7rem .4rem; text-decoration: none; color: var(--ink-2); font-weight: 600; border-radius: 12px; }
.sheet__sublink:active { background: var(--terra-soft); }
.sheet__link[aria-current="page"], .sheet__sublink[aria-current="page"] { color: var(--terra-deep); }
.sheet .btn { margin-top: 1.4rem; }
body.menu-open { overflow: hidden; }

@media (max-width: 1020px) {
  .nav { display: none; }
  .burger { display: inline-block; }
  .site-header__actions { margin-left: auto; }
  .site-header__actions .btn { display: none; }
}
@media (min-width: 1021px) {
  .sheet { display: none !important; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(4rem, 9vw, 7.5rem); }
.section__head { max-width: 60rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .lead { margin-inline: auto; }
.section__head--center .eyebrow { justify-content: center; }
.section--paper { background: linear-gradient(180deg, rgba(255, 253, 248, .75), rgba(255, 253, 248, .45)); border-block: 1px solid var(--border); }
.section--night {
  --ink: #f4efe6; --ink-2: #c9d0d8; --muted: #9aa6b2; --border: rgba(255, 255, 255, .13); --border-strong: rgba(255, 255, 255, .24);
  --paper: #1d2430; --paper-2: #232b36;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(182, 106, 68, .26), transparent 60%),
    radial-gradient(800px 500px at 90% 100%, rgba(139, 92, 246, .2), transparent 60%),
    linear-gradient(180deg, #151a21, #0f1318);
  overflow: clip;
}
.section--night .eyebrow { color: var(--terra-3); }
.section--night .lead { color: var(--ink-2); }
.section--night a:not(.btn) { color: var(--terra-3); }
.section--night .grad, .section--night .display em { background: linear-gradient(100deg, #f0a982, #f2c477 60%, #fff0c8); -webkit-background-clip: text; background-clip: text; }

/* ---------- Cartes génériques ---------- */
.card {
  background: var(--paper); border: 1px solid var(--border); border-radius: 22px; padding: 1.6rem; box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.spot { position: relative; overflow: hidden; }
.spot::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(217, 138, 95, .18), transparent 60%);
}
.spot:hover::before { opacity: 1; }

/* ---------- En-tête de page interne ---------- */
.phero { position: relative; padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 4.5rem); overflow: clip; }
.phero__bg span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.phero__bg span:nth-child(1) { width: 520px; height: 520px; right: -140px; top: -180px; background: radial-gradient(circle, rgba(217, 138, 95, .55), transparent 70%); }
.phero__bg span:nth-child(2) { width: 420px; height: 420px; left: -160px; bottom: -200px; background: radial-gradient(circle, rgba(42, 96, 130, .3), transparent 70%); }
.phero__grid { position: relative; display: grid; gap: 2.5rem; align-items: center; }
.phero__grid--visual { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.phero .display { font-size: clamp(2.2rem, 5.2vw, 4rem); max-width: 18ch; }
.phero__text .lead { margin-top: 1.2rem; }
.phero--night {
  --ink: #f4efe6; --ink-2: #c9d0d8; --muted: #9aa6b2; --border: rgba(255, 255, 255, .13);
  color: var(--ink); background: linear-gradient(180deg, #151a21, #0f1318);
}
.phero--night .eyebrow { color: var(--terra-3); }
.phero--night .crumbs a { color: var(--ink-2); }
@media (max-width: 900px) {
  .phero__grid--visual { grid-template-columns: 1fr; }
  .phero .display { max-width: none; }
}

.crumbs { margin-bottom: 1.4rem; font-size: .88rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .2rem .5rem; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: .5rem; opacity: .5; }
.crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--terra); text-decoration: underline; }

/* ---------- Révélation à l'entrée ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js [data-reveal].in, .reveal-all [data-reveal], .reduced [data-reveal] { opacity: 1; transform: none; }
.reduced [data-reveal] { transition: none; }
.reveal-all [data-reveal] { transition: none !important; }

/* ---------- Grilles utilitaires ---------- */
.grid { display: grid; gap: 1.2rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.split--wide-left { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.split--wide-right { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
@media (max-width: 900px) { .split, .split--wide-left, .split--wide-right { grid-template-columns: 1fr; } .split--reverse-mobile > :first-child { order: 2; } }

.feature { padding: 1.5rem; border-radius: 22px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(145deg, var(--terra-soft), #fff); font-size: 1.6rem; margin-bottom: 1rem; box-shadow: inset 0 0 0 1px rgba(148, 86, 55, .18); }
.feature h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.feature p { color: var(--ink-2); margin: 0; font-size: .98rem; }
.section--night .feature { background: var(--paper); }
.section--night .feature__icon { background: rgba(217, 138, 95, .14); box-shadow: inset 0 0 0 1px rgba(217, 138, 95, .3); }

.check-list { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: .65rem; }
.check-list li { position: relative; padding-left: 2rem; }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: .28em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3.2 3.2L15 6.8' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.check-list--x li::before { background-color: var(--red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 6 8 8M14 6l-8 8' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Étapes */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; counter-reset: s; }
.steps__item { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; padding: 1.3rem 1.4rem; border-radius: 20px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.steps__n { width: 2.6rem; height: 2.6rem; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(145deg, var(--terra-2), var(--terra-deep)); box-shadow: 0 6px 14px rgba(148, 86, 55, .3); font-family: var(--display); font-size: 1.2rem; }
.steps__item h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.steps__item p { margin: 0; color: var(--ink-2); font-size: .98rem; }

/* Callouts */
.callout { display: flex; gap: .9rem; padding: 1.1rem 1.3rem; border-radius: 18px; border: 1px solid var(--border); background: var(--paper); margin: 1.5rem 0; }
.callout__icon { font-size: 1.4rem; line-height: 1.4; }
.callout > div > :last-child { margin-bottom: 0; }
.callout--info { background: #eef5fa; border-color: #c5dceb; }
.callout--tip { background: #eaf5ef; border-color: #b9dcc9; }
.callout--warn { background: #fbf0e3; border-color: #ecd0a9; }
.callout--note { background: var(--terra-soft); border-color: #e8c7b2; }

/* Tableaux */
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--border); background: var(--paper); box-shadow: var(--shadow-soft); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 560px; }
.table th, .table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table thead th { background: var(--paper-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); position: sticky; top: 0; }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(244, 226, 215, .45); }

/* FAQ */
.faq__list { display: grid; gap: .8rem; max-width: 62rem; }
.faq__item { background: var(--paper); border: 1px solid var(--border); border-radius: 18px; transition: box-shadow .3s, border-color .3s; }
.faq__item[open] { border-color: rgba(148, 86, 55, .4); box-shadow: var(--shadow-soft); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.4rem; font-weight: 700; font-size: 1.06rem; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i { position: relative; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--terra-soft); }
.faq__item summary i::before, .faq__item summary i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; background: var(--terra); border-radius: 2px; transform: translate(-50%, -50%); transition: transform .3s var(--ease); }
.faq__item summary i::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] summary i::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__answer { padding: 0 1.4rem 1.3rem; color: var(--ink-2); }
.faq__answer > :last-child { margin-bottom: 0; }

/* Liens associés */
.related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.related__card {
  display: grid; gap: .35rem; padding: 1.4rem 1.4rem 1.3rem; border-radius: 22px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.related__card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(148, 86, 55, .4); color: var(--ink); }
.related__icon { font-size: 1.7rem; }
.related__card strong { font-size: 1.1rem; }
.related__card small { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.related__go { position: absolute; right: 1.2rem; top: 1.2rem; color: var(--terra); font-weight: 800; transition: transform .3s var(--ease); }
.related__card:hover .related__go { transform: translateX(4px); }

/* Bandeau d'appel à l'action */
.cta-band { position: relative; overflow: clip; color: #fff; text-align: center; padding: clamp(4.5rem, 10vw, 8rem) 0; background: linear-gradient(160deg, #1b2129, #12161c); isolation: isolate; }
.cta-band__bg span { position: absolute; border-radius: 50%; filter: blur(60px); z-index: -1; animation: drift 14s ease-in-out infinite alternate; }
.cta-band__bg span:nth-child(1) { width: 560px; height: 560px; left: -120px; top: -160px; background: rgba(217, 138, 95, .55); }
.cta-band__bg span:nth-child(2) { width: 460px; height: 460px; right: -100px; bottom: -180px; background: rgba(42, 96, 130, .55); animation-delay: -4s; }
.cta-band__bg span:nth-child(3) { width: 320px; height: 320px; left: 45%; top: 30%; background: rgba(139, 92, 246, .3); animation-delay: -8s; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.12); } }
.cta-band .h2 { font-size: clamp(2.1rem, 5vw, 3.8rem); max-width: 18ch; margin-inline: auto; }
.cta-band .lead { color: #d4dae1; margin: 1.2rem auto 0; }
.cta-band .display em { background: linear-gradient(100deg, #f0a982, #f2c477 60%, #fff0c8); -webkit-background-clip: text; background-clip: text; }

/* Article / texte long */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.article__aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 1.2rem; }
.article > * { min-width: 0; }
@media (max-width: 1000px) { .article { grid-template-columns: minmax(0, 1fr); } .article__aside { position: static; order: -1; } }
.article-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--muted); font-size: .9rem; margin: 1.2rem 0 0; }
.toc { padding: 1.2rem 1.3rem; border-radius: 20px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.toc__title { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; color: var(--muted); margin: 0 0 .6rem; }
.toc ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; font-size: .94rem; }
.toc a { text-decoration: none; color: var(--ink-2); font-weight: 600; }
.toc a:hover, .toc a.is-active { color: var(--terra); }
.prose { max-width: 72ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.02em; margin: 2.6em 0 .7em; }
.prose h3 { font-size: 1.3rem; margin: 2em 0 .5em; letter-spacing: -.01em; }
.prose p, .prose li { color: #2b3743; }
.prose ul, .prose ol { margin: 0 0 1.3em; }
.prose li { margin-bottom: .45em; }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.6em 0; padding: 1.2rem 1.5rem; border-left: 4px solid var(--terra-2); background: var(--terra-soft); border-radius: 0 18px 18px 0; font-family: var(--display); font-size: 1.15rem; font-style: italic; }
.prose blockquote p { margin: 0; }
.prose code, .kbd { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .88em; background: var(--paper-2); border: 1px solid var(--border); padding: .08em .4em; border-radius: 6px; }
.kbd { display: inline-block; min-width: 1.8em; text-align: center; box-shadow: 0 2px 0 var(--border-strong); font-weight: 700; }
.prose figure { margin: 2rem 0; }
.prose .table-wrap, .prose .demo { margin: 1.8rem 0; }

/* ---------- Pied de page ---------- */
.site-footer { background: linear-gradient(180deg, #12161c, #0c0f13); color: #c9d0d8; padding: clamp(3rem, 6vw, 5rem) 0 2rem; }
.site-footer a { color: #c9d0d8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: clamp(2rem, 5vw, 5rem); }
.site-footer__brand p { max-width: 34ch; margin: 1rem 0 1.4rem; color: #9aa6b2; }
.site-footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem; }
.site-footer__title { color: #fff; font-weight: 750; font-size: .95rem; margin: 0 0 .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .93rem; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .1); color: #7f8b97; font-size: .86rem; }
.site-footer__bottom p { margin: 0; }
@media (max-width: 960px) { .site-footer__top { grid-template-columns: 1fr; } .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .site-footer__cols { grid-template-columns: 1fr 1fr; gap: 1.4rem 1rem; } }
/* Cibles tactiles confortables (≥ 32 px de haut) pour les liens de navigation secondaires */
@media (pointer: coarse), (max-width: 760px) {
  .site-footer ul { gap: 0; }
  .site-footer li a { display: inline-flex; align-items: center; min-height: 36px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 32px; }
  .crumbs ol { gap: 0 .5rem; }
  .toc a { display: inline-block; padding: .25rem 0; }
}

/* Barre d'action mobile */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none; gap: .6rem; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(247, 242, 232, .9); backdrop-filter: blur(16px); border-top: 1px solid var(--border);
  transform: translateY(110%); transition: transform .45s var(--ease);
}
.dock .btn { --h: 2.9rem; font-size: .96rem; }
.dock .btn:first-child { flex: 1.35; }
.dock .btn:last-child { flex: 1; }
.dock.show { transform: none; }
@media (max-width: 720px) { .dock { display: flex; } body { padding-bottom: 0; } .site-footer { padding-bottom: 6rem; } }
body.menu-open .dock { transform: translateY(110%); }

/* Impression */
@media print { .site-header, .dock, .cta-band, .site-footer { display: none !important; } body { background: #fff; } }

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
