/* FoilPulse — site web. Mise en page : barre du haut fixe, contenu centré 1180 px, grilles qui passent
   en une colonne sur téléphone. Sombre par défaut (mer de nuit), clair au choix dans le compte. */
:root {
  color-scheme: dark;
  --fond: #0a1016; --surface: #111a23; --surface-2: #17222d; --trait: rgba(160, 190, 220, 0.13);
  --texte: #e8eef4; --texte-2: #a9b7c5; --discret: #6f8292;
  --accent: #3d8fe8; --accent-texte: #ffffff; --accent-doux: rgba(61, 143, 232, 0.16);
  --ecume: #39c2b0; --ok: #43c083; --alerte: #e7a83e; --erreur: #ef6b5b;
  --ombre: 0 10px 30px rgba(0, 0, 0, 0.35);
  --police-titre: "Saira Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --police: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --fond: #f3f6f9; --surface: #ffffff; --surface-2: #eef2f6; --trait: rgba(20, 45, 70, 0.12);
    --texte: #0e1a25; --texte-2: #44576a; --discret: #7a8a99;
    --accent: #1f6fcc; --accent-texte: #ffffff; --accent-doux: rgba(31, 111, 204, 0.10);
    --ecume: #138a7c; --ok: #1f9a5e; --alerte: #b9780f; --erreur: #c8402f;
    --ombre: 0 10px 30px rgba(14, 26, 37, 0.10);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --fond: #f3f6f9; --surface: #ffffff; --surface-2: #eef2f6; --trait: rgba(20, 45, 70, 0.12);
  --texte: #0e1a25; --texte-2: #44576a; --discret: #7a8a99;
  --accent: #1f6fcc; --accent-texte: #ffffff; --accent-doux: rgba(31, 111, 204, 0.10);
  --ecume: #138a7c; --ok: #1f9a5e; --alerte: #b9780f; --erreur: #c8402f;
  --ombre: 0 10px 30px rgba(14, 26, 37, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.site { background: var(--fond); color: var(--texte); font: 16px/1.5 var(--police); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: 0.005em; }
h1 { font-size: clamp(26px, 3.2vw, 34px); }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0; }
.chiffres, .nombre { font-variant-numeric: tabular-nums; }

/* ---------- Barre du haut (aussi injectée dans les pages de tableau de bord) ---------- */
.site-entete { position: sticky; top: 0; z-index: 2000; background: color-mix(in srgb, var(--fond) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--trait); font: 15px/1.4 var(--police); color: var(--texte); }
.site-entete .interieur { max-width: 1440px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--texte); text-decoration: none;
  font: 700 21px/1 var(--police-titre); letter-spacing: 0.02em; }
.logo svg { width: 26px; height: 26px; }
.logo b { color: var(--accent); font-weight: 700; }
.menu { display: flex; gap: 2px; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.menu a { color: var(--texte-2); text-decoration: none; padding: 7px 12px; border-radius: 8px; white-space: nowrap; }
.menu a:hover { color: var(--texte); background: var(--surface-2); }
.menu a[aria-current="page"] { color: var(--texte); background: var(--accent-doux); }
.compte-menu { position: relative; margin-left: auto; }
@media (max-width: 640px) { .site-entete .menu { order: 3; flex-basis: 100%; } }
.compte-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 3px 6px 3px 3px; border-radius: 999px; color: var(--texte); }
.compte-menu summary::-webkit-details-marker { display: none; }
.compte-menu summary:hover { background: var(--surface-2); }
.compte-menu .liste { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--trait);
  border-radius: 10px; box-shadow: var(--ombre); padding: 6px; display: grid; }
.compte-menu .liste a, .compte-menu .liste button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--texte); text-decoration: none;
  background: none; border: 0; font: inherit; cursor: pointer; width: 100%; }
.compte-menu .liste a:hover, .compte-menu .liste button:hover { background: var(--surface-2); }
.compte-menu .liste .qui { padding: 6px 10px 8px; border-bottom: 1px solid var(--trait); margin-bottom: 4px; font-size: 13px; color: var(--texte-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--accent-doux); color: var(--accent);
  display: inline-grid; place-items: center; font: 600 13px/1 var(--police-titre); flex: none; }
.avatar.grand { width: 96px; height: 96px; font-size: 34px; }
.offre-pastille { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--trait); color: var(--texte-2); }
.offre-pastille.premium { color: var(--ecume); border-color: color-mix(in srgb, var(--ecume) 45%, transparent); }

/* ---------- Mise en page ---------- */
main { flex: 1 0 auto; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 16px 56px; display: grid; gap: 26px; align-content: start; }
main.etroit { max-width: 460px; }
main.moyen { max-width: 860px; }
.tete { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 20px; }
.tete .sous { color: var(--texte-2); margin-top: 6px; }
.surtitre { font: 600 12px/1 var(--police); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ecume); margin-bottom: 8px; }
.bloc { background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: 20px; min-width: 0; }
.bloc:not(.pile) > h2 + * { margin-top: 14px; }
.bloc-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bloc-tete a { font-size: 14px; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grille-tableau { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .grille-3, .grille-tableau { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grille-2 { grid-template-columns: 1fr; } }
.pile { display: grid; gap: 18px; align-content: start; }

.pied { border-top: 1px solid var(--trait); color: var(--discret); font-size: 13px; }
.pied .interieur { max-width: 1180px; margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; }
.pied a { color: var(--texte-2); }

/* ---------- Chiffres clés ---------- */
.chiffres-cles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.chiffre { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.chiffre .libelle { color: var(--texte-2); font-size: 13px; }
.chiffre .valeur { font: 600 30px/1.1 var(--police-titre); margin-top: 4px; font-variant-numeric: tabular-nums; }
.chiffre .unite { font: 400 15px var(--police); color: var(--texte-2); margin-left: 3px; }
.chiffre .detail { color: var(--discret); font-size: 13px; margin-top: 2px; }
.chiffre.vedette { background: linear-gradient(160deg, var(--accent-doux), transparent 70%), var(--surface); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.chiffre.vedette .valeur { font-size: 40px; }

/* ---------- Boutons et formulaires ---------- */
.bouton, button.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--police); padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent; background: var(--accent); color: var(--accent-texte); text-decoration: none; cursor: pointer; white-space: nowrap; }
.bouton:hover { filter: brightness(1.08); }
.bouton.second { background: var(--surface-2); color: var(--texte); border-color: var(--trait); }
.bouton.second:hover { filter: none; border-color: var(--texte-2); }
.bouton.danger { background: transparent; color: var(--erreur); border-color: color-mix(in srgb, var(--erreur) 50%, transparent); }
.bouton.danger:hover { background: color-mix(in srgb, var(--erreur) 12%, transparent); filter: none; }
.bouton.petit { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.bouton[disabled] { opacity: 0.5; cursor: not-allowed; filter: none; }
.lien-bouton { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }

form.formulaire { display: grid; gap: 16px; }
.champ { display: grid; gap: 6px; min-width: 0; }
.champ label, .champ .label { font-weight: 600; font-size: 14px; }
.champ .aide { color: var(--discret); font-size: 13px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  font: inherit; color: var(--texte); background: var(--fond); border: 1px solid var(--trait); border-radius: 9px; padding: 10px 12px; width: 100%; min-width: 0; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--texte-2) 50%, transparent); }
textarea { min-height: 96px; resize: vertical; }
.rangee { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cases { display: grid; gap: 8px; }
.case { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--trait); border-radius: 9px; cursor: pointer; }
.case:hover { background: var(--surface-2); }
.case input { margin-top: 4px; accent-color: var(--accent); }
.case small { display: block; color: var(--discret); }
.choix-theme { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choix-theme label { border: 1px solid var(--trait); border-radius: 10px; padding: 12px; cursor: pointer; display: grid; gap: 8px; font-weight: 600; font-size: 14px; }
.choix-theme input { accent-color: var(--accent); }
.choix-theme .apercu { height: 42px; border-radius: 6px; border: 1px solid var(--trait); }
.apercu.sombre { background: linear-gradient(90deg, #0a1016 50%, #17222d 50%); }
.apercu.clair { background: linear-gradient(90deg, #f3f6f9 50%, #ffffff 50%); }
.apercu.systeme { background: linear-gradient(135deg, #0a1016 50%, #f3f6f9 50%); }

/* ---------- Messages ---------- */
.message { border-radius: 10px; padding: 12px 14px; border: 1px solid; font-size: 15px; }
.message.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.message.erreur { color: var(--erreur); border-color: color-mix(in srgb, var(--erreur) 40%, transparent); background: color-mix(in srgb, var(--erreur) 10%, transparent); }
.message.info { color: var(--texte); border-color: var(--trait); background: var(--surface-2); }
.message a { color: inherit; font-weight: 600; }

/* ---------- Tableaux et listes ---------- */
.defile-x { overflow-x: auto; }
table.liste { border-collapse: collapse; width: 100%; font-size: 15px; }
table.liste th, table.liste td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--trait); white-space: nowrap; vertical-align: middle; }
table.liste th { color: var(--texte-2); font-weight: 600; font-size: 13px; }
table.liste td.nombre, table.liste th.nombre { text-align: right; }
table.liste tbody tr:hover { background: var(--surface-2); }
table.liste tbody tr:last-child td { border-bottom: 0; }
table.liste td a.titre { color: var(--texte); font-weight: 600; text-decoration: none; }
table.liste td a.titre:hover { color: var(--accent); }
.unite { color: var(--discret); margin-left: 2px; font-size: 0.9em; }
.vide { color: var(--discret); text-align: center; padding: 28px 12px; }
.etiquette { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--texte-2); border: 1px solid var(--trait); }
.etiquette.ecume { color: var(--ecume); }
.etiquette.alerte { color: var(--alerte); }

.cartes-sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.carte-session { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden;
  color: var(--texte); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.carte-session:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-1px); }
.carte-session .mini { background: var(--surface-2); aspect-ratio: 16 / 7; max-width: 100%; display: block; }
.carte-session .corps { padding: 12px 14px; display: grid; gap: 4px; }
.carte-session .quand { color: var(--texte-2); font-size: 13px; }
.carte-session .valeurs { display: flex; gap: 14px; flex-wrap: wrap; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--texte-2); margin-top: 4px; }
.carte-session .valeurs b { color: var(--texte); font: 600 17px var(--police-titre); }
.mini polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mini rect { fill: var(--surface-2); }

/* ---------- Envoi de fichier ---------- */
.depot { border: 1.5px dashed var(--trait); border-radius: 12px; padding: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; background: var(--surface); }
.depot.survol { border-color: var(--accent); background: var(--accent-doux); }
.depot p { flex: 1 1 260px; color: var(--texte-2); }
.depot .etat { flex-basis: 100%; font-size: 14px; color: var(--texte-2); min-height: 1.3em; }
.depot .etat.erreur { color: var(--erreur); }
.barre-progression { flex-basis: 100%; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.barre-progression span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.barre-progression.jauge { height: 8px; border-radius: 4px; }
.barre-progression.jauge.pleine span { background: var(--alerte); }

/* ---------- Graphique en barres ---------- */
.histogramme { width: 100%; height: auto; display: block; }
.histogramme .barre { fill: var(--accent); }
.histogramme .barre.vide { fill: var(--surface-2); }
.histogramme text { fill: var(--discret); font: 12px var(--police); }
.histogramme text.valeur { fill: var(--texte-2); }
.histogramme line { stroke: var(--trait); }

/* ---------- Records ---------- */
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.record { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 16px; display: grid; gap: 4px; }
.record .libelle { color: var(--texte-2); font-size: 14px; }
.record .valeur { font: 600 36px/1.05 var(--police-titre); font-variant-numeric: tabular-nums; }
.record .valeur small { font: 400 16px var(--police); color: var(--texte-2); margin-left: 3px; }
.record a { font-size: 14px; color: var(--texte-2); }
.record.absent .valeur { color: var(--discret); }

/* ---------- Matériel ---------- */
.materiel-groupe { display: grid; gap: 10px; }
.objet { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 10px; background: var(--surface); }
.objet .nom { font-weight: 600; }
.objet .mesures { color: var(--texte-2); font-size: 14px; }
.objet .usage { color: var(--discret); font-size: 13px; font-variant-numeric: tabular-nums; }
.objet.retire { opacity: 0.6; }
details.edition > summary { cursor: pointer; color: var(--accent); font-size: 14px; list-style: none; }
details.edition > summary::-webkit-details-marker { display: none; }
details.edition[open] { flex-basis: 100%; }
details.edition[open] > form { margin-top: 12px; }

/* ---------- Offres ---------- */
.offres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .offres { grid-template-columns: 1fr; } }
.offre { background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: 20px; display: grid; gap: 10px; align-content: start; }
.offre.actuelle { border-color: var(--accent); }
.offre .prix { font: 600 26px var(--police-titre); }
.offre .prix small { font: 400 14px var(--police); color: var(--texte-2); }
.offre ul { margin: 0; padding-left: 18px; color: var(--texte-2); display: grid; gap: 4px; }

/* ---------- Page d'accueil ---------- */
main.accueil { max-width: none; padding: 0 0 40px; gap: 0; }
.section { padding: 72px 16px; }
.section > .interieur { max-width: 1180px; margin: 0 auto; display: grid; gap: 32px; }
.section.contraste { background: var(--surface); border-block: 1px solid var(--trait); }
.section .titre-section { display: grid; gap: 10px; max-width: 46em; }
.section .titre-section h2 { font-size: clamp(26px, 3.4vw, 38px); }
.section .titre-section p { color: var(--texte-2); font-size: 18px; }

.heros { position: relative; overflow: hidden; padding: 64px 16px 80px; border-bottom: 1px solid var(--trait); }
.heros::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 78% 40%, var(--accent-doux), transparent 70%); }
.heros .vagues { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 180px; pointer-events: none; opacity: 0.55; }
.heros .vagues path { fill: none; stroke: var(--trait); stroke-width: 1.5; }
.heros .vagues path.ecume { stroke: color-mix(in srgb, var(--ecume) 45%, transparent); }
.heros > .interieur { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: center; }
@media (max-width: 900px) { .heros > .interieur { grid-template-columns: 1fr; gap: 40px; } }
.heros h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.02; letter-spacing: -0.01em; }
.heros h1 em { font-style: normal; color: var(--accent); }
.heros p.chapeau { font-size: 19px; color: var(--texte-2); margin-top: 18px; max-width: 32em; }
.heros .actions { margin-top: 28px; }
.heros .slogan { margin-top: 22px; color: var(--discret); font-size: 15px; }

.planche { justify-self: center; width: 100%; max-width: 460px; display: grid; gap: 14px; }
.ecran { background: #0d0f0e; border-radius: 26px; padding: 18px; box-shadow: var(--ombre), inset 0 0 0 2px #262a28, inset 0 -6px 0 #050605; }
.ecran .vitre { background: #c6ccc1; border-radius: 10px; aspect-ratio: 400 / 240; position: relative; overflow: hidden; display: grid; place-items: center;
  background-image: linear-gradient(160deg, rgba(255,255,255,0.35), transparent 55%); }
.ecran .vitesse { font: 700 clamp(84px, 13vw, 132px)/1 var(--police-titre); color: #141714; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ecran .vitesse small { font-size: 0.34em; font-weight: 600; margin-left: 6px; letter-spacing: 0; }
.ecran .gnss { position: absolute; left: 12px; top: 9px; font: 600 12px var(--police); color: #2b302b; letter-spacing: 0.08em; }
.ecran .gnss::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2b302b; margin-left: 6px; vertical-align: 1px; }
.planche .legende { display: flex; justify-content: space-between; gap: 10px; color: var(--discret); font-size: 13px; flex-wrap: wrap; }
.planche .legende b { color: var(--texte-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.courbe-direct { width: 100%; height: 54px; display: block; }
.courbe-direct polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.courbe-direct line { stroke: var(--texte-2); stroke-width: 1; vector-effect: non-scaling-stroke; }

.fiche-technique { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--trait); border-radius: 14px; overflow: hidden; background: var(--surface); }
.fiche-technique > div { padding: 18px 20px; display: grid; gap: 2px; border-left: 1px solid var(--trait); }
.fiche-technique > div:first-child { border-left: 0; }
.fiche-technique .valeur { font: 600 28px/1.1 var(--police-titre); font-variant-numeric: tabular-nums; }
.fiche-technique .libelle { color: var(--texte-2); font-size: 14px; }
@media (max-width: 900px) {
  .fiche-technique { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fiche-technique > div { border-left: 0; border-top: 1px solid var(--trait); }
  .fiche-technique > div:nth-child(-n+2) { border-top: 0; }
  .fiche-technique > div:nth-child(even) { border-left: 1px solid var(--trait); }
  .fiche-technique > div:last-child { grid-column: 1 / -1; }
}
.note-cible { color: var(--discret); font-size: 13px; }

.duel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .duel { grid-template-columns: 1fr; } }
.duel > div { border: 1px solid var(--trait); border-radius: 14px; padding: 22px; display: grid; gap: 12px; align-content: start; background: var(--fond); }
.duel > div.nous { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: linear-gradient(170deg, var(--accent-doux), transparent 60%), var(--fond); }
.duel h3 { font-size: 20px; }
.duel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.duel li { padding-left: 22px; position: relative; color: var(--texte-2); }
.duel li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--discret); }
.duel .nous li { color: var(--texte); }
.duel .nous li::before { border-color: var(--accent); background: var(--accent); }

.etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: etape; list-style: none; margin: 0; padding: 0; }
@media (max-width: 900px) { .etapes { grid-template-columns: 1fr; } }
.etapes li { border-top: 2px solid var(--accent); padding-top: 18px; display: grid; gap: 8px; align-content: start; }
.etapes li::before { counter-increment: etape; content: "Étape " counter(etape); font: 600 13px var(--police); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ecume); }
.etapes p { color: var(--texte-2); }

.exemple { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 22px; align-items: stretch; }
@media (max-width: 900px) { .exemple { grid-template-columns: 1fr; } }
.exemple .carte-grande { background: var(--fond); border: 1px solid var(--trait); border-radius: 14px; overflow: hidden; display: grid; min-height: 260px; }
.exemple .carte-grande svg { width: 100%; height: 100%; display: block; }
.exemple .carte-grande rect { fill: var(--fond); }
.exemple .carte-grande polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.exemple .chiffres-cles { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.exemple .chiffre { background: var(--fond); }
.exemple .pied-exemple { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; color: var(--discret); font-size: 14px; }

.fonctions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--trait); border: 1px solid var(--trait); border-radius: 14px; overflow: hidden; }
@media (max-width: 900px) { .fonctions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fonctions { grid-template-columns: 1fr; } }
.fonctions > div { background: var(--fond); padding: 22px; display: grid; gap: 8px; align-content: start; }
.fonctions .mesure { font: 600 14px var(--police-titre); color: var(--ecume); letter-spacing: 0.04em; }
.fonctions p { color: var(--texte-2); }

.ecole { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px; align-items: center; }
@media (max-width: 900px) { .ecole { grid-template-columns: 1fr; } }
.ecole ul { margin: 0; padding-left: 18px; color: var(--texte-2); display: grid; gap: 6px; }
.radar { background: var(--fond); border: 1px solid var(--trait); border-radius: 14px; aspect-ratio: 4 / 3; max-width: 100%; display: block; width: 100%; }
.radar .cercle { fill: none; stroke: var(--trait); }
.radar .zone { fill: none; stroke: color-mix(in srgb, var(--alerte) 60%, transparent); stroke-dasharray: 5 5; }
.radar .plage { fill: color-mix(in srgb, var(--alerte) 14%, transparent); }
.radar .eleve { fill: var(--accent); }
.radar .eleve.eau { fill: var(--discret); }
.radar .eleve.alerte { fill: var(--erreur); }
.radar text { fill: var(--texte-2); font: 12px var(--police); }
.radar .base { fill: var(--ecume); }

.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border: 1px solid var(--trait); border-radius: 12px; background: var(--fond); }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font: 600 20px/1 var(--police-titre); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 16px; color: var(--texte-2); max-width: 60em; }

.appel { text-align: center; display: grid; gap: 18px; justify-items: center; }
.appel h2 { font-size: clamp(28px, 4vw, 44px); max-width: 18em; }
.appel p { color: var(--texte-2); font-size: 18px; }

/* ---------- Pages légales ---------- */
.liens-legaux { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sommaire ol { margin: 0; padding-left: 20px; columns: 2 220px; column-gap: 28px; }
.sommaire li { margin: 3px 0; break-inside: avoid; }
.texte-legal { display: grid; gap: 30px; max-width: 72ch; }
.texte-legal section { display: grid; gap: 10px; scroll-margin-top: 80px; }
.texte-legal h2 { font-size: 22px; }
.texte-legal p, .texte-legal li { color: var(--texte-2); }
.texte-legal b { color: var(--texte); }
.texte-legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.texte-legal .remarque { font-size: 14px; color: var(--discret); }
.texte-legal code { font-size: 14px; color: var(--texte); }
table.liste.legal td, table.liste.legal th { white-space: normal; vertical-align: top; min-width: 120px; }
mark.a-completer { background: color-mix(in srgb, var(--alerte) 22%, transparent); color: var(--texte); border-radius: 4px; padding: 0 4px; }
.autres-textes { display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid var(--trait); padding-top: 16px; font-size: 14px; }

/* ---------- Divers ---------- */
.lien-partage { display: flex; gap: 8px; flex-wrap: wrap; }
.lien-partage input { flex: 1 1 220px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.courrier { border: 1px solid var(--trait); border-radius: 10px; padding: 14px; display: grid; gap: 6px; background: var(--surface); }
.courrier .entete-courrier { color: var(--texte-2); font-size: 13px; }
.courrier pre { white-space: pre-wrap; font: 14px/1.5 var(--police); margin: 0; }
.zone-danger { border-color: color-mix(in srgb, var(--erreur) 40%, transparent); }
.cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
