/* La Baraque à frites · style « Brique du Nord ».
   Mise en page : mobile d'abord, une colonne ; grilles fluides au-delà de 720 px. */

@font-face { font-family: "Alfa Slab One"; src: url("fonts/alfa-slab-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #efe6d8;          /* mortier */
  --surface: #f9f4ea;     /* crème des cartes */
  --ink: #26231f;         /* charbon */
  --muted: #645b51;
  --line: rgba(38, 35, 31, .16);
  --accent: #a63d2a;      /* brique */
  --accent-dark: #85301f;
  --frite: #f0b429;       /* jaune frite */
  --open: #2f6f3a;
  --later: #7d4e0f;
  --joint: #d9c7aa;
  --f-display: "Alfa Slab One", Rockwell, Georgia, serif;
  --f-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --r: 4px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--frite); }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
h1, h2 { font-family: var(--f-display); font-weight: 400; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(30px, 6vw, 50px); }
h2 { font-size: clamp(22px, 3.4vw, 30px); }
h1 em { font-style: normal; color: var(--accent); }

/* ---------- En-tête : façade de briques ---------- */
.top {
  background-color: var(--accent);
  background-image: linear-gradient(var(--joint) 2px, transparent 2px), linear-gradient(90deg, var(--joint) 2px, transparent 2px), linear-gradient(90deg, var(--joint) 2px, transparent 2px);
  background-size: 100% 22px, 48px 44px, 48px 44px;
  background-position: 0 0, 0 0, 24px 22px;
  border-bottom: 4px solid var(--ink);
}
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px 10px; }
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 14px 9px; background: var(--surface); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 0 0 0 3px var(--surface); text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-nom { font-family: var(--f-display); font-size: 21px; line-height: 1.1; }
.logo-sous { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.rubriques { display: flex; gap: 4px; background: var(--ink); padding: 4px; border-radius: 6px; }
.rubriques a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 4px; color: var(--surface); text-decoration: none; font-weight: 700; font-size: 15px; }
.rubriques a[aria-current] { background: var(--frite); color: var(--ink); }
.menu { display: flex; gap: 2px 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.menu::-webkit-scrollbar { display: none; }
.menu a { flex: none; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 7px 12px; border-radius: var(--r); }
.menu a[aria-current] { background: var(--frite); }

/* ---------- Fil d'Ariane ---------- */
.ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 14px 0 0; margin: 0; font-size: 14px; color: var(--muted); }
.ariane li + li::before { content: "›"; margin-right: 4px; }
.ariane a { color: var(--muted); }

/* ---------- Accueil ---------- */
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 28px 8px; }
.hero-txt { min-width: 0; }
.hero-art { display: none; }
.dessin { width: 100%; height: auto; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chip { background: var(--frite); color: var(--ink); padding: 3px 10px; border-radius: 3px; letter-spacing: .04em; }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 12px 0 22px; text-wrap: pretty; }
.lead b { color: var(--ink); font-variant-numeric: tabular-nums; }

.search-wrap { position: relative; max-width: 560px; }
.search { display: flex; gap: 6px; max-width: 560px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); padding: 5px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 17px; padding: 9px 10px; color: var(--ink); }
.search input:focus-visible { outline: none; box-shadow: none; }
.search:focus-within { box-shadow: 0 0 0 3px var(--frite), 0 0 0 5px var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 2px solid var(--ink); background: var(--accent); color: var(--surface); font: inherit; font-weight: 700; padding: 9px 18px; border-radius: var(--r); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-dark); color: var(--surface); }
.search .btn { border: 0; min-height: 44px; padding: 8px 14px; }
.btn-jaune { background: var(--frite); color: var(--ink); }
.btn-jaune:hover { background: #e2a417; color: var(--ink); }
.btn-sec { background: var(--surface); color: var(--ink); }
.btn-sec:hover { background: #fff; color: var(--ink); }
@media (max-width: 420px) { .search .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); max-height: min(60vh, 380px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 14px 34px rgba(0,0,0,.16); padding-block: 4px; }
.sg { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px; padding: 10px 14px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); text-decoration: none; }
.sg small { color: var(--muted); font-size: 14px; white-space: nowrap; }
.sg[aria-selected="true"], .sg:hover { background: #f6dfa3; color: var(--ink); }
.sg-h { padding: 8px 14px 2px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; max-width: 560px; margin-top: 10px; }
.qchip { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 10px 16px; font: inherit; font-size: 17px; font-weight: 700; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); color: var(--ink); cursor: pointer; }
.qchip[aria-pressed="true"] { background: var(--frite); box-shadow: inset 0 0 0 2px var(--ink); }
.qchip i { width: 11px; height: 11px; border-radius: 50%; background: var(--open); flex: none; }
.qchip .ico { width: 22px; height: 22px; }

/* ---------- Sections ---------- */
section { padding-block: 26px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.sub { color: var(--muted); margin: 0; font-size: 15px; }
.page-tete { padding-block: 18px 6px; display: grid; gap: 6px; justify-items: start; }
.page-tete .lead { margin: 4px 0 8px; }
.empty { color: var(--muted); }
.note { margin: 16px 0 0; padding: 12px 16px; background: #f6e7c1; border-radius: var(--r); font-size: 15px; }
.more { margin: 16px 0 0; }
.petit { font-size: 14px; color: var(--muted); }
.avert { margin: 6px 0 0; padding: 8px 12px; border-left: 4px solid var(--frite); background: var(--surface); font-size: 15px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: thin; }
.tab { flex: none; display: grid; gap: 1px; min-width: 92px; padding: 8px 12px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); color: var(--ink); text-decoration: none; line-height: 1.2; }
.tab b { font-size: 15px; }
.tab small { font-size: 12px; color: var(--muted); }
.tab[aria-current] { background: var(--ink); color: var(--frite); }
.tab[aria-current] small { color: var(--surface); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.card { display: grid; gap: 5px; align-content: start; padding: 14px 14px 14px 16px; background: var(--surface); border-left: 5px solid var(--accent); border-radius: 3px; color: var(--ink); text-decoration: none; }
.card:hover { color: var(--ink); background: #fffaf1; box-shadow: 0 0 0 2px var(--ink); }
.card .nm { font-weight: 700; font-size: 18px; line-height: 1.2; }
.card .loc { color: var(--muted); font-size: 15px; }
.card .hrs { font-size: 15px; font-variant-numeric: tabular-nums; }

.pill { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 3px; font-size: 14px; font-weight: 700; background: #e2d8c7; color: var(--muted); }
.pill.open { background: #dcebd9; color: #1f5a2c; }
.pill.open::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--open); }
.pill.later { background: #fbe7b0; color: var(--ink); }
.pill.holiday { background: #f3d6cf; color: var(--accent-dark); }
.pill.unknown { background: transparent; border: 1.5px dashed var(--muted); padding: 2px 9px; font-weight: 600; }

.deps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.dep { display: grid; gap: 2px; padding: 16px; background: var(--surface); border-left: 5px solid var(--accent); border-radius: 3px; color: var(--ink); text-decoration: none; }
.dep:hover { color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.dep .num { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .1em; }
.dep .dn { font-weight: 700; font-size: 19px; }
.dep .cnt { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.dep .bar { height: 6px; border-radius: 3px; background: #e2d8c7; margin-top: 10px; overflow: hidden; }
.dep .bar span { display: block; height: 100%; background: var(--frite); }

.cities { display: flex; flex-wrap: wrap; gap: 8px; }
.city { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 12px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 3px; color: var(--ink); text-decoration: none; font-size: 15px; }
.city:hover { border-color: var(--ink); color: var(--ink); }
.city span { color: var(--muted); font-variant-numeric: tabular-nums; }

.groupe h2 { margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.compte { font-family: var(--f-body); font-size: 16px; font-weight: 700; background: var(--frite); padding: 1px 8px; border-radius: 3px; }

.two { display: grid; gap: 14px; }
.panel { padding: 22px; background: var(--surface); border-radius: var(--r); border-left: 5px solid var(--accent); }
.panel h2 { font-size: 23px; margin-bottom: 10px; }
.panel p { margin: 0 0 12px; max-width: 62ch; }
.panel-sombre { background: var(--ink); color: var(--surface); border-left-color: var(--frite); }
.panel-sombre h2 { color: var(--frite); }
.panel-sombre a:not(.btn) { color: var(--frite); }

.faq h2 { margin-bottom: 12px; }
.faq details { background: var(--surface); border-radius: 3px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 700; }
.faq details p { margin: 0; padding: 0 16px 16px; max-width: 70ch; }

/* ---------- Fiche ---------- */
.fiche { display: grid; gap: 10px 32px; }
.adresse { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; font-size: 17px; }
.adresse .ico { margin-top: 3px; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 12px; }
.semaine { width: 100%; max-width: 560px; border-collapse: collapse; background: var(--surface); border-left: 5px solid var(--accent); font-variant-numeric: tabular-nums; margin-top: 12px; }
.semaine th, .semaine td { padding: 10px 14px; border-bottom: 1px solid #e2d8c7; text-align: left; vertical-align: top; }
.semaine td { text-align: right; }
.semaine th { font-weight: 600; white-space: nowrap; }
.semaine tr.auj { background: #fbe7b0; font-weight: 700; }
.semaine small { font-weight: 600; color: var(--muted); }
.inconnu { margin-top: 12px; padding: 14px 16px; border: 2px dashed var(--muted); border-radius: var(--r); max-width: 560px; }
.inconnu p { margin: 0 0 8px; }
.inconnu code { font-size: 14px; word-break: break-word; }
.minicarte { height: 260px; max-width: 560px; margin-top: 12px; border: 2px solid var(--ink); border-radius: var(--r); background: #e6d8c1; }
.fiche-cote { padding-block: 26px; display: grid; gap: 12px; align-content: start; }

/* ---------- Carte ---------- */
.quick-carte { margin: 0 0 12px; }
.mapbox { border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: #e6d8c1; }
.carte { height: min(70vh, 640px); min-height: 380px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 0 0; margin: 0; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 7px; }
.lg { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--surface); box-shadow: 0 0 0 1px var(--ink); }
.lg.open { background: var(--open); } .lg.later { background: var(--frite); } .lg.unknown { background: #9b9184; }
.leaflet-container { font-family: var(--f-body); }
.leaflet-popup-content { font-size: 15px; line-height: 1.35; }
.leaflet-popup-content b { font-size: 16px; }
.leaflet-popup-content a { font-weight: 700; }

/* ---------- Textes et formulaires ---------- */
.page-texte { max-width: 760px; padding-block: 24px 40px; }
.page-texte h2 { font-size: 24px; margin: 28px 0 8px; }
.page-texte p { max-width: 68ch; }
.form { display: grid; gap: 6px; max-width: 560px; }
.form label { font-weight: 600; margin-top: 10px; }
.form label small { font-weight: 400; color: var(--muted); }
.form input:not([type="radio"]), .form textarea { font: inherit; padding: 10px 12px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); color: var(--ink); width: 100%; }
.form fieldset { border: 0; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.form legend { font-weight: 600; margin-bottom: 6px; width: 100%; }
.form .choix { font-weight: 400; margin: 0; display: flex; gap: 8px; align-items: center; min-height: 40px; }
.form .btn { justify-self: start; margin-top: 16px; }
.pot { position: absolute; left: -9999px; }
.erreur { padding: 10px 14px; background: #f3d6cf; border-left: 4px solid var(--accent); }

/* ---------- Pied de page ---------- */
.pied { margin-top: 30px; background: var(--ink); color: #d8cfc2; }
.pied-in { padding-block: 26px 30px; display: grid; gap: 14px; font-size: 15px; }
.pied-marque { display: grid; gap: 2px; }
.pied-marque b { font-family: var(--f-display); font-weight: 400; color: var(--frite); font-size: 20px; }
.pied nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pied a { color: var(--surface); }
.credits { margin: 0; font-size: 13px; color: #bdb3a6; }

/* ---------- Écrans larges ---------- */
@media (min-width: 720px) {
  .wrap { padding-inline: 24px; }
  .hero-in { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); align-items: center; padding-block: 48px 16px; }
  .hero-art { display: flex; justify-content: center; }
  .dessin { max-width: 260px; }
  .two { grid-template-columns: 1fr 1fr; }
  .fiche { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .logo-nom { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- Espace professionnel et gestion ---------- */
.ok { padding: 10px 14px; background: #dcebd9; border-left: 4px solid var(--open, #2f6f3a); border-radius: var(--r); }
.code { white-space: pre-wrap; word-break: break-all; padding: 12px 14px; background: var(--surface); border: 2px dashed var(--ink); border-radius: var(--r); font-size: 14px; }
.pro-bloc { margin-top: 28px; padding: 18px; background: var(--surface); border-left: 5px solid var(--accent); border-radius: var(--r); max-width: 720px; }
.pro-bloc h2 { margin-bottom: 12px; }
.svc { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid #e2d8c7; }
.svc:first-of-type { border-top: 0; }
.svc-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.svc-h span { color: var(--muted); font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { min-height: 52px; font: inherit; font-weight: 700; font-size: 18px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--bg); color: var(--ink); cursor: pointer; }
.seg button.on { background: #2f6f3a; border-color: #2f6f3a; color: #fff; }
.seg button.off.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.svc-ex { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.svc-ex input, .grille input, .grille select, .form select { font: inherit; padding: 8px 10px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--bg); color: var(--ink); min-height: 44px; }
.ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e2d8c7; }
.grille { display: grid; gap: 10px; }
.grille .jour { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding: 12px; border: 1px solid #e2d8c7; border-radius: var(--r); }
.grille legend { font-weight: 700; padding: 0 4px; }
.grille label { display: inline-flex; align-items: center; gap: 6px; }
.jour[data-m="ferme"] .t-services, .jour[data-m="ferme"] .t-continu, .jour[data-m="ferme"] .t-lieu,
.jour[data-m="services"] .t-continu, .jour[data-m="continu"] .t-services { display: none; }
.grille .btn { justify-self: start; }
.lieux { list-style: none; padding: 0; margin: 0 0 12px; }
.lieux li, .g-liste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid #e2d8c7; }
.g-liste { list-style: none; padding: 0; margin: 0; max-width: 900px; }
.g-liste li > span { min-width: 0; flex: 1 1 320px; }
.g-liste .msg { white-space: normal; color: var(--muted); }
.gestion section { margin-top: 28px; }
.grille select { min-width: 12em; }

/* Bannière de consentement (visible seulement si la mesure d'audience est configurée) */
.cookies { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 560px; margin-inline: auto; background: var(--surface); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 16px 18px; box-shadow: 0 8px 28px rgba(38,35,31,.25); font-size: 16px; }
.cookies p { margin: 0 0 12px; }
.cookies-btns { display: flex; gap: 10px; }
.cookies-btns button { flex: 1; min-height: 44px; font: inherit; font-weight: 700; color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 8px; cursor: pointer; }
.cookies-btns button:hover { background: var(--frite); }
.lien-cookies { font: inherit; color: var(--surface); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
