/*
Theme Name: Cinquante Ans — Événement Mobile
Theme URI:
Author: Olaf Pavel
Description: Thème mobile élégant pour la soirée 50 ans de Marie — Château de Vaux-le-Vicomte
Version: 1.0
License: GNU General Public License v2 or later
Tags: mobile, event, one-page, dark
*/

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:       #C9A227;
  --gold-light: #E8C96A;
  --gold-dark:  #A07818;
  --rose:       #2D6A4F;
  --plum:       #1B4332;
  --bg:         #E8F5EE;
  --card:       #FFFFFF;
  --card2:      #E8F2EC;
  --fg:         #0D2B1A;
  --muted:      #4A7C5F;
  --forest:     #2D6A4F;
  --forest-dark:#1B4332;
  --forest-light:#52B788;
  --max-w:      430px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Figtree', 'Nunito', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  display: flex;
  justify-content: center;
  min-height: 100vh;
  background: #E8F5EE;
}

#app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-w);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

#page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
#page-content::-webkit-scrollbar { display: none; }

/* ============================================
   BOTTOM NAV
   ============================================ */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(201, 162, 39, 0.18);
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 1000;
  flex-shrink: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

#bottom-nav .nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 8px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: opacity 0.15s;
}

.nav-item .nav-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--gold);
  box-shadow: 0 2px 8px var(--gold);
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-item.active .nav-indicator { opacity: 1; }

.nav-item svg {
  transition: transform 0.2s ease;
}
.nav-item.active svg { transform: scale(1.15); }

.nav-item {
  color: var(--muted);
}
.nav-item.active {
  color: var(--gold);
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
  color: inherit;
  letter-spacing: 0.01em;
  transition: font-weight 0.2s;
}
.nav-item.active .nav-label {
  font-weight: 700;
}

/* ============================================
   PAGE TABS
   ============================================ */
.tab-page { display: none; padding-bottom: 96px; }
.tab-page.active { display: block; }

/* Onglet Ma Table — pas de scroll */
body.noscroll-tab #page-content { overflow: hidden !important; }
body.noscroll-tab #tab-scanner { padding-bottom: 0; overflow: hidden; }
#tab-scanner.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px - env(safe-area-inset-bottom));
  overflow: hidden;
  padding-bottom: 0;
}
#tab-scanner .scanner-plan-wrap {
  flex: 1;
  min-height: 0;
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
}
#tab-scanner .scanner-plan-wrap > div {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 6px 4px;
}
#tab-scanner .scanner-plan-wrap svg {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================
   HOME — HERO
   ============================================ */
.hero {
  position: relative;
  height: 340px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(14,12,10,0.45) 0%,
    rgba(14,12,10,0.55) 45%,
    rgba(14,12,10,0.85) 75%,
    #E8F5EE 100%
  );
}

.status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-time {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.status-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.hero-tag {
  position: absolute;
  z-index: 2;
  top: 44px; left: 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
}

.hero-info {
  position: absolute;
  z-index: 2;
  bottom: 36px; left: 20px; right: 20px;
}

.hero-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.hero-number {
  font-family: 'Barlow Condensed', 'Impact', sans-serif;
  font-weight: 900;
  font-size: 86px;
  line-height: 0.9;
  color: var(--gold);
  letter-spacing: -0.03em;
  text-shadow: 0 0 40px rgba(201,162,39,0.5);
}

.hero-subtitle-stack {
  display: flex;
  flex-direction: column;
}

.hero-subtitle-stack span {
  font-family: 'Barlow Condensed', 'Impact', sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 5.2vw, 28px);
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hero-tagline {
  font-size: 13px;
  font-weight: 500;
  color: rgba(245,240,232,0.7);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.hero-meta {
  display: flex;
  gap: 16px;
  align-items: center;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.hero-meta-item svg { flex-shrink: 0; }

/* ============================================
   SECTION HELPERS
   ============================================ */
.section { padding: 24px 16px 0; }
.section-sm { padding: 12px 16px 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--fg);
}
.section-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
}

/* ============================================
   CARD BASE
   ============================================ */
.card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid rgba(201,162,39,0.1);
}

/* ============================================
   COUNTDOWN
   ============================================ */
.countdown-wrap {
  padding: 0 16px;
  margin-top: 16px;
}

.countdown-card {
  background: var(--card);
  border-radius: 22px;
  padding: 22px 18px;
  border: 1px solid rgba(201,162,39,0.18);
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.countdown-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  text-align: center;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.countdown-cell {
  border-radius: 14px;
  padding: 12px 4px;
  text-align: center;
}

.countdown-cell:nth-child(odd) {
  background: rgba(201,162,39,0.1);
  border: 1px solid rgba(201,162,39,0.2);
}
.countdown-cell:nth-child(even) {
  background: rgba(45,106,79,0.1);
  border: 1px solid rgba(45,106,79,0.2);
}

.countdown-num {
  font-family: 'Barlow Condensed', 'Impact', sans-serif;
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.countdown-unit {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 5px;
}
.countdown-cell:nth-child(odd) .countdown-unit { color: var(--gold); }
.countdown-cell:nth-child(even) .countdown-unit { color: var(--forest); }

/* ============================================
   ACTION GRID
   ============================================ */
.action-grid {
  padding: 14px 16px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-btn {
  border-radius: 18px;
  padding: 18px 16px;
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  display: block;
}

.action-btn-gold {
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: #fff;
}

.action-btn-dark {
  background: var(--card);
  border: 1px solid rgba(201,162,39,0.15);
  color: var(--fg);
}

.action-btn svg { margin-bottom: 10px; display: block; }

.action-btn-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.action-btn-sub {
  font-size: 10px;
  margin-top: 5px;
  font-weight: 600;
  opacity: 0.75;
}

.action-btn-dark .action-btn-sub {
  color: var(--gold);
  opacity: 1;
}

/* ============================================
   MAP CARD
   ============================================ */
.map-card {
  margin: 12px 16px 0;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(201,162,39,0.12);
}

.map-frame-wrap {
  position: relative;
  height: 175px;
}

.map-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  filter: saturate(0.35) brightness(0.55) sepia(0.2);
}

.map-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--card) 100%);
  pointer-events: none;
}

.map-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(201,162,39,0.3);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
}

.map-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
  flex-shrink: 0;
}

.map-footer {
  padding: 12px 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-footer-title { font-size: 13px; font-weight: 700; color: var(--fg); }
.map-footer-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.btn-gold {
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}

.btn-gold-full {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-meta {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.gallery-meta img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(201,162,39,0.2);
}

.gallery-meta-name { font-size: 14px; font-weight: 700; color: var(--fg); margin-bottom: 4px; }
.gallery-meta-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.gallery-meta-card {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(201,162,39,0.1);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.photo-cell {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--card2);
}

.photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-cell-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14,12,10,0.72);
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.photo-cell-overlay-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(201,162,39,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-cell-overlay span {
  font-size: 10px;
  font-weight: 700;
  color: var(--fg);
}

/* ============================================
   PROGRAM
   ============================================ */
.program-badge {
  background: rgba(201,162,39,0.12);
  border-radius: 8px;
  padding: 4px 12px;
  border: 1px solid rgba(201,162,39,0.25);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.program-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.program-item {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(201,162,39,0.08);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
}

.program-item.open {
  border-color: rgba(201,162,39,0.35);
}

.program-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.program-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.program-body { flex: 1; }

.program-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.program-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
}

.program-time {
  font-family: 'Barlow Condensed', 'Impact', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.program-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
  display: none;
}

.program-item.open .program-desc { display: block; }

/* ============================================
   TEXT SECTION
   ============================================ */
.message-card {
  background: linear-gradient(145deg, rgba(201,162,39,0.1), rgba(139,111,158,0.07));
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(201,162,39,0.18);
  margin-bottom: 10px;
}

.message-emoji { font-size: 22px; margin-bottom: 10px; }

.message-text {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.7;
  font-style: italic;
  font-weight: 500;
}

.message-sig {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  margin-top: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px 14px;
  border: 1px solid rgba(201,162,39,0.08);
}

.stat-icon { margin-bottom: 8px; display: block; }

.stat-value {
  font-family: 'Barlow Condensed', 'Impact', sans-serif;
  font-size: 30px;
  font-weight: 900;
  color: var(--fg);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

.info-card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(201,162,39,0.1);
}

.info-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-card p {
  font-size: 12px;
  color: var(--forest);
  margin-bottom: 8px;
  line-height: 1.5;
}

.info-card p:last-child { margin-bottom: 0; }

/* ============================================
   PAGE HEADERS
   ============================================ */
.page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
  padding: 16px 16px 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.page-header h1 {
  font-family: 'Barlow Condensed', 'Impact', sans-serif;
  font-size: 34px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.page-header p {
  font-size: 13px;
  color: var(--muted);
}

/* ============================================
   SCANNER PAGE
   ============================================ */
.scanner-wrap {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 100px;
}

.scanner-title {
  font-family: 'Barlow Condensed', 'Impact', sans-serif;
  font-size: 34px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  text-align: center;
}

.scanner-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 44px;
  text-align: center;
}

.scanner-frame {
  position: relative;
  width: 260px;
  height: 260px;
  margin-bottom: 40px;
}

.scanner-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border-style: solid;
  border-color: var(--gold);
}

.scanner-corner-tl { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 8px 0 0 0; }
.scanner-corner-tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 8px 0 0; }
.scanner-corner-bl { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 8px; }
.scanner-corner-br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 8px 0; }

.scanner-inner {
  position: absolute;
  inset: 16px;
  background: rgba(240,237,232,0.85);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.scanner-line {
  position: absolute;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  box-shadow: 0 0 10px var(--gold);
  animation: scanline 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

@keyframes scanline {
  0%, 100% { top: 20%; }
  50% { top: 80%; }
}

.scanner-icon-text {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.scanner-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(201,162,39,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--gold);
}

.scanner-ok-title { font-size: 13px; font-weight: 700; color: var(--gold); }
.scanner-ok-sub { font-size: 11px; color: var(--muted); }

.btn-scanner {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 16px;
  padding: 16px 48px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.scanner-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ============================================
   ITINERARY PAGE
   ============================================ */
.itin-map-wrap {
  margin: 0 16px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(201,162,39,0.12);
  height: 260px;
  background: var(--card);
}

.itin-map-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: saturate(0.3) brightness(0.55) sepia(0.25);
}

.itin-route-card {
  background: var(--card);
  border-radius: 20px;
  padding: 18px 16px;
  border: 1px solid rgba(201,162,39,0.1);
  margin-bottom: 12px;
}

.itin-route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.itin-route-title { font-size: 14px; font-weight: 700; color: var(--fg); }

.itin-time-badge {
  background: rgba(201,162,39,0.15);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(201,162,39,0.3);
}

.itin-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.itin-step:last-child { margin-bottom: 0; }

.itin-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.itin-step-name { font-size: 13px; font-weight: 600; color: var(--fg); }
.itin-step-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ============================================
   MEDIA PAGE
   ============================================ */
.media-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
  padding: 16px 16px 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.media-count { font-size: 13px; color: var(--muted); margin-top: 4px; }

.media-share {
  background: var(--card);
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(201,162,39,0.12);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.media-cell {
  position: relative;
  aspect-ratio: 1;
  background: var(--card2);
  overflow: hidden;
}

.media-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.media-cell:hover img { transform: scale(1.05); }

.media-like {
  position: absolute;
  bottom: 6px; right: 6px;
  z-index: 2;
  background: rgba(255,255,255,0.75);
  border: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.media-like.liked {
  background: rgba(201,162,39,0.9);
}

/* Protection anti-téléchargement médias */
.media-cell.no-save { cursor: pointer; }
.media-cell.no-save img {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
  -webkit-user-drag: none;
}
.media-cell-guard {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

.media-delete-x {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  background: rgba(192,57,43,0.92);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 2;
  transition: transform 0.15s ease;
}
.media-delete-x:hover { transform: scale(1.12); background: #c0392b; }

.media-add {
  margin: 16px;
  width: calc(100% - 32px);
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 2px dashed rgba(201,162,39,0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

/* ── Selfie bouton ──────────────────────────────────────────── */
.selfie-btn {
  width: 100%;
  background: linear-gradient(135deg, #A07818, #C9A227, #E8C96A);
  border: none;
  border-radius: 16px;
  padding: 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 4px 20px rgba(201,162,39,0.35);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.frame-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.frame-thumb.active { border-color: #C9A227; background: rgba(201,162,39,0.2); }
.frame-thumb-img { padding: 2px; overflow: hidden; background: #1a1a1a; }

/* ============================================
   UTILITIES
   ============================================ */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-fg { color: var(--fg); }

/* ============================================
   LEAFLET MAP OVERRIDES
   ============================================ */
#event-map {
  z-index: 1;
}
.leaflet-container {
  font-family: inherit;
  border-radius: 20px 20px 0 0;
}
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  font-size: 12px;
}

/* ============================================
   CARROUSEL SOUHAITS
   ============================================ */
.wish-count-badge {
  background: rgba(184,137,26,0.12);
  border: 1px solid rgba(184,137,26,0.3);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.wish-carousel-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.wish-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}

.wish-slide {
  flex: 0 0 100%;
  width: 100%;
}

.wish-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--card2);
  overflow: hidden;
}

.wish-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wish-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #1a3a2a;
}

.wish-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--fg);
}

.wish-type-video { background: rgba(0,0,0,0.55); color: #fff; }

.wish-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0,0,0,0.25);
}

.wish-play-icon svg {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.wish-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.wish-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.wish-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 3px;
}

.wish-msg {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
}

.wish-arrow {
  position: absolute;
  top: calc(50% - 30px);
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 10;
  transition: background 0.2s;
}

.wish-arrow:hover { background: #fff; }
.wish-arrow-prev { left: 10px; }
.wish-arrow-next { right: 10px; }

.wish-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.wish-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(184,137,26,0.25);
  transition: all 0.3s;
  cursor: pointer;
}

.wish-dot.active {
  width: 20px;
  border-radius: 3px;
  background: var(--gold);
}

/* ============================================
   PROGRAMME TOGGLE
   ============================================ */

/* Wrapper qui coupe la liste à 2 items en mode fermé */
.program-wrap {
  position: relative;
}

.program-wrap.collapsed .program-list {
  max-height: var(--program-2-height, 160px);
  overflow: hidden;
}

/* Dégradé flottant collé en bas du wrapper */
.program-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-top: 48px;
  background: linear-gradient(to bottom, transparent, var(--bg) 70%);
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.program-fade button { pointer-events: all; }

/* En mode ouvert : pas de dégradé, fade disparaît */
.program-wrap.expanded .program-fade {
  position: relative;
  background: none;
  padding-top: 10px;
}

.program-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1.5px solid rgba(45,106,79,0.3);
  border-radius: 20px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--forest);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.09);
  transition: all 0.2s;
  white-space: nowrap;
}
.program-toggle-btn:hover { background: rgba(45,106,79,0.06); }

/* ============================================
   GOOGLE FONTS LOAD
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=Figtree:wght@400;500;600;700;800&display=swap');
