/* ==========================================================================
   Fougeray Pièces Auto — feuille de style unique, mobile d'abord
   Polices : Barlow (texte) et Barlow Semi Condensed (titres), via Font Bunny
   Points de rupture : 48em (tablette), 64em (ordinateur)
   ========================================================================== */

:root {
    --graphite: #25292d;
    --graphite-deep: #1b1e21;
    --green: #6ebf4a;          /* vert du logo : fonds, icônes, boutons */
    --green-ink: #3d7f24;      /* vert lisible sur fond clair : liens, titres */
    --concrete: #eef0ec;
    --steel: #5f666c;
    --line: #d7dbd5;
    --red: #c63a2f;            /* rouge du logo : uniquement « fermé » et erreurs */
    --white: #fff;

    --font: Barlow, system-ui, sans-serif;
    --font-title: "Barlow Semi Condensed", Barlow, system-ui, sans-serif;

    --gutter: clamp(1rem, 4vw, 2.5rem);
    --section: clamp(3rem, 8vw, 6rem);
    --radius: 4px;
}

/* Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--font); color: var(--graphite); background: var(--white); }
h1, h2, h3, p, ul, figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--green-ink); text-underline-offset: .15em; }
a:hover { color: var(--graphite); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.wrap { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

.skip { position: absolute; left: -999px; top: 0; z-index: 100; padding: .75rem 1rem; background: var(--graphite); color: var(--white); }
.skip:focus { left: 0; }

/* Boutons
   ========================================================================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .5rem 1.4rem;
    border: 2px solid transparent; border-radius: var(--radius);
    font: 600 1.0625rem/1.1 var(--font-title); letter-spacing: .01em; text-decoration: none; text-align: center;
    cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--green); color: var(--graphite-deep); }
.btn--primary:hover { background: var(--white); color: var(--graphite-deep); }
.btn--ghost { border-color: rgb(255 255 255 / .7); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--graphite); }
.btn--outline { border-color: var(--graphite); color: var(--graphite); }
.btn--outline:hover { background: var(--graphite); color: var(--white); }
.btn:disabled { opacity: .5; cursor: wait; }

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

.header { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.header__bar { display: flex; align-items: center; gap: .5rem; min-height: 4rem; }
.header__logo { margin-right: auto; }
.header__logo { flex: none; }
.header__logo img { width: 7.25rem; }

.header__call {
    display: inline-flex; align-items: center; gap: .4rem; height: 2.5rem; padding-inline: .8rem;
    border-radius: 999px; background: var(--green); color: var(--graphite-deep);
    font: 700 1rem var(--font-title); text-decoration: none; white-space: nowrap;
}
.header__call:hover { background: var(--graphite); color: var(--white); }
.header__call svg { width: 1rem; fill: currentColor; }

.header__toggle { display: grid; gap: 5px; padding: .75rem .5rem .75rem .75rem; margin-right: -.5rem; border: 0; background: none; cursor: pointer; }
.header__toggle span { display: block; width: 24px; height: 2px; background: var(--graphite); transition: transform .3s, opacity .3s; }
.menu-open .header__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .header__toggle span:nth-child(2) { opacity: 0; }
.menu-open .header__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header__nav { display: none; position: absolute; inset: 100% 0 auto; background: var(--white); border-bottom: 1px solid var(--line); }
.menu-open .header__nav { display: block; }
.header__nav ul { list-style: none; padding: .5rem var(--gutter) 1.25rem; }
.header__nav a {
    display: block; padding: .7rem 0; border-bottom: 1px solid var(--line);
    font: 700 1.5rem var(--font-title); color: var(--graphite); text-decoration: none;
}
.header__nav a[aria-current] { color: var(--green-ink); }

@media (min-width: 48em) {
    .header__logo img { width: 12rem; }
    .header__bar { gap: .75rem; }
    .header__call { height: 2.75rem; padding-inline: 1.1rem; font-size: 1.05rem; }
    .header__call svg { width: 1.15rem; }
}
@media (min-width: 64em) {
    .header__bar { min-height: 5rem; gap: 2rem; }
    .header__toggle { display: none; }
    .header__nav { display: block; position: static; border: 0; order: 2; }
    .header__call { order: 3; }
    .header__nav ul { display: flex; gap: 1.75rem; padding: 0; }
    .header__nav a { padding: .25rem 0; border: 0; border-bottom: 3px solid transparent; font-size: 1.2rem; }
    .header__nav a:hover { color: var(--green-ink); }
    .header__nav a[aria-current] { color: var(--graphite); border-bottom-color: var(--green); }
}

/* Bandeau photo (hero)
   ========================================================================== */

.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 15rem; color: var(--white); background: var(--graphite); }
.hero picture img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to top, rgb(27 30 33 / .92) 10%, rgb(27 30 33 / .45) 60%, rgb(27 30 33 / .25));
}
.hero__inner { display: grid; gap: 2rem; padding-block: 3rem 2.25rem; }
.hero h1 { font-size: clamp(2.1rem, 7vw, 4.25rem); max-width: 18ch; text-wrap: balance; }
.hero__lead { margin-top: 1rem; max-width: 34rem; font-size: 1.15rem; color: rgb(255 255 255 / .88); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero__actions .btn { flex: 1 1 100%; }
@media (min-width: 30em) { .hero__actions .btn { flex: 0 0 auto; } }

.hero--accueil { min-height: 34rem; }
.hero--accueil .hero__inner { padding-top: 8rem; }

@media (min-width: 64em) {
    .hero { min-height: 20rem; }
    .hero::before { background: linear-gradient(to right, rgb(27 30 33 / .9) 25%, rgb(27 30 33 / .35) 70%, rgb(27 30 33 / .2)); }
    .hero--accueil { min-height: 40rem; }
    .hero--accueil .hero__inner { grid-template-columns: 1fr auto; align-items: end; padding-block: 10rem 4rem; }
}

/* Étiquette « ouvert / fermé » : forme d'étiquette de pièce, avec son œillet
   ========================================================================== */

.tag {
    --notch: 1rem;
    --eyelet: .95rem;          /* position horizontale de l'œillet */
    position: relative; padding: 1rem 1.1rem 1.1rem 2.1rem;
    background: var(--white); color: var(--graphite);
    clip-path: polygon(var(--notch) 0, 100% 0, 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch));
    -webkit-mask: radial-gradient(circle .4rem at var(--eyelet) 50%, transparent 98%, #000);
            mask: radial-gradient(circle .4rem at var(--eyelet) 50%, transparent 98%, #000);
}
@media (min-width: 48em) {
    .tag { --notch: 1.4rem; --eyelet: 1.35rem; padding: 1.1rem 1.4rem 1.2rem 2.9rem; }
}
.tag__status { display: flex; align-items: center; gap: .55rem; font: 700 1.35rem/1.1 var(--font-title); }
.tag__status::before { content: ""; flex: none; width: .7rem; height: .7rem; border-radius: 50%; background: var(--red); }
.tag--open .tag__status::before { background: var(--green); box-shadow: 0 0 0 4px rgb(110 191 74 / .25); }
.tag__today { margin-top: .3rem; color: var(--steel); }
.tag__today span { white-space: nowrap; }
.tag__address { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.tag__links { display: flex; gap: 1.25rem; margin-top: .4rem; font-weight: 600; }
@media (min-width: 64em) {
    .hero .tag { max-width: 24rem; transform: rotate(-2deg); transform-origin: left center; }
}

/* Services (bande graphite)
   ========================================================================== */

.services { padding-block: var(--section); background: var(--graphite); color: var(--white); }
.services__title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.services__list { list-style: none; padding: 0; display: grid; gap: 2rem; margin-top: 2.5rem; }
.services__list li { padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .18); }
.services__list .icon { width: 3rem; height: 3rem; color: var(--green); }
.services__list h3 { margin-top: 1rem; font-size: 1.45rem; }
.services__list p { margin-top: .4rem; color: rgb(255 255 255 / .78); }
.services__note { margin-top: 2.5rem; font-size: .9rem; color: rgb(255 255 255 / .6); }
@media (min-width: 48em) { .services__list { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }

/* Texte courant et encadré VHU
   ========================================================================== */

.prose { max-width: 42rem; }
.prose h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); color: var(--graphite); }
.prose h2 + p { margin-top: 1rem; }
.prose p + p { margin-top: 1rem; }
.prose p + h2 { margin-top: 2.5rem; }

.split { display: grid; gap: 3rem; }
@media (min-width: 64em) { .split { grid-template-columns: 1.3fr 1fr; gap: 5rem; align-items: start; } }

.vhu { padding: 1.75rem; background: var(--concrete); border-left: 4px solid var(--green); }
.vhu h2 { font-size: 1.6rem; }
.vhu > p { margin-top: .6rem; color: var(--steel); }
.vhu strong { color: var(--graphite); }
.vhu__table { width: 100%; margin-top: 1.25rem; border-collapse: collapse; }
.vhu__table :is(th, td) { padding: .55rem .5rem .55rem 0; border-top: 1px solid var(--line); text-align: left; }
.vhu__table th { font: 700 1.1rem var(--font-title); width: 4.5rem; }
.vhu__table a { font-weight: 600; }

/* Galerie et agrandissement
   ========================================================================== */

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.gallery a:first-child { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery a { cursor: zoom-in; }
@media (min-width: 48em) {
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .gallery a:first-child { grid-column: auto; }
}

.lightbox { padding: 0; border: 0; background: none; max-width: 92vw; cursor: zoom-out; }
.lightbox::backdrop { background: rgb(27 30 33 / .9); }
.lightbox img { max-height: 88vh; width: auto; }

/* Appel vers le catalogue
   ========================================================================== */

.catalogue {
    padding-block: var(--section); color: var(--white);
    background: linear-gradient(rgb(27 30 33 / .82), rgb(27 30 33 / .82)), url(/assets/img/catalogue.jpg) center / cover;
}
.catalogue h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); max-width: 20ch; }
.catalogue p { margin-block: 1rem 1.75rem; max-width: 34rem; color: rgb(255 255 255 / .85); }

/* Pages intérieures
   ========================================================================== */

.embed__help { margin-bottom: 1.5rem; color: var(--steel); }
.embed__help a { font-weight: 600; }
.embed iframe { display: block; width: 100%; height: 75vh; min-height: 40rem; border: 1px solid var(--line); border-radius: var(--radius); }

.page-legals .prose h2 { margin-top: 2.5rem; font-size: clamp(1.3rem, 2.5vw, 1.6rem); color: var(--green-ink); }
.page-legals .prose h2 + p { margin-top: .75rem; }

/* Contact
   ========================================================================== */

.contact { display: grid; gap: 3rem; }
.contact .tag { background: var(--concrete); }
.contact__infos h2 { margin-top: 2rem; font-size: 1.4rem; }
.contact__infos h2 + p { margin-top: .5rem; color: var(--steel); }
@media (min-width: 64em) { .contact { grid-template-columns: 22rem 1fr; gap: 5rem; align-items: start; } }

.form { --error: var(--red); }
.form > h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.form__grid { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
@media (min-width: 48em) {
    .form__grid { grid-template-columns: 1fr 1fr; }
    .field--full { grid-column: 1 / -1; }
}
.field label { display: block; margin-bottom: .35rem; font-weight: 600; }
.field label small { color: var(--steel); font-weight: 400; font-size: .9rem; }
.field :is(input, select, textarea) {
    width: 100%; padding: .7rem .85rem; border: 1px solid #b9bfb7; border-radius: var(--radius);
    font: inherit; color: var(--graphite); background: var(--white); transition: border-color .2s, box-shadow .2s;
}
.field :is(input, select) { height: 3rem; }
.field textarea { resize: vertical; min-height: 10rem; }
.field :is(input, select, textarea):focus { outline: none; border-color: var(--green-ink); box-shadow: 0 0 0 3px rgb(110 191 74 / .35); }
.field :is(input, select, textarea):user-invalid { border-color: var(--error); }
.field ::placeholder { color: #8a9095; }
.field__error { margin-top: .3rem; color: var(--error); font-size: .9rem; }
.field__error:empty { display: none; }

.form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.5rem; }
.form__footer .btn { background: var(--graphite); color: var(--white); }
.form__footer .btn:hover { background: var(--green); color: var(--graphite-deep); }
.form__legal { max-width: 28rem; font-size: .9rem; color: var(--steel); }
.form__status { margin-top: 1.25rem; color: var(--error); }
.form__status:empty { display: none; }
.form.is-sent > :not(h2, .form__status) { display: none; }
.form.is-sent .form__status { margin-top: 1.5rem; padding: 2rem; border-left: 4px solid var(--green); background: var(--concrete); color: var(--graphite); font-size: 1.15rem; }

.map { display: block; width: 100%; height: 22rem; border: 0; }
@media (min-width: 64em) { .map { height: 28rem; } }

/* Pied de page
   ========================================================================== */

.footer { background: var(--graphite-deep); color: rgb(255 255 255 / .78); font-size: 1rem; }
.footer a { color: var(--white); }
.footer a:hover { color: var(--green); }
.footer__grid { display: grid; gap: 2.5rem; padding-block: 3.5rem; }
.footer h2 { margin-bottom: .6rem; font-size: 1.2rem; color: var(--white); }
.footer__logo { width: 11rem; padding: .5rem .75rem; background: var(--white); border-radius: var(--radius); }
.footer__grid > div > p + p { margin-top: .75rem; }
.footer__grid > div:first-child > p { margin-top: 1rem; max-width: 22rem; }
.footer__labels { display: flex; align-items: center; gap: 1rem; }
.footer__labels img { background: var(--white); border-radius: var(--radius); padding: .25rem; }
.footer__bottom { padding-block: 1.25rem 1.75rem; border-top: 1px solid rgb(255 255 255 / .12); }
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .95rem; }
.footer__bottom a { color: rgb(255 255 255 / .78); text-decoration: none; }
@media (min-width: 48em) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
