/* ==========================================================
   Auto École Une Fois — feuille de style
   Palette feu tricolore : rouge / orange / vert
   ========================================================== */

:root {
  --rouge: #D9301F;
  --rouge-fonce: #B8261A;
  --orange: #F5A31A;
  --vert: #2FB36A;
  --anthracite: #2F3238;
  --sable: #EBE9E0;
  --rayure: #FFD9A6;
  --titres: Montserrat, "Segoe UI", Arial, sans-serif;
  --texte: Lato, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { 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(--anthracite);
  background: #fff;
}

body.noscroll { overflow: hidden; }

img, svg { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--titres);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--anthracite);
  outline-offset: 3px;
}

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

.centre { text-align: center; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 16px 34px;
  border-radius: 999px;
  border: 0;
  background: var(--rouge);
  color: #fff;
  font: 800 .95rem var(--titres);
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--rouge-fonce); }
.btn--sombre { background: var(--anthracite); }
.btn--sombre:hover { background: #1c1e22; }

/* ---------- Logo (haut gauche) ---------- */
.logo {
  position: absolute;
  left: 24px;
  top: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 14px;
  background: #fff;
  border-radius: 22px;
  color: var(--anthracite);
  font: 800 1.05rem var(--titres);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}
.logo svg { width: 24px; height: 56px; flex: none; }

/* ---------- Bouton MENU rond + retour en haut ---------- */
.btn-menu {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 110;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--rouge);
  color: #fff;
  font: 800 .95rem var(--titres);
  letter-spacing: .14em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}
.btn-menu span {
  display: block;
  padding: 5px 0;
  margin: 0 14px;
  border-top: 3px solid #fff;
  border-bottom: 3px solid #fff;
}
.btn-menu:hover { background: var(--rouge-fonce); }
.btn-menu:focus-visible { outline-color: #fff; outline-offset: 4px; }

.haut {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.haut.visible { opacity: 1; pointer-events: auto; }
.haut svg { width: 26px; height: 26px; }

/* ---------- Menu plein écran ---------- */
.nav {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: var(--anthracite);
}
.nav.ouvert { display: grid; }
.nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.nav li { margin: .35em 0; }
.nav a {
  display: inline-block;
  padding: 4px 18px;
  border-bottom: 6px solid transparent;
  color: #fff;
  font: 700 clamp(2rem, 6vw, 3.4rem) var(--titres);
  text-decoration: none;
}
.nav li:nth-child(3n+1) a:hover, .nav li:nth-child(3n+1) a:focus-visible { border-color: var(--rouge); }
.nav li:nth-child(3n+2) a:hover, .nav li:nth-child(3n+2) a:focus-visible { border-color: var(--orange); }
.nav li:nth-child(3n+3) a:hover, .nav li:nth-child(3n+3) a:focus-visible { border-color: var(--vert); }
.nav a:focus-visible { outline-color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 120px 0 0;
  background: var(--orange);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 880px) minmax(0, 1fr);
  align-items: end;
}
.deco {
  display: flex;
  justify-content: center;
  align-self: end;
  padding-bottom: 110px;
}
.deco svg { width: min(180px, 85%); height: auto; }

.hero-card {
  position: relative;
  z-index: 2;
  margin-bottom: -80px;
  padding: 56px 48px 64px;
  background: #fff;
  border-radius: 44px;
  text-align: center;
}
.hero-card .intro {
  max-width: 60ch;
  margin: 0 auto 1.6em;
}

.hero--page .hero-card {
  max-width: 880px;
  margin-inline: auto;
  margin-bottom: -80px;
}

.bande {
  height: 150px;
  background: repeating-linear-gradient(135deg, #fff 0 22px, var(--rayure) 22px 44px);
}

/* ---------- Cercles de choix du profil ---------- */
.cercles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 34px;
  padding-top: 8px;
}
.cercle {
  --c: var(--rouge);
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--anthracite);
  color: #fff;
  font: italic 900 1.15rem/1.1 var(--texte);
  text-decoration: none;
  transition: box-shadow .2s;
}
.cercle.grand { width: 184px; height: 184px; font-size: 1.4rem; }
.cercle:hover, .cercle:focus-visible { box-shadow: 0 0 0 7px var(--c); }
.cercle:focus-visible { outline: none; }
.cercle.v { --c: var(--vert); }
.cercle.o { --c: var(--orange); }
.cercle .ico {
  position: absolute;
  right: -8px;
  bottom: -6px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 50%;
}
.cercle .ico svg { width: 38px; height: 38px; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section--apres-bande { padding-top: 40px; }

.sous-titre {
  max-width: 62ch;
  margin: 0 auto 1em;
}

/* Cartes des trois profils */
.cartes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 30px;
}
.carte {
  margin-top: 70px;
  padding: 0 28px 40px;
  background: var(--sable);
  text-align: center;
}
.tuile {
  width: 124px;
  margin: -70px auto 22px;
  padding: 14px 0;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 8px 8px 26px 8px;
  transform: rotate(-5deg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .1);
}
.tuile svg { width: 40px; height: 94px; }
.carte h3 {
  margin-bottom: .4em;
  color: var(--rouge);
  font: italic 900 1.7rem var(--texte);
}
.carte p { max-width: 32ch; margin: 0 auto 26px; }

/* Bloc diagonal orange */
.diag {
  padding: 150px 0;
  background: var(--orange);
  clip-path: polygon(0 7%, 100% 0, 100% 93%, 0 100%);
}
.diag-carte {
  padding: 56px 48px;
  background: #fff;
  border-radius: 40px;
  text-align: center;
}
.temps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 36px 0 40px;
  text-align: left;
}
.temps h3 { display: flex; align-items: center; gap: 12px; }
.pastille {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.pastille.r { background: var(--rouge); }
.pastille.o { background: var(--orange); }
.pastille.v { background: var(--vert); }

/* Appel à l'action */
.appel { text-align: center; }
.appel .btn { margin: 6px; }

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 28px;
  margin: 30px 0 20px;
}
.service {
  --c: var(--rouge);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  background: var(--sable);
  border-top: 10px solid var(--c);
  border-radius: 0 0 28px 28px;
}
.service.o { --c: var(--orange); }
.service.v { --c: var(--vert); }
.service p { flex: none; }
.service h3 { font-style: italic; }

.titre-bloc { margin-top: 20px; }

.inclus {
  flex: 1;
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}
.inclus li {
  position: relative;
  margin: .35em 0;
  padding-left: 28px;
}
.inclus li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .5em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c, var(--vert));
}
.prix { margin: 0 0 1em; font-weight: 700; }
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
}
.lien { font-weight: 700; }
.actions-hero { margin: 32px 0 0; }
.actions-hero .btn { margin: 6px; }

.etapes {
  margin: 0 0 32px;
  padding-left: 1.4em;
}
.etapes li { margin: .8em 0; padding-left: .3em; }
.etapes li::marker { font: 800 1.1rem var(--titres); color: var(--rouge); }
.coordonnees h3 { margin-bottom: .6em; }

/* ---------- À propos ---------- */
.deux-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.encart {
  padding: 40px;
  background: var(--sable);
  border-radius: 36px;
}
.encart p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.coordonnees {
  padding: 36px;
  background: var(--sable);
  border-radius: 36px;
}
.coordonnees dt { margin-top: 1.1em; font: 700 1rem var(--titres); }
.coordonnees dt:first-child { margin-top: 0; }
.coordonnees dd { margin: 0; }
.coordonnees a { font-weight: 700; }

form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #cfcfc7;
  border-radius: 14px;
  background: #fff;
  color: var(--anthracite);
  font: 400 1rem var(--texte);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--anthracite);
  outline: none;
  box-shadow: 0 0 0 3px var(--orange);
}
textarea { min-height: 140px; resize: vertical; }
.note { font-size: .92rem; color: #555a63; }

/* ---------- Pied de page ---------- */
.pied {
  margin-top: 40px;
  background: var(--anthracite);
  color: #fff;
}
.pied::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg, var(--rouge) 33.34%, var(--orange) 33.34% 66.67%, var(--vert) 66.67%);
}
.pied-grille {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 32px;
}
.pied h3 { font-size: 1.05rem; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin: .3em 0; }
.pied a { text-decoration: none; }
.pied a:hover { text-decoration: underline; }
.pied a:focus-visible { outline-color: #fff; }
.pied-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font: 800 1.1rem var(--titres); }
.pied-logo svg { width: 24px; height: 56px; }
.copy { padding: 0 0 28px; font-size: .9rem; color: #c9ccd2; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .deco { display: none; }
  .hero-card { padding: 44px 24px 52px; }
  .cartes, .temps, .deux-col, .contact-grid, .pied-grille { grid-template-columns: 1fr; }
  .diag { padding: 110px 0; }
  .diag-carte { padding: 40px 24px; }
  .logo { left: 14px; top: 14px; font-size: .95rem; }
  .btn-menu { top: 14px; right: 14px; width: 76px; height: 76px; font-size: .85rem; }
  .btn-menu span { margin: 0 12px; }
}

@media (max-width: 520px) {
  .logo span { max-width: 9.5em; line-height: 1.1; }
  .cercle { width: 128px; height: 128px; font-size: 1rem; }
  .cercle.grand { width: 156px; height: 156px; font-size: 1.2rem; }
  .cercle .ico { width: 52px; height: 52px; }
  .cercle .ico svg { width: 32px; height: 32px; }
  .cercles { gap: 26px; }
}

/* ---------- Animation unique : le feu passe au vert à l'arrivée ---------- */
.hero-feu .l-rouge  { animation: feu-rouge 3.2s forwards; }
.hero-feu .l-orange { animation: feu-orange 3.2s forwards; }
.hero-feu .l-vert   { animation: feu-vert 3.2s forwards; }

@keyframes feu-rouge  { 0%, 30% { opacity: 1; } 34%, 100% { opacity: .2; } }
@keyframes feu-orange { 0%, 30% { opacity: .2; } 34%, 64% { opacity: 1; } 68%, 100% { opacity: .2; } }
@keyframes feu-vert   { 0%, 64% { opacity: .2; } 68%, 100% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-feu .l-rouge, .hero-feu .l-orange { animation: none; opacity: .2; }
  .hero-feu .l-vert { animation: none; opacity: 1; }
  .btn, .cercle, .haut { transition: none; }
}

/* ---------- Ajouts : inscription, formules, parcours, FAQ ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.etapes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin: 34px 0 40px;
  text-align: left;
}
.etape { --c: var(--rouge); }
.etape:nth-child(2), .etape:nth-child(3) { --c: var(--orange); }
.etape:nth-child(4) { --c: var(--vert); }
.etape .num {
  width: 52px;
  height: 52px;
  margin: 0 0 18px 5px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--anthracite);
  color: #fff;
  font: 800 1.3rem var(--titres);
  box-shadow: 0 0 0 5px var(--c);
}

.atouts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 30px;
  text-align: left;
}
.atout {
  --c: var(--rouge);
  padding: 24px 28px;
  background: var(--sable);
  border-left: 10px solid var(--c);
  border-radius: 0 28px 28px 0;
}
.atout.o { --c: var(--orange); }
.atout.v { --c: var(--vert); }
.atout h3 { margin-bottom: .3em; }
.atout p { margin: 0; }

.formule ul { margin: 0 0 22px; padding-left: 1.2em; }
.formule li { margin: .4em 0; }
.formule .pour { font-weight: 700; }
.actions-carte { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.lien { font-weight: 700; }

.faq details {
  margin: 0 0 14px;
  background: var(--sable);
  border-radius: 20px;
}
.faq summary {
  position: relative;
  padding: 18px 60px 18px 24px;
  font: 700 1.05rem var(--titres);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rouge);
  color: #fff;
  font: 800 1.2rem/1 var(--titres);
}
.faq details[open] summary::after { content: "−"; background: var(--vert); }
.faq details p { margin: 0; padding: 0 24px 20px; max-width: 70ch; }

.liste { margin: 0 0 1em; padding-left: 1.2em; }
.liste li { margin: .45em 0; }
label.case { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; }
label.case input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--rouge); }

@media (max-width: 900px) {
  .etapes { grid-template-columns: repeat(2, 1fr); }
  .atouts { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .etapes { grid-template-columns: 1fr; }
}

/* ---------- Conseils pratiques (accueil) ---------- */
.conseils {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 26px;
  text-align: left;
}
.conseil {
  padding: 26px 28px;
  background: var(--sable);
  border-radius: 28px;
}
.conseil h3 { color: var(--rouge); font-style: italic; }
.conseil p { margin: 0; }

@media (max-width: 900px) {
  .conseils { grid-template-columns: 1fr; }
}

/* ---------- Pied de page : liens légaux ---------- */
.copy { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; }
.liens-legaux { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.liens-legaux a { color: #c9ccd2; text-decoration: none; }
.liens-legaux a:hover { text-decoration: underline; }

/* ---------- Pages légales ---------- */
.legal h2 { margin-top: 1.6em; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { max-width: 74ch; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: .35em 0; }
.a-completer { background: #fff4de; border: 1px solid #f0d8a8; border-radius: 10px; padding: 2px 8px; }

/* ---------- Section "Le permis en 2026" (accueil) ---------- */
.reforme {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 30px 0 18px;
  text-align: left;
}
.reforme-carte {
  padding: 26px 26px 22px;
  background: var(--sable);
  border-radius: 24px;
}
.reforme-carte h3 { color: var(--rouge); font-size: 1.15rem; margin-bottom: .4em; }
.reforme-carte p { margin: 0; }

/* ---------- Paragraphe d'info dans les formules ---------- */
.formule .info {
  padding: 14px 16px;
  margin: 0 0 20px;
  background: #fff;
  border-left: 4px solid var(--orange);
  border-radius: 0 12px 12px 0;
  font-size: .95rem;
}

@media (max-width: 900px) {
  .reforme { grid-template-columns: 1fr; }
}
