/* Styles de table.kaldo.ch (même structure que les autres sites kaldo.ch : noir et blanc du drapeau fribourgeois, accent bordeaux, crête dorée). */
@font-face { font-family: "Bebas Neue"; src: url("/fonts/bebas-neue-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 {
  color-scheme: light;
  --bg: #f8f5ef;
  --card: #ffffff;
  --text: #1b1916;
  --muted: #5a544b;          /* 7:1 sur blanc */
  --grid: #ebe5d9;
  --line: #d9d0bf;
  --accent: #8e2b1c;         /* bordeaux, 8:1 sur blanc */
  --accent-soft: rgba(142, 43, 28, .09);
  --on-accent: #ffffff;
  --focus: #8e2b1c;
  --ok: #24663a;       --ok-bg: #e3f2e6;
  --ko: #8a3a12;       --ko-bg: #f7e7dc;
  --gold: #7a5600;     --gold-bg: #f8edcf;
  --alpe: #2c5b2f;     --alpe-bg: #e4efdf;
  --hero-bg: #161412;
  --hero-text: #ffffff;
  --hero-muted: #ddd5c8;
  --hero-accent: #e2ad3b;    /* or du vacherin */
  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(22, 20, 18, .06), 0 4px 16px rgba(22, 20, 18, .07);
  --ease: 180ms ease-out;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13110f;
  --card: #1f1c18;
  --text: #f3eee6;
  --muted: #c9c0b2;
  --grid: #2e2a24;
  --line: #474036;
  --accent: #f0a48f;
  --accent-soft: rgba(240, 164, 143, .13);
  --on-accent: #13110f;
  --focus: #f0a48f;
  --ok: #9fd8ac;       --ok-bg: rgba(159, 216, 172, .12);
  --ko: #f3b58f;       --ko-bg: rgba(243, 181, 143, .12);
  --gold: #f0cd78;     --gold-bg: rgba(240, 205, 120, .12);
  --alpe: #a9d6a4;     --alpe-bg: rgba(169, 214, 164, .12);
  --hero-bg: #0c0b0a;
  --shadow: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: .02em; line-height: 1; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
svg { flex: none; }
.wrap { max-width: 1200px; 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; }
.muted { color: var(--muted); }

/* ---------- En-tête ---------- */
.hero {
  background:
    radial-gradient(520px 300px at 90% 0%, rgba(226, 173, 59, .18), transparent 65%),
    radial-gradient(700px 380px at 5% 110%, rgba(142, 43, 28, .35), transparent 70%),
    var(--hero-bg);
  color: var(--hero-text);
  position: relative;
  padding: 20px 0 72px;
}
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 48px; display: block; }
.wave .water { fill: var(--bg); }
.wave .crest { fill: none; stroke: var(--hero-accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 10px; background: var(--hero-text); color: var(--hero-bg); font-weight: 700; }
.skip:focus { top: 12px; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 26px; }
.topbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.brand-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-height: 44px; color: var(--hero-text); text-decoration: none; }
.brand-title { font-family: var(--font-display); font-size: clamp(30px, 5vw, 42px); line-height: 1; letter-spacing: .02em; }
.brand-sub { color: var(--hero-muted); font-size: 15px; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.tabs a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  color: var(--hero-text); text-decoration: none; font-weight: 700; font-size: 15px; transition: background-color var(--ease), color var(--ease);
}
.tabs a:hover { background: rgba(255, 255, 255, .12); }
.tabs a[aria-current="page"] { background: var(--hero-accent); color: var(--hero-bg); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lang, .credit {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; color: var(--hero-text); text-decoration: none; font-size: 15px;
  transition: background-color var(--ease), color var(--ease);
}
.lang { border: 1.5px solid rgba(255, 255, 255, .35); font-weight: 700; }
.lang:hover { background: rgba(255, 255, 255, .12); }
.credit { border: 1.5px solid var(--hero-accent); }
.credit strong { color: var(--hero-accent); transition: color var(--ease); }
.credit:hover, .credit:focus-visible { background: var(--hero-accent); color: var(--hero-bg); }
.credit:hover strong, .credit:focus-visible strong { color: var(--hero-bg); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1.5px solid rgba(255, 255, 255, .35); border-radius: 999px;
  background: transparent; color: var(--hero-text); cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease);
}
.theme-toggle:hover { background: rgba(255, 255, 255, .12); border-color: var(--hero-text); }
.theme-toggle .icon-sun, :root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--hero-accent); }
.page-title { margin: 0; font-size: clamp(48px, 9vw, 88px); line-height: .95; overflow-wrap: anywhere; }
.page-title.long { font-size: clamp(38px, 6vw, 64px); }
.page-text { margin: 12px 0 0; font-size: clamp(18px, 2.4vw, 21px); max-width: 60ch; color: var(--hero-muted); }
.hero-grid { display: grid; gap: 24px 48px; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); } }
.hero-photo img { border-radius: 16px; }
.hero-photo figcaption, .hero-photo figcaption a { color: var(--hero-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; color: var(--hero-muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 8px; }
.breadcrumb a { color: var(--hero-text); }
.hero .badges { margin-top: 4px; }

/* Recherche de l'accueil */
.search { margin-top: 26px; max-width: 640px; }
.search label { display: block; margin-bottom: 6px; font-weight: 700; color: var(--hero-muted); }
.search-row { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 2px solid transparent; background: #fff; color: #1b1916; font: 400 18px var(--font-body); }
.search input:focus { outline: none; border-color: var(--hero-accent); }
.search .button { min-height: 52px; }

/* ---------- Contenu ---------- */
main { padding: 20px 0 48px; }
section.block { margin-bottom: 40px; }
section.block > h2 { margin: 0 0 10px; font-size: 34px; }
.hint { margin: 0 0 14px; color: var(--muted); font-size: 16px; max-width: 75ch; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 2px solid var(--accent); background: var(--accent); color: var(--on-accent); font: 700 16px var(--font-body);
  text-decoration: none; cursor: pointer; transition: filter var(--ease), background-color var(--ease);
}
.button:hover { filter: brightness(1.1); }
.button.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.button.ghost { background: transparent; color: var(--accent); }
.button.ghost:hover { background: var(--accent-soft); filter: none; }
.button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.hero .button { background: var(--hero-accent); border-color: var(--hero-accent); color: var(--hero-bg); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }

.photo { margin: 0; }
.photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: var(--grid); }
.photo figcaption { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.photo figcaption a { color: inherit; }

/* Raccourcis et districts */
.shortcuts, .districts { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.shortcuts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.districts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.shortcuts a, .districts a {
  position: relative; display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px; border-radius: var(--radius);
  background: var(--card); border: 1.5px solid var(--grid); color: var(--text); text-decoration: none; box-shadow: var(--shadow);
  transition: border-color var(--ease), transform var(--ease);
}
.shortcuts a:hover, .districts a:hover { border-color: var(--accent); transform: translateY(-2px); }
.shortcuts strong, .districts strong { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.05; color: var(--accent); }
.shortcuts span, .districts span { color: var(--muted); }
.districts .count { position: absolute; right: 16px; top: 14px; font: 400 28px var(--font-display); color: var(--line); }

/* Saison en cours */
.now-card { display: grid; gap: 16px 24px; padding: 16px; border-radius: var(--radius); background: var(--gold-bg); border-left: 6px solid var(--hero-accent); }
@media (min-width: 760px) { .now-card { grid-template-columns: minmax(240px, 360px) 1fr; align-items: center; } }
.now-card h3 { margin: 4px 0 6px; font-size: 34px; }
.now-card p { margin: 0 0 8px; max-width: 60ch; }
.when { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }

.prose { max-width: 75ch; }
.prose h2 { margin: 28px 0 8px; font-size: 30px; }
.prose p { margin: 0 0 12px; }
.prose ul { padding-left: 20px; }

/* ---------- Badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--grid); color: var(--muted); }
.badge.small { min-height: 22px; font-size: 12px; padding: 0 8px; }
.badge.terroir { background: var(--ok-bg); color: var(--ok); }
.badge.gm { background: var(--gold-bg); color: var(--gold); }
.badge.alpe { background: var(--alpe-bg); color: var(--alpe); }
.hero .badge { background: rgba(255, 255, 255, .12); color: var(--hero-text); }
.hero .badge.terroir { background: #cfe9d6; color: #1d4f2d; }
.hero .badge.gm { background: var(--hero-accent); color: var(--hero-bg); }

/* ---------- Cartes d'adresses ---------- */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); padding: 0; margin: 0; list-style: none; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--card); border: 1.5px solid var(--grid); box-shadow: var(--shadow); transition: border-color var(--ease);
}
.card:hover { border-color: var(--accent); }
.card h3 { margin: 0; font-size: 26px; line-height: 1.05; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* toute la carte est cliquable */
.card h3 a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.card p { margin: 0; }
.where, .status, .stop { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 15px; line-height: 1.35; }
.where svg, .status svg, .stop svg { margin-top: 1px; color: var(--muted); }
.dist { margin-left: auto; font-weight: 700; color: var(--text); white-space: nowrap; }
.status .open { color: var(--ok); font-weight: 700; }
.status .closed { color: var(--ko); font-weight: 700; }
.status.big { font-size: 19px; align-items: center; margin: 0 0 14px; }

/* ---------- Filtres ---------- */
.finder { scroll-margin-top: 16px; }
.filters {
  display: grid; gap: 12px 14px; margin-bottom: 18px; padding: 16px; border-radius: var(--radius);
  background: var(--card); border: 1.5px solid var(--grid); box-shadow: var(--shadow);
}
@media (min-width: 820px) { .filters { grid-template-columns: 1.4fr 1fr 1fr; } .filters > .more, .filters > .filters-foot, .filters > .geo-msg { grid-column: 1 / -1; } }
.field label, .filters legend { display: block; margin-bottom: 4px; font-weight: 700; font-size: 15px; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--text); font: 400 17px var(--font-body);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.more summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--accent); cursor: pointer; }
.more-count:not(:empty) { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13px; }
.more fieldset { margin: 6px 0 10px; padding: 0; border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--bg); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color var(--ease), border-color var(--ease);
}
.chip span:hover { border-color: var(--accent); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip input:checked + span::before { content: "✓"; margin-right: 6px; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.filters-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.count { margin: 0; font-weight: 700; font-size: 18px; }
.sort { display: flex; flex-wrap: wrap; gap: 8px; }
.geo-msg { margin: 0; color: var(--ko); }
.empty { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1.5px dashed var(--line); }
.more-row { text-align: center; margin: 22px 0 0; }
.no-js-hide { display: none; }

/* ---------- Districts : liste par village ---------- */
.villages { columns: 280px; column-gap: 28px; }
.village { break-inside: avoid; margin: 0 0 18px; }
.village h3 { margin: 0 0 4px; font-size: 24px; }
.village h3 span { color: var(--line); }
.village ul { margin: 0; padding: 0; list-style: none; }
.village li { padding: 3px 0; }

/* ---------- Fiche d'un restaurant ---------- */
.resto { display: grid; gap: 24px 36px; margin-bottom: 36px; }
@media (min-width: 900px) { .resto { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); align-items: start; } }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.hours { width: 100%; max-width: 520px; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.hours th, .hours td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--grid); }
.hours th { font-weight: 600; width: 40%; }
.hours tr:last-child > * { border-bottom: 0; }
.hours tr.today { background: var(--gold-bg); }
.hours tr.today th::after { content: " ●"; color: var(--hero-accent); }
.resto .hint { margin-top: 10px; }
.panel { margin-bottom: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--grid); }
.panel h2 { margin: 0 0 6px; font-size: 24px; }
.panel p { margin: 0 0 6px; }
.panel a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-weight: 700; }
.plain { margin: 0; padding: 0; list-style: none; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ticks li { padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--grid); font-weight: 600; }
.ticks li::before { content: "✓ "; color: var(--ok); }

/* ---------- Saisons ---------- */
.seasons { display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; }
.seasons > li { display: grid; gap: 14px 24px; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--grid); scroll-margin-top: 16px; }
@media (min-width: 760px) { .seasons > li { grid-template-columns: minmax(220px, 320px) 1fr; align-items: center; } }
.seasons h2 { margin: 4px 0 6px; font-size: 34px; }
.seasons p { margin: 0 0 10px; max-width: 62ch; }
.seasons li.now { border: 2px solid var(--hero-accent); background: var(--gold-bg); }
.archive { max-width: 520px; margin: 28px 0 0; }

footer { color: var(--muted); font-size: 14px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--grid); }
footer p { margin: 0 0 6px; max-width: 95ch; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* En-tête réduit sur téléphone (liste) : les filtres apparaissent sans défiler */
@media (max-width: 819px) {
  .hero.compact { padding-bottom: 44px; }
  .hero.compact .topbar { margin-bottom: 12px; }
  .hero.compact .brand-sub, .hero.compact .breadcrumb, .hero.compact .page-text, .hero.compact .eyebrow { display: none; }
  .hero.compact .page-title { font-size: 40px; }
  .hero.compact + main { padding-top: 4px; }
  .filters { padding: 12px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters > :not(.field:nth-child(2)):not(.field:nth-child(3)) { grid-column: 1 / -1; }
  .field select { padding: 0 8px; font-size: 16px; }
  .tabs a { padding: 0 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
