/* ==========================================================================
   agents.louloutech.fr — « console d'agents »

   Parent du portail Home, pas son jumeau. Ce qui est partagé : le bleu-nuit,
   l'indigo #6366f1, le verre flouté, la courbe cubic-bezier(.4,0,.2,1), le
   header en îlot flottant.

   Ce qui est propre à ce site :
     — Space Grotesk pour les titres et les données chiffrées ;
     — une couleur par niveau d'autonomie qui irrigue le module entier
       (halo, filet, index, puces) au lieu de teinter un seul badge ;
     — un fond en aurore conique + trame de points + grain, là où Home
       fait des orbes rondes sur une grille de lignes ;
     — des modules en trois étages (bandeau / corps / barre d'état) qui
       ouvrent un panneau latéral, au lieu de cartes-liens.
   ========================================================================== */

:root {
  --bg-base:       #0b0b14;
  --bg-elevated:   #13131f;
  --bg-module:     rgba(20, 20, 32, 0.42);

  --border:       rgba(255, 255, 255, 0.055);
  --border-hover: rgba(255, 255, 255, 0.13);

  --text-primary:   #f4f4f5;
  --text-secondary: #a5a5b4;
  --text-muted:     #74747f;

  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-soft:  rgba(99, 102, 241, 0.15);
  --accent-glow:  rgba(99, 102, 241, 0.25);

  /* Trio de catégories. L'indigo reste au centre — c'est le lien avec Home —
     encadré d'une émeraude et d'un fuchsia. Le fuchsia est le pari du lot :
     employé à 14 % en fond et en filet fin, il donne le relief que trois
     teintes sages n'auraient pas. */
  --cat-auto:  #34d399;
  --cat-pipe:  #818cf8;
  --cat-embed: #e879f9;

  --blur:        28px;
  --blur-strong: 40px;

  --radius:    20px;
  --radius-sm: 10px;

  --shadow-hover: 0 18px 48px rgba(0, 0, 0, 0.5);

  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --display: 'Space Grotesk', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --maxw: 1180px;
  --gut: clamp(1.15rem, 4vw, 2.5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: var(--sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: #a5b4fc; }

:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(99, 102, 241, 0.3); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; z-index: 300;
  background: var(--bg-elevated); color: var(--text-primary);
  padding: .7rem 1.1rem; border: 1px solid var(--border-hover); border-radius: var(--radius-sm);
}
.skip-link:focus { left: 16px; top: 16px; }

/* ==========================================================================
   Fond — aurore, trame de points, grain
   ========================================================================== */

.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* L'aurore : un dégradé conique en rotation très lente, écrasé en ellipse et
   fortement flouté. Rien à voir avec les orbes circulaires du portail — le
   mouvement est rotatif, pas flottant. */
.bg-aurora {
  position: absolute;
  top: -55vh; left: 50%;
  width: 165vw; height: 125vh;
  transform: translateX(-50%);
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(99, 102, 241, 0.34) 0deg,
    rgba(232, 121, 249, 0.16) 72deg,
    rgba(52, 211, 153, 0.13) 152deg,
    rgba(99, 102, 241, 0.28) 232deg,
    rgba(139, 92, 246, 0.22) 300deg,
    rgba(99, 102, 241, 0.34) 360deg);
  filter: blur(90px);
  opacity: .82;
  border-radius: 50%;
  animation: auroraSpin 70s linear infinite;
  will-change: transform;
}
@keyframes auroraSpin {
  from { transform: translateX(-50%) rotate(0deg); }
  to   { transform: translateX(-50%) rotate(360deg); }
}

/* Deuxième nappe, contre-rotative et plus lente : c'est elle qui empêche
   l'aurore de tourner « en bloc » et lui donne sa respiration. */
.bg-aurora-2 {
  position: absolute;
  top: -25vh; left: 50%;
  width: 120vw; height: 80vh;
  transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 50%,
    transparent 0deg,
    rgba(232, 121, 249, 0.18) 90deg,
    transparent 180deg,
    rgba(52, 211, 153, 0.14) 270deg,
    transparent 360deg);
  filter: blur(110px);
  opacity: .55;
  border-radius: 50%;
  animation: auroraSpin 104s linear infinite reverse;
  will-change: transform;
}

/* Trame de points plutôt qu'une grille de lignes. */
.bg-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 100% 62% at 50% 0%, #000 8%, transparent 78%);
          mask-image: radial-gradient(ellipse 100% 62% at 50% 0%, #000 8%, transparent 78%);
  opacity: .55;
}

/* Grain : un bruit SVG figé, à très faible opacité. Coûte une image de
   quelques centaines d'octets et enlève l'aspect « aplat numérique » des
   grands dégradés. */
.bg-grain {
  position: absolute; inset: -100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  opacity: .035;
  mix-blend-mode: overlay;
}

/* Voile bas de page : l'aurore ne doit pas colorer le socle technique. */
.bg-fade {
  position: absolute; inset: auto 0 0; height: 45vh;
  background: linear-gradient(180deg, transparent, var(--bg-base) 88%);
}

/* ==========================================================================
   Header — îlot flottant
   ========================================================================== */

.dock {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 120;
  width: min(1120px, calc(100% - 28px));
  padding: 9px 10px 9px 16px;
  background: rgba(11, 11, 20, 0.5);
  backdrop-filter: blur(44px) saturate(170%);
  -webkit-backdrop-filter: blur(44px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.055);
  /* Coins nettement moins ronds que la pilule du portail : la parenté tient
     au verre et à la flottaison, pas à la forme. */
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.dock-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.dock-brand { display: inline-flex; align-items: center; gap: 9px; padding: 5px 4px 5px 2px; }
.dock-mark {
  width: 24px; height: 24px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--accent), #a855f7);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
  font-family: var(--display); font-size: .72rem; font-weight: 700; color: #fff;
  letter-spacing: -.02em;
}
.dock-title { font-family: var(--display); font-size: .95rem; font-weight: 600; letter-spacing: -.02em; }
.dock-title .dim { color: var(--text-muted); font-weight: 400; }

.dock-nav { display: flex; align-items: center; gap: 3px; margin-right: auto; }
.dock-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display);
  font-size: .78rem; font-weight: 500;
  color: var(--text-muted);
  padding: 6px 11px; border-radius: 9px;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.dock-link .n { font-variant-numeric: tabular-nums; opacity: .6; }
.dock-link:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.dock-link.active { color: var(--accent-light); background: var(--accent-soft); }
.dock-link.active .n { opacity: 1; }

.dock-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding-right: 6px; }

.dock-clock {
  font-family: var(--mono); font-size: .78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 8px;
}
.dock-clock .led {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cat-auto);
  box-shadow: 0 0 10px rgba(52, 211, 153, .8);
  animation: led 2.8s ease-in-out infinite;
}
@keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Progression de lecture, sur l'arête basse de l'îlot. */
.dock-progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent), #c084fc, var(--cat-auto));
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: .9;
}

/* ==========================================================================
   Mise en page
   ========================================================================== */

.container { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

.hero { padding-top: clamp(7.5rem, 17vw, 11rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display);
  font-size: .7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--text-secondary);
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 1.6rem;
}
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent-glow); }

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.25rem, 6.4vw, 4rem);
  font-weight: 600; line-height: 1.04; letter-spacing: -.04em;
  margin-bottom: 1.5rem; max-width: 17ch;
  color: #fff;
}
/* Un seul mot porte le dégradé : le reste du titre reste blanc, sinon la
   couleur mange la lisibilité aux grandes tailles. */
.hero h1 .grad {
  background: linear-gradient(104deg, var(--accent-light) 0%, #c084fc 42%, var(--cat-embed) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.hero-lead { color: var(--text-secondary); max-width: 64ch; font-size: clamp(1rem, 2.2vw, 1.0625rem); margin-bottom: .9rem; }
.hero-lead strong { color: var(--text-primary); font-weight: 500; }
.hero-note { color: var(--text-muted); font-size: .9rem; max-width: 64ch; }

/* ==========================================================================
   Bandeau de chiffres
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.5rem;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: rgba(14, 14, 24, 0.55);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  padding: 1.15rem 1.25rem;
  transition: background-color .25s var(--ease);
}
.stat:hover { background: rgba(22, 22, 36, 0.7); }
.stat-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 600;
  letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  margin-bottom: .25rem;
}
.stat-num .suffix { color: var(--accent-light); }
.stat-label { font-size: .75rem; color: var(--text-muted); line-height: 1.35; display: block; }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:last-child { grid-column: 1 / -1; }
}

/* ==========================================================================
   Filtres
   ========================================================================== */

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.25rem; align-items: center; }
.filters[hidden] { display: none; }
.filters-label {
  font-family: var(--display); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .14em; color: var(--text-muted); margin-right: .35rem;
}
.filter {
  font-family: var(--display); font-size: .8rem; font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s var(--ease);
}
.filter .swatch { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.filter:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); border-color: var(--border-hover); }
.filter[data-filter="auto"]  { --fc: var(--cat-auto); }
.filter[data-filter="pipe"]  { --fc: var(--cat-pipe); }
.filter[data-filter="embed"] { --fc: var(--cat-embed); }
.filter[data-filter="all"]   { --fc: var(--accent-light); }
.filter[aria-pressed="true"] {
  color: var(--fc);
  border-color: color-mix(in srgb, var(--fc) 45%, transparent);
  background: color-mix(in srgb, var(--fc) 13%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--fc) 16%, transparent);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding-block: clamp(2.25rem, 5vw, 3.25rem); scroll-margin-top: 96px; }
.section[hidden] { display: none; }

.section-head { margin-bottom: 1.85rem; display: flex; align-items: flex-start; gap: 1.1rem; }

/* Le numéro de section en gros chiffre, teinté par la catégorie : c'est la
   signature visuelle du site. */
.section-idx {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 700;
  line-height: .85; letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--c, var(--accent)) 55%, transparent);
  flex-shrink: 0;
  padding-top: .1em;
}
@supports not (-webkit-text-stroke: 1px red) {
  .section-idx { color: color-mix(in srgb, var(--c, var(--accent)) 45%, transparent); }
}

.section-kicker {
  display: block;
  font-family: var(--display); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--c, var(--accent));
  margin-bottom: .55rem;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.3vw, 1.85rem);
  font-weight: 600; letter-spacing: -.025em; line-height: 1.2;
  margin-bottom: .6rem;
}
.section-head p { color: var(--text-secondary); max-width: 62ch; font-size: .94rem; }

.grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1040px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Modules
   ========================================================================== */

.module {
  position: relative;
  display: flex; flex-direction: column;
  text-align: left;
  font: inherit; color: inherit;
  background: var(--bg-module);
  backdrop-filter: blur(var(--blur-strong));
  -webkit-backdrop-filter: blur(var(--blur-strong));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition:
    opacity .5s var(--ease),
    transform .42s var(--ease-out),
    border-color .3s var(--ease),
    box-shadow .3s var(--ease);
}
.module[hidden] { display: none; }

/* Halo de catégorie, révélé au survol : la couleur vient du module lui-même,
   pas d'un badge isolé. */
.module::after {
  content: ''; position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 62%);
  opacity: 0; transition: opacity .3s var(--ease);
}

.module:hover,
.module:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 38%, transparent);
  box-shadow: var(--shadow-hover), 0 0 0 1px color-mix(in srgb, var(--c) 12%, transparent);
}
.module:hover::after, .module:focus-visible::after { opacity: 1; }

/* Le focus clavier atterrit sur le bouton interne, pas sur l'article : ces
   deux règles allument la carte dans ce cas. Isolées à dessein — groupées
   avec les précédentes, un navigateur sans :has() les invaliderait toutes. */
.module:has(:focus-visible)::after { opacity: 1; }
.module:has(:focus-visible) {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 38%, transparent);
  box-shadow: var(--shadow-hover), 0 0 0 1px color-mix(in srgb, var(--c) 12%, transparent);
}

/* Étage 1 — bandeau */
.module-top {
  position: relative;
  display: flex; align-items: flex-start; gap: .9rem;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, transparent), transparent);
}
/* Filet lumineux qui balaie le bandeau au survol. */
.module-top::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--c), transparent);
  opacity: 0; transform: scaleX(.4);
  transition: opacity .3s var(--ease), transform .5s var(--ease-out);
}
.module:hover .module-top::before { opacity: .85; transform: scaleX(1); }

.module-idx {
  font-family: var(--display); font-size: .72rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--c); opacity: .75;
  padding-top: .2rem;
  letter-spacing: .04em;
}

.module-title {
  font-family: var(--display);
  font-size: 1.06rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.28;
  margin-bottom: .55rem;
}
.module-head { min-width: 0; flex: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display);
  font-size: .655rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .09em;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent);
  white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }

/* Étage 2 — corps */
.module-body { padding: 1.1rem 1.35rem; flex: 1; }
.module-desc { color: var(--text-secondary); font-size: .9rem; line-height: 1.58; }

/* Étage 3 — barre d'état */
.module-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1.35rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.16);
}
.module-meta {
  font-family: var(--mono); font-size: .69rem;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 7px;
  min-width: 0;
}
.module-meta .tick { color: var(--c); opacity: .8; flex-shrink: 0; }
.module-meta .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.module-open {
  border: 0; background: none; cursor: pointer; padding: 0;
  font-family: var(--display); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  transition: color .25s var(--ease), gap .25s var(--ease);
}
.module:hover .module-open { color: var(--c); gap: 10px; }
.module-open .arr { transition: transform .25s var(--ease-out); }
.module:hover .module-open .arr { transform: translateX(3px); }

/* Le détail vit dans le HTML et n'est extrait que par le JS. Sans JS il
   s'affiche à la suite du module : rien n'est perdu, rien n'est inaccessible. */
.module-detail { padding: 0 1.35rem 1.3rem; }
.js .module-detail { display: none; }

/* ==========================================================================
   Panneau de détail
   ========================================================================== */

.sheet-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(5, 5, 10, 0.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .32s var(--ease), visibility .32s;
}
.sheet-scrim.open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed; z-index: 210;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 100%);
  display: flex; flex-direction: column;
  background: rgba(15, 15, 25, 0.92);
  backdrop-filter: blur(48px) saturate(160%);
  -webkit-backdrop-filter: blur(48px) saturate(160%);
  border-left: 1px solid var(--border-hover);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.55);
  transform: translateX(102%);
  transition: transform .42s var(--ease-out);
  overscroll-behavior: contain;
}
.sheet.open { transform: none; }
.sheet[hidden], .sheet-scrim[hidden] { display: none; }

/* Liseré de catégorie sur l'arête du panneau. */
.sheet::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--c, var(--accent)), transparent 70%);
  opacity: .9;
}

.sheet-head {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.5rem 1.6rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--accent)) 9%, transparent), transparent);
}
.sheet-head-main { flex: 1; min-width: 0; }
.sheet-kicker { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; flex-wrap: wrap; }
.sheet-idx { font-family: var(--mono); font-size: .7rem; color: var(--text-muted); }
.sheet h2 {
  font-family: var(--display);
  font-size: 1.4rem; font-weight: 600; letter-spacing: -.028em; line-height: 1.22;
}

.sheet-close {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
  transition: all .2s var(--ease);
}
.sheet-close:hover { background: rgba(255, 255, 255, 0.09); color: var(--text-primary); border-color: var(--border-hover); }

.sheet-body { padding: 1.4rem 1.6rem 2.5rem; overflow-y: auto; flex: 1; }

.sheet-lead { color: var(--text-secondary); font-size: .95rem; line-height: 1.62; margin-bottom: 1.5rem; }

.sheet-section + .sheet-section { margin-top: 1.6rem; }
.sheet-section :is(h3, h4) {
  font-family: var(--display); font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .15em;
  color: var(--text-muted);
  margin-bottom: .85rem;
  display: flex; align-items: center; gap: .7rem;
}
.sheet-section :is(h3, h4)::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.points { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.points li {
  position: relative; padding-left: 1.4rem;
  font-size: .89rem; color: var(--text-secondary); line-height: 1.55;
}
.points li::before {
  content: ''; position: absolute; left: .25rem; top: .62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--c, var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--c, var(--accent)) 60%, transparent);
}

.stack { display: flex; flex-wrap: wrap; gap: .4rem; }
.stack span {
  font-family: var(--mono); font-size: .7rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 9px;
}

.specs { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.1rem; font-size: .84rem; }
.specs dt { font-family: var(--mono); font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.specs dd { color: var(--text-secondary); }

code {
  font-family: var(--mono); font-size: .86em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.055);
  padding: .1em .35em; border-radius: 5px;
}

@media (max-width: 620px) {
  /* Sur mobile le panneau devient une feuille qui monte du bas. */
  .sheet {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%; height: min(90vh, 100%);
    border-left: 0; border-top: 1px solid var(--border-hover);
    border-radius: 22px 22px 0 0;
    transform: translateY(102%);
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.55);
  }
  .sheet::before { top: 0; left: 50%; right: auto; bottom: auto; width: 46px; height: 3px; border-radius: 3px; transform: translateX(-50%); margin-top: 9px; background: var(--c, var(--accent)); opacity: .5; }
  .sheet-head { padding-top: 1.9rem; }
  .sheet-body { padding-inline: 1.25rem; }
}

/* ==========================================================================
   Pied de page
   ========================================================================== */

.foot { position: relative; z-index: 2; border-top: 1px solid var(--border); margin-top: 1rem; }
.foot .container {
  padding-block: 1.6rem 2.75rem;
  display: flex; flex-wrap: wrap; gap: .55rem 1.75rem; align-items: baseline;
  font-family: var(--mono); font-size: .72rem; color: var(--text-muted);
}

/* ==========================================================================
   Entrées animées
   ========================================================================== */

.js .fx { opacity: 0; transform: translateY(18px); }
.js .fx.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .7s var(--ease-out); }

.js .reveal .module,
.js .reveal .stat { opacity: 0; transform: translateY(20px); }

.js .reveal.in .module,
.js .reveal.in .stat {
  opacity: 1; transform: none;
  transition: opacity .55s var(--ease), transform .62s var(--ease-out),
              border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .25s var(--ease);
}

.js .reveal.in :is(.module, .stat):nth-child(1) { transition-delay: 0ms; }
.js .reveal.in :is(.module, .stat):nth-child(2) { transition-delay: 80ms; }
.js .reveal.in :is(.module, .stat):nth-child(3) { transition-delay: 160ms; }
.js .reveal.in :is(.module, .stat):nth-child(n+4) { transition-delay: 240ms; }

/* Le survol repasse devant la règle de révélation, qui fixe `transform: none`
   avec une spécificité supérieure et annulerait le mouvement. */
.js .reveal.in .module:hover,
.js .reveal.in .module:focus-visible { transform: translateY(-4px); transition-delay: 0ms; }
.js .reveal.in .module:has(:focus-visible) { transform: translateY(-4px); transition-delay: 0ms; }
.js .reveal.in .stat:hover { transition-delay: 0ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .bg-aurora, .bg-aurora-2 { animation: none; }
  .module:hover, .js .reveal.in .module:hover { transform: none; }
  .module:has(:focus-visible) { transform: none; }
}

/* ==========================================================================
   Responsive — header
   ========================================================================== */

@media (max-width: 900px) { .dock-link .lbl { display: none; } .dock-link { padding: 6px 9px; } }

@media (max-width: 640px) {
  .dock { top: 10px; left: 10px; right: 10px; width: auto; transform: none; padding: 9px 12px; border-radius: 14px; }
  .dock-nav {
    order: 3; width: 100%; margin-right: 0;
    justify-content: space-between; gap: 2px;
    margin-top: 8px; padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .dock-link .lbl { display: inline; }
  .dock-link { font-size: .74rem; padding: 5px 8px; }
  .dock-right { margin-left: auto; padding-right: 0; }
  .module-top, .module-body, .module-foot { padding-inline: 1.15rem; }
  .section-head { gap: .85rem; }
}

@media (max-width: 420px) { .dock-link .lbl { display: none; } }

@media print {
  .bg, .dock, .filters, .sheet, .sheet-scrim, .module-open { display: none !important; }
  body { background: #fff; color: #000; }
  .module, .stat { background: #fff; border-color: #ccc; box-shadow: none; backdrop-filter: none; break-inside: avoid; }
  .js .module-detail { display: block; }
  .module-desc, .points li { color: #333; }
  .hero h1, .hero h1 .grad { -webkit-text-fill-color: #000; color: #000; }
}
