/* Page de commande du site, construite par construire-commande-site.js : ne pas modifier ici. */
/* Page de commande : le formulaire à gauche, la commande et le bouton de paiement à droite (collants), comme dans le configurateur. */
:root {
  --bg: #f3f6f9; --surface: #ffffff; --surface-2: #f7fafc; --ink: #17212b; --muted: #56636f; --line: #d9e2ec;
  --accent: #1193b8; --accent-strong: #0b7896; --accent-soft: #e3f3f8; --on-accent: #ffffff; --focus: #1193b8;
  --ok: #157347; --ok-soft: #e6f4ec; --danger: #b42318; --danger-soft: #fdecea;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif; --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d151c; --surface: #142029; --surface-2: #182733; --ink: #e7eef4; --muted: #9fb1c0; --line: #26394a;
    --accent: #2bb2d8; --accent-strong: #6ccbe6; --accent-soft: #11313e; --on-accent: #06202b; --focus: #6ccbe6;
    --ok: #5fd39a; --ok-soft: #12302a; --danger: #ff8a80; --danger-soft: #3a1c1c; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d151c; --surface: #142029; --surface-2: #182733; --ink: #e7eef4; --muted: #9fb1c0; --line: #26394a;
  --accent: #2bb2d8; --accent-strong: #6ccbe6; --accent-soft: #11313e; --on-accent: #06202b; --focus: #6ccbe6;
  --ok: #5fd39a; --ok-soft: #12302a; --danger: #ff8a80; --danger-soft: #3a1c1c; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.55; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding-block: 28px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 24px; }
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; font-size: 1.05rem; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: var(--on-accent); font-size: .8rem; }
.brand b { color: var(--accent); font-weight: 700; }
.mockup { font-size: .78rem; font-weight: 600; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 2px 10px; margin-left: auto; }
.retour { display: inline-block; font-size: .9rem; color: var(--accent-strong); text-decoration: none; font-weight: 500; margin-bottom: 10px; }
.retour:hover { text-decoration: underline; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.15; margin: 0; text-wrap: balance; font-weight: 700; }
.lead { color: var(--muted); margin: 8px 0 0; max-width: 64ch; text-wrap: pretty; }
.grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.colonne { display: grid; gap: 18px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.card h2 { font-size: 1.05rem; margin: 0 0 4px; }
.card > .aide { color: var(--muted); font-size: .88rem; margin: 0 0 16px; text-wrap: pretty; }
.f { display: grid; gap: 6px; margin-top: 14px; min-width: 0; }
.f > label, .f > .lab { font-size: .9rem; font-weight: 600; }
.f .facultatif { font-weight: 400; color: var(--muted); }
.deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 560px) { .deux { grid-template-columns: minmax(0, 1fr); } }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; width: 100%; min-width: 0;
}
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.note { font-size: .82rem; color: var(--muted); margin: 0; text-wrap: pretty; }
.err { font-size: .84rem; color: var(--danger); margin: 0; font-weight: 500; }
.adresse { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.adresse .pre { padding: 9px 2px 9px 12px; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.adresse input { border: 0; border-radius: 0; background: transparent; padding-left: 0; }
.adresse:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.adresse input:focus-visible { outline: none; }
.adresse.ko { border-color: var(--danger); background: var(--danger-soft); }
@media (max-width: 420px) { .adresse .pre { font-size: .8rem; padding-top: 11px; } }
.etat-nom { font-size: .84rem; margin: 0; font-weight: 500; color: var(--muted); }
.etat-nom.ok { color: var(--ok); }
.etat-nom.ko { color: var(--danger); }
.chk { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 14px; font-size: .92rem; cursor: pointer; }
.chk input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); }
.chk small { display: block; color: var(--muted); font-size: .82rem; }
.chk.invalide { color: var(--danger); }
.dates-sep { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.dates-sep .f { margin-top: 0; }
.jours-liste { font-size: .9rem; margin: 2px 0 0; }
.coupure { font-size: .86rem; margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); }
.recap { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.recap li { font-size: .88rem; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.regles { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .88rem; color: var(--muted); text-wrap: pretty; }
.regles b { color: var(--ink); font-weight: 600; }
.robot { margin-top: 16px; border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; font-size: .84rem; color: var(--muted); }
.erreurs { border: 1px solid var(--danger); background: var(--danger-soft); border-radius: var(--radius); padding: 14px 18px; }
.erreurs p { margin: 0 0 6px; font-weight: 600; color: var(--danger); }
.erreurs ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.erreurs a { color: var(--ink); }
.sum { position: sticky; top: calc(16px + env(safe-area-inset-top, 0px)); }
@media (max-width: 900px) { .sum { position: static; } }
.sum h2 { font-size: 1.05rem; margin: 0 0 14px; }
.lines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; font-size: .92rem; }
.lines li .d { color: var(--muted); font-size: .82rem; display: block; }
.lines li .v { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.lines li.minus .v { color: var(--accent-strong); }
.total { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.total .t { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.total .ht { color: var(--muted); font-size: .85rem; }
.ttc { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ttc li.fort { font-weight: 700; font-size: 1.05rem; }
.payer { margin-top: 18px; width: 100%; font: inherit; font-weight: 700; padding: 13px 18px; border-radius: 12px; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.payer:disabled { opacity: .7; cursor: wait; }
.secu { font-size: .8rem; color: var(--muted); margin: 10px 0 0; text-wrap: pretty; }
.resultat { margin-top: 18px; border: 1px solid var(--ok); background: var(--ok-soft); border-radius: 12px; padding: 14px 16px; }
.resultat .t { margin: 0 0 8px; font-weight: 700; color: var(--ok); }
.resultat dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; font-size: .88rem; }
.resultat dt { color: var(--muted); }
.resultat dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.resultat p { font-size: .84rem; margin: 10px 0 0; text-wrap: pretty; }
.secondaire { margin-top: 12px; font: inherit; font-size: .88rem; font-weight: 600; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Parcours de commande (2026-11-16, choix de l'utilisateur) : étapes, formule dans le récapitulatif, conditions résumées, garanties sous « Payer ». */
.etapes { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.etapes li { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; font-size: .9rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.etapes li:not(:last-child)::after { content: ""; flex: 1; height: 2px; min-width: 24px; margin: 0 14px; background: var(--line); }
.etapes li.fait:not(:last-child)::after { background: var(--ok); }
.etapes li:last-child { flex: 0 0 auto; }
.etapes .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; border: 2px solid var(--line); background: var(--surface); color: var(--muted); }
.etapes .fait, .etapes .ici { color: var(--ink); }
.etapes .fait .n { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.etapes .ici .n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.etapes { min-width: 0; }
@media (max-width: 760px) { .etapes li:not(.ici) .t { display: none; } .etapes li { gap: 8px; } .etapes li:not(:last-child)::after { margin: 0 6px; min-width: 8px; } .etapes .n { width: 26px; height: 26px; } }
.sum .recap { margin: 0 0 16px; }
.sum .recap li { font-size: .82rem; padding: 4px 10px; border-radius: 999px; }
.regles:not(.toutes) li:nth-child(n+4) { display: none; }
.plus-regles { margin: 10px 0 2px; padding: 0; border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 600; color: var(--accent-strong); cursor: pointer; }
.plus-regles:hover { text-decoration: underline; }
.garanties { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); list-style: none; display: grid; gap: 6px; font-size: .86rem; }
.garanties li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.garanties li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.note-heure { margin-top: 2px; }
/* Langue (2026-11-16, commande bilingue) : sélecteur FR | EN comme celui du site, et page anglaise montrée une fois ses textes posés
   (au pire après 1 s, si le script ne s'exécute pas). */
.lang { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: .85rem; line-height: 1; flex: none; }
.lang a, .lang b { display: block; padding: 8px 12px; text-decoration: none; }
.lang b { background: var(--accent); color: var(--on-accent); }
.lang a { color: var(--ink); }
.lang a:hover { background: var(--accent-soft); color: var(--accent-strong); }
html[lang="en"] body:not(.traduite) { opacity: 0; animation: montrer-page 0s linear 1s forwards; }
@keyframes montrer-page { to { opacity: 1; } }
/* Écran étroit : le sélecteur reste à droite du logo, le badge de la maquette passe dessous. */
@media (max-width: 560px) { .top .lang { margin-left: auto; } .top .mockup { order: 3; margin-left: 0; } }
/* Composants du site (règle de l'utilisateur du 2026-11-16 : une nouvelle page reprend exactement les composants des pages existantes).
   Sélecteur FR | EN et bouton principal au style du site (assets/style.css : .lang, .btn-primary). */
.lang a:hover { background: #eff2f9; color: #1193b8; }
@media (max-width: 379px) { .lang a, .lang b { padding: 7px 9px; } }
.payer { box-shadow: 0 6px 18px rgba(17, 147, 184, .35); transition: box-shadow .25s, background .15s, color .15s; }
.payer:not(:disabled):hover { background: #0e7d9c; color: #fff; box-shadow: 0 10px 24px rgba(17, 147, 184, .45); }
/* Écran étroit (2026-11-16) : sous 420 px, traits et pastilles un peu plus serrés, et le libellé de l'étape en cours peut passer
   sur 2 lignes au lieu de déborder (« Votre plateforme » à 360 px). Les pastilles ne rétrécissent jamais. */
@media (max-width: 420px) { .etapes li { gap: 6px; } .etapes li:not(:last-child)::after { margin: 0 4px; min-width: 6px; } .etapes .n { width: 24px; height: 24px; font-size: .75rem; }
  .etapes li.ici { min-width: 0; } .etapes li.ici:last-child { flex: 0 1 auto; } .etapes .ici .t { white-space: normal; line-height: 1.2; min-width: 0; } }
/* Grand écran (2026-11-16) : traits plus courts entre les étapes, pour que la barre française tienne dans le bloc de 780 px
   de la page de retour (elle le dépassait de 56 px). Même règle sur les 3 pages, pour garder la même barre partout. */
@media (min-width: 761px) { .etapes li { gap: 8px; } .etapes li:not(:last-child)::after { min-width: 12px; margin: 0 10px; } }
@media (min-width: 761px) and (max-width: 820px) { .etapes li:not(:last-child)::after { min-width: 6px; margin: 0 6px; } }   /* juste au-dessus de 760 px, la barre française dépassait de 8 px */
[data-st="1"] { margin-top:10px !important; }
[data-st="2"] { margin-top:10px !important; }

/* Logo du site (construire-commande-site.js) */
.brand { text-decoration: none; }
.brand-mark { height: 46px; width: auto; display: block; }
.brand-logo { height: 40px; width: auto; display: block; }
/* Sélecteur FR | EN à droite de la barre du haut, à la place qu’il occupe sur le site */
.top .lang, .top .langue { margin-left: auto; }

/* Champ de l’adresse (construire-commande-site.js) */
.f { align-content: start; }
.adresse .pre { padding-right: 0; }
.adresse input { font-weight: 600; padding-left: 1px; }
.adresse input::placeholder { font-weight: 400; }
.adresse.ko ~ #nom-aide { display: none; }
.jours-liste:empty { display: none; }
