/* Charte TachoPro, reprise de lib/theme/tachopro_colors.dart.
   Les deux thèmes ne sont pas deux palettes : c'est la MÊME, redistribuée.
   Le thème clair n'introduit aucune teinte nouvelle, exactement comme dans
   l'application. */

/* Polices auto-hébergées : aucune requête vers un tiers, donc aucune adresse
   IP de visiteur transmise à Google (RGPD). Sous-ensemble latin : couvre le
   français et l'anglais. */
@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url('../polices/archivo-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url('../polices/archivo-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url('../polices/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url('../polices/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url('../polices/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('../polices/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url('../polices/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --nuit: #0F1E3F;
  --bleu: #1E3A5F;
  --emeraude: #10B981;
  --emeraude-sombre: #047857;

  --fond: #F2F5F9;
  --surface: #FFFFFF;
  --surface-creuse: #E9EEF5;
  --bordure: #DDE4ED;
  --encre: #0F1E3F;
  --secondaire: #536079;
  --accent: #047857;
  --sur-accent: #FFFFFF;
  --focus: #1D4ED8;

  /* Bandes sombres posées DANS une page claire (héros, encarts, pied). Elles
     ne changent pas au thème : ce sont des blocs de marque, pas du fond. */
  --bande: #0F1E3F;
  --sur-bande: #FFFFFF;
  --sur-bande-doux: #B4C2D8;
  --sur-bande-faible: #8DA0BC;
  --bande-trait: rgba(255, 255, 255, 0.12);
  --ombre: 0 1px 2px rgba(15, 30, 63, 0.05), 0 8px 24px rgba(15, 30, 63, 0.06);
}

/* NUIT. Le fond recule vers le bleu de la marque plutôt que vers le noir :
   un noir pur sous un texte clair vibre. */
:root[data-theme="nuit"] {
  color-scheme: dark;
  --fond: #0B1730;
  --surface: #132546;
  --surface-creuse: #0F1E3F;
  --bordure: #23375C;
  --encre: #EAF0F9;
  --secondaire: #9DB0CC;
  --accent: #34D399;
  --sur-accent: #06251A;
  --focus: #93C5FD;
  --bande: #081227;
  --bande-trait: rgba(255, 255, 255, 0.10);
  --ombre: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}

@media (prefers-color-scheme: dark) {
  /* Le choix explicite du visiteur l'emporte : sans cette garde, basculer en
     JOUR sur un système en mode sombre n'aurait aucun effet. */
  :root:not([data-theme="jour"]) {
    color-scheme: dark;
    --fond: #0B1730;
    --surface: #132546;
    --surface-creuse: #0F1E3F;
    --bordure: #23375C;
    --encre: #EAF0F9;
    --secondaire: #9DB0CC;
    --accent: #34D399;
    --sur-accent: #06251A;
    --focus: #93C5FD;
    --bande: #081227;
    --bande-trait: rgba(255, 255, 255, 0.10);
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Archivo', 'Segoe UI', system-ui, sans-serif; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

.aller-contenu {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 8px;
  background: var(--emeraude-sombre); color: #fff;
}
.aller-contenu:focus { top: 12px; text-decoration: none; }

.large { max-width: 1180px; margin: 0 auto; }
.bloc { padding: 52px 22px; }
.creux { background: var(--surface); border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.centre { text-align: center; }
.centre .intro { margin-left: auto; margin-right: auto; }

/* --- En-tête ------------------------------------------------------------ */
.entete {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--fond) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bordure);
}
.entete-rangee { display: flex; align-items: center; gap: 10px; padding: 10px 22px; max-width: 1180px; margin: 0 auto; }
.marque { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--encre); }
.marque:hover { text-decoration: none; }
.marque span { font-family: 'Archivo', system-ui, sans-serif; font-weight: 800; font-size: 18px; }
.nav { display: none; gap: 2px; }
.nav a { font-size: 14.5px; color: var(--secondaire); padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--surface-creuse); color: var(--encre); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--encre); font-weight: 600; background: var(--surface-creuse); }

.outil {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 10px; flex: 0 0 auto;
  background: transparent; color: var(--secondaire);
  border: 1px solid var(--bordure); border-radius: 10px;
  font: 600 13px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: 0.04em;
  cursor: pointer;
}
.outil:hover { color: var(--encre); border-color: var(--secondaire); text-decoration: none; }
.langue { display: inline-flex; border: 1px solid var(--bordure); border-radius: 10px; overflow: hidden; height: 44px; }
.langue a, .langue span {
  display: inline-flex; align-items: center; padding: 0 11px;
  font: 600 13px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: 0.04em;
  color: var(--secondaire);
}
.langue a:hover { background: var(--surface-creuse); color: var(--encre); text-decoration: none; }
.langue [aria-current="true"] { background: var(--emeraude-sombre); color: #fff; }
:root[data-theme="nuit"] .langue [aria-current="true"] { background: var(--emeraude); color: #06251A; }
.outil .lune { display: none; }
:root[data-theme="nuit"] .outil .lune { display: block; }
:root[data-theme="nuit"] .outil .soleil { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="jour"]) .outil .lune { display: block; }
  :root:not([data-theme="jour"]) .outil .soleil { display: none; }
  :root:not([data-theme="jour"]) .langue [aria-current="true"] { background: var(--emeraude); color: #06251A; }
}
.burger { display: inline-flex; }
.nav.ouvert {
  display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%;
  padding: 10px 22px 16px; background: var(--fond); border-bottom: 1px solid var(--bordure);
}
.nav.ouvert a { padding: 13px 12px; font-size: 16px; }

/* --- Blocs de contenu --------------------------------------------------- */
.sur { font: 600 11.5px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); }
.titre { margin-top: 12px; font-size: 28px; line-height: 1.14; font-weight: 800; text-wrap: balance; }
.intro { margin-top: 14px; font-size: 16px; line-height: 1.62; color: var(--secondaire); text-wrap: pretty; max-width: 720px; }
.bande { background: var(--bande); color: var(--sur-bande); }
.bande .titre, .bande h3 { color: var(--sur-bande); }
.bande .intro { color: var(--sur-bande-doux); }
.bande .sur { color: #6EE7B7; }

.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: 16px; padding: 22px 20px 24px; box-shadow: var(--ombre); }
.creux .carte { background: var(--fond); box-shadow: none; }
.carte h3 { font-size: 18px; font-weight: 700; }
.carte p { margin-top: 8px; font-size: 15px; line-height: 1.58; color: var(--secondaire); }
.carte .ico {
  display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(16, 185, 129, 0.14); color: var(--accent); margin-bottom: 14px;
}
.pile { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; }

.puces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.puce { font-size: 13px; padding: 7px 13px; background: var(--surface); border: 1px solid var(--bordure); border-radius: 999px; color: var(--encre); }

/* --- Boutons ------------------------------------------------------------ */
.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 22px; border-radius: 12px;
  font: 600 15.5px 'IBM Plex Sans', system-ui, sans-serif;
  border: 1px solid transparent; cursor: pointer;
}
.bouton:hover { text-decoration: none; }
.bouton-plein { background: var(--emeraude); color: #04241A; }
.bouton-plein:hover { background: #34D399; color: #04241A; }
.bouton-contour { background: transparent; color: var(--encre); border-color: var(--bordure); }
.bande .bouton-contour { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.bouton-contour:hover { border-color: var(--secondaire); }

/* --- Héros -------------------------------------------------------------- */
.heros { background-image: radial-gradient(760px 460px at 82% 0%, #1E3A5F 0%, rgba(30, 58, 95, 0) 66%); padding: 0 22px; }
.heros .large { padding: 52px 0 0; }
.pastille {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px;
  border: 1px solid rgba(16, 185, 129, 0.42); border-radius: 999px; background: rgba(16, 185, 129, 0.10);
  font: 500 11.5px 'IBM Plex Mono', ui-monospace, monospace; color: #6EE7B7; letter-spacing: 0.05em;
}
.pastille::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #10B981; }
.heros h1 { margin-top: 18px; font-size: clamp(34px, 8vw, 58px); line-height: 1.05; font-weight: 800; color: #fff; text-wrap: balance; }
.heros .intro { max-width: 560px; font-size: clamp(16px, 1.7vw, 19px); }
.chiffres { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--bande-trait); }
.chiffres b { display: block; font: 600 22px 'IBM Plex Mono', ui-monospace, monospace; color: #fff; }
.chiffres span { display: block; font-size: 13px; color: var(--sur-bande-faible); margin-top: 3px; }
/* La scène est proportionnelle : les trois téléphones gardent leurs rapports
   à toutes les largeurs, et sortent par le bas de la bande. */
.heros-scene { position: relative; width: min(100%, 600px); aspect-ratio: 600 / 560; margin: 40px auto 0; overflow: hidden; }
.heros-scene .telephone { position: absolute; padding: 5px; border-radius: 22px; }
.heros-scene .telephone img { border-radius: 17px; }
.heros-scene .t2 { width: 46%; left: 27%; bottom: -7%; z-index: 2; }
.heros-scene .t1 { width: 38%; left: 0; bottom: -8%; transform: rotate(-4deg); }
.heros-scene .t3 { width: 38%; right: 0; bottom: -8%; transform: rotate(4deg); }

/* --- Téléphone / tablette ------------------------------------------------ */
.telephone {
  margin: 0; padding: 7px; background: #0A1220; border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 24px 56px rgba(2, 8, 23, 0.42);
}
.telephone img { border-radius: 24px; width: 100%; height: auto; }
.tablette { margin: 0; padding: 9px; background: #0A1220; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 24px 56px rgba(2, 8, 23, 0.32); }
.tablette img { border-radius: 14px; width: 100%; height: auto; }
figcaption { margin-top: 12px; font-size: 13.5px; line-height: 1.45; color: var(--secondaire); text-align: center; }

/* --- Rangées fonction : texte + capture ----------------------------------- */
.rangee { display: flex; flex-direction: column; gap: 30px; align-items: center; padding: 40px 0; }
.rangee + .rangee { border-top: 1px solid var(--bordure); }
.rangee .texte { width: 100%; }
.rangee h3 { margin-top: 10px; font-size: 24px; line-height: 1.18; font-weight: 800; text-wrap: balance; }
.rangee p { margin-top: 12px; font-size: 16px; line-height: 1.64; color: var(--secondaire); }
.rangee ul, .liste { margin: 14px 0 0; padding: 0; list-style: none; }
.rangee li, .liste li { position: relative; margin-top: 9px; padding-left: 26px; font-size: 15.5px; line-height: 1.55; color: var(--secondaire); }
.rangee li::before, .liste li::before {
  content: ''; position: absolute; left: 3px; top: 8px; width: 12px; height: 7px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg) scale(0.9);
}
.rangee .visuel { flex: 0 0 auto; width: min(100%, 290px); }
.rangee .visuel.large-visuel { width: min(100%, 560px); }
.rangee b, .liste b { color: var(--encre); font-weight: 600; }

/* --- Étapes ------------------------------------------------------------- */
.etapes { counter-reset: e; display: grid; gap: 14px; margin-top: 30px; grid-template-columns: minmax(0, 1fr); }
.etape { counter-increment: e; position: relative; padding: 24px 20px 24px 76px; }
.etape::before {
  content: counter(e); position: absolute; left: 20px; top: 22px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--emeraude); color: #04241A; font: 600 18px 'IBM Plex Mono', monospace;
}

/* --- Galerie ------------------------------------------------------------ */
.galerie { display: grid; gap: 34px 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; align-items: start; }
.galerie .telephone { background: #0A1220; box-shadow: var(--ombre); }
.galerie .large-cellule { grid-column: 1 / -1; }
.galerie .large-cellule .tablette { max-width: 760px; margin: 0 auto; }
.galerie a.zoom { display: block; }

/* --- FAQ ---------------------------------------------------------------- */
.faq { margin-top: 26px; display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--bordure); border-radius: 14px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 54px 18px 20px; position: relative;
  font: 700 16.5px 'Archivo', system-ui, sans-serif; line-height: 1.32; color: var(--encre); min-height: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.18s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .reponse { padding: 0 20px 20px; }
.faq .reponse p { margin-top: 10px; font-size: 15.5px; line-height: 1.64; color: var(--secondaire); }
.faq .reponse ul { margin: 10px 0 0; padding-left: 20px; color: var(--secondaire); font-size: 15.5px; line-height: 1.6; }
.faq h2.rubrique { margin-top: 38px; font-size: 20px; font-weight: 800; }
.faq-tete { max-width: 860px; }

/* --- Pages de texte : confidentialité, conditions, mentions -------------- */
.legal { max-width: 800px; }
.legal .article { background: var(--surface); border: 1px solid var(--bordure); border-radius: 14px; padding: 22px 24px; margin-top: 16px; }
.creux .legal .article { background: var(--fond); }
.legal .article h2 { font-size: 18px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--bordure); }
.legal .article h3 { margin-top: 20px; font-size: 15px; font-weight: 700; color: var(--accent); }
.legal p { margin-top: 10px; font-size: 15px; line-height: 1.64; color: var(--secondaire); }
.legal strong { color: var(--encre); font-weight: 600; }
.legal ul { margin: 10px 0 0; padding-left: 22px; }
.legal li { margin-top: 6px; font-size: 15px; line-height: 1.64; color: var(--secondaire); }
.legal table { border-collapse: collapse; width: 100%; margin-top: 12px; }
.legal th, .legal td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--bordure); font-size: 14.5px; line-height: 1.55; vertical-align: top; color: var(--secondaire); }
.legal th { color: var(--encre); font-weight: 600; white-space: nowrap; }
.legal .maj { margin-top: 14px; font-size: 13px; color: var(--secondaire); }
.encart { margin-top: 24px; padding: 16px 18px; border-left: 4px solid var(--emeraude); border-radius: 10px; background: rgba(16, 185, 129, 0.12); }
.encart p { color: var(--encre); margin-top: 8px; }
.encart p:first-child { margin-top: 0; }
.sommaire { margin-top: 22px; padding: 16px 20px; border: 1px solid var(--bordure); border-radius: 14px; background: var(--surface); }
.sommaire b { font: 600 12px 'IBM Plex Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondaire); }
.sommaire ol { margin: 8px 0 0; padding-left: 20px; columns: 1; }
.sommaire li { margin-top: 5px; font-size: 14.5px; }

/* --- Appel final -------------------------------------------------------- */
.appel { border-radius: 22px; padding: 38px 24px 40px; }
.appel .titre { margin-top: 0; }

/* --- Pied de page ------------------------------------------------------- */
.pied { background: var(--bande); color: var(--sur-bande-doux); padding: 44px 22px 34px; }
.pied a { color: var(--sur-bande-doux); }
.pied a:hover { color: #fff; }
.pied-grille { display: grid; gap: 30px; grid-template-columns: minmax(0, 1fr); }
.pied h2 { font: 600 11.5px 'IBM Plex Mono', monospace; letter-spacing: 0.09em; text-transform: uppercase; color: var(--sur-bande-faible); }
.pied ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.pied li a, .pied li button { display: inline-block; padding: 7px 0; font-size: 14.5px; }
.pied .lien-bouton { background: none; border: 0; padding: 7px 0; font: inherit; font-size: 14.5px; color: var(--sur-bande-doux); cursor: pointer; text-align: left; }
.pied .lien-bouton:hover { color: #fff; text-decoration: underline; }
.pied .fin { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--bande-trait); font-size: 12.5px; color: var(--sur-bande-faible); }

/* --- Fenêtre « Vos choix » --------------------------------------------- */
dialog.choix { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--bordure); border-radius: 18px; background: var(--surface); color: var(--encre); box-shadow: 0 30px 80px rgba(2, 8, 23, 0.45); }
dialog.choix::backdrop { background: rgba(2, 8, 23, 0.6); }
dialog.choix .interieur { padding: 26px 24px 22px; }
dialog.choix h2 { font-size: 22px; font-weight: 800; }
dialog.choix p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--secondaire); }
dialog.choix dl { margin: 16px 0 0; display: grid; gap: 10px; }
dialog.choix dt { font: 600 12.5px 'IBM Plex Mono', monospace; color: var(--encre); }
dialog.choix dd { margin: 2px 0 0; font-size: 14px; color: var(--secondaire); }
dialog.choix .valeur { color: var(--accent); font-family: 'IBM Plex Mono', monospace; }
dialog.choix .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

@media (min-width: 900px) {
  .bloc { padding: 92px 56px; }
  .entete-rangee { padding: 12px 56px; max-width: 1292px; }
  .nav { display: flex; }
  .burger { display: none; }
  .titre { font-size: 42px; }
  .intro { font-size: 18px; }
  .grille.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
  .pile { flex-direction: row; gap: 22px; margin-top: 44px; }
  .pile > * { flex: 1 1 0; }
  .heros { padding: 0 56px; }
  .heros .large { padding: 84px 0 0; }
  .heros-cols { display: flex; gap: 40px; align-items: flex-end; }
  .heros-cols > .texte { flex: 1 1 0; padding-bottom: 76px; }
  .heros-scene { flex: 0 0 600px; margin: 0; }
  .rangee { flex-direction: row; gap: 76px; padding: 68px 0; }
  .rangee.inverse { flex-direction: row-reverse; }
  .rangee .texte { flex: 1 1 0; }
  .rangee h3 { font-size: 32px; }
  .rangee .visuel { width: 300px; }
  .rangee .visuel.large-visuel { width: 560px; }
  .etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .etape { padding: 76px 22px 26px; }
  .etape::before { left: 22px; top: 22px; }
  .galerie { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 28px; }
  .pied { padding: 56px 56px 38px; }
  .pied-grille { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
  .sommaire ol { columns: 2; }
  .appel { padding: 60px 56px 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .entete, .pied, .aller-contenu, .boutons { display: none; }
  body { background: #fff; color: #000; }
}
