/* =========================================================
   htema — feuille de style
   Palette : terracotta (accent), safran, vert menthe, crème.
   Tout est en propriétés logiques (inline/block) pour l'arabe RTL.
   ========================================================= */

:root {
  --bg: #FBF7F1;
  --surface: #FFFFFF;
  --surface-2: #F3ECE2;
  --surface-3: #EADFD0;
  --ink: #1D1915;
  --ink-2: #5E554C;
  --ink-3: #6F665C;
  --line: #E6DCCF;
  --accent: #C8431F;
  --accent-ink: #FFFFFF;
  --accent-soft: #FBE3DA;
  --saffron: #F2B33D;
  --mint: #1E6B55;
  --mint-soft: #DDEEE7;
  --danger: #B3261E;
  --shadow: 0 1px 2px rgba(40, 25, 10, .06), 0 8px 24px rgba(40, 25, 10, .08);
  --shadow-lg: 0 12px 40px rgba(40, 25, 10, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Bricolage Grotesque", "Readex Pro", system-ui, sans-serif;
  --font-body: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabbar-h: 64px;
  --topbar-h: 60px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120F; --surface: #1F1B17; --surface-2: #2A251F; --surface-3: #352E27;
    --ink: #F5EFE6; --ink-2: #C3B8AB; --ink-3: #A99D90; --line: #3A332B;
    --accent: #FF7B54; --accent-ink: #1D1915; --accent-soft: #3D2219;
    --mint: #6FCFAE; --mint-soft: #17332A; --danger: #FF8A80;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15120F; --surface: #1F1B17; --surface-2: #2A251F; --surface-3: #352E27;
  --ink: #F5EFE6; --ink-2: #C3B8AB; --ink-3: #A99D90; --line: #3A332B;
  --accent: #FF7B54; --accent-ink: #1D1915; --accent-soft: #3D2219;
  --mint: #6FCFAE; --mint-soft: #17332A; --danger: #FF8A80;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
html[dir="rtl"] body { font-family: var(--font-body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-sm { width: 16px; height: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
main:focus { outline: none; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-inner { max-width: 1240px; margin-inline: auto; height: var(--topbar-h); display: flex; align-items: center; gap: 8px; padding-inline: 12px 8px; }
@media (min-width: 768px) { .topbar-inner { padding-inline: 32px; gap: 16px; } }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-height: 44px; }
.logo-mark { width: 30px; height: 30px; }
.logo-word { font: 800 25px/1 var(--font-display); letter-spacing: -.04em; }
.city-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 8px; border: 0; background: var(--surface-2); border-radius: 999px; font-weight: 500; font-size: 15px; margin-inline-start: auto; }
.city-btn .ico { width: 18px; height: 18px; color: var(--accent); }
.city-btn .ico-sm { color: var(--ink-2); }
@media (min-width: 768px) { .city-btn { margin-inline-start: 8px; } }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 999px; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); }
.desk-nav { display: none; }
.desk-only { display: none; }
@media (min-width: 900px) {
  .desk-nav { display: flex; gap: 4px; margin-inline-start: auto; }
  .desk-nav a { text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 500; color: var(--ink-2); }
  .desk-nav a:hover { background: var(--surface-2); color: var(--ink); }
  .desk-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
  .desk-only { display: inline-grid; }
}

/* ---------- Barre d'onglets mobile ---------- */
.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar a[aria-current="page"] .ico { stroke-width: 2.4; }
.tab-count { position: absolute; top: 8px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; }
@media (min-width: 900px) { .tabbar { display: none; } body { padding-bottom: 0; } }
body.has-cta .tabbar { display: none; }
@media (max-width: 899px) { body.has-cta { padding-bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ---------- Accueil ---------- */
.hero { padding-block: 20px 8px; }
.hero h1 { font-size: clamp(30px, 7vw, 56px); font-weight: 800; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
.search-field { margin-top: 16px; width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); color: var(--ink-3); text-align: start; font-size: 16px; }
.search-field .ico { color: var(--ink); }
@media (min-width: 768px) { .search-field { max-width: 560px; } }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 14px 4px; margin-inline: -16px; padding-inline: 16px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .chips { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; scroll-snap-align: start; transition: background .15s, border-color .15s, transform .1s; }
.chip:hover { border-color: var(--ink-3); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .ico { width: 18px; height: 18px; }
.chip-x { padding-inline-end: 10px; background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.chip-x .ico { width: 16px; height: 16px; }

.notice { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--mint-soft); color: var(--ink); font-size: 14px; }
.notice .ico { color: var(--mint); margin-top: 1px; }
.notice strong { font-weight: 600; }
.demo-banner { background: var(--surface-2); }
.demo-banner .ico { color: var(--accent); }
.demo-banner button, .notice a { font-weight: 600; text-decoration: underline; background: none; border: 0; padding: 0; color: inherit; }

/* ---------- Rangées horizontales ---------- */
.row { margin-top: 28px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.row-head h2 { font-size: clamp(21px, 4.6vw, 28px); font-weight: 800; }
.row-head a { flex: none; font-weight: 600; font-size: 15px; color: var(--accent); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.row-head a:hover { text-decoration: underline; }
.row-track-wrap { position: relative; }
.row-track { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; padding-bottom: 6px; scroll-padding-inline: 16px; }
.row-track::-webkit-scrollbar { display: none; }
.row-track > * { scroll-snap-align: start; }
.row-feature .row-track { grid-auto-columns: 88%; }
@media (min-width: 600px) { .row-track { grid-auto-columns: 42%; } .row-feature .row-track { grid-auto-columns: 62%; } }
@media (min-width: 768px) { .row-track { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }
@media (min-width: 1000px) { .row-track { grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; } .row-feature .row-track { grid-auto-columns: calc((100% - 16px) / 2); } .row-feature .card-media { aspect-ratio: 16 / 9; } }
@media (min-width: 1200px) { .row-track { grid-auto-columns: calc((100% - 4 * 16px) / 5); } .row-feature .row-track { grid-auto-columns: calc((100% - 2 * 16px) / 3); } .row-feature .card-media { aspect-ratio: 4 / 3; } }
.row-arrow { display: none; }
@media (hover: hover) and (min-width: 768px) {
  .row-arrow { display: grid; place-items: center; position: absolute; top: 30%; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); z-index: 2; opacity: 0; transition: opacity .2s; }
  .row-arrow.prev { inset-inline-start: -18px; } .row-arrow.next { inset-inline-end: -18px; }
  html[dir="rtl"] .row-arrow .ico { transform: scaleX(-1); }
  .row-track-wrap:hover .row-arrow:not([disabled]) { opacity: 1; }
  .row-arrow[disabled] { display: none; }
}

/* ---------- Cartes ---------- */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card-link { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); }
.card-media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); isolation: isolate; }
.row-feature .card-media { aspect-ratio: 16 / 11; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card-link:hover .card-media img { transform: scale(1.04); }
.card-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,.35)); pointer-events: none; }
.badge { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.94); color: #1D1915; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.badge-last { background: #1D1915; color: #fff; }
.badge-new { background: var(--saffron); color: #1D1915; }
.demo-tag { position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 1; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 6px; }
.card-cat-label { position: absolute; bottom: 10px; inset-inline-end: 10px; z-index: 1; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.fav-btn { position: absolute; top: 6px; inset-inline-end: 6px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; }
.fav-btn span { width: 36px; height: 36px; display: grid; place-items: center; background: rgba(255,255,255,.94); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.18); color: #1D1915; transition: transform .2s var(--ease); }
.fav-btn .ico { width: 20px; height: 20px; }
.fav-btn[aria-pressed="true"] span { color: #D7263D; }
.fav-btn[aria-pressed="true"] .ico { fill: currentColor; }
.fav-btn.pop span { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }
.card-body { padding: 10px 2px 0; display: grid; gap: 2px; }
.card-date { font-size: 13.5px; font-weight: 600; color: var(--accent); }
.card-title { font: 600 17px/1.25 var(--font-body); letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-feature .card-title { font-size: 19px; }
.card-venue { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { font-size: 14.5px; font-weight: 600; margin-top: 2px; }
.card-price.free { color: var(--mint); }

/* Grille */
.grid { display: grid; gap: 22px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid .card-title { font-size: 15.5px; }
@media (min-width: 768px) { .grid .card-title { font-size: 17px; } }

/* Liste */
.list { display: grid; gap: 12px; }
@media (min-width: 900px) { .list { grid-template-columns: 1fr 1fr; gap: 16px; } }
.card-row .card-link { flex-direction: row; gap: 14px; align-items: stretch; background: var(--surface); padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); }
.card-row .card-media { width: 112px; flex: none; aspect-ratio: 1; border-radius: 12px; }
.card-row .card-media::after, .card-row .badge, .card-row .card-cat-label { display: none; }
.card-row .card-body { padding: 2px 40px 2px 0; align-content: center; }
html[dir="rtl"] .card-row .card-body { padding: 2px 0 2px 40px; }
.card-row .fav-btn { top: 8px; inset-inline-end: 8px; }
.card-row .fav-btn span { box-shadow: none; background: var(--surface-2); color: var(--ink); }
.card-row .badge-inline { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ink-2); }

/* ---------- Skeletons ---------- */
.skel { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card .card-media { background: none; }
.skel-line { height: 14px; margin-top: 8px; }

/* ---------- Explorer ---------- */
.page-head { padding-block: 18px 6px; }
.page-head h1 { font-size: clamp(26px, 6vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.page-head p { color: var(--ink-2); margin-top: 4px; }
.toolbar { position: sticky; top: var(--topbar-h); z-index: 20; background: var(--bg); padding-block: 8px; margin-inline: -16px; padding-inline: 16px; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .toolbar { margin-inline: -32px; padding-inline: 32px; } }
.toolbar-row { display: flex; gap: 8px; align-items: center; }
.inline-search { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.inline-search input { flex: 1; border: 0; background: transparent; min-width: 0; height: 42px; outline: none; font-size: 16px; }
.inline-search:focus-within { border-color: var(--ink); }
.inline-search .clear[hidden] { display: none; }
input[type="search"]::-webkit-search-cancel-button { display: none; }
.inline-search .clear { border: 0; background: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.btn-filter { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.btn-filter b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; line-height: 20px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.seg button { min-width: 44px; height: 38px; border: 0; background: transparent; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; color: var(--ink-2); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg .lbl { display: none; }
@media (min-width: 768px) { .seg .lbl { display: inline; } }
.active-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; }
.active-filters:empty { display: none; }
.active-filters::-webkit-scrollbar { display: none; }
.active-filters .chip { min-height: 36px; font-size: 14px; }
.active-filters .chip-reset { background: transparent; border-color: transparent; text-decoration: underline; color: var(--ink-2); min-height: 44px; }
.results-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 14px 12px; font-size: 14px; color: var(--ink-2); }
.results-meta select { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 0 12px; }

/* Carte */
.map-wrap { position: relative; height: calc(100dvh - 390px); min-height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
@media (min-width: 900px) { .map-wrap { height: calc(100vh - var(--topbar-h) - 170px); } }
.map { position: absolute; inset: 0; }
.map-preview { position: absolute; inset-inline: 10px; bottom: 10px; z-index: 500; max-width: 440px; }
.map-preview .card-link { box-shadow: var(--shadow-lg); }
.preview-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.preview-track > * { scroll-snap-align: start; }
.preview-more { display: inline-flex; align-items: center; min-height: 40px; margin-top: 6px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; text-decoration: none; }
.map-preview .close { position: absolute; top: -14px; inset-inline-end: -6px; z-index: 4; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow); }
.pin { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); font: 700 12.5px/1 var(--font-body); padding: 6px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.25); transform: translate(-50%, -50%); display: inline-block; transition: transform .15s; }
.pin.free { border-color: var(--mint); }
.pin.on { background: var(--ink); color: var(--bg); transform: translate(-50%, -50%) scale(1.12); }
.leaflet-div-icon.pin-icon { background: none; border: 0; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--ink-2); }
html[data-theme="dark"] .leaflet-tile-pane, html.auto-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9); }
.leaflet-container { font: inherit; background: var(--surface-2); }

/* ---------- États ---------- */
.empty { text-align: center; padding: 40px 16px; display: grid; justify-items: center; gap: 10px; }
.empty-art { width: 120px; height: 120px; }
.empty h2 { font-size: 22px; }
.empty p { color: var(--ink-2); max-width: 420px; }
.empty .chips { justify-content: center; flex-wrap: wrap; margin: 0; padding: 6px 0 0; }
.error-box { border: 1px solid var(--danger); color: var(--ink); background: var(--surface); border-radius: var(--radius-sm); padding: 16px; display: grid; gap: 10px; }

/* ---------- Boutons ---------- */
#rcount { white-space: nowrap; }
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 600; font-size: 16px; text-decoration: none; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }

/* ---------- Page événement ---------- */
.ev-top { position: relative; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; background: var(--surface-2); }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.ev-top .wrap { position: relative; }
@media (min-width: 900px) {
  .ev-top .wrap { padding-inline: 32px !important; }
  .gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; aspect-ratio: auto; height: min(440px, 52vh); overflow: hidden; border-radius: var(--radius); margin-top: 16px; background: none; }
  .gallery img { min-height: 0; }
  .gallery img:first-child { grid-row: 1 / 3; }
  .gallery-dots { display: none !important; }
  .side-card { align-self: start; }
  .ev-actions { top: 26px; inset-inline: 42px; }
}
.gallery-dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gallery-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); }
.gallery-dots i.on { background: #fff; }
.ev-actions { position: absolute; top: 10px; inset-inline: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.ev-actions > * { pointer-events: auto; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: #1D1915; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.2); text-decoration: none; }
.round-btn[aria-pressed="true"] { color: #D7263D; }
.round-btn[aria-pressed="true"] .ico { fill: currentColor; }
html[dir="rtl"] .round-btn.back .ico { transform: scaleX(-1); }
.ev-layout { display: grid; gap: 24px; padding-top: 18px; }
@media (min-width: 900px) { .ev-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; padding-top: 28px; } }
.ev-kicker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.pill-demo { background: var(--accent-soft); color: var(--ink); }
.ev-title { font-size: clamp(28px, 6.5vw, 46px); font-weight: 800; margin-top: 10px; letter-spacing: -.025em; }
.keyinfo { display: grid; gap: 4px; margin-top: 18px; }
.ki { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ki:last-child { border-bottom: 0; }
.ki-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--accent); }
.ki-main { flex: 1; min-width: 0; }
.ki-label { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.ki-value { font-weight: 600; font-size: 16.5px; }
.ki-sub { color: var(--ink-2); font-size: 14.5px; }
.ki-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.ki-links a, .ki-links button { color: var(--accent); font-weight: 600; font-size: 14.5px; background: none; border: 0; padding: 0; min-height: 36px; text-decoration: none; }
.ki-links a:hover, .ki-links button:hover { text-decoration: underline; }
.section { margin-top: 30px; }
.section h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.prose { color: var(--ink); font-size: 16.5px; line-height: 1.65; max-width: 68ch; }
.prose p + p { margin-top: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mini-map { height: 220px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; background: var(--surface-2); }
.source-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14.5px; }
.org-card { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; background: var(--surface); }
.org-avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 800 18px var(--font-display); color: #fff; }
.side-card { display: none; }
@media (min-width: 900px) {
  .side-card { display: grid; gap: 12px; position: sticky; top: calc(var(--topbar-h) + 20px); padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .side-card .price-big { font: 800 28px/1 var(--font-display); }
}
.sticky-cta { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.sticky-cta .p { flex: none; line-height: 1.2; }
.sticky-cta .p small { display: block; color: var(--ink-2); font-size: 12.5px; }
.sticky-cta .p b { font: 800 19px var(--font-display); }
.sticky-cta .btn { flex: 1; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

/* Lieu / organisateur */
.entity-hero { display: grid; gap: 16px; padding-top: 18px; }
.entity-hero .cover { aspect-ratio: 21 / 9; border-radius: var(--radius); overflow: hidden; }
.entity-hero .cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Feuilles (dialog) ---------- */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(15, 10, 5, .5); backdrop-filter: blur(2px); }
.sheet { border: 0; padding: 0; background: var(--surface); width: 100%; max-width: 100%; margin: auto 0 0 0; border-radius: 22px 22px 0 0; max-height: 88dvh; box-shadow: var(--shadow-lg); }
.sheet[open] { animation: sheetUp .28s var(--ease); display: flex; flex-direction: column; }
.sheet-tall { height: 92dvh; max-height: 92dvh; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 768px) {
  .sheet { margin: auto; max-width: 520px; border-radius: 22px; max-height: 86vh; }
  .sheet-tall { height: auto; max-height: 88vh; }
  .sheet[open] { animation: fadeIn .2s var(--ease); }
}
@keyframes fadeIn { from { opacity: 0; transform: scale(.98); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 20px; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; }
@media (min-width: 768px) { .sheet-grip { display: none; } }
.sheet-body { padding: 16px 20px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn-primary { flex: 1; }
.fgroup { padding-block: 14px; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup > h3 { font: 600 16px var(--font-body); margin-bottom: 10px; }
.fgroup .chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--surface-3); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: inset-inline-start .2s var(--ease); }
.switch:checked { background: var(--mint); }
.switch:checked::after { inset-inline-start: 23px; }
.city-list { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.city-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; min-height: 72px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: start; }
.city-opt b { font: 700 17px var(--font-display); }
.city-opt span { font-size: 13px; color: var(--ink-2); }
.city-opt[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }

/* Calendrier */
.cal { user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head b { font-weight: 600; text-transform: capitalize; }
.cal-head button { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; }
html[dir="rtl"] .cal-head .ico { transform: scaleX(-1); }
.cal-month { font-weight: 600; text-transform: capitalize; margin: 10px 0 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid .dow { font-size: 12px; color: var(--ink-3); padding: 4px 0; font-weight: 600; }
.cal-day { position: relative; height: 44px; border: 0; background: transparent; border-radius: 12px; font-weight: 500; }
.cal-day:hover:not(:disabled) { background: var(--surface-2); }
.cal-day:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.cal-day.in-range { background: var(--accent-soft); border-radius: 0; }
.cal-day.sel { background: var(--ink); color: var(--bg); }
.cal-day .hd { position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--mint); }
.cal-day.sel .hd { background: var(--saffron); }
.cal-note { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); min-height: 20px; }

/* Recherche */
.search-dialog { border: 0; padding: 0; margin: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; background: var(--bg); }
.search-dialog[open] { display: flex; flex-direction: column; animation: fadeIn .18s var(--ease); }
@media (min-width: 768px) { .search-dialog { margin: 8vh auto auto; max-width: 640px; height: auto; max-height: 80vh; border-radius: 22px; box-shadow: var(--shadow-lg); } }
.search-top { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.search-top .inline-search { min-height: 48px; }
.search-body { padding: 8px 16px 24px; overflow-y: auto; }
.search-body h3 { font: 600 13px var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 8px; }
.s-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-decoration: none; min-height: 56px; }
.s-item:hover, .s-item:focus-visible { background: var(--surface-2); }
.s-item img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.s-item b { display: block; font-weight: 600; }
.s-item small { color: var(--ink-2); font-size: 13.5px; }
mark { background: color-mix(in srgb, var(--saffron) 45%, transparent); color: inherit; border-radius: 3px; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 16px; max-width: 640px; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 13.5px; color: var(--ink-2); }
.field input, .field select, .field textarea { min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 13.5px; font-weight: 500; }
.row2 { display: grid; gap: 16px; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.success { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 28px 16px; }

/* ---------- Bandeaux ---------- */
.promo { margin-top: 36px; display: grid; gap: 14px; }
@media (min-width: 768px) { .promo { grid-template-columns: 1fr 1fr; } }
.promo-card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; min-height: 170px; text-decoration: none; }
.promo-card h3 { font-size: 23px; font-weight: 800; max-width: 18ch; }
.promo-card p { max-width: 34ch; font-size: 15px; }
.promo-card .btn { justify-self: start; margin-top: 6px; }
.promo-news { background: var(--ink); color: var(--bg); }
.promo-news .btn { background: var(--saffron); color: #1D1915; }
.promo-org { background: var(--mint-soft); }
.promo-card svg.deco { position: absolute; inset-inline-end: -30px; bottom: -30px; width: 160px; height: 160px; opacity: .25; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 56px; padding: 32px 0 28px; border-top: 1px solid var(--line); background: var(--surface); font-size: 14.5px; color: var(--ink-2); }
.foot-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-grid h3 { font: 600 14px var(--font-body); color: var(--ink); margin-bottom: 8px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-grid a { text-decoration: none; display: inline-block; padding: 6px 0; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-brand p { margin-top: 8px; max-width: 34ch; }
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 768px) { .foot-brand { grid-column: auto; } }
.foot-legal { margin-top: 24px; font-size: 13px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 1000; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.has-cta .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Transition de page */
.view-enter { animation: viewIn .28s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
