/* Carrosserie Alp'Yvan — feuille de style publique.
   Mobile d'abord. Palette dérivée du logo (bleu électrique / encre / neige). */

:root {
    --bleu: #0e4bc0;
    --bleu-fonce: #08398f;
    --bleu-pale: #e9f0fc;
    --encre: #101822;
    --noir: #0b0f14;
    --gris: #55606f;
    --gris-clair: #8a93a1;
    --bord: #dde3ec;
    --fond: #ffffff;
    --fond-alt: #f4f7fb;
    --ok: #1a7f4b;
    --alerte: #b3261e;
    --titre: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    --texte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ombre: 0 1px 2px rgba(16, 24, 34, .06), 0 8px 24px rgba(16, 24, 34, .06);
    --large: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--fond);
    color: var(--encre);
    font: 400 16px/1.65 var(--texte);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--bleu); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--bleu-fonce); }

h1, h2, h3, h4 {
    font-family: var(--titre);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: .01em;
    margin: 0 0 .5em;
    text-transform: uppercase;
}
h1 { font-size: 34px; }
h2 { font-size: 27px; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 2px; }

.visuallyhidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--bleu); color: #fff; padding: 12px 18px; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

.wrap { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 20px; }

/* ═══ Bandeau noir supérieur ═══ */
.topbar {
    background: var(--noir);
    color: #fff;
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.topbar-in {
    width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; gap: 12px; min-height: 52px;
}
.topbar-brand {
    font-family: var(--titre); text-transform: uppercase; text-decoration: none;
    color: #fff; letter-spacing: .06em; line-height: 1; margin-right: auto;
    display: flex; align-items: baseline; gap: 6px;
}
.topbar-brand .tb-1 { font-size: 12px; font-weight: 600; color: #9fb4d8; letter-spacing: .18em; }
.topbar-brand .tb-2 { font-size: 20px; font-weight: 700; }
.topbar-brand:hover { color: #fff; }

.burger {
    order: 3; width: 42px; height: 38px; padding: 9px 8px; flex: none;
    background: none; border: 1px solid rgba(255, 255, 255, .22); border-radius: 3px;
    display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;
}
.burger span { display: block; height: 2px; background: #fff; border-radius: 2px; }
.burger[aria-expanded="true"] { background: var(--bleu); border-color: var(--bleu); }

.topbar-tel {
    order: 2; display: flex; align-items: center; gap: 7px; flex: none;
    color: #fff; text-decoration: none; font-weight: 600; font-size: 14px;
    background: var(--bleu); padding: 8px 12px; border-radius: 3px;
}
.topbar-tel:hover { background: var(--bleu-fonce); color: #fff; }
.tt-etat { width: 8px; height: 8px; border-radius: 50%; background: var(--gris-clair); flex: none; }
.tt-etat.etat-ouvert { background: #4ade80; }
.tt-etat.etat-bientot { background: #fbbf24; }
.tt-etat.etat-ferme, .tt-etat.etat-exception { background: #f87171; }

.topnav { order: 4; width: 100%; display: none; }
.topnav.ouvert { display: block; }
.topnav ul { list-style: none; margin: 0; padding: 0 0 12px; }
.topnav li { border-top: 1px solid rgba(255, 255, 255, .09); }
.topnav a {
    display: block; padding: 12px 4px; color: #dbe4f2; text-decoration: none;
    font-family: var(--titre); text-transform: uppercase; font-size: 17px;
    font-weight: 600; letter-spacing: .05em;
}
.topnav a:hover, .topnav a[aria-current="page"] { color: #fff; }
.topnav .tn-cta a { color: #7fb0ff; }

/* ═══ Bannière (héro pleine largeur) ═══ */
.banniere { background: #fff; line-height: 0; }
.banniere img { width: 100%; height: auto; }

.bandeau {
    margin: 0; background: var(--bleu-pale); color: var(--bleu-fonce);
    border-bottom: 1px solid #cfdcf5; padding: 10px 20px;
    font-size: 14px; font-weight: 500; text-align: center;
}

/* ═══ Sections ═══ */
.section { padding: 44px 0; }
.section-alt { background: var(--fond-alt); border-block: 1px solid var(--bord); }
.section-sombre { background: var(--encre); color: #e7ecf4; }
.section-sombre h2 { color: #fff; }
.section-sombre p { color: #b9c4d4; }

.kicker {
    font-family: var(--titre); text-transform: uppercase; letter-spacing: .16em;
    font-size: 13px; font-weight: 600; color: var(--bleu); margin: 0 0 8px;
}
.section-sombre .kicker { color: #7fb0ff; }
.chapo { font-size: 17px; color: var(--gris); max-width: 62ch; }
.section-sombre .chapo { color: #b9c4d4; }

/* ═══ Héro d'accueil ═══ */
.hero { padding: 34px 0 40px; }
.hero h1 { font-size: 38px; margin-bottom: 14px; }
.hero .hero-txt { font-size: 17px; color: var(--gris); max-width: 60ch; margin-bottom: 22px; }

.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 22px; border-radius: 3px; text-decoration: none;
    font-family: var(--titre); text-transform: uppercase; letter-spacing: .06em;
    font-size: 17px; font-weight: 700; border: 2px solid transparent; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.btn-1 { background: var(--bleu); color: #fff; }
.btn-1:hover { background: var(--bleu-fonce); color: #fff; }
.btn-2 { background: transparent; color: var(--encre); border-color: var(--bord); }
.btn-2:hover { border-color: var(--bleu); color: var(--bleu); }
.section-sombre .btn-2 { color: #fff; border-color: rgba(255, 255, 255, .3); }
.section-sombre .btn-2:hover { border-color: #fff; color: #fff; }

/* Bande de réassurance sous le héro */
.reassure { display: grid; gap: 1px; background: var(--bord); border: 1px solid var(--bord); margin-top: 30px; }
.reassure div { background: #fff; padding: 16px 18px; }
.reassure strong {
    display: block; font-family: var(--titre); text-transform: uppercase;
    font-size: 17px; letter-spacing: .04em; margin-bottom: 2px;
}
.reassure span { font-size: 14px; color: var(--gris); line-height: 1.5; }

/* ═══ Cartes ═══ */
.cartes { display: grid; gap: 16px; margin-top: 26px; }
.carte {
    background: #fff; border: 1px solid var(--bord); border-radius: 3px;
    padding: 22px; display: flex; flex-direction: column;
}
.carte-lien { text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.carte-lien:hover { border-color: var(--bleu); box-shadow: var(--ombre); color: inherit; }
.carte h3 { margin-bottom: 8px; font-size: 21px; }
.carte p { font-size: 15px; color: var(--gris); margin-bottom: 14px; }
.carte .plus {
    margin-top: auto; font-weight: 600; font-size: 14px; color: var(--bleu);
    font-family: var(--texte); text-transform: none;
}
.carte-num {
    /* align-self : la carte est un flex column, un span y serait étiré sur toute la largeur */
    display: inline-block; align-self: flex-start;
    font-family: var(--titre); font-weight: 700; font-size: 15px;
    background: var(--bleu-pale); color: var(--bleu-fonce); padding: 3px 9px;
    border-radius: 3px; margin-bottom: 12px; letter-spacing: .05em;
}

/* ═══ Liste de prestations détaillées ═══ */
.presta { border-top: 1px solid var(--bord); padding: 26px 0; }
.presta:last-child { border-bottom: 1px solid var(--bord); }
.presta h3 { font-size: 23px; margin-bottom: 6px; }
.presta .resume { font-size: 16px; color: var(--encre); font-weight: 500; margin-bottom: 10px; }
.presta .detail { font-size: 15px; color: var(--gris); max-width: 72ch; }
.presta .detail p:last-child { margin-bottom: 0; }

.presta-img { margin-bottom: 16px; }
.presta-img img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    border: 1px solid var(--bord); border-radius: 3px; background: var(--fond-alt);
}
/* Un schéma se recadre mal : il s'affiche en entier, pas rogné comme une photo. */
.presta-img--schema img { object-fit: contain; }

/* ═══ Réalisations : avant / après ═══ */
.grille-real { display: grid; gap: 18px; margin-top: 26px; }
.real {
    border: 1px solid var(--bord); border-radius: 3px; overflow: hidden;
    background: #fff; text-decoration: none; color: inherit; display: block;
}
.real:hover { border-color: var(--bleu); box-shadow: var(--ombre); color: inherit; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--bord); }
.duo figure { margin: 0; position: relative; background: var(--fond-alt); }
.duo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.duo figcaption {
    position: absolute; left: 0; bottom: 0; background: rgba(11, 15, 20, .82); color: #fff;
    font-family: var(--titre); text-transform: uppercase; letter-spacing: .1em;
    font-size: 12px; font-weight: 600; padding: 4px 10px;
}
.real-txt { padding: 16px 18px; }
.real-txt h3 { font-size: 19px; margin-bottom: 4px; }
.real-txt .meta { font-size: 13px; color: var(--gris-clair); margin: 0; }
.vide {
    border: 1px dashed var(--bord); border-radius: 3px; padding: 34px 20px;
    text-align: center; color: var(--gris); background: var(--fond-alt); font-size: 15px;
}

/* ═══ FAQ ═══ */
.faq-liste { margin-top: 24px; border-top: 1px solid var(--bord); }
.faq-item { border-bottom: 1px solid var(--bord); }
.faq-item summary {
    cursor: pointer; padding: 16px 34px 16px 0; position: relative; list-style: none;
    font-family: var(--titre); text-transform: uppercase; font-size: 19px;
    font-weight: 600; line-height: 1.2;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    font-size: 24px; color: var(--bleu); line-height: 1; font-weight: 400;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item .rep { padding: 0 0 18px; font-size: 15px; color: var(--gris); max-width: 74ch; }
.faq-item .rep p:last-child { margin-bottom: 0; }

/* ═══ Formulaires (libellé DEVANT le champ — charte §23) ═══ */
.form-carte {
    background: #fff; border: 1px solid var(--bord); border-radius: 3px;
    padding: 22px; box-shadow: var(--ombre);
}
.form-row { display: grid; grid-template-columns: 1fr; gap: 4px; margin-bottom: 12px; }
.form-row > label { font-size: 13px; font-weight: 500; color: var(--gris); }
.form-row--top { align-items: start; }

.form-carte input[type="text"], .form-carte input[type="email"], .form-carte input[type="tel"],
.form-carte input[type="file"], .form-carte select, .form-carte textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 3px;
    background: #fff; font: 400 15px var(--texte); color: var(--encre);
}
.form-carte textarea { resize: vertical; min-height: 120px; }
.form-carte input:focus-visible, .form-carte select:focus-visible, .form-carte textarea:focus-visible {
    border-color: var(--bleu);
}
.aide { font-size: 13px; color: var(--gris-clair); margin: 4px 0 0; }
.erreur-champ { font-size: 13px; color: var(--alerte); margin: 4px 0 0; font-weight: 500; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--alerte); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-carte .btn { width: 100%; margin-top: 6px; }

.flash { border-radius: 3px; padding: 14px 16px; margin: 0 0 20px; font-size: 15px; }
.flash-ok { background: #e8f6ee; border: 1px solid #b6e0c7; color: #14603a; }
.flash-ko { background: #fdecea; border: 1px solid #f5c2be; color: #8c1d17; }

/* ═══ Blocs d'information (contact) ═══ */
.infos { display: grid; gap: 16px; margin-top: 24px; }
.info-bloc { background: #fff; border: 1px solid var(--bord); border-radius: 3px; padding: 18px 20px; }
.info-bloc h3 { font-size: 18px; margin-bottom: 8px; }
.info-bloc p, .info-bloc address { font-size: 15px; font-style: normal; margin: 0; color: var(--gris); }
.horaires-tab { width: 100%; border-collapse: collapse; font-size: 15px; }
.horaires-tab th, .horaires-tab td { text-align: left; padding: 6px 0; border-bottom: 1px solid var(--bord); }
.horaires-tab th { font-weight: 500; color: var(--gris); width: 40%; }
.horaires-tab tr:last-child th, .horaires-tab tr:last-child td { border-bottom: 0; }
.horaires-tab .auj { font-weight: 700; color: var(--bleu); }
.etat-ligne { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.etat-ligne .pastille { width: 9px; height: 9px; border-radius: 50%; background: var(--gris-clair); }
.etat-ligne.etat-ouvert .pastille { background: #16a34a; }
.etat-ligne.etat-bientot .pastille { background: #d97706; }
.etat-ligne.etat-ferme .pastille, .etat-ligne.etat-exception .pastille { background: #dc2626; }

/* ═══ Contenu éditorial (pages légales, description) ═══ */
.prose { max-width: 74ch; }
.prose h2 { font-size: 22px; margin-top: 1.6em; }
.prose h3 { font-size: 18px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1em; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--bord); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--fond-alt); font-weight: 600; width: 38%; }
.a-completer { color: #92400e; background: #fef3c7; padding: 1px 7px; border-radius: 3px; font-size: 14px; }

/* ═══ Appel à l'action ═══ */
.cta { text-align: center; }
.cta h2 { font-size: 30px; }
.cta .btns { justify-content: center; }

/* ═══ Pied de page ═══ */
.pied { background: var(--noir); color: #aab6c6; font-size: 15px; margin-top: 0; }
.pied a { color: #cfdaea; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
/* Deux colonnes dès le mobile : empilées, les trois blocs faisaient un pied de
   page interminable au doigt. La colonne « atelier » occupe la ligne entière
   (adresse + horaires), les deux listes de liens se partagent la suivante. */
.pied-in {
    width: 100%; max-width: var(--large); margin: 0 auto;
    padding: 26px 20px 18px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px;
}
.pied-in > .pied-col:first-child { grid-column: 1 / -1; }
.pied-marque {
    font-family: var(--titre); text-transform: uppercase; font-size: 21px;
    font-weight: 700; color: #fff; margin: 0 0 10px; letter-spacing: .04em;
}
.pied-titre {
    font-family: var(--titre); text-transform: uppercase; font-size: 15px; letter-spacing: .14em;
    color: #7f8da0; margin: 0 0 12px; font-weight: 600;
}
.pied address { font-style: normal; line-height: 1.7; margin: 0 0 10px; }
.pied-horaires { font-size: 14px; color: #8b98a9; margin: 0; }
.pied-note { font-size: 14px; color: #8b98a9; margin: 0 0 12px; }
.pied-liens { list-style: none; margin: 0; padding: 0; }
.pied-liens li { margin-bottom: 7px; }

.footer-social { list-style: none; display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
.footer-social a {
    display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
    border: 1px solid rgba(255, 255, 255, .18); border-radius: 3px;
}
.footer-social a:hover { background: var(--bleu); border-color: var(--bleu); }
.footer-social svg { width: 17px; height: 17px; fill: #cfdaea; }
.footer-social a:hover svg { fill: #fff; }

.pied-bas {
    border-top: 1px solid rgba(255, 255, 255, .1);
    max-width: var(--large); margin: 0 auto; padding: 16px 20px 26px;
    display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between;
    font-size: 13px; color: #7f8da0;
}
.pied-bas p { margin: 0; }

/* ═══ Fil d'Ariane ═══ */
.ariane { font-size: 13px; color: var(--gris-clair); padding: 14px 0 0; }
.ariane a { color: var(--gris); text-decoration: none; }
.ariane a:hover { color: var(--bleu); text-decoration: underline; }

/* ══════════ ≥ 560 px ══════════ */
@media (min-width: 560px) {
    .reassure { grid-template-columns: 1fr 1fr; }
    .cartes { grid-template-columns: 1fr 1fr; }
    .infos { grid-template-columns: 1fr 1fr; }
    .form-carte .btn { width: auto; padding-inline: 34px; }
    .form-row { grid-template-columns: 128px 1fr; align-items: center; gap: 12px; }
    .form-row > label { padding-top: 0; }
    .form-row--top { align-items: start; }
    .form-row--top > label { padding-top: 11px; }
    .form-row .erreur-champ, .form-row .aide { grid-column: 2; }
}

/* ══════════ ≥ 900 px : navigation horizontale ══════════ */
@media (min-width: 900px) {
    h1 { font-size: 44px; }
    h2 { font-size: 32px; }
    .hero h1 { font-size: 52px; }
    .section { padding: 60px 0; }

    .topbar-in { min-height: 58px; gap: 22px; }
    .burger { display: none; }
    .topnav { order: 2; width: auto; display: block; margin-left: auto; }
    .topnav ul { display: flex; gap: 4px; padding: 0; }
    .topnav li { border-top: 0; }
    .topnav a { padding: 6px 10px; font-size: 15px; letter-spacing: .07em; }
    .topnav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--bleu); }
    .topnav .tn-cta a { background: rgba(14, 75, 192, .22); border-radius: 3px; color: #a9c8ff; }
    .topnav .tn-cta a:hover { background: var(--bleu); color: #fff; }
    .topbar-tel { order: 3; font-size: 15px; }

    .reassure { grid-template-columns: repeat(4, 1fr); }
    .cartes { grid-template-columns: repeat(4, 1fr); }
    .cartes-3 { grid-template-columns: repeat(3, 1fr); }
    .grille-real { grid-template-columns: 1fr 1fr; gap: 22px; }
    .infos { grid-template-columns: 2fr 1fr; }
    .pied-in { grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; padding: 38px 20px 26px; }
    .pied-in > .pied-col:first-child { grid-column: auto; }

    .duo-large { grid-template-columns: 1fr 1fr; }

    /* Prestation illustrée : image et texte côte à côte, alternés une ligne sur deux.
       Sur les lignes inversées, il faut inverser AUSSI le gabarit de colonnes :
       un simple `order` déplacerait l'image dans la colonne large (1fr) et
       écraserait le texte dans les 380 px. */
    .presta-illustree {
        display: grid; grid-template-columns: 380px 1fr; gap: 30px; align-items: center;
    }
    .presta-illustree .presta-img { margin-bottom: 0; }
    .presta-inverse { grid-template-columns: 1fr 380px; }
    .presta-inverse .presta-img { order: 2; }
    .hero-2col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
}

@media (min-width: 1100px) {
    .grille-real { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════ Impression ══════════ */
@media print {
    .topbar, .pied, .btns, .burger { display: none; }
    body { color: #000; }
}

/* ══════════ Mouvement réduit ══════════ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ═══ Utilitaires (aucun style inline : la CSP publique n'autorise pas style-src-attr) ═══ */
.btns-suite { margin-top: 24px; }
.chapo-centre { margin-left: auto; margin-right: auto; margin-bottom: 22px; }
.apercu-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.apercu-photos img { width: 90px; height: 68px; object-fit: cover; border: 1px solid var(--bord); border-radius: 3px; }
.apercu-photos[hidden] { display: none; }

/* Réalisation illustrée par une seule photo.
   Dans la grille, le bandeau prend la MÊME hauteur qu'un diptyque (deux images
   4/3 côte à côte = 8/3 au total), sinon la carte est deux fois plus haute que
   ses voisines et toute la ligne se décale. */
.solo { background: var(--fond-alt); }
.solo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.grille-real .solo img { aspect-ratio: 8 / 3; }

/* Sur la fiche détaillée, la photo garde ses proportions naturelles. */
.solo-large { display: flex; justify-content: center; }
.solo-large figure { margin: 0; max-width: 620px; }
.solo-large img { aspect-ratio: auto; object-fit: contain; }

/* Le chapô des pages est du HTML éditable : ses <p> ne doivent pas ajouter
   de marge en fin de bloc (le conteneur porte déjà l'espacement). */
.hero-txt > p:last-child { margin-bottom: 0; }
.hero-txt > p { margin-bottom: .7em; }

/* ═══ Avis clients ═══ */
.avis-liste { display: grid; gap: 16px; margin-top: 26px; }
.avis {
    margin: 0; background: #fff; border: 1px solid var(--bord); border-radius: 3px;
    padding: 20px; display: flex; flex-direction: column;
}
.avis-note { color: var(--bleu); font-size: 17px; letter-spacing: .12em; margin: 0 0 10px; }
.avis blockquote { margin: 0 0 14px; font-size: 15px; color: var(--gris); line-height: 1.6; }
.avis figcaption { margin-top: auto; font-size: 14px; }
.avis figcaption strong { display: block; color: var(--encre); }
.avis-meta { color: var(--gris-clair); font-size: 13px; margin-right: 8px; }
@media (min-width: 560px) { .avis-liste { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .avis-liste { grid-template-columns: repeat(3, 1fr); } }
.avis-source { display: inline-block; margin-top: 6px; font-size: 13px; }
