/* Styles de winter.kaldo.ch (même structure que les autres sites kaldo.ch, palette d'hiver). */
:root {
  color-scheme: light;
  --bg: #f2f5f8;
  --card: #ffffff;
  --text: #13233a;
  --muted: #4f5d70;          /* 6:1 sur blanc */
  --grid: #e3e9ef;
  --line: #c6d1dc;
  --accent: #1f5f99;         /* bleu hiver, 6:1 sur blanc */
  --accent-soft: rgba(31, 95, 153, .1);
  --on-accent: #ffffff;
  --focus: #1f5f99;
  --market: #a3241c;   --market-bg: #fbe3e0;   /* rouge de Noël */
  --rink: #1f5f99;     --rink-bg: #dfecf8;
  --now: #1d6b35;      --now-bg: #def2e3;
  --soon: #7a5200;     --soon-bg: #fbefd2;
  --past: #5b6573;     --past-bg: #e7ebef;
  --hero-bg: #0e2338;
  --hero-text: #ffffff;
  --hero-muted: #b9c8d8;
  --hero-accent: #9fd3f2;    /* glace */
  --gold: #e9b949;
  --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(14, 35, 56, .06), 0 4px 16px rgba(14, 35, 56, .06);
  --ease: 180ms ease-out;
}
/* Thème sombre : activé par le bouton de l'en-tête (le thème clair est celui par défaut) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1420;
  --card: #13202f;
  --text: #e6eef6;
  --muted: #a3b3c4;
  --grid: #1f2e3e;
  --line: #3a4d61;
  --accent: #8cc4f0;
  --accent-soft: rgba(140, 196, 240, .14);
  --on-accent: #0a1420;
  --focus: #8cc4f0;
  --market: #ff9d93;   --market-bg: rgba(255, 157, 147, .14);
  --rink: #8cc4f0;     --rink-bg: rgba(140, 196, 240, .14);
  --now: #8fdca2;      --now-bg: rgba(143, 220, 162, .14);
  --soon: #f0c36a;     --soon-bg: rgba(240, 195, 106, .14);
  --past: #b2bdc8;     --past-bg: rgba(178, 189, 200, .12);
  --hero-bg: #071322;
}
* { box-sizing: border-box; }
/* L'attribut hidden doit l'emporter sur les display des composants (cartes filtrées, messages) */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 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; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- En-tête ---------- */
.hero {
  background:
    radial-gradient(520px 300px at 90% 0%, rgba(233, 185, 73, .22), transparent 65%),
    radial-gradient(700px 380px at 5% 110%, rgba(124, 196, 239, .25), transparent 70%),
    var(--hero-bg);
  color: var(--hero-text);
  position: relative;
  padding: 20px 0 72px;
}
/* Vague en bas de l'en-tête : signature commune aux sites kaldo.ch, crête couleur glace */
.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: 22px; }
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.brand h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); }
.brand p { margin: 0; color: var(--hero-muted); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1.5px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 0; gap: 0; }
.lang a {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  border-radius: 999px; color: var(--hero-text); text-decoration: none; font-weight: 700; font-size: 14px;
  transition: background-color var(--ease), color var(--ease);
}
.lang a:hover { background: rgba(255, 255, 255, .12); }
.lang a[aria-current="page"] { background: var(--hero-text); color: #0e2338; }
.credit {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--hero-accent); border-radius: 999px;
  color: var(--hero-text); text-decoration: none; font-size: 15px;
  transition: background-color var(--ease), color var(--ease);
}
.credit strong { color: var(--hero-accent); transition: color var(--ease); }
.credit:hover, .credit:focus-visible { background: var(--hero-accent); color: #0e2338; }
.credit:hover strong, .credit:focus-visible strong { color: #0e2338; }
.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); }
.hero-grid { display: grid; gap: 24px 48px; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); } }
.hero-text { margin: 10px 0 0; font-size: clamp(18px, 2.4vw, 21px); max-width: 60ch; }
.hero-meta { margin: 10px 0 0; color: var(--hero-muted); font-size: 15px; }

/* ---------- Contenu ---------- */
main { padding: 20px 0 48px; }
.intro { margin: 0 0 20px; max-width: 75ch; color: var(--muted); }
section.block { margin-bottom: 28px; }
section.block > h2, .map-card > h2 { margin: 0 0 4px; font-size: 32px; }
.hint { margin: 0 0 14px; color: var(--muted); font-size: 15px; max-width: 75ch; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin-bottom: 28px; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card > h2 { margin: 0 0 10px; font-size: 26px; }
.no-data { margin: 14px 0 0; font-size: 18px; font-weight: 600; }

/* Règles, contrôle */
.rules { margin: 0; padding-left: 20px; }
.rules li { margin: 0 0 6px; }
.source { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.card p { max-width: 75ch; }
.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none;
}
.button:hover { filter: brightness(1.1); }

/* FAQ */
.faq details { border-top: 1px solid var(--grid); }
.faq details:first-of-type { border-top: 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 10px 0;
  cursor: pointer; list-style: none; font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(45deg); transition: transform var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 0 0 14px; max-width: 75ch; }

.info { border-left: 4px solid var(--accent); }
.info h2 { margin: 0 0 6px; font-size: 26px; }
.info p { margin: 0; }
footer { color: var(--muted); font-size: 14px; margin-top: 24px; }
footer p { margin: 0 0 6px; }

/* États de chargement */
.skeleton { display: block; height: 1em; border-radius: 6px; background: var(--grid); animation: pulse 1.4s ease-in-out infinite; }
.hero .skeleton { background: rgba(255, 255, 255, .12); }
@keyframes pulse { 50% { opacity: .5; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Ma position */
.locate-btn {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 4px;
  background: #fff; color: #1d281f; cursor: pointer;
}
.locate-btn:hover { background: #f4f4f4; }
.locate-btn[aria-pressed="true"] { color: #1d6fd1; }
.me-dot { fill: #1d6fd1; fill-opacity: 1; stroke: #fff; stroke-width: 3; }
.me-halo { fill: #1d6fd1; fill-opacity: .12; stroke: #1d6fd1; stroke-opacity: .5; stroke-width: 1; }
.me-title { color: #1d6fd1; }
.map-toast {
  position: absolute; left: 50%; bottom: 28px; z-index: 1000; translate: -50% 0; max-width: calc(100% - 32px); margin: 0;
  padding: 8px 14px; border-radius: 10px; background: rgba(20, 38, 25, .92); color: #fff; font-size: 14px; text-align: center;
}

/* ---------- Onglets (comme lacs.kaldo.ch) ---------- */
.topbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.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: #0e2338; }
.brand-link { min-height: 44px; color: var(--hero-text); text-decoration: none; }
.brand h1, .brand .brand-title { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 5vw, 42px); line-height: 1; letter-spacing: .02em; font-weight: 400; }

/* ---------- En-tête des pages ---------- */
.page-title { margin: 0; font-size: clamp(44px, 8vw, 76px); line-height: .95; }
.page-text { margin: 10px 0 0; font-size: clamp(18px, 2.4vw, 21px); max-width: 60ch; }
.hero-count { display: inline-block; margin: 14px 0 0; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 600; }
.weekend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.weekend a {
  display: block; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  color: var(--hero-text); text-decoration: none; transition: background-color var(--ease);
}
.weekend a:hover { background: rgba(255, 255, 255, .14); }
.weekend strong { display: block; font-size: 17px; }
.weekend span { color: var(--hero-muted); font-size: 14px; }
.weekend .kind { color: var(--gold); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Thèmes (accueil) ---------- */
.themes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 28px; }
.theme { display: block; padding: 20px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); color: var(--text); text-decoration: none; border-top: 5px solid var(--line); transition: transform var(--ease); }
.theme:hover { transform: translateY(-2px); }
.theme.kind-market { border-top-color: var(--market); }
.theme.kind-rink { border-top-color: var(--rink); }
.theme h3 { margin: 0 0 6px; font-size: 30px; }
.theme p { margin: 0; color: var(--muted); }
.theme .more { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 700; }

/* ---------- Liste des lieux ---------- */
.place-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.place { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border-top: 5px solid var(--line); scroll-margin-top: 16px; }
.place.kind-market { border-top-color: var(--market); }
.place.kind-rink { border-top-color: var(--rink); }
.place.is-past { opacity: .7; }
.place h3 { margin: 0; font-size: 26px; }
.place h3 a { color: inherit; text-decoration: none; }
/* Toute la carte mène à la fiche (lien étendu) ; les autres liens de la carte restent au-dessus */
.place { position: relative; transition: box-shadow var(--ease), transform var(--ease); }
.place h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.place .links a { position: relative; z-index: 1; }
.place:hover { box-shadow: 0 2px 4px rgba(14, 35, 56, .08), 0 10px 28px rgba(14, 35, 56, .12); transform: translateY(-2px); }
.place:hover h3 a { color: var(--accent); text-decoration: underline; }
.place:has(h3 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.place h3 a:focus-visible { outline: none; }
.where { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.periods { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.periods li { display: flex; flex-direction: column; font-size: 15px; }
.periods span { color: var(--muted); }
.note, .lead { margin: 4px 0 0; font-size: 15px; }
.lead { font-size: 18px; max-width: 70ch; }
.tbc { align-self: flex-start; margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--soon-bg); color: var(--soon); font-size: 13px; font-weight: 700; }
.status { align-self: flex-start; margin: 0; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status.st-now, .status.st-today { background: var(--now-bg); color: var(--now); }
.status.st-weekend, .status.st-before { background: var(--soon-bg); color: var(--soon); }
.status.st-upcoming, .status.st-season { background: var(--accent-soft); color: var(--accent); }
.status.st-past, .status.st-over, .status.st-closed { background: var(--past-bg); color: var(--past); }
.season, .hours { margin: 4px 0 0; font-size: 15px; }
.prices { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; }
.links { margin: auto 0 0; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-weight: 700; }
.checked { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* Filtres */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin-bottom: 14px; }
.filter { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
.filter legend { padding: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--text); font: 600 15px var(--font-body); cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.chips button:hover { border-color: var(--accent); }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.nothing { font-weight: 600; }

/* Carte */
.map { height: clamp(360px, 55vh, 560px); border-radius: 14px; overflow: hidden; background: var(--grid); z-index: 0; }
.canton-outline { stroke: #13233a; stroke-dasharray: 6 4; fill: none; }
.leaflet-container { font: 14px/1.45 var(--font-body); }
.pin { stroke: #fff; stroke-width: 2.5; fill-opacity: .95; }
.pin-market { fill: #c0392b; }
.pin-rink { fill: #1f6fb5; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.key::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.key-market::before { background: #c0392b; }
.key-rink::before { background: #1f6fb5; }
.popup-title { display: block; font-weight: 700; font-size: 15px; }

/* Fiche */
.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); }
.sheet h2 { margin: 18px 0 6px; font-size: 26px; }
.sheet .periods li { font-size: 17px; }
.sheet .button { margin-right: 6px; }
.sheet-grid { display: grid; gap: 14px; }
@media (min-width: 860px) { .sheet-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.sheet-grid .map { height: 360px; }
.hero-count a { color: inherit; text-decoration: none; }
.hero-count a:hover { text-decoration: underline; }

/* Photos d'en-tête (décoratives, le texte n'en dépend pas), sous un voile qui garde le texte lisible :
   accueil, marchés de Noël et patinoires */
.hero.hero-photo {
  background:
    var(--hero-veil),
    var(--hero-img) var(--hero-pos, center 40%) / cover no-repeat,
    var(--hero-bg);
  --hero-veil: linear-gradient(rgba(14, 35, 56, .84), rgba(14, 35, 56, .84));
}
.hero-photo-home { --hero-img: url("/img/hero-hiver-800.webp"); }
.hero-photo-rinks { --hero-img: url("/img/hero-patinoire-800.webp"); --hero-pos: center 55%; }
.hero-photo-markets { --hero-img: url("/img/hero-marche-800.webp"); --hero-pos: center 60%; }
@media (min-width: 801px) {
  .hero.hero-photo { --hero-veil: linear-gradient(90deg, rgba(14, 35, 56, .92) 0%, rgba(14, 35, 56, .78) 50%, rgba(14, 35, 56, .58) 100%); }
  .hero-photo-home { --hero-img: url("/img/hero-hiver-1440.webp"); }
  .hero-photo-rinks { --hero-img: url("/img/hero-patinoire-1440.webp"); }
  .hero-photo-markets { --hero-img: url("/img/hero-marche-1440.webp"); }
}
