/* Trucks & Moi – street food, proximité, découverte. Mobile d'abord, aucune dépendance externe. */
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --asphalt: #1d1b1a;
  --asphalt-2: #2b2826;
  --cream: #fbf7f0;
  --surface: #ffffff;
  --mustard: #f2b705;
  --mustard-soft: #fdf1c7;
  --tomato: #e4572e;
  --tomato-dark: #b8401e;
  --ink: #1d1b1a;
  --muted: #6a645b;
  --line: #ebe3d6;
  --ok: #1f7a4d;
  --ok-soft: #e1f3e8;
  --info: #22598f;
  --info-soft: #e3edf8;
  --warn: #8f5a00;
  --warn-soft: #fcefd4;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(29,27,26,.06), 0 6px 20px rgba(29,27,26,.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--tomato-dark); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.7rem, 6vw, 2.6rem); font-weight: 850; }
h2 { font-size: 1.3rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .9rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* En-tête */
.t-header { background: var(--asphalt); color: #fff; position: sticky; top: 0; z-index: 40; }
.t-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 58px; }
.t-brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-weight: 850; font-size: 1.15rem; letter-spacing: -.02em; }
.t-brand img { width: 34px; height: 34px; }
.t-brand .amp { color: var(--mustard); }
.t-header nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; opacity: .9; }
.t-header nav a:hover { opacity: 1; text-decoration: underline; }
.awning { height: 8px; background: repeating-linear-gradient(90deg, var(--tomato) 0 22px, var(--cream) 22px 44px); }
.preview-bar { background: var(--mustard); color: var(--asphalt); text-align: center; font-weight: 700; font-size: .85rem; padding: .35rem 16px; }

/* Hero / recherche */
.hero { background: var(--asphalt); color: #fff; padding: 2rem 0 2.5rem; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--mustard); }
.hero p.lead { color: #e9e3d8; font-size: 1.05rem; max-width: 36rem; }
.search-box { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); margin-top: 1.25rem; }
.search-box .field { position: relative; }
.search-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-row .grow { flex: 1 1 220px; }
label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .3rem; }
input[type=text], input[type=search], input[type=email], textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .8rem; min-height: 48px;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--mustard); box-shadow: 0 0 0 3px rgba(242,183,5,.3); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; padding: .65rem 1.1rem; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--asphalt); }
.btn-primary { background: var(--tomato); border-color: var(--tomato); color: #fff; }
.btn-primary:hover { background: var(--tomato-dark); border-color: var(--tomato-dark); }
.btn-dark { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.btn-geo { background: var(--mustard-soft); border-color: var(--mustard); color: var(--asphalt); }
.btn-block { width: 100%; }
.btn-order { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 1.1rem; min-height: 56px; box-shadow: 0 6px 18px rgba(31,122,77,.3); }
.geo-status { font-size: .85rem; color: var(--muted); margin: .4rem 0 0; min-height: 1.2em; }

/* Pastilles de filtres */
.pills { display: flex; gap: .45rem; overflow-x: auto; padding: .2rem 0 .4rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .85rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-weight: 650; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.pill.active { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.filters { background: var(--surface); border-bottom: 1px solid var(--line); padding: .75rem 0; position: sticky; top: 58px; z-index: 30; }
.filters form { display: grid; gap: .5rem; }
.filters .selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; }
.filters select { min-height: 44px; padding: .5rem .7rem; }

/* Sections et cartes */
main { padding-bottom: 2.5rem; }
.section { padding: 1.5rem 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; margin-bottom: 1rem; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 .75rem; }
.truck-card { display: grid; grid-template-columns: 64px 1fr; gap: .85rem; align-items: start; }
.truck-card .thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--mustard-soft); display: grid; place-items: center; font-size: 1.8rem; overflow: hidden; }
.truck-card h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.truck-card h3 a { color: var(--ink); text-decoration: none; }
.truck-card h3 a::after { content: ''; position: absolute; inset: 0; }
.truck-card { position: relative; }
.truck-card .meta { color: var(--muted); font-size: .88rem; }
.truck-card .passages, .truck-card .tags { position: relative; z-index: 1; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; }
.tag { display: inline-block; padding: .15rem .55rem; border-radius: 999px; background: var(--mustard-soft); color: #5a4300; font-size: .8rem; font-weight: 650; }
.tag-order { background: var(--ok-soft); color: var(--ok); }
.tag-off { background: #efebe4; color: var(--muted); }

/* Passages */
.passages { list-style: none; margin: .5rem 0 0; padding: 0; }
.passages li { display: flex; flex-wrap: wrap; gap: .15rem .5rem; align-items: baseline; padding: .45rem 0; border-top: 1px dashed var(--line); font-size: .93rem; }
.passages .when { font-weight: 750; min-width: 7.5rem; }
.passages .where { color: var(--ink); }
.cert { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 750; white-space: nowrap; }
.cert-confirmed { background: var(--ok-soft); color: var(--ok); }
.cert-planned { background: var(--info-soft); color: var(--info); }
.cert-unconfirmed { background: var(--warn-soft); color: var(--warn); }
.live { display: inline-flex; align-items: center; gap: .3rem; color: var(--ok); font-weight: 750; font-size: .8rem; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(31,122,77,.2); }

/* Fiche */
.truck-hero { background: var(--asphalt); color: #fff; padding: 1.5rem 0 1.25rem; }
.truck-hero .id { display: flex; gap: 1rem; align-items: center; }
.truck-hero .logo { width: 84px; height: 84px; border-radius: 20px; background: #fff; object-fit: contain; flex: 0 0 auto; }
.truck-hero .logo-ph { width: 84px; height: 84px; border-radius: 20px; background: var(--mustard); display: grid; place-items: center; font-size: 2.4rem; flex: 0 0 auto; }
.truck-hero h1 { color: #fff; margin: 0; }
.truck-hero .sub { color: #e9e3d8; margin: .25rem 0 0; }
.truck-photo { width: 100%; max-height: 340px; object-fit: cover; border-radius: var(--radius); display: block; margin-top: -1px; }
.cta-box { background: var(--surface); border-radius: var(--radius); padding: 1rem; margin-top: 1rem; box-shadow: var(--shadow); color: var(--ink); }
.cta-box.off { background: #f3efe8; box-shadow: none; border: 1px dashed #d8cfbf; }
.order-sticky { position: sticky; bottom: 0; z-index: 35; padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--cream) 70%, rgba(251,247,240,0)); }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.weekly { list-style: none; padding: 0; margin: 0; }
.weekly > li { padding: .7rem 0; border-top: 1px solid var(--line); }
.weekly > li:first-child { border-top: 0; }
.weekly .loc { font-weight: 750; }
.weekly .slots { margin: .15rem 0 0; color: var(--ink); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.contact-list a { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 650; background: #fff; }
.notice { border-radius: 12px; padding: .75rem .9rem; font-size: .92rem; margin: 0 0 1rem; }
.notice-warn { background: var(--warn-soft); color: #5e3c00; }
.notice-info { background: var(--info-soft); color: #173f66; }
.notice-ok { background: var(--ok-soft); color: #134a2f; }
.claim { background: var(--mustard-soft); border: 1.5px solid var(--mustard); border-radius: var(--radius); padding: 1rem; }
.claim strong { display: block; margin-bottom: .25rem; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 1rem 0 .5rem; }
.breadcrumb a { color: var(--muted); }

/* Liste de communes */
.commune-links { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.commune-links a { display: inline-block; padding: .45rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }

/* Étapes / pros */
.steps { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 1rem; }
.step .n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mustard); font-weight: 850; margin-bottom: .4rem; }
.empty { text-align: center; padding: 2rem 1rem; }
.empty .big { font-size: 2.5rem; }

/* Formulaires */
.field { margin-bottom: 1rem; }
.radio-list { display: grid; gap: .4rem; }
.radio-list label { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; padding: .6rem .7rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; margin: 0; }
.error { color: #b42318; font-size: .875rem; margin: .3rem 0 0; }
.hp { position: absolute; left: -9999px; }

/* Autocomplétion */
.ac-list { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: .3rem 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.18); max-height: 300px; overflow-y: auto; color: var(--ink); }
.ac-list li { padding: .7rem .9rem; cursor: pointer; font-weight: 600; }
.ac-list li small { color: var(--muted); font-weight: 400; }
.ac-list li.active, .ac-list li:hover { background: var(--mustard-soft); }

/* Pied de page */
.t-footer { background: var(--asphalt); color: #cfc8bc; padding: 1.5rem 0 2rem; font-size: .9rem; }
.t-footer a { color: #fff; }
.t-footer .links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-bottom: .8rem; }
.t-footer .eco { opacity: .85; }

/* Pages de texte */
.prose { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 1.25rem; margin-top: 1.25rem; }
.prose h2 { margin-top: 1.4rem; }

@media (min-width: 720px) {
  .hero { padding: 3rem 0 3.5rem; }
  .truck-card { grid-template-columns: 76px 1fr; }
  .truck-card .thumb { width: 76px; height: 76px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .pill { transition: background-color .15s, border-color .15s; }
}
