/* =========================================================================
   Instructions d'installation (page /installation/)
   S'ajoute à style.css : mêmes couleurs, mêmes polices, mêmes boutons.
   Un écran par étape : dessin animé, réglage au pouce, liste à cocher.
   ========================================================================= */

.guide {
  /* couleurs des dessins, tirées de la nuit du landing */
  --ciel: #0a0f19; --gazon: #0c1d18; --asphalte: #1a212c; --sur-rue: #eef1f6; --ligne: #e3b24f;
  --boitier: #18212d; --boitier-bord: #5d6c82; --neige: #dfe7f2; --bois: #6f5238;
  --auto: #e9edf3; --auto-face: #8795ab; --papier: #f4f1ea; --encre: #0d141c; --del: #58a8ff;
  --sur-menthe: #03140f;
  --haut: var(--entete);
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;
  padding-top: calc(var(--haut) + 14px);
  background:
    radial-gradient(70% 420px at 80% 0%, rgba(60, 240, 197, 0.09), transparent 70%),
    var(--fond);
}
.guide__colonne { width: 100%; max-width: calc(660px + var(--gouttiere) * 2); margin-inline: auto; padding-inline: var(--gouttiere); }
.guide > .guide__colonne { flex: 1; padding-bottom: 36px; }
.guide .mono { font-family: var(--police-mono); font-variant-numeric: tabular-nums; }
/* FR | EN dans l'en-tête du guide (le landing le met dans son menu) ; sous 520 px, le lien est dans le pied de page */
.entete--guide .langues { align-self: center; margin: 0 0 0 auto; padding: 3px; }
.entete--guide .langues a { min-width: 34px; padding: 6px 8px; border-radius: 999px; color: var(--doux); font: 500 11px/1 var(--police-mono); letter-spacing: 0.08em; text-align: center; text-decoration: none; }
.entete--guide .langues a:hover { color: var(--texte); background: var(--surface-2); }
.entete--guide .langues a[aria-current] { color: var(--texte); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--bord-fort); }

/* le fil des étapes */
.fil { display: flex; gap: 4px; margin-bottom: 22px; }
.fil button { flex: 1; min-width: 0; height: 28px; padding: 11px 0; border: 0; background: none; cursor: pointer; }
.fil button::before { content: ''; display: block; height: 6px; border-radius: 3px; background: var(--bord-fort); transition: background 0.25s, box-shadow 0.25s; }
.fil button.vu::before { background: var(--doux); }
.fil button.fait::before { background: var(--menthe); box-shadow: 0 0 10px rgba(60, 240, 197, 0.5); }
.fil button[aria-current='step']::before { background: var(--texte); }

/* une étape */
.etape { display: flex; flex-direction: column; gap: 18px; animation: etape-entre 0.5s var(--sortie); }
@keyframes etape-entre { from { opacity: 0; transform: translateY(12px); } }
.etape .surtitre { margin-bottom: 14px; }
.etape h1, .etape h2 { font-size: clamp(32px, 7.6vw, 48px); }
.etape h1:focus, .etape h2:focus { outline: none; }
.etape h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--menthe) 10%, #a8fbe6 55%, var(--ambre) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.etape .chapeau { margin-top: 0; }
.guide__sous-titre { margin-top: 14px; font-size: 22px; }

/* le dessin animé */
.dessin {
  margin: 0; overflow: hidden;
  border-radius: var(--rayon); border: 1px solid var(--bord);
  background: linear-gradient(180deg, rgba(15, 19, 27, 0.8), rgba(8, 10, 15, 0.82));
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.dessin svg { width: 100%; height: auto; }
.dessin figcaption { padding: 12px 16px 14px; border-top: 1px solid var(--bord); color: var(--texte-2); font-size: 14.5px; line-height: 1.45; }

/* réglages au pouce */
.reglage { display: flex; flex-direction: column; gap: 6px; }
.reglage__ligne { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.reglage label { font-weight: 600; font-size: 16px; }
.reglage output { color: var(--menthe); font: 600 22px/1 var(--police-mono); font-variant-numeric: tabular-nums; }
.guide input[type='range'] { width: 100%; height: 40px; margin: 0; accent-color: var(--menthe); }
.lectures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lecture { min-width: 0; padding: 14px 16px; border-radius: var(--rayon); border: 1px solid var(--bord); background: var(--surface); }
.lecture > span { display: block; color: var(--doux); font: 500 11px/1.2 var(--police-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.lecture b { display: block; margin-top: 8px; font: 600 30px/1 var(--police-mono); font-variant-numeric: tabular-nums; transition: opacity 0.2s; }
.lecture b small { color: var(--doux); font: 500 13px var(--police-mono); }
.lecture.vieux b { opacity: 0.4; }
.lecture.fort b { color: var(--menthe); }

.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--bord); background: var(--surface); }
.choix button { min-height: 44px; padding: 6px 10px; border: 0; border-radius: 999px; background: none; color: var(--texte-2); font-weight: 600; font-size: 15px; line-height: 1.2; cursor: pointer; transition: background 0.25s, color 0.25s; }
.choix button[aria-pressed='true'] { background: var(--menthe); color: var(--sur-menthe); box-shadow: 0 8px 24px -12px rgba(60, 240, 197, 0.7); }

.verdict { padding: 14px 16px; border-radius: var(--rayon); border: 1px solid var(--bord); background: var(--surface); color: var(--texte-2); font-size: 15.5px; }
.verdict b { display: block; margin-bottom: 4px; color: var(--texte); font: 600 17px/1.3 var(--police-titre); letter-spacing: -0.012em; }
.verdict.bon { border-color: rgba(60, 240, 197, 0.3); background: rgba(60, 240, 197, 0.07); }
.verdict.bon b { color: var(--menthe); }
.verdict.moyen b { color: var(--ambre); }
.verdict.non b { color: var(--rouge); }

/* la liste à cocher : mêmes lignes fines que les étapes du landing */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { border-top: 1px solid var(--bord); }
.liste li:last-child { border-bottom: 1px solid var(--bord); }
.liste label { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; padding: 16px 0; cursor: pointer; }
.liste input {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin: 0; border-radius: 9px; cursor: pointer;
  background: rgba(60, 240, 197, 0.06) center / 15px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(60, 240, 197, 0.34);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.liste input:checked {
  background-color: var(--menthe);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.2 2.3 2.3 4.7-5' fill='none' stroke='%2303140f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 0 14px rgba(60, 240, 197, 0.4);
}
.liste span { min-width: 0; color: var(--texte-2); }
.liste span b { color: var(--texte); font-weight: 600; }
.liste input:checked + span, .liste input:checked + span b { color: var(--doux); }
.note { padding-left: 14px; border-left: 2px solid var(--ambre); color: var(--texte-2); font-size: 15.5px; }
.note b { color: var(--texte); }
.guide .faq summary { padding-block: 18px; font-size: 17px; }
.guide .faq details p { padding-bottom: 20px; font-size: 15.5px; }

/* le sommaire de l'accueil */
.sommaire { list-style: none; margin: 0; padding: 0; }
.sommaire li { border-top: 1px solid var(--bord); }
.sommaire li:last-child { border-bottom: 1px solid var(--bord); }
.sommaire button { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; width: 100%; padding: 11px 0; border: 0; background: none; text-align: left; cursor: pointer; font: 600 17px/1.3 var(--police-titre); letter-spacing: -0.012em; }
.sommaire i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: rgba(60, 240, 197, 0.08); box-shadow: inset 0 0 0 1px rgba(60, 240, 197, 0.3); color: var(--menthe); font: 600 14px var(--police-mono); font-style: normal; }
.sommaire button::after { content: '→'; color: var(--doux); transition: transform 0.25s var(--sortie), color 0.2s; }
.sommaire button:hover::after { transform: translateX(4px); color: var(--menthe); }

/* Retour / Suivant, collés au bas de l'écran */
.guide__nav {
  position: sticky; bottom: 0; z-index: 5;
  border-top: 1px solid var(--bord);
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.guide__nav-dedans { display: flex; gap: 10px; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.guide__nav .bouton { min-height: 52px; }
.guide__nav #suivant { flex: 1; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; text-align: center; line-height: 52px; }
.guide__nav .bouton:hover { transform: none; }
.bouton--discret { align-self: flex-start; }

/* ---------- dessins ---------- */
.guide .gazon { fill: var(--gazon); } .guide .asphalte { fill: var(--asphalte); } .guide .ciel { fill: var(--ciel); }
.guide .ligne-j { stroke: var(--ligne); stroke-width: 1.6; stroke-dasharray: 12 10; }
.guide .boitier { fill: var(--boitier); stroke: var(--boitier-bord); stroke-width: 1.2; }
.guide .poteau { fill: #3d4756; } .guide .bois { fill: var(--bois); } .guide .neige { fill: var(--neige); }
.guide .faisceau { fill: var(--menthe); opacity: 0.16; }
.guide .axe { stroke: var(--menthe); stroke-width: 1.3; stroke-dasharray: 5 4; }
.guide .t { font: 600 11px var(--police); fill: var(--texte); }
.guide .t.rue { fill: var(--sur-rue); } .guide .t.doux { fill: var(--doux); } .guide .t.sur-boitier { fill: #eef1f6; letter-spacing: 0.12em; }
.guide .t.sur-papier { fill: var(--encre); } .guide .t.menthe { fill: var(--menthe); }
.guide .t.mono { font-family: var(--police-mono); }
.guide .milieu { text-anchor: middle; } .guide .fin { text-anchor: end; }
.guide .tourne { transition: transform 0.7s var(--sortie); }
.guide .auto .caisse { fill: var(--auto); } .guide .auto .vitre { fill: var(--asphalte); }
.guide .auto .bulle { opacity: 0; transition: opacity 0.15s; }
.guide .auto.vue .bulle { opacity: 1; }
.guide .auto.vue .caisse { stroke: var(--menthe); stroke-width: 2; }
.guide .bulle rect { fill: var(--fond); stroke: var(--menthe); } .guide .bulle text { fill: var(--texte); font: 700 10px var(--police-mono); text-anchor: middle; }
.guide .auto-face { fill: var(--auto-face); }
.guide .cache { fill: var(--rouge); opacity: 0.3; }
.guide .vue-ligne { stroke: var(--rouge); stroke-width: 1.4; stroke-dasharray: 4 4; }
.guide .pulse { animation: g-pulse 2.4s ease-in-out infinite; }
@keyframes g-pulse { 50% { opacity: 0.07; } }
.guide .cote-l { stroke: var(--ambre); stroke-width: 4; stroke-linecap: round; }
.guide .cote-d { stroke: var(--texte); stroke-width: 1.4; stroke-dasharray: 3 4; }
.guide .ruban { stroke: var(--menthe); stroke-width: 2.2; stroke-dasharray: 8 6; animation: g-defile 1.2s linear infinite; }
@keyframes g-defile { to { stroke-dashoffset: -28; } }
.guide .piquet { fill: var(--ambre); }
.guide .onde { fill: none; stroke: var(--ambre); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: g-onde 1.8s ease-out infinite; }
@keyframes g-onde { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(3.2); opacity: 0; } }
.guide .pt { fill: var(--sur-rue); }
.guide .cable { fill: none; stroke: #55617a; stroke-width: 4; stroke-linecap: round; }
.guide .del { fill: var(--del); animation: g-del 1.8s linear infinite; }
.guide .del-halo { fill: var(--del); opacity: 0.25; animation: g-del-halo 1.8s linear infinite; }
@keyframes g-del { 0%, 7%, 16%, 23% { opacity: 1; } 8%, 15%, 24%, 100% { opacity: 0.12; } }
@keyframes g-del-halo { 0%, 7%, 16%, 23% { opacity: 0.3; } 8%, 15%, 24%, 100% { opacity: 0; } }
.guide .chargeur { fill: var(--auto-face); } .guide .prise { fill: #10151d; stroke: var(--bord-fort); }
.guide .papier { fill: var(--papier); }
.guide .fauxqr { fill: var(--encre); }
.guide .cible { fill: none; stroke: var(--menthe); stroke-width: 2.5; animation: g-cible 5s linear infinite; }
@keyframes g-cible { 0%, 40% { opacity: 0.25; } 46%, 100% { opacity: 1; } }
.guide .rayon { stroke: var(--menthe); stroke-width: 1.5; stroke-dasharray: 3 5; animation: g-defile 1s linear infinite reverse; }
.guide .cell-coque { fill: #0b0d11; stroke: var(--boitier-bord); stroke-width: 1.2; }
.guide .cell-ecran { fill: var(--papier); }
.guide .balai { fill: var(--menthe); animation: g-balai 5s linear infinite; }
@keyframes g-balai { 0% { transform: translateY(0); opacity: 1; } 20% { transform: translateY(44px); } 40% { transform: translateY(0); opacity: 1; } 46%, 100% { transform: translateY(0); opacity: 0; } }
.guide .banniere { animation: g-banniere 5s linear infinite; }
.guide .banniere rect { fill: #0b0d11; stroke: var(--menthe); } .guide .banniere text { fill: #eef1f6; font: 600 8.5px var(--police); text-anchor: middle; }
@keyframes g-banniere { 0%, 44% { opacity: 0; transform: translateY(8px); } 52%, 100% { opacity: 1; transform: none; } }
.guide .mire { stroke: var(--doux); stroke-width: 1.6; stroke-dasharray: 6 5; }
.guide .mire.bon { stroke: var(--menthe); } .guide .mire.moyen { stroke: var(--ambre); }
.guide .vis { fill: var(--neige); stroke: var(--encre); stroke-width: 1; }
.guide .penche { transform-origin: 252px 44px; animation: g-penche 3.6s ease-in-out infinite; }
@keyframes g-penche { 0%, 15% { transform: rotate(0deg); } 50%, 85% { transform: rotate(-8deg); } }
.guide .anneau { fill: none; stroke: var(--bord-fort); stroke-width: 1; }
.guide .pa { fill: var(--menthe); } .guide .pe { fill: var(--ambre); }
.guide .pa, .guide .pe { animation: g-point 7s linear infinite both; }
@keyframes g-point { 0% { opacity: 0; } 2%, 78% { opacity: 1; } 86%, 100% { opacity: 0; } }
.guide .vis2 { transform-box: fill-box; transform-origin: center; animation: g-vis2 3s var(--sortie) infinite; }
@keyframes g-vis2 { 0%, 20% { transform: scale(2.6) rotate(-180deg); opacity: 0; } 45%, 100% { transform: none; opacity: 1; } }
.guide .goutte { fill: var(--del); }
.guide .arc { fill: none; stroke: var(--menthe); stroke-width: 2; stroke-linecap: round; animation: g-arc 2.1s linear infinite; }
.guide .arc:nth-of-type(2) { animation-delay: 0.35s; } .guide .arc:nth-of-type(3) { animation-delay: 0.7s; }
@keyframes g-arc { 0%, 100% { opacity: 0.15; } 30% { opacity: 1; } 60% { opacity: 0.15; } }

/* le cellulaire de l'étape Wi-Fi : même coque que celui du landing */
.cell-zone { display: flex; justify-content: center; padding: 22px 12px; }
.cell { width: min(100%, 256px); padding: 9px; border-radius: 34px; background: #0b0d11; border: 1px solid var(--bord-fort); box-shadow: 0 30px 60px -30px #000, inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.cell__ecran { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 276px; padding: 14px 12px 12px; overflow: hidden; border-radius: 26px; background: var(--fond); font-size: 13px; line-height: 1.4; }
.cell__adresse { color: var(--doux); font: 500 11px var(--police-mono); text-align: center; }
.cell__titre { font: 600 15px var(--police-titre); }
.cell__reseaux { list-style: none; display: grid; gap: 4px; margin: 0; padding: 0; }
.cell__reseaux li { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--bord); transition: background 0.3s, border-color 0.3s; }
.cell__reseaux small { color: var(--doux); font: 500 10px var(--police-mono); }
.cell[data-phase='1'] li.choisi, .cell[data-phase='2'] li.choisi, .cell[data-phase='3'] li.choisi { background: rgba(60, 240, 197, 0.1); border-color: var(--menthe); }
.cell__mdp { height: 34px; padding: 7px 10px; overflow: hidden; border-radius: 10px; border: 1px solid var(--bord-fort); color: var(--doux); white-space: nowrap; }
.cell__mdp i { display: none; font-style: normal; letter-spacing: 3px; color: var(--texte); }
.cell__mdp em { font-style: normal; }
.cell[data-phase='2'] .cell__mdp i, .cell[data-phase='3'] .cell__mdp i { display: inline-block; max-width: 12ch; overflow: hidden; vertical-align: bottom; animation: g-tape 1.2s steps(8) both; }
.cell[data-phase='2'] .cell__mdp em, .cell[data-phase='3'] .cell__mdp em { display: none; }
@keyframes g-tape { from { max-width: 0; } }
.cell__bouton { margin-top: auto; padding: 10px; border-radius: 999px; background: var(--menthe); color: var(--sur-menthe); font-weight: 600; text-align: center; transition: transform 0.15s; }
.cell[data-phase='3'] .cell__bouton { transform: scale(0.96); }
.cell__voile { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; gap: 8px; padding: 16px; text-align: center; background: var(--fond); animation: etape-entre 0.35s var(--sortie); }
.cell__voile b { font: 600 18px/1.2 var(--police-titre); letter-spacing: -0.012em; }
.cell__voile .mono { color: var(--menthe); font-weight: 600; overflow-wrap: anywhere; }
.cell[data-phase='4'] .cell__voile--essai, .cell[data-phase='5'] .cell__voile--ok, .cell[data-phase='seul'] .cell__voile--seul { display: flex; }
.tourniquet { width: 26px; height: 26px; margin-inline: auto; border-radius: 50%; border: 3px solid var(--bord-fort); border-top-color: var(--menthe); animation: g-tour 0.9s linear infinite; }
@keyframes g-tour { to { transform: rotate(360deg); } }

/* étalonnage : la rue et les compteurs */
.piste { position: relative; height: 58px; overflow: hidden; background: var(--asphalte); }
.piste::before { content: ''; position: absolute; inset: 28px 0 auto; border-top: 2px dashed var(--ligne); }
.piste i { position: absolute; width: 30px; height: 13px; border-radius: 4px; background: var(--auto); }
.piste i.a { top: 36px; left: -40px; box-shadow: 8px 0 14px rgba(255, 240, 200, 0.5); animation: g-roule-a 2.6s linear infinite; }
.piste i.b { top: 9px; right: -40px; box-shadow: -8px 0 14px rgba(255, 240, 200, 0.5); animation: g-roule-b 3.1s linear infinite; }
@keyframes g-roule-a { to { transform: translateX(760px); } }
@keyframes g-roule-b { to { transform: translateX(-760px); } }
.compteurs { display: grid; gap: 14px; padding: 16px; }
.compteur__ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: var(--texte-2); font-size: 14.5px; }
.compteur__ligne b { color: var(--texte); font: 600 20px var(--police-mono); font-variant-numeric: tabular-nums; }
.jauge { position: relative; height: 8px; margin-top: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); }
.jauge i { display: block; height: 100%; border-radius: 4px; background: var(--menthe); box-shadow: 0 0 10px rgba(60, 240, 197, 0.5); transition: width 0.2s linear; }
.jauge::after { content: ''; position: absolute; left: 37.5%; top: -4px; bottom: -4px; border-left: 2px solid var(--ambre); }
.etat { justify-self: start; padding: 6px 12px; border-radius: 999px; border: 1px solid currentColor; color: var(--doux); font: 500 12.5px var(--police-mono); }
.etat.moyen { color: var(--ambre); } .etat.bon { color: var(--menthe); background: rgba(60, 240, 197, 0.07); }

.guide [hidden] { display: none !important; }

@media (max-width: 400px) {
  .guide__nav .bouton { padding-inline: 18px; }
  .lecture b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .guide *, .guide *::before, .guide *::after { animation: none !important; transition: none !important; }
  .guide .goutte { display: none; }
}
