/* porte-a-porte.ch — bande dessinée sobre : encre noire, papier, une seule couleur d'accent */

:root {
  --encre: #1a1a1a;
  --papier: #fbfaf6;
  --blanc: #ffffff;
  --gris: #f0eee7;
  --gris-texte: #55524a;
  --accent: #ffcf33;
  --alerte: #fde3df;
  --trait: 2.5px solid var(--encre);
  --ombre: 4px 4px 0 var(--encre);
  --titre: "Bangers", "Arial Narrow", Impact, sans-serif;
  --texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* couleurs fonctionnelles, réservées à l'administration (états, zones) */
  --jaune: var(--accent);
  --vert: #bfe3c4;
  --bleu: #cfe3ee;
  --rouge: #f3b3aa;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--encre);
  background: var(--papier);
}

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.1; }
h1, h2 { font-family: var(--titre); font-weight: 400; letter-spacing: .03em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1em; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
small { color: var(--gris-texte); font-size: .875rem; }

main { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem 4rem; }

.evitement { position: absolute; left: -999px; top: 0; background: var(--encre); color: var(--blanc); padding: .5rem 1rem; z-index: 100; }
.evitement:focus { left: 0; }

/* ---------- En-tête ---------- */

.entete {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
}
.logo { text-decoration: none; }
.logo-bulle {
  display: inline-block;
  font-family: var(--titre);
  font-size: 1.7rem;
  letter-spacing: .04em;
  background: var(--accent);
  border: var(--trait);
  border-radius: 999px;
  padding: .05em .75em .1em;
  box-shadow: 3px 3px 0 var(--encre);
}
.logo-bulle small { font-size: .6em; color: inherit; }

.menu { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.4rem; }
.menu a { text-decoration: none; font-weight: 600; font-size: .98rem; }
.menu a:not(.bouton):hover { text-decoration: underline; }

/* ---------- Boutons ---------- */

.bouton {
  display: inline-block;
  font-family: var(--texte);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--encre);
  background: var(--accent);
  border: var(--trait);
  border-radius: 10px;
  padding: .65em 1.4em;
  box-shadow: var(--ombre);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.bouton:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--encre); }
.bouton:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--encre); }
.bouton.petit { font-size: .98rem; padding: .45em 1em; box-shadow: 3px 3px 0 var(--encre); }
.bouton.clair, .bouton.jaune, .bouton.bleu { background: var(--blanc); }
.bouton[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Cases de BD ---------- */

.case {
  background: var(--blanc);
  border: var(--trait);
  border-radius: 8px;
  box-shadow: var(--ombre);
  padding: 1.4rem 1.5rem;
  position: relative;
}
.case > :last-child { margin-bottom: 0; }
.case.accent, .case.jaune { background: var(--accent); }
.case.gris, .case.bleu, .case.vert { background: var(--gris); }
.case.etroit { max-width: 720px; margin-left: auto; margin-right: auto; }

.cartouche {
  display: inline-block;
  background: var(--encre);
  color: var(--blanc);
  padding: .15em .7em;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 .8rem;
  border-radius: 4px;
}

.bulle {
  position: relative;
  background: var(--blanc);
  border: var(--trait);
  border-radius: 22px;
  padding: .8rem 1.1rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
}
.bulle::after {
  content: "";
  position: absolute;
  left: 2.4rem;
  bottom: -12px;
  width: 20px;
  height: 20px;
  background: var(--blanc);
  border-right: var(--trait);
  border-bottom: var(--trait);
  transform: rotate(45deg);
}

.section { margin-top: 4.5rem; }
.section > h2 { margin-bottom: 1.2rem; }
.section > h2::after { content: ""; display: block; width: 64px; height: 6px; background: var(--accent); border: 2px solid var(--encre); margin-top: .35rem; }
.intro { max-width: 62ch; margin-bottom: 1.6rem; }
.centre { text-align: center; margin-top: 2.2rem; }

/* ---------- Accueil ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 1.5rem;
}
.surtitre { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin-bottom: .8rem; }
.hero h1 span { background: linear-gradient(transparent 62%, var(--accent) 62%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.chapeau { font-size: 1.15rem; max-width: 56ch; }
.verif { margin-top: 1.6rem; }
.verif-titre { font-family: var(--texte); font-size: 1.15rem; font-weight: 700; letter-spacing: 0; margin-bottom: .7rem; }
.hero-dessin {
  border: var(--trait);
  border-radius: 8px;
  box-shadow: var(--ombre);
  padding: 1.4rem;
  background-color: var(--blanc);
  /* trame de points, comme une case imprimée */
  background-image: radial-gradient(rgba(26, 26, 26, .16) 1.1px, transparent 1.2px);
  background-size: 11px 11px;
}
.dessin-velo { width: 100%; height: auto; display: block; }

.bandeau { margin-top: 3rem; }
.atouts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: var(--trait); border-radius: 8px; background: var(--blanc); }
.atouts li { padding: 1.1rem 1.2rem; border-left: var(--trait); font-size: .95rem; }
.atouts li:first-child { border-left: 0; }
.atouts strong { display: block; font-size: 1.05rem; margin-bottom: .2rem; }

.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.etapes .numero {
  font-family: var(--titre);
  font-size: 1.7rem;
  width: 1.7em;
  height: 1.7em;
  display: grid;
  place-items: center;
  background: var(--accent);
  border: var(--trait);
  border-radius: 50%;
  margin-bottom: .8rem;
}
.etapes p { font-size: .97rem; }

.offres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.offre { display: flex; flex-direction: column; }
.offre .prix { font-family: var(--titre); font-size: 1.9rem; margin: auto 0 0; padding-top: .8rem; }
.offre .prix small { font-family: var(--texte); font-size: .9rem; font-weight: 600; color: inherit; }

.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: 1.4rem; }
.section > .deux:first-of-type { margin-top: 0; }

.tri { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.tri li { border: var(--trait); border-radius: 8px 8px 14px 14px; padding: .55rem .4rem; text-align: center; font-weight: 600; font-size: .9rem; background: var(--blanc); }

.coches, .liens { list-style: none; margin: 0 0 1em; padding: 0; }
.coches li { padding-left: 1.7rem; position: relative; margin-bottom: .45rem; }
.coches li::before { content: ""; position: absolute; left: .15rem; top: .45em; width: .8rem; height: .42rem; border-left: 3px solid var(--encre); border-bottom: 3px solid var(--encre); transform: rotate(-45deg); }
.liens li { margin-bottom: .4rem; font-weight: 600; }

.faq details { border-bottom: 1.5px solid var(--encre); padding: .8rem 0; }
.faq details:first-child { padding-top: 0; }
.faq details:last-child { border-bottom: 0; padding-bottom: 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: .5rem 0 0; max-width: 75ch; }

a.porte { display: block; text-decoration: none; padding-right: 3.5rem; transition: transform .08s, box-shadow .08s; }
a.porte:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--encre); background: var(--accent); }
a.porte .fleche { position: absolute; right: 1.3rem; top: 50%; transform: translateY(-50%); font-size: 1.8rem; font-weight: 700; }
.besoin { margin-top: 3rem; }
.besoin > h2::after { display: none; }

/* ---------- Vérificateur d'adresse ---------- */

.adresse label { display: block; font-weight: 700; margin-bottom: .3rem; }
.adresse-saisie { position: relative; }
.adresse-liste {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  background: var(--blanc);
  border: var(--trait);
  border-radius: 8px;
  box-shadow: var(--ombre);
  max-height: 260px;
  overflow: auto;
}
.adresse-liste li { padding: .55rem .8rem; cursor: pointer; }
.adresse-liste li:hover, .adresse-liste li[aria-selected="true"] { background: var(--accent); }
.adresse-liste li.vide { cursor: default; color: var(--gris-texte); background: none; }
.adresse-resultat { margin-top: 1.1rem; }
.adresse-resultat .reponse { border-left: 6px solid var(--accent); padding: .2rem 0 .2rem .9rem; margin: 0; }
.adresse-resultat .reponse strong { display: block; font-size: 1.2rem; }
.adresse-resultat .actions { margin: 1rem 0 0; }
.adresse-resultat form { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.adresse-resultat form input { flex: 1 1 14rem; }

/* ---------- Formulaires ---------- */

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--blanc);
  border: 2px solid var(--encre);
  border-radius: 8px;
  padding: .6rem .8rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .bouton:focus-visible, summary:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 3px;
}
input[type="file"] { font: inherit; max-width: 100%; }

.champ { margin-bottom: 1.1rem; }
.champ > label, .champ > .libelle { display: block; font-weight: 700; margin-bottom: .3rem; }
.champ small { display: block; margin-top: .3rem; }
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.choix { display: grid; gap: .6rem; }
.choix.en-ligne { grid-template-columns: repeat(3, 1fr); }
.choix label {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  border: 2px solid var(--encre);
  border-radius: 8px;
  padding: .7rem .9rem;
  background: var(--blanc);
  cursor: pointer;
  font-weight: 400;
}
.choix label:has(input:checked) { background: var(--accent); box-shadow: 3px 3px 0 var(--encre); }
.choix label:has(input:focus-visible) { outline: 3px solid var(--encre); outline-offset: 3px; }
.choix input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--encre); flex: none; }
.choix .prix-ligne { margin-left: auto; font-weight: 700; white-space: nowrap; padding-left: 1rem; }
.choix small { display: block; color: inherit; }

.erreurs { background: var(--alerte); border: 2px solid var(--encre); border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1.2rem; }
.erreurs ul { margin: 0; padding-left: 1.2rem; }
.succes { border-left-width: 12px; }
.piege { position: absolute; left: -9999px; }

/* ---------- Inscription en 4 étapes ---------- */

.assistant { max-width: 1000px; margin: 1.5rem auto 0; }
.progression { display: none; gap: .5rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.assistant.actif .progression { display: flex; }
.progression li { flex: 1; height: 10px; border: 2px solid var(--encre); border-radius: 999px; background: var(--blanc); }
.progression li.fait { background: var(--accent); }

.pas { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2rem; margin-bottom: 2rem; }
.assistant.actif .pas { display: none; }
.assistant.actif .pas.courant { display: grid; }
.pas-aide { background: var(--gris); border-right: var(--trait); margin: -1.4rem 0 -1.4rem -1.5rem; padding: 1.4rem 1.5rem; border-radius: 6px 0 0 6px; }
.pas-aide .compte { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gris-texte); margin-bottom: .3rem; }
.pas-aide h2 { font-size: 1.8rem; }
.pas-aide p { font-size: .97rem; }
.pas-champs h3 { margin-top: 1.4rem; }
.pas-champs h3:first-child { margin-top: 0; }
.pas-nav { display: none; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.assistant.actif .pas-nav { display: flex; }
.pas-nav .bouton:only-child { margin-left: auto; }
.pas-message { font-weight: 700; margin: 1rem 0 0; }
.envoi-simple { text-align: center; }
.assistant.actif .envoi-simple { display: none; }

/* ---------- Règlement ---------- */

.reglement { max-width: 820px; margin: 0 auto; }
.reglement h2 { font-family: var(--texte); font-weight: 700; letter-spacing: 0; font-size: 1.35rem; margin-top: 2rem; }
.reglement table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .95rem; }
.reglement th, .reglement td { border: 1.5px solid var(--encre); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.reglement th { background: var(--gris); }

/* ---------- Pied ---------- */

.pied { border-top: var(--trait); background: var(--encre); color: var(--blanc); padding: 2.5rem 1.25rem 1.5rem; font-size: .95rem; }
.pied-colonnes { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.pied-titre { font-weight: 700; color: var(--accent); margin-bottom: .5rem; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: .35rem; }
.pied-bas { max-width: 1120px; margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid #55524a; color: #cfcbc0; font-size: .85rem; }

/* ---------- Petits écrans ---------- */

@media (max-width: 900px) {
  .hero, .deux, .pas, .assistant.actif .pas.courant { grid-template-columns: 1fr; }
  .hero-dessin { order: -1; max-width: 440px; }
  .etapes, .atouts { grid-template-columns: 1fr 1fr; }
  .atouts li:nth-child(3) { border-left: 0; }
  .atouts li:nth-child(n+3) { border-top: var(--trait); }
  .offres, .pied-colonnes { grid-template-columns: 1fr; }
  .pas-aide { margin: -1.4rem -1.5rem 0; border-right: 0; border-bottom: var(--trait); border-radius: 6px 6px 0 0; }
}
@media (max-width: 560px) {
  .etapes, .ligne, .choix.en-ligne, .atouts { grid-template-columns: 1fr; }
  .atouts li { border-left: 0; border-top: var(--trait); }
  .atouts li:first-child { border-top: 0; }
  .tri { grid-template-columns: 1fr 1fr; }
  .menu a:not(.bouton) { font-size: .9rem; }
  .choix label { flex-wrap: wrap; }
  .choix .prix-ligne { margin-left: 1.8rem; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton { transition: none; }
}

/* Titre d'étape ciblé par le script : pas de cadre de focus */
.pas-aide h2:focus { outline: none; }
