/* ═══════════════════════════════════════════════
   Puy du Craft – Webapp
   ═══════════════════════════════════════════════ */

:root {
  --bg: #fefbf3;
  --surface: #ffffff;
  --surface-2: #f6f1e4;
  --text: #1a1a1a;
  --muted: #6b665c;
  --line: #e9e2d0;
  --accent: #b81d24;
  --accent-soft: #fbe9e9;
  --gold: #c9960c;
  --gold-bright: #ebb614;
  --bar: #141414;
  --bar-text: #f4efe2;

  --st-open: #2e7d32;
  --st-noces: #cc0000;
  --st-noel: #1e88e5;
  --st-foulee: #8e24aa;
  --st-closed: #b9b3a5;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 4px 14px rgba(40, 30, 10, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 76px;

  --tab-bg: #f7f5f3;
  --tab-line: #e7e1da;
  --tab-ink: #3d2b22;
  --tab-active: #c8102e;
  --tab-active-bg: #fbf1e4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1c1a18;
    --surface-2: #26231f;
    --text: #f1ece0;
    --muted: #a39c8d;
    --line: #34302a;
    --accent: #ff5a5f;
    --accent-soft: #3a1c1d;
    --gold: #ebb614;
    --st-open: #66bb6a;
    --st-noces: #ff5252;
    --st-noel: #64b5f6;
    --st-foulee: #ce93d8;
    --st-closed: #5a554c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --tab-bg: #1f1c19;
    --tab-line: #332e28;
    --tab-ink: #e9e1d4;
    --tab-active: #ff5a5f;
    --tab-active-bg: #3a2722;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ─── Barre du haut ─── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: var(--bar); color: var(--bar-text);
  border-bottom: 2px solid var(--accent);
}
.topbar-logo { width: 36px; height: 36px; border-radius: 9px; background: #fff; padding: 3px; }
.topbar-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.topbar-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; letter-spacing: .04em; color: var(--gold-bright); }
.topbar-sub { font-size: .75rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install-btn {
  border: 1px solid var(--gold-bright); background: transparent; color: var(--gold-bright);
  border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 600;
}

.offline-banner {
  background: #5d4a12; color: #fff3cc; font-size: .8rem; text-align: center; padding: 6px 16px;
}

/* ─── Vues ─── */
main { padding: 0 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px); max-width: 720px; margin: 0 auto; }
.view { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-title {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
  margin: 20px 0 14px; letter-spacing: .02em;
}
.section-title { font-family: var(--font-display); font-size: 1.15rem; margin: 26px 0 10px; }

.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 16px;
}

.btn {
  display: block; width: 100%; padding: 13px 16px; border-radius: 12px;
  font-weight: 600; text-align: center; text-decoration: none; border: 0;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--line); color: var(--text); margin-top: 16px; }

.loader {
  width: 34px; height: 34px; margin: 48px auto; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.error-box { text-align: center; padding: 28px 16px; color: var(--muted); }
.error-box .btn { margin-top: 14px; }

/* ─── Programme ─── */
.day-chips {
  display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 4px;
  scrollbar-width: none;
}
.day-chips::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  min-width: 64px; padding: 8px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); line-height: 1.15;
}
.day-chip .dc-wd { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day-chip .dc-d { font-size: 1.25rem; font-weight: 700; }
.day-chip .dc-m { font-size: .72rem; color: var(--muted); }
.day-chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.day-chip[aria-selected="true"] .dc-wd,
.day-chip[aria-selected="true"] .dc-m { color: rgba(255,255,255,.85); }

.day-hours {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
}
.day-hours-title { font-weight: 700; }
.day-hours-sub { font-size: .85rem; color: var(--muted); }
.day-extra { font-size: .9rem; color: var(--accent); font-weight: 600; margin: -6px 0 14px; }

.next-box { margin-bottom: 18px; border-left: 4px solid var(--gold); }
.next-box h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.next-item { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.next-item + .next-item { border-top: 1px dashed var(--line); }
.next-time { font-weight: 800; font-size: 1.05rem; min-width: 58px; color: var(--accent); font-variant-numeric: tabular-nums; }
.next-name { flex: 1; font-weight: 600; }
.next-in { font-size: .78rem; color: var(--muted); white-space: nowrap; }

.shows-list { display: flex; flex-direction: column; gap: 10px; }
.show {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.badge {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  background: var(--bar); color: var(--gold-bright);
}
.show-body { flex: 1; min-width: 0; }
/* Aperçu rond du spectacle, avec son numéro en pastille */
.show-thumb { position: relative; flex: 0 0 auto; width: 56px; height: 56px; }
.show-thumb img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--surface-2); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--gold); }
.show-thumb .badge { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; font-size: .7rem; box-shadow: 0 0 0 2px var(--surface); }
.show:has(.show-thumb) .show-name { margin-top: 6px; }
.show-name { font-weight: 700; margin: 3px 0 8px; }
.show-status { font-size: .88rem; color: var(--muted); font-style: italic; }
.times { display: flex; flex-wrap: wrap; gap: 6px; }
.time {
  font-size: .88rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); font-variant-numeric: tabular-nums;
}
.time.continuous { font-weight: 600; }
.time.passed { opacity: .45; text-decoration: line-through; }
.time.live { background: var(--st-open); color: #fff; }
.time.soon { background: var(--accent); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.time.state-closed { background: var(--st-closed); color: #fff; }
.time.state-cancelled { background: var(--accent-soft); color: var(--accent); }
@keyframes pulse { 50% { opacity: .7; } }
.show-more { font-size: .78rem; color: var(--accent); margin-top: 8px; font-weight: 600; }

.closed-card { text-align: center; border-top: 5px solid var(--accent); padding: 28px 18px; }
.closed-card h2 { font-family: var(--font-display); color: var(--accent); font-size: 1.35rem; margin: 0 0 14px; }
.countdown { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }
.countdown div { background: var(--surface-2); border-radius: 10px; padding: 8px 4px; min-width: 58px; }
.countdown b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.countdown small { font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.closed-card p { color: var(--muted); margin: 6px 0; }
.closed-card .highlight { color: var(--accent); font-weight: 700; margin-top: 14px; }

/* ─── Statuts ─── */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; color: #fff; background: var(--st-closed);
}
.status-pill.open { background: var(--st-open); }
.status-pill.open_noces { background: var(--st-noces); }
.status-pill.noel { background: var(--st-noel); }
.status-pill.foulee { background: var(--st-foulee); }

.today-card { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.today-card .tc-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.today-card .tc-hours { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.today-card .tc-extra { font-size: .9rem; }
.today-card .tc-note { font-size: .88rem; color: var(--muted); font-style: italic; }

/* ─── Calendrier ─── */
.cal-card { padding: 14px 12px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); font-size: 1.4rem; line-height: 1;
}
.cal-month { text-align: center; }
#cal-month-label { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; display: block; }
.cal-month-event { font-size: .8rem; font-weight: 700; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-weekdays span { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  font-size: .92rem; font-weight: 600; border: 1.5px solid transparent; background: none; padding: 0;
  color: var(--st-closed); font-variant-numeric: tabular-nums;
}
.cal-day.open { color: var(--st-open); border-color: var(--st-open); }
.cal-day.open_noces { color: var(--st-noces); border-color: var(--st-noces); }
.cal-day.noel { color: var(--st-noel); border-color: var(--st-noel); }
.cal-day.foulee { color: var(--st-foulee); border-color: var(--st-foulee); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--gold); }
.cal-day.past { opacity: .4; }
.cal-day svg { width: 70%; height: 70%; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: .78rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--st-closed); display: inline-block; }
.dot.open { border-color: var(--st-open); }
.dot.open_noces { border-color: var(--st-noces); }
.dot.noel { border-color: var(--st-noel); }
.dot.foulee { border-color: var(--st-foulee); }

.upcoming { display: flex; flex-direction: column; gap: 8px; }
.upcoming-more { display: flex; flex-direction: column; gap: 8px; animation: fade .2s ease; }
.upcoming-more[hidden] { display: none; }
.upcoming .upcoming-toggle { margin-top: 2px; padding: 10px 14px; font-size: .92rem; color: var(--accent); }
.up-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.up-date { text-align: center; min-width: 46px; line-height: 1.1; }
.up-date b { display: block; font-size: 1.3rem; }
.up-date small { font-size: .7rem; text-transform: uppercase; color: var(--muted); }
.up-info { flex: 1; min-width: 0; }
.up-info .up-hours { font-weight: 700; font-variant-numeric: tabular-nums; }
.up-info .up-note { font-size: .8rem; color: var(--muted); }
.up-item .status-pill { font-size: .7rem; padding: 3px 8px; }

/* ─── Articles ─── */
.articles { display: flex; flex-direction: column; gap: 14px; }

/* Accueil : carrousel horizontal des actualités */
.news-carousel {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.news-carousel::-webkit-scrollbar { display: none; }
.news-carousel .article-card { flex: 0 0 82%; max-width: 330px; scroll-snap-align: start; display: flex; flex-direction: column; }
.news-carousel .article-card .ac-body { flex: 1; }
.news-carousel .ac-excerpt { -webkit-line-clamp: 2; }
.news-carousel .empty { width: 100%; }
.carousel-more {
  flex: 0 0 42% !important; max-width: 170px !important; justify-content: center; align-items: center; gap: 8px;
  text-decoration: none; color: var(--accent); font-weight: 700; font-size: .95rem; text-align: center; padding: 16px;
}
.carousel-more b { font-size: 2rem; line-height: 1; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.carousel-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.carousel-dots i.on { width: 18px; background: var(--accent); }
.article-card {
  display: block; width: 100%; text-align: left; padding: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.article-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.article-card .ac-body { padding: 14px 16px 16px; }
.ac-meta { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ac-meta .cat { color: var(--accent); font-weight: 700; }
.ac-title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; margin: 6px 0; line-height: 1.3; }
.ac-excerpt { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }

.back-btn { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 16px 0 4px; font-size: 1rem; }
.article-hero { width: calc(100% + 32px); margin: 8px -16px 0; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.article-head h1 { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.25; margin: 16px 0 6px; }
.article-content { font-size: 1.02rem; line-height: 1.65; overflow-wrap: break-word; }
.article-content img, .article-content video, .article-content iframe { max-width: 100%; height: auto; border-radius: 10px; }
.article-content iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.article-content figure { margin: 16px 0; }
.article-content a { color: var(--accent); }
.article-content h2, .article-content h3 { font-family: var(--font-display); line-height: 1.3; }
.article-content table { display: block; overflow-x: auto; border-collapse: collapse; }
.article-content [style*="width"] { max-width: 100% !important; }
.article-content .elementor-button, .article-content .wp-block-button__link {
  display: inline-block; background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 10px; text-decoration: none;
}
.article-source { margin-top: 28px; }

/* ─── Barre d'onglets (style application de parc) ─── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: flex-start;
  background: var(--tab-bg);
  padding: 8px 4px calc(6px + var(--safe-bottom));
  box-shadow: 0 -1px 0 var(--tab-line), 0 -6px 18px rgba(40, 25, 15, .06);
}
.tab {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--tab-ink); text-decoration: none;
  font-size: .78rem; font-weight: 500; letter-spacing: -.01em;
}
.tab-ico {
  width: 56px; height: 40px; border-radius: 20px;
  display: grid; place-items: center; transition: background-color .2s;
}
.tab svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab-label { white-space: nowrap; }
.tab.active { color: var(--tab-active); font-weight: 700; }
.tab.active .tab-ico { background: var(--tab-active-bg); }

/* Bouton central surélevé */
.tab-center .tab-ico {
  width: 70px; height: 70px; border-radius: 50%; margin-top: -30px;
  background: var(--tab-bg); border: 3.5px solid var(--tab-ink);
  box-shadow: 0 4px 12px rgba(40, 25, 15, .12);
}
.tab-center svg { width: 32px; height: 32px; stroke-width: 1.8; }
.tab-center.active .tab-ico { background: var(--tab-bg); border-color: var(--tab-active); }
.tab-center .tab-label { margin-top: 0; }
@media (max-width: 360px) { .tab { font-size: .7rem; } .tab-ico { width: 48px; } }

/* ─── Feuille modale ─── */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 80vh; overflow-y: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; max-width: 720px; margin: 0 auto;
  padding: 8px 20px calc(24px + var(--safe-bottom));
  animation: up .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; border: 0; font-size: 1.5rem; line-height: 1;
  background: rgba(20, 20, 20, .55); color: #fff; backdrop-filter: blur(4px);
}
.sheet-handle { width: 40px; height: 5px; background: var(--line); border-radius: 3px; margin: 4px auto 14px; }
.sheet h3 { font-family: var(--font-display); margin: 0 0 10px; font-size: 1.25rem; }
.sheet .sh-row { margin: 10px 0; }
.sheet .sh-hours { font-size: 1.3rem; font-weight: 800; }
.sheet .btn { margin-top: 18px; }
.sheet .sh-desc { white-space: pre-line; color: var(--muted); }

/* ─── Aide iOS ─── */
.ios-hint {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); z-index: 35;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2); padding: 14px 40px 14px 16px; font-size: .9rem;
}
.ios-hint p { margin: 4px 0 0; }
.ios-hint-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.4rem; color: var(--muted); }
.share-ico { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--st-noel); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 720px) {
  .tabbar { left: 50%; transform: translateX(-50%); max-width: 720px; border-radius: 16px 16px 0 0; }
}

/* ─── Vidéo de démarrage ─── */
.splash {
  position: fixed; inset: 0; z-index: 100; background: #000;
  transition: opacity .45s ease;
}
.splash video { width: 100%; height: 100%; object-fit: cover; display: block; }
.splash.hide { opacity: 0; pointer-events: none; }

/* ─── Blocage ordinateur ─── */
.desktop-block { display: none; }
html.is-desktop .app-shell,
html.is-desktop .splash { display: none !important; }
html.is-desktop .desktop-block {
  display: grid; place-items: center; min-height: 100vh; padding: 24px;
  background: radial-gradient(circle at 50% 30%, #2a211c, #0e0c0b 70%);
}
.db-card {
  background: var(--surface); color: var(--text); border-radius: 22px; padding: 36px 40px;
  max-width: 420px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4);
  border-top: 5px solid var(--accent);
}
.db-logo { border-radius: 18px; background: #fff; padding: 6px; }
.db-card h1 { font-family: var(--font-display); color: var(--accent); margin: 14px 0 8px; }
.db-card p { margin: 8px 0; }
.db-qr { display: grid; place-items: center; margin: 22px auto 10px; }
.db-qr:empty { display: none; }
.db-qr img, .db-qr canvas { background: #fff; padding: 10px; border-radius: 12px; }
.db-hint { font-size: .88rem; color: var(--muted); }
#db-url { font-weight: 700; color: var(--text); word-break: break-all; }

/* ─── Accueil ─── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.see-all { color: var(--accent); font-weight: 600; text-decoration: none; font-size: .9rem; }
.home-cta { margin-top: 12px; }

/* ─── Plan interactif ─── */
body.plan-mode { overflow: hidden; }
body.plan-mode .app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.plan-mode .topbar, body.plan-mode .offline-banner { flex: 0 0 auto; }
body.plan-mode main { flex: 1; min-height: 0; position: relative; padding: 0; max-width: none; width: 100%; }
body.plan-mode .view-plan { position: absolute; inset: 0; animation: none; }
.map-viewport {
  position: absolute; left: 0; right: 0; top: 0; bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  overflow: hidden; background: #8cb85e; touch-action: none; user-select: none; -webkit-user-select: none;
}
.map-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.map-stage img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.map-pins { position: absolute; inset: 0; }
.map-pin {
  position: absolute; width: 38px; height: 48px; padding: 0; border: 0; background: none;
  transform: translate(-50%, -100%) scale(var(--inv, 1)); transform-origin: 50% 100%;
  animation: pin-drop .35s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes pin-drop { from { opacity: 0; margin-top: -14px; } }
.map-pin svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.map-pin .num {
  position: absolute; top: 7px; left: 0; right: 0; text-align: center; color: #fff;
  font: 700 15px/22px var(--font-display); pointer-events: none;
}
.map-pin .num.glyph { font-family: var(--font); font-size: 14px; }
.map-pin.dim { opacity: 0; pointer-events: none; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #8cb85e; }
.map-loading .loader { border-color: rgba(255,255,255,.2); border-top-color: #fff; }

.map-zoom {
  position: absolute; right: 12px; bottom: 110px; z-index: 2; display: flex; flex-direction: column;
  background: var(--tab-bg); border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.25); overflow: hidden;
}
.map-zoom button { width: 42px; height: 42px; border: 0; background: none; font-size: 1.4rem; color: var(--tab-ink); }
.map-zoom button + button { border-top: 1px solid var(--tab-line); }

.map-chips {
  position: absolute; left: 0; right: 0; bottom: 46px; z-index: 2; display: flex; gap: 10px;
  overflow-x: auto; padding: 4px 16px; scrollbar-width: none;
}
.map-chips::-webkit-scrollbar { display: none; }
.map-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; border: 0;
  background: var(--tab-bg); color: var(--tab-ink); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
.map-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.map-chip.active { background: var(--c, var(--tab-active)); color: #fff; }
.map-chip.active i { background: #fff; }
/* « Tout » sélectionné : couleurs inversées du thème (lisible en clair comme en sombre) */
.map-chip.active[data-filter="all"] { background: var(--tab-ink); color: var(--tab-bg); }

.fiche-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.fiche-head .map-pin { position: relative; left: auto !important; top: auto !important; transform: none; animation: none; flex: 0 0 auto; }
.fiche-head h3 { margin: 0; }
.fiche-type { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fiche-times { margin: 4px 0 14px; }
.fiche-times .times { margin-top: 6px; }
.fiche-img { width: calc(100% + 40px); margin: 0 -20px 12px; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.sheet .article-content { font-size: .98rem; }

/* ─── Se connecter ─── */
.ip-card { text-align: center; display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; border-top: 4px solid var(--gold); }
.ip-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ip-value { font-size: 1.45rem; font-weight: 800; font-family: ui-monospace, "SF Mono", Menlo, monospace; margin-bottom: 8px; }

/* ─── Toast ─── */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 30px); transform: translateX(-50%);
  background: var(--bar); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 60;
  animation: fade .2s;
}

/* ─── Fiche spectacle ─── */
#fiche-hero .fiche-img { margin-top: -4px; border-radius: 0; }
.fiche-duration { font-weight: 700; margin: -4px 0 12px; }
.fiche-desc { font-size: 1rem; line-height: 1.6; margin: 0 0 14px; }
.fiche-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 8px; }
.fiche-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fiche-yt-link { display: inline-block; margin: 2px 0 6px; font-size: .88rem; font-weight: 600; color: var(--accent); text-decoration: none; }

/* ─── Actualités créées dans l'admin ─── */
.news-lead { font-size: 1.08rem; font-weight: 600; line-height: 1.5; margin: 4px 0 14px; }
#article-body .fiche-video { margin-top: 18px; }

/* ─── Notifications ─── */
.bell-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(235, 182, 20, .5); background: transparent; color: var(--gold-bright); display: grid; place-items: center; flex: 0 0 auto; }
.bell-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.bell-btn.on { background: var(--gold-bright); color: var(--bar); }
.bell-dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bar); }
.notif-intro { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.notif-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif-row .nr-text { flex: 1; min-width: 0; }
.notif-row small { display: block; color: var(--muted); font-size: .8rem; }
.tgl { position: relative; flex: 0 0 auto; width: 50px; height: 30px; }
.tgl input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.tgl span { position: absolute; inset: 0; border-radius: 15px; background: var(--st-closed); transition: background .2s; }
.tgl span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.tgl input:checked + span { background: var(--st-open); }
.tgl input:checked + span::after { transform: translateX(20px); }
.tgl input:disabled + span { opacity: .45; }
.notif-shows-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 4px; }
.notif-shows-head h4 { margin: 0; font-size: 1rem; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 4px 0; }
.notif-show { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-weight: 600; font-size: .95rem; }
.notif-show span:first-child { flex: 1; }
.notif-warn { background: var(--accent-soft); color: var(--text); border-radius: 12px; padding: 12px 14px; font-size: .9rem; margin-bottom: 12px; }
.remind-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 4px 0 14px; padding: 11px; border-radius: 12px; border: 1.5px solid var(--gold); background: transparent; color: var(--text); font-weight: 700; }
.remind-btn.on { background: var(--gold); color: #1a1a1a; }

/* ─── Image de fond décorative dans la barre du haut (réglée dans l'admin) ─── */
.topbar { isolation: isolate; overflow: hidden; }
.topbar > :not(.decor) { position: relative; z-index: 1; }
.decor { position: absolute; top: 0; right: 0; bottom: 0; z-index: 0; pointer-events: none; width: 65%; }
.decor img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right center;
  opacity: var(--decor-opacity, .2);
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent);
          mask-image: linear-gradient(to left, #000 45%, transparent); }
.decor.size-s { width: 45%; }
.decor.size-l { width: 100%; }
