/* ════════════════════════════════════════════════════════════════
   DASCAFF — Catalogue Matériel · Édition 2026 (refonte sobre v2)
   Catalogue technique de marque : blanc & espace, filets 1px, navy
   pour la structure, flame en accent RARE, DM Mono pour réf/cotes/specs.
   Tokens requis : --gl-paper/--gl-sheet/--gl-ink/--gl-muted/--gl-faint/
                   --gl-line/--gl-gold · --navy · --flame · dark via tokens
   Règles : zéro hex hors :root · zéro style inline · zéro !important
   ════════════════════════════════════════════════════════════════ */

:root {
  /* — papier technique (clair / froid) — */
  --gl-paper:   #EEF1F6;   /* fond de page derrière les feuilles */
  --gl-sheet:   #FFFFFF;   /* feuilles & cartes */
  --gl-ink:     #16273A;   /* texte principal */
  --gl-muted:   #546779;   /* texte secondaire (acier) */
  --gl-faint:   #8492A2;   /* labels / texte tertiaire */
  --gl-line:    #DCE3EC;   /* filets 1px */
  --gl-line2:   #E8EDF3;   /* filets très clairs */
  --gl-gold:    #9AA6B4;   /* token requis — neutralisé (plus d'or) */

  /* — structure / marque — */
  --navy:       #0B2340;
  --navy2:      #14315A;
  --navy-soft:  #2B4E7C;

  /* — accent (rare) — */
  --flame:      #C84B0F;
  --flame2:     #A83A08;
  --flame-tint: #FBEEE6;
  --on-flame:   #FFFFFF;

  /* — statuts (pastilles dispo) — */
  --ok:         #15803D;
  --ok-dot:     #16A34A;
  --amber:      #B45309;
  --amber-dot:  #D97706;
  --neutral:    #8492A2;

  /* — surfaces navy (couverture + bandeau d'en-tête de table) — */
  --on-navy:        #F4F7FB;
  --on-navy-dim:    rgba(244,247,251,.66);
  --on-navy-faint:  rgba(244,247,251,.40);
  --on-navy-line:   rgba(255,255,255,.13);
  --on-navy-fill:   rgba(255,255,255,.05);

  --active:         var(--navy);   /* FOND actif = navy (texte blanc dessus) */
  --active-fg:      var(--navy);    /* TEXTE actif = navy en clair (→ orange lisible en sombre) */
  --flame-fg:       var(--flame);   /* TEXTE orange accent = flame en clair (→ éclairci en sombre) */

  /* — trame blueprint (signature accueil, sur navy) — */
  --bp-line:        rgba(255,255,255,.055);   /* trame principale 80px */
  --bp-subline:     rgba(255,255,255,.018);   /* sous-trame 16px */

  /* — ombres légères — */
  --shadow-sm:  0 1px 2px rgba(11,35,64,.06);
  --shadow:     0 14px 34px -26px rgba(11,35,64,.34);

  --fb: 'DM Sans', system-ui, sans-serif;
  --fm: 'DM Mono', ui-monospace, monospace;
}

html.dark {
  --gl-paper:   #0A121C;
  --gl-sheet:   #18222F;
  --gl-ink:     #E8EDF3;
  --gl-muted:   #9DAAB8;
  --gl-faint:   #8290A0;   /* éclairci (AA : 4.93:1 sur les feuilles ; avant #6F7E8E = 3.86) */
  --gl-line:    #2B3848;
  --gl-line2:   #1E2832;
  --gl-gold:    #6F7E8E;

  --navy:       #0B2340;
  --navy2:      #14315A;
  --navy-soft:  #355C8C;

  --flame:      #C84B0F;
  --flame2:     #A83A08;
  --flame-tint: #241913;
  --on-flame:   #FFFFFF;

  --ok:         #34D399;
  --ok-dot:     #34D399;
  --amber:      #FBBF24;
  --amber-dot:  #FBBF24;
  --neutral:    #6F7E8E;

  --on-navy:        #F4F7FB;
  --on-navy-dim:    rgba(244,247,251,.64);
  --on-navy-faint:  rgba(244,247,251,.38);
  --on-navy-line:   rgba(255,255,255,.11);
  --on-navy-fill:   rgba(255,255,255,.04);

  --active:         var(--flame);  /* FOND actif en sombre = flame (texte blanc, 4.7:1) */
  --active-fg:      #E86A24;        /* TEXTE actif en sombre = flame éclairci (4.98:1) */
  --flame-fg:       #E86A24;        /* TEXTE orange accent en sombre = flame éclairci */

  --shadow-sm:  0 1px 2px rgba(0,0,0,.4);
  --shadow:     0 18px 38px -26px rgba(0,0,0,.62);
}

/* ════════════════════ BASE ════════════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fb);
  background: var(--gl-paper);
  color: var(--gl-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono { font-family: var(--fm); font-feature-settings: "tnum"; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }

/* ════════════════════ NAV CATALOGUE (sticky) ════════════════════ */
.cat-nav {
  position: sticky; top: 0; z-index: 60;
  background: var(--gl-sheet); border-bottom: 1px solid var(--gl-line);
  transition: box-shadow .2s;
}
.cat-nav.scrolled { box-shadow: var(--shadow-sm); }
.cat-nav-in {
  max-width: 1180px; margin: 0 auto; height: 60px; padding: 0 clamp(16px, 4vw, 32px);
  display: flex; align-items: center; gap: 18px;
}
.cn-brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; flex-shrink: 0; gap: 3px; }
.cn-name { font-size: 17px; font-weight: 900; letter-spacing: -.04em; color: var(--navy); }
html.dark .cn-name { color: var(--gl-ink); }
.cn-tag { font-size: 7.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--flame-fg); }
.cn-links { display: flex; align-items: center; gap: 22px; }
.navlink {
  position: relative; font-size: 13.5px; font-weight: 500; color: var(--gl-muted);
  text-decoration: none; padding: 4px 1px; transition: color .15s;
}
.navlink::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: var(--flame); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.navlink:hover { color: var(--navy); }
html.dark .navlink:hover { color: var(--gl-ink); }
.navlink.on { color: var(--navy); font-weight: 600; }
html.dark .navlink.on { color: var(--gl-ink); }
.navlink.on::after { transform: scaleX(1); }
.cn-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.cn-lang { display: inline-flex; align-items: center; }
/* — Navigation de droite : Accueil/À propos/Contact = liens texte (même langage
     que les chapitres, .navlink). La Boutique = unique CTA, plein flame (identique
     clair/sombre, comme tous les CTA flame du site). — */
.cn-pages { display: flex; align-items: center; gap: 18px; }
.cn-shop {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
  color: var(--on-flame); text-decoration: none; padding: 7px 14px;
  background: var(--flame); border: 1px solid var(--flame); border-radius: 7px;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--flame) 70%, transparent);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.cn-shop:hover { background: var(--flame2); border-color: var(--flame2); transform: translateY(-1px); box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--flame) 70%, transparent); }
.cn-shop svg { width: 14px; height: 14px; stroke: currentColor; transition: transform .18s; }
.cn-shop:hover svg { transform: translateX(2px); }
.icon-btn {
  width: 36px; height: 36px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--gl-line); border-radius: 7px; color: var(--gl-muted); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.icon-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.icon-btn:hover { border-color: var(--navy-soft); color: var(--gl-ink); }

/* ════════════════════ COUVERTURE (sobre) ════════════════════ */
.cover {
  position: relative; overflow: hidden; background: var(--navy); color: var(--on-navy);
  border-bottom: 1px solid var(--on-navy-line);
}
/* — signature « blueprint » (reprise à l'identique de l'accueil) :
     double trame technique 80px + sous-trame 16px sur navy + repères ingénieur.
     Posée en couche-enfant (z-index:0) sous le contenu (.cover-in z-index:1). — */
.bp-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right,  var(--bp-line)    1px, transparent 1px),
    linear-gradient(to bottom, var(--bp-line)    1px, transparent 1px),
    linear-gradient(to right,  var(--bp-subline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bp-subline) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: center center;
}
.bp-marks { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bp-marks svg { position: absolute; opacity: .15; }
.bp-marks svg line, .bp-marks svg circle { fill: none; stroke: var(--on-navy); stroke-width: 1; }
.bp-marks svg text { fill: var(--on-navy); stroke: none; font-family: var(--fm); font-size: 9px; }
.bp-compass { top: 20px; right: 26px; width: 56px; height: 56px; }
.bp-north   { bottom: 24px; left: 26px; width: 56px; height: 56px; }
.bp-scale   { bottom: 24px; right: 26px; width: 160px; height: 34px; }
@media (max-width: 767px) { .bp-marks { display: none; } }
.cover-in {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto;
  padding: clamp(44px, 7vw, 86px) clamp(20px, 5vw, 40px);
  min-height: clamp(480px, 74vh, 720px);
  display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(30px, 5vw, 70px); align-items: center;
}
.cov-kicker { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--on-navy-dim); margin-bottom: 22px; }
.cov-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--flame); flex-shrink: 0; }
.cov-h1 { font-size: clamp(38px, 7vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: .98; color: var(--on-navy); }
.cov-rule { width: 54px; height: 3px; border-radius: 2px; background: var(--flame); margin: clamp(20px, 3vw, 28px) 0; }
.cov-sub { font-size: clamp(15px, 2.4vw, 18px); color: var(--on-navy-dim); max-width: 42ch; line-height: 1.6; }
.cov-sub b { color: var(--on-navy); font-weight: 600; }
.cov-meta { margin-top: 26px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cov-plate { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fm); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--on-navy-dim); border: 1px solid var(--on-navy-line); border-radius: 5px; padding: 8px 13px; }
.cov-actions { margin-top: 30px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cov-cue { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fm); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-faint); }
.cov-cue svg { width: 14px; height: 14px; stroke: var(--flame); }

/* — plaque dessin technique (1 visuel) — */
.cov-figure {
  position: relative; border: 1px solid var(--on-navy-line); border-radius: 8px;
  background: var(--on-navy-fill); padding: clamp(20px, 3vw, 34px);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.cov-figure::before, .cov-figure::after { content: ''; position: absolute; width: 10px; height: 10px; border: 1px solid var(--on-navy-line); pointer-events: none; }
.cov-figure::before { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.cov-figure::after { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }
.cov-svg { display: block; width: 100%; max-width: 280px; height: auto; overflow: visible; }
.cov-svg line, .cov-svg path { fill: none; stroke: var(--on-navy-dim); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cov-svg .deck { stroke: var(--on-navy); }
.cov-svg .brace { stroke: var(--on-navy-faint); }
.cov-svg .dim { stroke: var(--flame); stroke-width: 1; opacity: .7; }
.cov-svg .dimtxt { fill: var(--on-navy-dim); stroke: none; font-family: var(--fm); font-size: 11px; letter-spacing: .04em; }
.cov-cap { font-family: var(--fm); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-faint); text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .cover.draw .cov-svg [data-draw] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawln .8s ease forwards; }
  .cover.draw .cov-svg [data-draw="2"] { animation-delay: .14s; }
  .cover.draw .cov-svg [data-draw="3"] { animation-delay: .3s; }
  .cover.draw .cov-svg [data-draw="4"] { animation-delay: .46s; }
  .cover.draw .cov-svg [data-draw="5"] { animation-delay: .6s; }
  .cover.draw .cov-svg .dim { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawln .7s ease .8s forwards; }
  .cover.draw .cov-svg .dimtxt { opacity: 0; animation: fadeIn .5s ease 1.04s forwards; }
}
@keyframes drawln { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ════════════════════ CORPS — feuilles ════════════════════ */
.book { max-width: 1180px; margin: 0 auto; padding: clamp(26px, 4vw, 52px) clamp(16px, 4vw, 32px) clamp(40px, 6vw, 80px); }
.leaf {
  position: relative; background: var(--gl-sheet); border: 1px solid var(--gl-line); border-radius: 10px;
  padding: clamp(26px, 4vw, 54px) clamp(20px, 4vw, 56px) clamp(48px, 5vw, 64px);
  margin-bottom: clamp(20px, 3vw, 30px); box-shadow: var(--shadow);
  scroll-margin-top: 78px;
}
.leaf-head { margin-bottom: 24px; }
.sec-tag { display: inline-flex; align-items: center; gap: 9px; font-family: var(--fm); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--flame-fg); margin-bottom: 13px; }
.sec-tag::before { content: ''; width: 22px; height: 1px; background: var(--flame); }
.sec-title { font-size: clamp(23px, 3.2vw, 33px); font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.08; }
html.dark .sec-title { color: var(--gl-ink); }
.sec-intro { margin-top: 13px; max-width: 62ch; font-size: 14.5px; color: var(--gl-muted); line-height: 1.62; }
.sec-intro b { color: var(--gl-ink); font-weight: 600; }
.folio { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-family: var(--fm); font-size: 11px; letter-spacing: .28em; color: var(--gl-faint); }
.folio::before, .folio::after { content: '—'; margin: 0 9px; opacity: .5; }

/* — FRONTISPICE / CAPACITÉ (#gl-surface) — */
.leaf.front { text-align: center; padding-top: clamp(34px, 5vw, 60px); }
.gl-front-figure { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 14px; line-height: 1; }
.gl-front-approx { font-size: clamp(24px, 5vw, 30px); font-weight: 500; color: var(--gl-faint); }
.gl-front-num { font-size: clamp(50px, 11vw, 86px); font-weight: 800; letter-spacing: -.03em; color: var(--gl-ink); font-feature-settings: "tnum"; }
.gl-front-unit { font-size: clamp(24px, 5vw, 32px); font-weight: 700; color: var(--flame-fg); }
.gl-front-label { margin: 14px 0 4px; font-size: clamp(15px, 2.4vw, 18px); font-weight: 700; color: var(--gl-ink); }
.gl-front-analogie { margin: 0 auto; max-width: 48ch; font-size: 13.5px; color: var(--gl-muted); line-height: 1.6; }
.front-rule { width: 56px; height: 2px; margin: 22px auto; background: var(--gl-line); }
.gl-front-stats { display: flex; justify-content: center; gap: clamp(26px, 6vw, 64px); flex-wrap: wrap; margin-top: 4px; }
.gl-front-stat { display: flex; flex-direction: column; gap: 5px; }
.gl-front-stat-n { font-size: clamp(18px, 3vw, 23px); font-weight: 800; color: var(--gl-ink); }
.gl-front-stat-l { font-size: 11.5px; color: var(--gl-faint); letter-spacing: .02em; }
.gl-front-note { max-width: 52ch; margin: 26px auto 0; font-size: 11.5px; line-height: 1.6; color: var(--gl-faint); }

/* — SOMMAIRE — */
.toc { border-top: 1px solid var(--gl-line); }
.toc-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 16px;
  border-bottom: 1px solid var(--gl-line); padding: 18px 6px; text-decoration: none; color: var(--gl-ink);
  transition: background .15s, padding-left .18s;
}
.toc-item:hover { background: var(--gl-paper); padding-left: 13px; }
.toc-num { font-family: var(--fm); font-size: 12px; color: var(--flame-fg); letter-spacing: .08em; }
.toc-body { min-width: 0; }
.toc-name { font-size: clamp(16px, 2.2vw, 19px); font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
html.dark .toc-name { color: var(--gl-ink); }
.toc-sub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--gl-muted); }
.toc-dots { align-self: center; height: 1px; min-width: 24px; margin: 0 2px; border-bottom: 1px dotted var(--gl-faint); opacity: .7; }
.toc-pg { font-family: var(--fm); font-size: 12.5px; color: var(--gl-muted); white-space: nowrap; }
.toc-pg b { color: var(--gl-ink); font-weight: 500; }
.toc-foot { margin-top: 22px; font-size: 12.5px; color: var(--gl-faint); line-height: 1.6; }
.toc-foot b { color: var(--gl-muted); font-weight: 600; }

/* — CHAPITRE MARQUE — */
.brand-head { display: flex; align-items: center; gap: 18px; margin-bottom: 6px; }
.brand-logo {
  flex-shrink: 0; width: 60px; height: 60px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--on-navy); font-weight: 800; font-size: 12px; letter-spacing: .02em; position: relative; overflow: hidden;
}
.brand-logo::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--flame); }
.brand-kicker { font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--flame-fg); }
.brand-name { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.05; }
html.dark .brand-name { color: var(--gl-ink); }
.brand-sys { margin-top: 3px; font-size: 13px; color: var(--gl-muted); }
.brand-note {
  display: flex; align-items: flex-start; gap: 11px; margin: 18px 0 4px;
  padding: 13px 16px; background: var(--gl-paper); border: 1px solid var(--gl-line); border-left: 3px solid var(--flame); border-radius: 0 8px 8px 0;
  font-size: 13px; color: var(--gl-muted); line-height: 1.55;
}
.brand-note svg { flex-shrink: 0; width: 16px; height: 16px; stroke: var(--flame); margin-top: 1px; }
.brand-note b { color: var(--gl-ink); font-weight: 600; }
.block-tag { font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gl-faint); margin: 30px 0 4px; }

/* ════════════════════ TABLES (parc · EPI · réfs) ════════════════════ */
.table-wrap { margin-top: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--gl-line); border-radius: 9px; background: var(--gl-sheet); }
table.gl-table { width: 100%; border-collapse: collapse; min-width: 720px; }
table.gl-table thead th {
  text-align: left; font-family: var(--fm); font-weight: 500; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--on-navy); background: var(--navy); padding: 13px 16px; white-space: nowrap;
}
table.gl-table thead th:first-child { border-top-left-radius: 8px; }
table.gl-table thead th:last-child { border-top-right-radius: 8px; }
table.gl-table th.r, table.gl-table td.r { text-align: right; }
table.gl-table tbody tr { border-bottom: 1px solid var(--gl-line2); transition: background .14s, box-shadow .14s; }
table.gl-table tbody tr:last-child { border-bottom: 0; }
table.gl-table tbody tr.is-link { cursor: pointer; }
table.gl-table tbody tr.is-link:hover { background: var(--gl-paper); box-shadow: inset 3px 0 0 var(--flame); }
table.gl-table tbody td { padding: 14px 16px; font-size: 13.5px; color: var(--gl-ink); vertical-align: middle; }
td .desc { font-weight: 600; color: var(--gl-ink); }
td .data { font-family: var(--fm); font-size: 12.5px; color: var(--gl-muted); white-space: nowrap; }
a.gl-ref { font-family: var(--fm); font-size: 12.5px; font-weight: 500; color: var(--flame-fg); white-space: nowrap; text-decoration: none; }
a.gl-ref:hover { text-decoration: underline; text-underline-offset: 2px; }
/* Déclencheur de catégorie : même allure que .gl-ref (réf flame mono), mais bouton
   qui pré-filtre l'explorateur en dessous. Le chevron signale « voir les réfs ↓ ». */
.gl-cat-trigger { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--fm); font-size: 12.5px; font-weight: 500; color: var(--flame-fg); white-space: nowrap; }
.gl-cat-trigger svg { width: 13px; height: 13px; stroke: currentColor; opacity: .7; transition: transform .15s, opacity .15s; }
.gl-cat-trigger:hover { text-decoration: underline; text-underline-offset: 2px; }
.gl-cat-trigger:hover svg { transform: translateY(1px); opacity: 1; }
.price { font-family: var(--fm); font-size: 13.5px; font-weight: 500; color: var(--gl-ink); white-space: nowrap; }
.price:empty::before { content: '—'; color: var(--gl-faint); }
.norm { display: inline-block; font-family: var(--fm); font-size: 11px; color: var(--navy); background: var(--gl-paper); border: 1px solid var(--gl-line); border-radius: 4px; padding: 3px 7px; white-space: nowrap; }
html.dark .norm { color: var(--gl-ink); }
.desc-cell { display: flex; align-items: center; gap: 12px; }
.pico { width: 22px; height: 22px; flex-shrink: 0; stroke: var(--navy); fill: none; opacity: .82; }
html.dark .pico { stroke: var(--navy-soft); }
.tcat { font-weight: 600; color: var(--gl-ink); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--gl-ink); }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pill.in { color: var(--ok); }
.pill.in .dot { background: var(--ok-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-dot) 20%, transparent); }
.pill.low { color: var(--amber); }
.pill.low .dot { background: var(--amber-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber-dot) 20%, transparent); }
.pill.ord { color: var(--gl-muted); }
.pill.ord .dot { background: var(--neutral); }
.foot-note { margin-top: 14px; font-size: 12px; color: var(--gl-faint); }
.foot-note b { color: var(--gl-muted); font-weight: 600; }
.foot-note a { color: var(--flame-fg); text-decoration: none; }
.foot-note a:hover { text-decoration: underline; }

/* ════════════════════ EXPLORATEUR DE RÉFÉRENCES ════════════════════ */
.refs { margin-top: 14px; scroll-margin-top: 78px; }
.refs-search { position: relative; margin-top: 4px; }
.refs-search > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--gl-faint); fill: none; pointer-events: none; }
.refs-search input {
  width: 100%; font: 500 15px var(--fb); color: var(--gl-ink); background: var(--gl-sheet);
  border: 1px solid var(--gl-line); border-radius: 10px; padding: 14px 16px 14px 46px;
  transition: border-color .15s, box-shadow .15s;
}
.refs-search input::placeholder { color: var(--gl-faint); }
.refs-search input:focus { outline: none; border-color: var(--navy-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 14%, transparent); }

.refs-filters { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.refs-row { display: flex; align-items: center; gap: 14px; }
.refs-flabel { flex-shrink: 0; width: 62px; font-family: var(--fm); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gl-faint); }
.refs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rchip {
  font: 600 12.5px var(--fb); color: var(--gl-muted); background: var(--gl-sheet);
  border: 1px solid var(--gl-line); border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.rchip:hover { color: var(--navy); border-color: var(--navy-soft); }
html.dark .rchip:hover { color: var(--gl-ink); }
.rchip.on { background: var(--active); border-color: var(--active); color: #fff; }
.rchip.on:hover { color: var(--on-flame); }

.refs-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 20px 0 0; }
.refs-count { font-family: var(--fm); font-size: 12px; letter-spacing: .04em; color: var(--gl-muted); white-space: nowrap; flex-shrink: 0; }
.refs-count b { color: var(--flame-fg); font-weight: 500; }
.refs-syslock { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gl-faint); white-space: nowrap; flex-shrink: 0; }
.refs-syslock svg { width: 14px; height: 14px; stroke: var(--gl-faint); fill: none; flex-shrink: 0; }

.refs-table tbody td { font-size: 13px; }
.refs-pieces { color: var(--gl-muted); }
.refs-brandcell { font-weight: 600; color: var(--gl-ink); }
.refs-empty { padding: 40px 18px; text-align: center; font-size: 13.5px; color: var(--gl-muted); background: var(--gl-sheet); border-top: 1px solid var(--gl-line2); }
.refs-empty svg { display: block; width: 26px; height: 26px; margin: 0 auto 10px; stroke: var(--gl-faint); fill: none; }
.refs-note { margin-top: 12px; font-size: 12px; color: var(--gl-faint); line-height: 1.55; }

/* ── « Par page » (segmenté) + pagination de l'explorateur — mêmes tokens que .rchip ── */
.gl-pp { display: inline-flex; align-items: stretch; border: 1px solid var(--gl-line); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.gl-pp-lab { display: inline-flex; align-items: center; padding: 0 13px; background: var(--gl-sheet); font-family: var(--fm); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gl-faint); }
.gl-pp button { min-width: 40px; padding: 7px 12px; border: none; border-left: 1px solid var(--gl-line); background: var(--gl-sheet); color: var(--gl-muted); font: 600 12.5px var(--fb); cursor: pointer; transition: color .15s, background .15s; }
.gl-pp button:hover:not(.on) { color: var(--gl-ink); }
.gl-pp button.on { background: var(--active); color: #fff; }   /* actif = --active : navy(clair) / flame(sombre) */

.gl-pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 22px 0 0; }
.gl-pager:empty { display: none; }
.gl-pager button { min-width: 38px; height: 38px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gl-line); background: var(--gl-sheet); color: var(--gl-muted); border-radius: 8px; font: 600 12.5px var(--fb); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.gl-pager button:hover:not(:disabled):not(.on) { color: var(--gl-ink); border-color: var(--gl-faint); }
.gl-pager button.on { background: var(--active); border-color: var(--active); color: #fff; cursor: default; }
.gl-pager button:disabled { opacity: .4; cursor: not-allowed; }
.gl-pager .pg-gap { color: var(--gl-faint); user-select: none; padding: 0 2px; }
.gl-pager svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; }

/* ════════════════════ BOUTONS / CTA ════════════════════ */
.sec-cta { margin-top: 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-flame {
  display: inline-flex; align-items: center; gap: 11px; font: 700 14.5px var(--fb); color: var(--on-flame);
  background: var(--flame); border: 0; border-radius: 7px; padding: 14px 24px; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--flame) 70%, transparent); transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-flame:hover { transform: translateY(-2px); background: var(--flame2); box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--flame) 70%, transparent); }
.btn-flame svg { width: 17px; height: 17px; stroke: currentColor; transition: transform .18s; }
.btn-flame:hover svg { transform: translateX(3px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 9px; font: 700 14px var(--fb); color: var(--navy); background: none;
  border: 1px solid var(--gl-line); border-radius: 7px; padding: 13px 20px; cursor: pointer; text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
html.dark .btn-ghost { color: var(--gl-ink); }
.btn-ghost:hover { border-color: var(--navy-soft); background: var(--gl-paper); }
.btn-ghost svg { width: 16px; height: 16px; stroke: currentColor; }
.cta-aside { font-size: 13px; color: var(--gl-muted); }

/* ════════════════════ CONTACT (4e de couverture) ════════════════════ */
.leaf.backcover { background: var(--navy); border-color: var(--on-navy-line); color: var(--on-navy-dim); overflow: hidden; }
.bc-inner { position: relative; z-index: 1; text-align: center; padding: clamp(8px, 2vw, 24px) 0 6px; }
.bc-mark { font-weight: 900; letter-spacing: -.04em; font-size: clamp(30px, 5vw, 44px); color: var(--on-navy); }
.bc-flamebar { width: 46px; height: 3px; border-radius: 2px; background: var(--flame); margin: 16px auto 18px; }
.bc-lead { max-width: 50ch; margin: 0 auto; font-size: clamp(14px, 2.1vw, 16.5px); color: var(--on-navy-dim); line-height: 1.62; }
.bc-lead b { color: var(--on-navy); font-weight: 600; }
.bc-actions { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.bc-light { color: var(--on-navy); border-color: var(--on-navy-line); }
.bc-light:hover { border-color: var(--on-navy); background: var(--on-navy-fill); }
.bc-contacts { margin-top: 34px; display: flex; justify-content: center; gap: clamp(22px, 5vw, 52px); flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--on-navy-line); }
.bc-contact { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--on-navy-dim); text-decoration: none; transition: color .15s; }
.bc-contact:hover { color: var(--on-navy); }
.bc-contact svg { width: 17px; height: 17px; stroke: var(--flame); fill: none; flex-shrink: 0; }
.bc-contact b { color: var(--on-navy); font-weight: 600; }
.bc-meta { margin-top: 26px; font-family: var(--fm); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-navy-faint); }
.bc-legal { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; }
.bc-legal a { font-size: 12px; color: var(--on-navy-faint); text-decoration: none; cursor: pointer; transition: color .15s; }
.bc-legal a:hover { color: var(--on-navy); text-decoration: underline; }
.leaf.backcover .folio { color: var(--on-navy-faint); }

/* ════════════════════ MODALE LÉGALE ════════════════════ */
.gl-legal { display: none; position: fixed; inset: 0; z-index: 3000; background: color-mix(in srgb, var(--navy) 66%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); align-items: center; justify-content: center; padding: 1.5rem; }
.gl-legal.open { display: flex; }
.gl-legal-box { background: var(--gl-sheet); color: var(--gl-ink); border: 1px solid var(--gl-line); border-radius: 10px; max-width: 720px; width: 100%; max-height: 84vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.gl-legal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--gl-line); }
.gl-legal-head h3 { font-size: 16px; font-weight: 700; color: var(--gl-ink); }
.gl-legal-close { background: none; border: 0; cursor: pointer; color: var(--gl-muted); padding: 4px; line-height: 0; border-radius: 6px; }
.gl-legal-close:hover { color: var(--gl-ink); background: var(--gl-paper); }
.gl-legal-body { overflow-y: auto; padding: 1.3rem 1.4rem; font-size: 13.5px; line-height: 1.7; color: var(--gl-muted); }
.gl-legal-body h2, .gl-legal-body h3, .gl-legal-body b, .gl-legal-body strong { color: var(--gl-ink); }

/* ════════════════════ RESPONSIVE ════════════════════ */
/* Sous 1080px : on retire les boutons de page pour ne pas surcharger la barre
   (les chapitres restent jusqu'à 900px ; Accueil/Contact restent joignables
   depuis la 4ᵉ de couverture). */
@media (max-width: 1080px) { .cn-pages { display: none; } }
@media (max-width: 900px) {
  .cn-links { display: none; }
  .cover-in { grid-template-columns: 1fr; }
  .cov-figure { order: -1; max-width: 360px; }
}
@media (max-width: 640px) {
  .cn-shop .lbl { display: none; }
  .refs-flabel { width: 100%; margin-bottom: -4px; }
  .refs-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* tables → cartes empilées */
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  table.gl-table { min-width: 0; display: block; }
  table.gl-table thead { display: none; }
  table.gl-table tbody, table.gl-table tbody tr, table.gl-table tbody td { display: block; }
  table.gl-table tbody tr { background: var(--gl-sheet); border: 1px solid var(--gl-line); border-radius: 10px; padding: 4px 15px 8px; margin-bottom: 13px; }
  table.gl-table tbody tr.is-link:hover { box-shadow: none; }
  table.gl-table tbody td { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--gl-line2); text-align: right; }
  table.gl-table tbody td:last-child { border-bottom: 0; }
  table.gl-table tbody td::before { content: attr(data-label); flex: 0 0 auto; text-align: left; font-family: var(--fm); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gl-faint); }
  table.gl-table tbody td:first-child { border-bottom: 1px solid var(--gl-line); padding: 12px 0 11px; }
  .desc-cell { justify-content: flex-end; gap: 9px; }
  .refs-empty { border: 1px solid var(--gl-line); border-radius: 10px; }
}
@media (max-width: 460px) {
  .leaf { padding: 24px 17px 48px; }
  .brand-head { gap: 13px; }
  .brand-logo { width: 52px; height: 52px; }
}

/* ════════════════════ MOTION RÉDUIT ════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms; animation-iteration-count: 1; transition-duration: .001ms; }
}

/* ════════════════════ IMPRESSION ════════════════════ */
@media print {
  .cat-nav, .bp-grid, .bp-marks, .cov-actions, .cov-cue, .cat-top { display: none; }
  body { background: white; }
  .leaf { box-shadow: none; break-inside: avoid; }
  .leaf.backcover, .cover { background: var(--navy); }
}

/* ════════════════════ BOUTON « REMONTER EN HAUT » (flame, clair & sombre) ════════════════════ */
.cat-top { position: fixed; right: 24px; bottom: 24px; z-index: 200; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%;
  background: var(--flame); color: #fff; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, background .15s; }
.cat-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.cat-top:hover { background: var(--flame2); }
.cat-top svg { width: 22px; height: 22px; }
@media (max-width: 640px) { .cat-top { right: 16px; bottom: 16px; width: 42px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .cat-top { transition: none; } }
