/* L'Hexagone Ambulant : feuille de style unique, sans framework.
   Reprend le design historique (Materialize) : bordeaux #761619, crème,
   polices « Hexa », cartes produits avec pastille de prix. */

@font-face {
    font-family: "Hexa Title";
    src: url("../fonts/hexa.4af074239f14.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "Hexa Subtitle";
    src: url("../fonts/subtitle.faf7ebe81a8e.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-latin-400-normal.e7198b2dcb57.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/montserrat-latin-700-normal.1c0792ac34ef.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

:root {
    --red: #761619;
    --red-dark: #5c1013;
    --red-line: #b71c1c;
    --cream: #fefaee;
    --sand: #cbae82;
    --sun: #ffb300;
    --moon: #283593;
    --text: rgba(0, 0, 0, 0.87);
    --muted: #5f5f5f;
    --shadow-1: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
    --shadow-2: 0 8px 16px rgba(0, 0, 0, 0.12), 0 4px 4px rgba(0, 0, 0, 0.15);
    --nav-height: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--cream);
}

img { max-width: 100%; height: auto; }
a { color: var(--red); }

.icon { width: 24px; height: 24px; fill: currentColor; flex: none; vertical-align: middle; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: #fff; padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; }

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

/* ── Barre de navigation ────────────────────────────────────────────────── */

.topbar {
    position: sticky; top: 0; z-index: 50;
    background-color: var(--red);
    color: #fff;
    box-shadow: var(--shadow-1);
}
.nav {
    display: flex; align-items: center; gap: 1rem;
    min-height: var(--nav-height);
    padding: 0 1rem;
}
.nav a { color: #fff; text-decoration: none; }
.nav__brand { display: flex; align-items: center; gap: 1rem; }
.nav__brand img { width: 50px; height: 50px; }
.nav__title { font-family: "Hexa Title", serif; font-size: 3.2rem; line-height: 1; white-space: nowrap; }
.nav__title span { font-family: "Hexa Subtitle", serif; }
.nav__links { display: flex; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav__links a { display: block; padding: 0 15px; line-height: var(--nav-height); transition: background-color .3s; }
.nav__links a:hover { background-color: rgba(0, 0, 0, 0.1); }
.nav__phone-mobile { display: none; font-size: .85rem; }
.nav__burger, .sidenav__close {
    display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: .5rem;
}

.sidenav { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.5); }
.sidenav[hidden] { display: none; }
.sidenav__panel {
    width: min(300px, 85vw); height: 100%; overflow-y: auto;
    background: #fff; box-shadow: var(--shadow-2);
    animation: slide-in .25s ease-out;
}
@keyframes slide-in { from { transform: translateX(-100%); } to { transform: none; } }
.sidenav__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1rem 0 2rem; min-height: 56px; font-weight: 700;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .16), 0 3px 6px rgba(0, 0, 0, .23);
    margin-bottom: 5%;
}
.sidenav__close { display: block; }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav li a {
    display: flex; align-items: center; gap: 24px;
    padding: 0 32px; min-height: 48px; font-size: .85rem; font-weight: 700;
    color: var(--text); text-decoration: none;
}
.sidenav li a:hover { background: rgba(0, 0, 0, 0.05); }
.sidenav .icon { color: rgba(0, 0, 0, 0.54); }

/* ── Bandeaux d'information ─────────────────────────────────────────────── */

.announcements { background-color: var(--red-dark); color: #fff; }
.announcement {
    display: flex; align-items: center; justify-content: center; gap: .75rem;
    margin: 0; padding: .9rem 1rem; text-align: center; font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}
.announcement--closure { background-color: #8e1b1f; }
.announcement .icon { color: var(--sand); }

/* ── Bannière ──────────────────────────────────────────────────────────── */

.hero { height: 60vh; min-height: 260px; background-color: #6e1f22; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ── Prochain service ──────────────────────────────────────────────────── */

.hero { position: relative; display: flex; overflow: hidden; align-items: flex-end; justify-content: center; padding: 0 1rem 1.5rem; }
.next-stop {
    position: relative; display: flex; align-items: stretch; max-width: 100%; margin: 0;
    color: #fff; font-size: .95rem; line-height: 1.3;
    background: rgba(30, 12, 12, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.next-stop a { color: inherit; text-decoration: none; }
.next-stop__info { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .9rem; padding: .6rem 1.25rem; min-width: 0; }
.next-stop__label {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--sand);
}
.next-stop__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--sand); }
.next-stop--open .next-stop__label { color: #a5d6a7; }
.next-stop--open .next-stop__dot { background: #66bb6a; animation: next-stop-pulse 2s ease-out infinite; }
@keyframes next-stop-pulse { 0% { box-shadow: 0 0 0 0 rgba(102, 187, 106, .7); } 100% { box-shadow: 0 0 0 .6rem rgba(102, 187, 106, 0); } }
.next-stop__when { font-weight: 700; }
.next-stop__place { opacity: .85; }
.next-stop__info:hover .next-stop__place { text-decoration: underline; }
.next-stop__go {
    display: inline-flex; align-items: center; gap: .35rem; padding: .6rem 1.25rem .6rem 1rem;
    border-left: 1px solid rgba(255, 255, 255, .18); font-weight: 700; white-space: nowrap; transition: background-color .2s;
}
.next-stop__go:hover { background: rgba(255, 255, 255, .1); border-radius: 0 999px 999px 0; }
.next-stop__go .icon { width: 1.1rem; height: 1.1rem; color: var(--sand); }
@media (prefers-reduced-motion: reduce) { .next-stop--open .next-stop__dot { animation: none; } }

.section-title {
    margin: 2.5%;
    font-family: "Hexa Title", serif;
    font-weight: 400;
    font-size: 3.56rem;
    line-height: 1.1;
}

/* ── Cartes produits ───────────────────────────────────────────────────── */

.products {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
    gap: 1.5rem;
    padding: 0 .75rem 1rem;
}
.products--3 { --cols: 3; padding-inline: 4%; }
.products--4 { --cols: 4; }

.card {
    display: flex; flex-direction: column;
    background: #fff; border-radius: 2px;
    box-shadow: var(--shadow-1);
    transition: box-shadow .25s;
}
.card:hover { box-shadow: var(--shadow-2); }
.card__image { position: relative; }
.card__image img { display: block; width: 100%; aspect-ratio: 512 / 504; object-fit: cover; border-radius: 2px 2px 0 0; }
.card__placeholder {
    display: grid; place-items: center; aspect-ratio: 512 / 504;
    background: #f1e9d6; color: var(--sand);
}
.card__placeholder .icon { width: 30%; height: 30%; }
.card__price {
    position: absolute; right: 24px; bottom: -28px;
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 50%;
    background-color: var(--red); color: #fff; font-weight: 700;
    box-shadow: var(--shadow-1);
}
.card__content { padding: 24px; padding-top: 16px; font-size: .9rem; }
.card__title {
    margin: 8px 70px 8px 0;
    font-family: "Hexa Title", serif; font-weight: 400; font-size: 3rem; line-height: 1.05;
}
.card__content p { margin: 0; min-height: 3.5rem; }
/* Visuel portrait avec nom et ingrédients incrustés : l'image fait toute la carte. */
.card--visual { align-self: start; overflow: hidden; border-radius: 6px; }
.card--visual .card__image img { aspect-ratio: 4 / 5; border-radius: 0; }
/* En haut à droite : le bas du visuel porte les ingrédients. */
.card--visual .card__price { top: 16px; right: 16px; bottom: auto; }

.allergens { width: 90%; margin: 1.5rem auto 2rem; text-align: center; }
.allergens a { color: #000; font-size: 1.25rem; font-weight: 700; }

.call-to-phone {
    width: 90%; margin: 0 auto; text-align: center;
    background-color: var(--red); border: 2px solid var(--red); border-radius: 9px;
    font-size: 1.2rem;
}
.call-to-phone a { display: block; padding: 1rem; color: #fff; text-decoration: none; }
.call-to-phone span { font-weight: 700; white-space: nowrap; }

/* ── Planning et carte ─────────────────────────────────────────────────── */

.infos {
    display: flex; justify-content: space-around; align-items: flex-start; gap: 2rem;
    padding: 2.5% 2.5%;
}
.hours { width: 50%; box-shadow: var(--shadow-1); border: 1px solid #ddd; }
.map-wrapper { width: 45%; position: sticky; top: calc(var(--nav-height) + 1rem); }
.map { height: 70vh; min-height: 360px; border: 1px solid #ddd; box-shadow: var(--shadow-1); background: #ebe3cd; }

.day { background: #fff; border-bottom: 1px solid #ddd; }
.day:last-child { border-bottom: 0; }
.day__header {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem; cursor: pointer; list-style: none;
    font-size: 2rem; line-height: 1.2;
}
.day__header::-webkit-details-marker { display: none; }
.day__header:hover { background: #fafafa; }
.day__chevron { transition: transform .2s; color: var(--muted); }
.day[open] .day__chevron { transform: rotate(180deg); }
.day__date { font-size: 1rem; color: var(--muted); }
.day--today .day__date { color: var(--red); font-weight: 700; }
.day__badge {
    margin-left: auto; padding: .15rem .6rem; border-radius: 1rem;
    background: var(--red); color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em;
}
.day__body {
    display: flex; flex-wrap: wrap; justify-content: space-around; gap: 2rem 1rem;
    padding: 1.5rem 2rem 2rem; border-top: 1px solid #ddd;
}

.slot { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1 1 220px; }
.slot--pause { flex-basis: 100%; }
.slot h3 { display: flex; align-items: center; gap: .75rem; margin: 0; font-size: 2.28rem; font-weight: 400; line-height: 1.2; }
.slot__icon { width: 2rem; height: 2rem; color: var(--sun); }
.slot--evening .slot__icon { color: var(--moon); }
.slot--pause .slot__icon, .slot--closed .slot__icon { display: none; }
.slot__hours { margin: 0; font-size: 1.65rem; }
.slot__place { margin: 0 0 1rem; font-size: 1.3rem; }
.slot__note { margin: -.5rem 0 1rem; color: var(--muted); }
.slot--closed { opacity: .75; }
.slot--closed h4 { font-size: 1.6rem; }
.separator { display: block; width: 40px; border: 2px solid var(--red-line); margin: 1.25rem 0; }

.outline-btn, .contact-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .75rem; color: #000; text-decoration: none; text-align: center;
    border: 2px solid var(--red-line);
    background: transparent;
    transition: box-shadow .25s ease-in-out;
}
.outline-btn:hover, .contact-btn:hover { box-shadow: var(--shadow-2); }
.contact-btn { align-self: center; width: 75%; margin-bottom: 2rem; border-radius: 9px; }

.map-legend { display: flex; gap: 1.5rem; justify-content: center; margin: .75rem 0 0; color: var(--muted); }
.map-legend__item { display: inline-flex; align-items: center; gap: .4rem; }
.pin {
    display: inline-block; width: 16px; height: 16px;
    border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.pin--midi { background: var(--sun); }
.pin--soir { background: var(--moon); }
.map-pin { background: none; border: 0; }
.map-pin .pin { width: 26px; height: 26px; margin: 2px; }
.map-pin--next .pin { width: 36px; height: 36px; margin: 3px; }
.leaflet-popup-content { font-family: Montserrat, sans-serif; font-size: .9rem; }
.leaflet-popup-content strong { display: block; font-size: 1rem; }
.leaflet-popup-content ul { margin: .4rem 0; padding-left: 1.1rem; }
.leaflet-container a.map-directions { color: var(--red); font-weight: 700; }

/* ── Privatisation (accueil) ───────────────────────────────────────────── */

.events { display: flex; flex-direction: column; }
.events__box { display: flex; justify-content: space-around; gap: 2rem; padding: 0 2.5%; }
.events__text, .events__truck { display: flex; flex-direction: column; width: 45%; }
.flow-text { font-size: 1.3rem; font-weight: 300; line-height: 1.6; text-align: justify; }
.events__pictures { display: flex; justify-content: space-around; align-items: center; gap: 1rem; }
.events__pictures img { width: 20vw; }

/* ── Pages simples & formulaire ────────────────────────────────────────── */

.page { width: min(1100px, 92%); margin: 0 auto 3rem; }
.page .section-title { margin-inline: 0; }
.page__intro { font-size: 1.1rem; }
.message-page { text-align: center; display: flex; flex-direction: column; align-items: center; min-height: 40vh; justify-content: center; }
.message-page p { font-size: 1.2rem; }

.legal__grid { display: flex; flex-wrap: wrap; gap: 2rem; }
.legal__card {
    flex: 1 1 320px; display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; align-content: start;
    margin: 0; padding: 1.5rem 2rem; font-size: 1.1rem; border: 2px solid var(--red); border-radius: 9px; background: #fff;
}
.legal__card dt { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: .2rem; }
.legal__card dd { margin: 0; }
@media (max-width: 480px) {
    .legal__card { grid-template-columns: 1fr; gap: .1rem; padding: 1.25rem; }
    .legal__card dd { margin-bottom: .6rem; }
}
.legal h2 { margin-top: 2.5rem; font-family: "Hexa Title", serif; font-weight: 400; font-size: 2.4rem; }

.alert { padding: 1rem; margin: 1rem 0; border-left: 4px solid var(--red-line); background: #fdecea; }
.alert p { margin: 0; }

.request-form fieldset {
    margin: 0 0 1.5rem; padding: 1rem 1.5rem 0.5rem;
    border: 2px solid var(--red); border-radius: 9px; background: #fff;
}
.request-form legend { padding: 0 .5rem; font-family: "Hexa Title", serif; font-size: 2rem; }
.grid { display: grid; gap: 0 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.field label, .field__label { margin: 0 0 .3rem; font-weight: 700; font-size: .9rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: .65rem .75rem; font: inherit; color: inherit;
    border: 1px solid #b9b2a3; border-radius: 6px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); outline: 2px solid rgba(118, 22, 25, .2); }
.field__help { color: var(--muted); }
.field .hx-autocomplete { position: relative; display: block; }
.hx-suggestions {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50; margin: 4px 0 0; padding: .25rem 0;
    list-style: none; background: #fff; border: 1px solid #b9b2a3; border-radius: 6px; box-shadow: var(--shadow-2);
}
.hx-suggestions li { padding: .55rem .75rem; cursor: pointer; }
.hx-suggestions li small { display: block; color: var(--muted); font-size: .8rem; }
.hx-suggestions li:hover, .hx-suggestions li[aria-selected="true"] { background: var(--cream); }
.field__error { color: var(--red-line); font-weight: 700; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--red-line); }
.field--check label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.field--check input { width: auto; margin-top: .3rem; }

.pizza-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-top: .5rem; }
.pizza-choice { position: relative; cursor: pointer; font-weight: 400 !important; }
.pizza-choice input { position: absolute; opacity: 0; }
.pizza-choice__body {
    display: flex; flex-direction: column; height: 100%;
    padding: .6rem; border: 2px solid #e2dccd; border-radius: 9px; background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.pizza-choice img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.pizza-choice img.pizza-choice__visual { object-position: 50% 30%; }
.pizza-choice__name { margin-top: .4rem; font-family: "Hexa Title", serif; font-size: 1.9rem; line-height: 1; }
.pizza-choice__desc { font-size: .75rem; color: var(--muted); }
.pizza-choice input:checked + .pizza-choice__body { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.pizza-choice input:focus-visible + .pizza-choice__body { outline: 3px solid var(--sand); }
.pizza-choice input:disabled + .pizza-choice__body { opacity: .45; cursor: not-allowed; }
.pizza-counter { display: block; margin-top: .4rem; color: var(--muted); }

.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.legal-note { font-size: .8rem; color: var(--muted); }
.btn {
    display: inline-block; padding: .9rem 2rem; border: 0; border-radius: 4px;
    background: var(--red); color: #fff; font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    cursor: pointer; box-shadow: var(--shadow-1);
}
.btn:hover { background: var(--red-dark); }
.btn:disabled { opacity: .6; cursor: wait; }

/* ── Pied de page & boutons flottants ──────────────────────────────────── */

.footer {
    display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
    margin-top: 5vh; padding: 1rem 2.5%;
    background-color: var(--red); color: #fff;
}
.footer > div { display: flex; flex-direction: column; justify-content: center; width: 40%; margin: .5% 2.5%; }
.footer > div:nth-child(2) { text-align: center; }
.footer p { margin: 0 0 .3rem; }
.footer a { color: #fff; }
.footer__small { font-size: .75rem; opacity: .85; }
.footer__social { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

.fab {
    position: fixed; right: 5vh; bottom: 5vh; z-index: 40;
    display: flex; align-items: center; justify-content: center;
    width: 72px; height: 72px; border-radius: 50%;
    /* Jaune safran du planning (midi), icône bordeaux : assorti à la charte. */
    background-color: var(--sun); color: var(--red);
    box-shadow: var(--shadow-2);
    transition: background-color .2s;
}
.fab:hover { background-color: #f2a900; }
.fab .icon { width: 3rem; height: 3rem; }
.fab--phone { display: none; }

/* ── Mobile et tablette (< 900 px) ─────────────────────────────────────── */

@media (max-width: 899px) {
    :root { --nav-height: 56px; }
    .nav { justify-content: space-between; }
    .nav__brand { display: none; }
    .nav__links { display: none; }
    .nav__burger { display: block; order: -1; }
    .nav__phone-mobile { display: block; }

    .section-title { font-size: 2rem; margin: 5% 2.5%; }
    .products, .products--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding-inline: .5rem; }
    .products--3 { grid-template-columns: minmax(0, 1fr); padding-inline: 8%; }
    .card__price { width: 44px; height: 44px; right: 8px; bottom: -22px; font-size: .85rem; }
    .card__content { padding: 4px 6px 8px; }
    .card__title { font-size: 1.75rem; margin: 10px 48px 4px 0; }
    .card__content p { font-size: .75rem; min-height: 0; }
    .card--visual .card__price { top: 8px; right: 8px; }

    .hero { padding-bottom: 1rem; }
    .next-stop { border-radius: 16px; font-size: .85rem; }
    .next-stop__info { flex-direction: column; align-items: flex-start; gap: .1rem; padding: .55rem .9rem; }
    .next-stop__go { padding: 0 .9rem; }
    .next-stop__go:hover { border-radius: 0 16px 16px 0; }
    .next-stop__go .icon { width: 1.5rem; height: 1.5rem; }
    .next-stop__go-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

    .call-to-phone { font-size: 1.02rem; }
    .infos { flex-direction: column; align-items: center; padding: 2.5% 0 7.5%; }
    .hours, .map-wrapper { width: 92%; }
    .map-wrapper { position: static; }
    .map { height: 60vh; }
    .day__header { font-size: 1.6rem; padding: .8rem; }
    .day__body { padding: 1.25rem 1rem 1.5rem; }
    .slot h3 { font-size: 1.8rem; }
    .slot__hours { font-size: 1.4rem; }
    .slot__place { font-size: 1rem; }

    .events__box { flex-direction: column; align-items: center; }
    .events__text, .events__truck { width: 90%; }
    .flow-text { font-size: 1.1rem; }
    .events__pictures img { width: 42vw; }
    .contact-btn { width: 100%; }

    .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
    .request-form fieldset { padding-inline: 1rem; }

    .footer { flex-direction: column; }
    .footer > div { width: 95%; text-align: center; }
    .footer__social { justify-content: center; }

    .fab { width: 56px; height: 56px; }
    .fab .icon { width: 28px; height: 28px; }
    .fab--phone { display: flex; }
    .fab--menu { display: none; }
}

/* Téléphone : une carte par ligne pour que le texte incrusté reste lisible. */
@media (max-width: 599px) {
    .products:has(.card--visual) { grid-template-columns: minmax(0, 1fr); padding-inline: 8%; }
}
