/* Alp'Auto École — feuille de style. Couleurs tirées du logo : le rouge du « A », le bleu
   nuit de l'écriture. Polices servies avec le site (aucun appel à Google). */
@font-face { font-family: 'Familjen Grotesk'; font-weight: 600; font-display: swap; src: url('polices/FamiljenGrotesk-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Familjen Grotesk'; font-weight: 700; font-display: swap; src: url('polices/FamiljenGrotesk-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 400; font-display: swap; src: url('polices/PublicSans-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 500; font-display: swap; src: url('polices/PublicSans-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 600; font-display: swap; src: url('polices/PublicSans-600-latin.woff2') format('woff2'); }

:root {
  --nuit: #0b1a36; --nuit-2: #13284f; --nuit-3: #1d3766;
  --rouge: #e2342d; --rouge-fonce: #b8221c;
  --creme: #f6f4ef; --blanc: #ffffff;
  --texte: #1b2333; --gris: #586377; --trait: #e3e6ec;
  --titre: 'Familjen Grotesk', 'Segoe UI', Arial, sans-serif;
  --corps: 'Public Sans', 'Segoe UI', Arial, sans-serif;
  --rayon: 14px;
  --ombre: 0 10px 30px rgba(11, 26, 54, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--corps); color: var(--texte); background: var(--blanc); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--nuit-3); }
h1, h2, h3, h4 { font-family: var(--titre); line-height: 1.15; margin: 0 0 .5em; color: var(--nuit); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.conteneur { width: min(1180px, 100% - 40px); margin-inline: auto; }
.surtitre { display: inline-block; font-family: var(--titre); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--rouge); margin-bottom: .8rem; }
section { padding: 96px 0; }
.fond-creme { background: var(--creme); }
.intro { max-width: 720px; color: var(--gris); font-size: 1.08rem; }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; border-radius: 4px; }

/* Boutons */
.bouton { display: inline-flex; align-items: center; gap: .55em; padding: .9em 1.4em; border-radius: 999px; font-weight: 600; text-decoration: none; font-family: var(--titre); font-size: 1.02rem; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s; cursor: pointer; }
.bouton-rouge { background: var(--rouge); color: #fff; }
.bouton-rouge:hover { background: var(--rouge-fonce); transform: translateY(-1px); }
.bouton-clair { border-color: rgba(255,255,255,.55); color: #fff; }
.bouton-clair:hover { background: #fff; color: var(--nuit); }
.bouton-nuit { background: var(--nuit); color: #fff; }
.bouton-nuit:hover { background: var(--nuit-3); }
.bouton svg { width: 1.1em; height: 1.1em; }

/* En-tête */
.entete { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, box-shadow .3s; }
.entete.defile { background: rgba(11, 26, 54, .92); backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.logo { display: flex; align-items: center; background: #fff; border-radius: 12px; padding: 6px 12px; }
.logo img { height: 44px; width: auto; }
.menu { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.menu a { color: #fff; text-decoration: none; font-weight: 500; font-size: .98rem; opacity: .9; }
.menu a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--rouge); }
.entete .bouton { padding: .65em 1.1em; font-size: .95rem; }
.ouvrir-menu { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
@media (max-width: 980px) {
  .ouvrir-menu { display: block; }
  .menu { position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--nuit); padding: 8px 20px 20px; display: none; }
  .menu.ouvert { display: flex; }
  .menu a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .entete .bouton-tel-texte { display: none; }
}

/* Héros avec la scène 3D */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden;
  background: radial-gradient(ellipse at 20% 85%, #f26b4f33, transparent 55%), linear-gradient(180deg, #0b1a36 0%, #13284f 60%, #1d3766 100%); }
#scene-3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,26,54,.88) 0%, rgba(11,26,54,.55) 45%, rgba(11,26,54,0) 75%); pointer-events: none; }
.hero .conteneur { position: relative; z-index: 2; padding: 120px 0 80px; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.6vw, 4.4rem); max-width: 14ch; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--rouge); }
.hero .accroche { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 560px; color: #dfe6f3; margin-bottom: 2rem; }
.hero .surtitre { color: #ffb4a8; }
.boutons { display: flex; flex-wrap: wrap; gap: 14px; }
.labels { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 2.6rem; }
.labels figure { margin: 0; background: #fff; border-radius: 12px; height: 70px; padding: 8px 12px; display: flex; align-items: center; }
.labels img { max-height: 54px; width: auto; }
.labels span { color: #cfd8e8; font-size: .9rem; max-width: 220px; line-height: 1.4; }
@media (max-width: 700px) { .hero::after { background: linear-gradient(180deg, rgba(11,26,54,.55), rgba(11,26,54,.9)); } }

/* Chiffres clés */
.chiffres { background: var(--nuit); color: #fff; padding: 0; }
.chiffres .conteneur { display: grid; grid-template-columns: repeat(4, 1fr); }
.chiffre { padding: 34px 26px; border-left: 1px solid rgba(255,255,255,.09); }
.chiffre:first-child { border-left: 0; }
.chiffre strong { display: block; font-family: var(--titre); font-size: 2rem; color: #fff; }
.chiffre strong small { font-size: .9rem; color: #ffb4a8; font-weight: 600; }
.chiffre span { color: #b9c5da; font-size: .95rem; }
@media (max-width: 900px) { .chiffres .conteneur { grid-template-columns: 1fr 1fr; } .chiffre:nth-child(3) { border-left: 0; } .chiffre { border-top: 1px solid rgba(255,255,255,.09); } }

/* Présentation */
.presentation .conteneur { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.photo { border-radius: 22px; overflow: hidden; box-shadow: var(--ombre); aspect-ratio: 4 / 3; background: var(--creme); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 12px; }
.points li { padding-left: 34px; position: relative; }
.points li::before { content: ''; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--rouge) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
@media (max-width: 900px) { .presentation .conteneur { grid-template-columns: 1fr; gap: 36px; } }

/* Formations */
.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 2.4rem; }
@media (max-width: 1000px) { .grille { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grille { grid-template-columns: 1fr; } }
.carte { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--trait); }
.carte .visuel { aspect-ratio: 16 / 9; background: var(--nuit-2); overflow: hidden; }
.carte .visuel img { width: 100%; height: 100%; object-fit: cover; }
.carte .contenu { padding: 22px 22px 18px; display: flex; flex-direction: column; flex: 1; }
.carte .etiquette { align-self: flex-start; background: #fdebea; color: var(--rouge-fonce); font-weight: 600; font-size: .78rem; border-radius: 999px; padding: .25em .8em; margin-bottom: .8rem; }
.carte p { color: var(--gris); font-size: .98rem; }
.carte ul { padding-left: 1.1em; color: var(--gris); font-size: .96rem; margin: 0 0 1em; }
details { margin-top: auto; border-top: 1px solid var(--trait); padding-top: 12px; }
summary { cursor: pointer; font-weight: 600; color: var(--nuit-3); list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--rouge); }
details[open] summary::after { content: '–'; }
details > div { padding-top: 10px; color: var(--gris); font-size: .96rem; }

/* Parcours */
.parcours { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 2rem; }
.parcours > div { background: #fff; border-radius: var(--rayon); padding: 28px; border: 1px solid var(--trait); }
.etapes { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 1rem 0 0; }
.etapes li { background: var(--creme); border-radius: 999px; padding: .4em 1em; font-weight: 500; font-size: .95rem; }
@media (max-width: 820px) { .parcours { grid-template-columns: 1fr; } }

/* Tarifs */
.onglets { display: inline-flex; background: #fff; border-radius: 999px; padding: 5px; border: 1px solid var(--trait); margin: 1.6rem 0 2rem; }
.onglets input { position: absolute; opacity: 0; pointer-events: none; }
.onglets label { padding: .7em 1.4em; border-radius: 999px; font-weight: 600; cursor: pointer; font-family: var(--titre); color: var(--gris); }
#tarif-manuelle:checked ~ .onglets label[for=tarif-manuelle],
#tarif-auto:checked ~ .onglets label[for=tarif-auto] { background: var(--nuit); color: #fff; }
#tarif-manuelle:focus-visible ~ .onglets label[for=tarif-manuelle],
#tarif-auto:focus-visible ~ .onglets label[for=tarif-auto] { outline: 3px solid var(--rouge); }
.radio-cache { position: absolute; opacity: 0; pointer-events: none; }
.tarifs-auto, #tarif-auto:checked ~ .tarifs-manuelle { display: none; }
#tarif-auto:checked ~ .tarifs-auto { display: grid; }
.tarifs { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
@media (max-width: 900px) { .tarifs { grid-template-columns: 1fr; } }
.bloc-tarif { background: #fff; border-radius: var(--rayon); border: 1px solid var(--trait); padding: 28px; box-shadow: var(--ombre); }
.bloc-tarif h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ligne { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--trait); }
.ligne small { display: block; color: var(--gris); font-size: .85rem; }
.ligne b { white-space: nowrap; font-family: var(--titre); }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; padding: 16px 18px; background: var(--nuit); color: #fff; border-radius: 12px; font-family: var(--titre); }
.total strong { font-size: 1.8rem; }
.total span { font-weight: 600; }
.ttc { font-size: .8rem; color: #b9c5da; margin-left: .3em; }
.note-tarif { color: var(--gris); font-size: .92rem; margin-top: 1.2rem; }
.encadre-rouge { border-left: 4px solid var(--rouge); background: #fff; padding: 16px 20px; border-radius: 0 12px 12px 0; margin-top: 18px; }

/* Code, examen */
.deux-colonnes { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .deux-colonnes { grid-template-columns: 1fr; gap: 28px; } }
.horaires { display: grid; gap: 14px; }
.horaire { background: var(--nuit); color: #fff; border-radius: var(--rayon); padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.horaire b { font-family: var(--titre); font-size: 1.15rem; }
.horaire span { font-family: var(--titre); font-size: 1.4rem; color: #ffb4a8; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1.8rem 0; }
.stat { background: #fff; border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px; }
.stat strong { display: block; font-family: var(--titre); font-size: 2rem; color: var(--rouge); line-height: 1.1; margin-bottom: .3em; }
.stat span { color: var(--gris); font-size: .95rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }

/* Pièces à fournir */
.pieces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: piece; }
.pieces li { counter-increment: piece; background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 18px 18px 18px 64px; position: relative; font-weight: 600; }
.pieces li::before { content: counter(piece); position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--nuit); color: #fff; display: grid; place-items: center; font-family: var(--titre); font-size: .95rem; }
.pieces small { display: block; font-weight: 400; color: var(--gris); font-size: .88rem; }
@media (max-width: 900px) { .pieces { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pieces { grid-template-columns: 1fr; } }

/* Contact */
.contact { background: var(--nuit); color: #dfe6f3; }
.contact h2, .contact h3 { color: #fff; }
.contact .conteneur { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; }
@media (max-width: 900px) { .contact .conteneur { grid-template-columns: 1fr; } }
.coordonnees { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: 18px; }
.coordonnees li { display: flex; gap: 14px; align-items: flex-start; }
.coordonnees .icone { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--nuit-3); display: grid; place-items: center; }
.coordonnees .icone svg { width: 20px; height: 20px; stroke: #ffb4a8; }
.coordonnees a { color: #fff; font-weight: 600; text-decoration: none; }
.coordonnees a:hover { text-decoration: underline; }
.coordonnees small { display: block; color: #9fb0cc; }
form { background: #fff; color: var(--texte); border-radius: 18px; padding: 30px; display: grid; gap: 14px; }
form h3 { color: var(--nuit); }
label.champ { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=tel], textarea, select { font: inherit; padding: .75em .9em; border: 1px solid #cdd3dd; border-radius: 10px; background: #fbfbfd; width: 100%; }
textarea { min-height: 130px; resize: vertical; }
.deux-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .deux-champs { grid-template-columns: 1fr; } }
.mention-form { font-size: .82rem; color: var(--gris); margin: 0; }
.reclamations { margin-top: 26px; background: rgba(255,255,255,.06); border-radius: 14px; padding: 20px 22px; }
.reclamations h3 { font-size: 1.05rem; }

/* Pied */
.pied { background: #071126; color: #9fb0cc; padding: 48px 0 30px; font-size: .94rem; }
.pied .conteneur { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.pied h4 { color: #fff; font-size: 1rem; }
.pied ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pied a { color: #cfd8e8; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied .bas { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .86rem; }
@media (max-width: 800px) { .pied .conteneur { grid-template-columns: 1fr; } }

/* Apparitions douces au défilement (désactivées en mouvement réduit) */
.apparait { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.apparait.vu { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .apparait { opacity: 1; transform: none; transition: none; } }
.sans-js .apparait { opacity: 1; transform: none; }
