/* dronedetect.fr — Drone Detect. Feuille de style unique, sans dépendance externe.
   Fond : vidéos (assets/videos.js), ou ciel WebGL quand la vidéo est indisponible (assets/scene.js).

   Typographie : une seule famille, Archivo (variable, graisse 100-900, chasse 62-125 %, licence OFL).
   Titres et chiffres en chasse étroite (76-84 %), texte courant en chasse normale, chiffres tabulaires.
   Échelle de 1,25 autour de 17 px : 13,6 / 15 / 17 / 21 / 26,5 / 33 / 41,5 / 52 / 65 / 81. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-variable.woff") format("woff");
}

/* ---------- Jetons ---------- */
:root {
  color-scheme: dark;
  --nuit: #0b1420;            /* fond quand le ciel n'est pas dessiné */
  --verre: rgba(9, 16, 27, 0.66);
  --verre-fort: rgba(9, 16, 27, 0.82);
  --surface: #121c29;         /* fond des graphes, contour des points */
  --trait-verre: rgba(255, 255, 255, 0.1);
  --trait: rgba(255, 255, 255, 0.12);
  --trait-fort: rgba(255, 255, 255, 0.3);
  --encre: #eef3f8;
  --encre-2: #b4c1cf;
  --encre-3: #8d9cad;
  --piste: #ffb23e;           /* cadres de détection, actions principales */
  --piste-clair: #ffc76e;
  --sur-piste: #1c1204;

  /* séries des graphes : une couleur par modèle, partout sur la page */
  --v1: #3987e5;
  --v2: #d95926;
  --v3: #199e70;
  --public: #7d8790;

  /* compatibilité avec la page des mentions légales */
  --encre-claire: var(--encre-2);
  --repere: var(--piste);
  --repere-fond: rgba(255, 178, 62, 0.16);

  --sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --etroit: 78%;              /* chasse des titres */
  --chiffre: 84%;             /* chasse des grands chiffres */
  --gouttiere: 16px;
  --rayon: 14px;              /* panneaux */
  --rayon-2: 8px;             /* boutons, commandes */
  --entete: 60px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--entete) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  font-weight: 400;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.sans-webgl body { background: linear-gradient(180deg, #1a2745 0%, #24375a 40%, #0b1420 100%) fixed; }
img, svg, canvas { display: block; }
a { color: var(--piste-clair); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--piste); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; font-stretch: var(--etroit); text-wrap: balance; }
p { margin: 0 0 1em; }
time { white-space: nowrap; }
.insecable { white-space: nowrap; }
cite { font-style: italic; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lien-evitement {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  background: var(--piste); color: var(--sur-piste); padding: 8px 14px; border-radius: var(--rayon-2); font-weight: 600; text-decoration: none;
}
.lien-evitement:focus { top: 12px; }

.conteneur { width: min(1200px, 100% - 2 * var(--gouttiere)); margin-inline: auto; }
@media (min-width: 760px) { :root { --gouttiere: 32px; } }

/* ---------- Ciel et cadres ---------- */
#ciel { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
#pistes { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.piste { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, width, height; --c: var(--piste); }
.piste:not(.principale) { --c: rgba(255, 255, 255, 0.9); }
.piste .c { position: absolute; width: 13px; height: 13px; border: 2px solid var(--c); }
.piste .hg { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 3px; }
.piste .hd { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 3px; }
.piste .bg { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 3px; }
.piste .bd { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 3px; }
.piste .etiq {
  position: absolute; left: -2px; bottom: 100%; margin-bottom: 6px;
  display: flex; gap: 8px; align-items: baseline;
  background: var(--c); color: var(--sur-piste);
  font-size: 12px; line-height: 1; font-weight: 600; font-stretch: 92%; font-variant-numeric: tabular-nums;
  padding: 4px 8px 4px 7px; border-radius: 3px; white-space: nowrap;
}
.piste .etiq span { font-weight: 500; opacity: 0.72; }
.piste .etiq span:empty { display: none; }
.piste.perdue .c { border-style: dashed; }
.piste.perdue .etiq b::after { content: " : recherche"; font-weight: 500; }

/* ---------- En-tête ---------- */
.entete {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--entete);
  background: rgba(7, 12, 21, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--trait-verre);
}
.entete .conteneur { height: 100%; display: flex; align-items: center; gap: 20px; }
.marque { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; font-size: 1.125rem; font-stretch: 88%; letter-spacing: 0.01em; }
.marque:hover { color: #fff; }
.marque svg { width: 24px; height: 24px; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: 6px 12px; border-radius: 6px; color: var(--encre-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--encre); background: rgba(255, 255, 255, 0.08); }
@media (max-width: 960px) { .nav { display: none; } .entete .bouton.petit { margin-left: auto; } }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: var(--rayon-2); border: 1px solid rgba(255, 255, 255, 0.36);
  color: var(--encre); text-decoration: none; font-weight: 600; font-size: 1rem; font-stretch: 100%; letter-spacing: 0.005em;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.bouton:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.bouton.principal { background: var(--piste); border-color: var(--piste); color: var(--sur-piste); }
.bouton.principal:hover { background: var(--piste-clair); border-color: var(--piste-clair); color: var(--sur-piste); }
.bouton.petit { min-height: 34px; padding: 0 16px; font-size: 0.875rem; }
@media (max-width: 520px) { .entete .bouton.petit { display: none; } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.actions.centre { justify-content: center; }

/* ---------- Mise en page des scènes ---------- */
main, .pied { position: relative; z-index: 2; }
.scene { position: relative; min-height: 112vh; display: flex; align-items: center; padding: 140px 0; }
.scene.courte { min-height: 96vh; }

.panneau {
  position: relative; max-width: 600px;
  background: var(--verre);
  -webkit-backdrop-filter: blur(24px) saturate(1.35); backdrop-filter: blur(24px) saturate(1.35);
  border: 1px solid var(--trait-verre); border-radius: var(--rayon);
  padding: clamp(24px, 3.4vw, 46px);
}
.panneau.gauche { margin-right: auto; }
.panneau.droite { margin-left: auto; }
.panneau.large { max-width: 880px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .panneau { background: var(--verre-fort); } }

.rubrique { display: flex; align-items: center; gap: 10px; color: var(--piste); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 14px; }
.rubrique::before { content: ""; width: 18px; height: 2px; background: currentColor; }
h2 { font-size: clamp(2rem, 1.3rem + 2.3vw, 3.25rem); line-height: 1.04; letter-spacing: -0.004em; margin-bottom: 22px; }
h3 { font-size: 1.25rem; line-height: 1.25; font-stretch: 90%; }
.panneau > p, .panneau li { color: var(--encre-2); }
.panneau > .rubrique { color: var(--piste); }
.panneau p strong, .panneau p b { color: var(--encre); font-weight: 600; }
.source, .source-chiffres { font-size: 0.8125rem; line-height: 1.5; color: var(--encre-3); margin: 12px 0 0; }

/* ---------- Ouverture ---------- */
.ouverture { min-height: 100vh; min-height: 100svh; align-items: flex-end; padding: calc(var(--entete) + 60px) 0 9vh; }
.ouverture::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 9, 17, 0.74) 0%, rgba(5, 9, 17, 0.42) 42%, rgba(5, 9, 17, 0) 68%),
              linear-gradient(0deg, rgba(5, 9, 17, 0.55) 0%, rgba(5, 9, 17, 0) 40%);
}
.ouverture .conteneur { position: relative; }
.ouverture h1 { max-width: 9.5em; font-size: clamp(2.875rem, 1.1rem + 6vw, 6rem); line-height: 0.96; font-stretch: 72%; letter-spacing: -0.012em; }
.ouverture .accroche { margin: 20px 0 0; max-width: 34ch; font-size: clamp(1.25rem, 0.98rem + 0.95vw, 1.75rem); line-height: 1.25; font-weight: 500; font-stretch: 92%; color: var(--encre); }
.ouverture .chapeau { max-width: 60ch; margin-top: 18px; font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem); color: var(--encre-2); }
.chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 28px; margin: 44px 0 0; max-width: 960px; }
.chiffres > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; border-top: 1px solid var(--trait-fort); padding-top: 12px; }
.chiffres dd { margin: 0; font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem); line-height: 1; font-weight: 600; font-stretch: var(--chiffre); font-variant-numeric: tabular-nums; }
.chiffres dt { font-size: 0.875rem; line-height: 1.35; color: var(--encre-2); }
.source-chiffres { max-width: 90ch; }
@media (max-width: 760px) { .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.defiler { position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 14px; }
.defiler span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--encre); }
@media (prefers-reduced-motion: no-preference) { .defiler span { animation: defiler 1.8s ease-in-out infinite; } }
@keyframes defiler { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@media (max-height: 700px), (max-width: 760px) { .defiler { display: none; } }

/* ---------- Figure « pixels » ---------- */
.pixels { margin: 26px 0 0; }
.pixels-paire { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pixels-paire > div { background: rgba(0, 0, 0, 0.25); border: 1px solid var(--trait-verre); border-radius: 10px; padding: 14px; }
.pixels canvas { width: 100%; max-width: 120px; aspect-ratio: 1; image-rendering: pixelated; margin: 0 auto 10px; border-radius: 6px; }
.pixels-paire p { margin: 0; font-size: 0.875rem; color: var(--encre-2); text-align: center; }
.pixels-paire strong { display: block; font-size: 1.375rem; color: var(--encre); font-stretch: var(--chiffre); font-weight: 600; font-variant-numeric: tabular-nums; }
.pixels figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--encre-3); }

/* ---------- Figures et graphes ---------- */
.figure { margin: 28px 0 0; }
.figure figcaption { font-size: 0.875rem; color: var(--encre-3); margin-bottom: 12px; }
.figure figcaption b { display: block; color: var(--encre); font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.graphe { position: relative; min-height: 120px; }
.graphe svg { overflow: visible; font-family: var(--sans); }
.graphe text { fill: var(--encre-3); font-size: 12px; font-stretch: 100%; font-variant-numeric: tabular-nums; }
.graphe .t-fort { fill: var(--encre); font-weight: 600; font-size: 13px; }
.graphe .t-2 { fill: var(--encre-2); }
.graphe .grille { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.graphe .axe { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1; }
.graphe .viseur { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1; stroke-dasharray: 3 3; }
.graphe .cible { fill: transparent; }
.graphe .barre { outline: none; cursor: default; }
.graphe .barre:focus-visible path { stroke: var(--encre); stroke-width: 2; }
.graphe svg:focus-visible { outline: 2px solid var(--piste); outline-offset: 4px; }
.trace { stroke-dasharray: var(--l); stroke-dashoffset: var(--l); transition: stroke-dashoffset 2.2s cubic-bezier(0.35, 0.4, 0.2, 1) var(--d, 0s); }
.vu .trace { stroke-dashoffset: 0; }
.pousse { transform: scaleX(0); transform-box: fill-box; transform-origin: 0 50%; transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0s); }
.monte { transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 100%; transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0s); }
.vu .pousse, .vu .monte { transform: none; }
.apparait { opacity: 0; transition: opacity 0.6s ease var(--d, 0s); }
.vu .apparait { opacity: 1; }

.bulle {
  position: absolute; z-index: 5; pointer-events: none; opacity: 0; transition: opacity 0.12s;
  min-width: 170px; max-width: 260px; padding: 10px 12px; border-radius: var(--rayon-2);
  background: #0d1621; border: 1px solid var(--trait-fort); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-size: 0.8125rem; line-height: 1.4; color: var(--encre-2);
}
.bulle.visible { opacity: 1; }
.bulle b { display: block; color: var(--encre); margin-bottom: 4px; }
.bulle .ligne { display: flex; justify-content: space-between; gap: 14px; }
.bulle .ligne span:last-child { color: var(--encre); font-variant-numeric: tabular-nums; font-weight: 600; }
.bulle i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bulle .note { margin-top: 6px; color: var(--encre-3); font-size: 0.75rem; }

.mesure { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--trait); font-size: 0.8125rem; line-height: 1.45; }
.mesure > div { display: flex; gap: 6px; min-width: 0; }
.mesure dt { flex: none; color: var(--encre-3); white-space: nowrap; }
.mesure dt::after { content: " :"; }
.mesure dd { margin: 0; color: var(--encre-2); }
.avertissement { margin: 14px 0 0; padding-left: 12px; border-left: 2px solid var(--trait-fort); font-size: 0.875rem; color: var(--encre-2); }

.legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 0.875rem; color: var(--encre-2); }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }

.segments { display: inline-flex; flex-wrap: wrap; gap: 2px; margin: 0 0 14px; padding: 3px; border: 1px solid var(--trait); border-radius: var(--rayon-2); background: rgba(0, 0, 0, 0.2); }
.segments legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.segments label { position: relative; }
.segments input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segments span { display: block; padding: 5px 13px; border-radius: 5px; font-size: 0.875rem; color: var(--encre-2); }
.segments input:checked + span { background: var(--encre); color: #0b1420; font-weight: 600; }
.segments input:focus-visible + span { outline: 2px solid var(--piste); outline-offset: 2px; }

.defile { overflow-x: auto; overflow-y: hidden; margin-top: 26px; }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { text-align: left; padding: 8px 16px 8px 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
thead th { color: var(--encre-3); font-weight: 500; }
tbody th { color: var(--encre-2); font-weight: 500; white-space: nowrap; }
td { color: var(--encre); font-variant-numeric: tabular-nums; }
tr > :last-child { padding-right: 0; }

/* ---------- Vitrine des menaces ---------- */
.vitrine { position: relative; height: 720vh; }  /* environ 100vh de défilement par type de drone */
.colle { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: var(--entete); }
.vitrine-texte { max-width: 440px; }
.vitrine-texte h2 { margin-bottom: 28px; }
.etapes { margin: 0; padding: 0; list-style: none; }
.etape { position: relative; padding: 10px 0 10px 22px; color: var(--encre-3); transition: color 0.35s; }
.etape::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; transition: background-color 0.35s, border-color 0.35s; }
.etape h3 { font-size: 1.25rem; color: inherit; }
.etape p { margin: 0; max-height: 0; overflow: hidden; opacity: 0; color: var(--encre-2); transition: max-height 0.45s ease, opacity 0.35s ease, margin 0.35s; }
.etape.active { color: var(--encre); }
.etape.active::before { background: var(--piste); border-color: var(--piste); }
.etape.active p { max-height: 8em; opacity: 1; margin-top: 6px; }
.progression { height: 2px; margin-top: 22px; background: var(--trait); border-radius: 2px; overflow: hidden; max-width: 260px; }
.progression span { display: block; height: 100%; width: 100%; background: var(--piste); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.vitrine-texte { position: relative; z-index: 1; background: none; }
/* Voile sombre à gauche : le texte reste lisible sur le ciel clair de l'après-midi */
.colle::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: min(760px, 62vw); pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 9, 17, 0.7) 0%, rgba(5, 9, 17, 0.5) 50%, rgba(5, 9, 17, 0) 100%);
}
@media (max-width: 760px) {
  .colle::before { display: none; }
  .vitrine { height: 650vh; }
  .colle { align-items: flex-end; padding-bottom: 5vh; }
  .vitrine-texte { background: var(--verre); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--trait-verre); border-radius: var(--rayon); padding: 20px 20px 18px; max-width: none; }
  .vitrine-texte h2 { font-size: 1.625rem; margin-bottom: 12px; }
  .etape:not(.active) { display: none; }
}

/* ---------- Familles ---------- */
.familles { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.familles li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline; }
.familles .nom-f { color: var(--encre-2); font-size: 0.9375rem; }
.familles .nb { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--encre); font-stretch: var(--chiffre); }
.familles .jauge { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.familles .jauge span { display: block; height: 100%; border-radius: 3px; background: var(--encre-3); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0s); }
.familles li.fort .jauge span { background: var(--piste); }
.familles li.fort .nom-f { color: var(--encre); }
.vu .familles .jauge span, .familles.vu .jauge span { transform: scaleX(var(--part)); }

.regles { margin: 0 0 6px; padding: 0; list-style: none; }
.regles li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.regles li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 9px; height: 9px; border: 1.5px solid var(--piste); border-radius: 2px; }
.entre-figures { margin-top: 32px; }
.note-version { margin-top: 20px; font-size: 0.9375rem; color: var(--encre-2); }

/* ---------- Résultats ---------- */
.duel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 30px 0 6px; }
.duel-chiffre { display: flex; flex-direction: column; gap: 6px; border-top: 2px solid var(--v1); padding-top: 14px; }
.duel-chiffre.ref { border-top-color: var(--public); }
.duel-chiffre:last-child { border-top-color: var(--piste); }
.duel .valeur { font-size: clamp(2.25rem, 1.3rem + 3vw, 3.75rem); line-height: 1; font-weight: 600; font-stretch: var(--chiffre); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.duel .ref .valeur { color: var(--encre-3); }
.duel .libelle { font-size: 0.875rem; line-height: 1.4; color: var(--encre-2); }
.figures-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 36px; }
@media (min-width: 900px) { .figures-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 600px) { .duel { grid-template-columns: minmax(0, 1fr); } }
.duel.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 22px 0 4px; }
.duel.deux .valeur { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); }
.duel-chiffre.v3 { border-top-color: var(--v3); }
.duel-chiffre.v2 { border-top-color: var(--v2); }

/* ---------- Intégration ---------- */
.chaine { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 30px 0; padding: 0 0 22px; list-style: none; }
/* Le fil et l'impulsion courent sous les cartes, sans traverser le texte */
.chaine::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 6px; height: 1px; background: var(--trait-fort); }
.chaine li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border-radius: 10px; background: rgba(6, 11, 19, 0.7); border: 1px solid var(--trait); font-size: 0.8125rem; line-height: 1.35; color: var(--encre-3); }
.chaine b { color: var(--encre); font-size: 0.9375rem; font-weight: 600; }
.chaine .modele { border-color: var(--piste); box-shadow: 0 0 0 1px var(--piste) inset; }
.chaine .modele b { color: var(--piste); }
.chaine::after { content: ""; position: absolute; bottom: 3.5px; left: 8%; width: 6px; height: 6px; border-radius: 50%; background: var(--piste); box-shadow: 0 0 12px var(--piste); opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .vu .chaine::after, .chaine.vu::after { animation: impulsion 3.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; } }
@keyframes impulsion { 0% { left: 8%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 92%; opacity: 0; } }
@media (max-width: 760px) {
  .chaine { grid-template-columns: minmax(0, 1fr); }
  .chaine { padding-bottom: 0; }
  .chaine::before { left: 24px; right: auto; top: 6%; bottom: 6%; width: 1px; height: auto; }
  .chaine li { background: #0a111c; }
  .chaine::after { display: none; }
}
.briques { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 10px; }
.brique { border-top: 1px solid var(--trait); padding-top: 16px; }
.brique h3 { margin-bottom: 10px; }
.brique p { font-size: 0.9375rem; color: var(--encre-2); }
.brique .gros { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 12px; }
.brique .gros span { font-size: 2.125rem; line-height: 1; font-weight: 600; font-stretch: var(--chiffre); color: var(--encre); font-variant-numeric: tabular-nums; }
.brique .gros small { font-size: 0.8125rem; color: var(--encre-3); flex-basis: 100%; }
.brique .gros span + small { flex-basis: auto; }
.brique .fleche { width: 22px; height: 2px; background: var(--piste); position: relative; align-self: center; font-size: 0 !important; }
.brique .fleche::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--piste); border-right: 0; }
.principe { margin: 28px 0 0; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.625rem); line-height: 1.3; font-weight: 500; font-stretch: 90%; color: var(--encre); }
@media (max-width: 900px) { .briques { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Feuille de route ---------- */
.route { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.route li { counter-increment: etape; position: relative; display: grid; gap: 2px; padding: 14px 0 14px 44px; border-top: 1px solid var(--trait); }
.route li::before { content: counter(etape); position: absolute; left: 0; top: 14px; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--piste); color: var(--piste); font-size: 0.875rem; font-weight: 600; display: grid; place-items: center; }
.route b { color: var(--encre); font-size: 1.0625rem; }
.route span { color: var(--encre-2); font-size: 0.9375rem; }

/* ---------- Méthode ---------- */
.principes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 6px 0 26px; }
.principes h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.principes p { font-size: 0.9375rem; color: var(--encre-2); margin: 0; }
@media (max-width: 760px) { .principes { grid-template-columns: minmax(0, 1fr); } }
.glossaire { margin: 18px 0 8px; border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }
.glossaire summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--encre); }
.glossaire dl { margin: 0 0 16px; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 10px 20px; font-size: 0.9375rem; }
.glossaire dt { color: var(--encre); font-weight: 600; }
.glossaire dd { margin: 0; color: var(--encre-2); }
@media (max-width: 600px) { .glossaire dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .glossaire dd { margin-bottom: 10px; } }
.sous-titre { margin: 24px 0 10px; font-size: 1.0625rem; }
.sources { margin: 0; padding-left: 18px; font-size: 0.9375rem; color: var(--encre-2); }
.sources li { margin-bottom: 6px; }

/* ---------- Contact ---------- */
.contact { min-height: 100vh; text-align: center; }
.contact::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(5, 9, 17, 0.6), rgba(5, 9, 17, 0)); }
.contact .conteneur { position: relative; }
.contact h2 { font-size: clamp(2.5rem, 1.2rem + 5vw, 5.5rem); line-height: 1; font-stretch: 72%; letter-spacing: -0.012em; }
.contact .chapeau { max-width: 52ch; margin: 0 auto; color: var(--encre-2); font-size: 1.125rem; }

/* ---------- Pied de page ---------- */
.pied { background: rgba(5, 9, 16, 0.86); border-top: 1px solid var(--trait-verre); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); font-size: 0.875rem; color: var(--encre-3); }
.pied .conteneur { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
.pied p { margin: 0; }
.pied b { color: var(--encre-2); font-weight: 600; }
.pied ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.pied a { color: var(--encre-2); }

/* ---------- Petits écrans ---------- */
@media (max-width: 760px) {
  .scene { min-height: auto; padding: 46vh 0 90px; }
  .scene.courte { min-height: auto; }
  .ouverture { padding-top: calc(var(--entete) + 40vh); padding-bottom: 60px; }
  .ouverture::before { background: linear-gradient(0deg, rgba(5, 9, 17, 0.82) 0%, rgba(5, 9, 17, 0.55) 55%, rgba(5, 9, 17, 0) 85%); }
  .contact { padding: 40vh 0 80px; }
  .panneau { border-radius: 12px; }
  .figure { margin-top: 22px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .trace { stroke-dashoffset: 0; }
  .pousse, .monte { transform: none; }
  .apparait { opacity: 1; }
}

/* ---------- Mentions légales ---------- */
.legal { position: relative; z-index: 2; padding: calc(var(--entete) + 48px) 0 80px; min-height: 100vh; }
.legal .corps { max-width: 760px; }

/* ---------- Fond vidéo (assets/videos.js) ---------- */
#fond { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #0b1420; }
#fond video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s ease; will-change: opacity, transform; }
#fond video.actif { opacity: 1; }
/* voile léger : le texte reste lisible sur les plans clairs */
#fond::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 9, 17, 0.42) 0%, rgba(5, 9, 17, 0.12) 32%, rgba(5, 9, 17, 0.12) 68%, rgba(5, 9, 17, 0.4) 100%); }
.piste.maintenue .c { opacity: 0.6; }
/* Téléphone : la vidéo en 16:9 recadrée plein écran coupait le drone ; elle occupe une bande en haut, fondue vers le bas */
@media (max-width: 760px) {
  #fond video { bottom: auto; height: 54vh; height: 54svh; }
  #fond::after { background: linear-gradient(180deg, rgba(5, 9, 17, 0.4) 0%, rgba(5, 9, 17, 0) 22%, rgba(11, 20, 32, 0) 36vh, #0b1420 54vh); }
}
.avec-video .contact h2, .avec-video .contact p { text-shadow: 0 2px 18px rgba(5, 9, 17, 0.6); }
@media (prefers-reduced-motion: reduce) { #fond video { transition: none; } }
