@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&display=swap');

/* backend-node/public/css/fete.css — hub Fêtes (take-over bleu immersif, FEQ-grade) */

/* ───────────────────────────────────────────────────────────
   ROOT CONTAINER
   No padding-top here — hero gradient fills to the very top
   instead (STEP 3 fix). The hero itself carries top-padding
   so its background covers the topbar offset area.
─────────────────────────────────────────────────────────── */
.ev-fete {
  color: #eef3ff;
  --fete-accent: #0032A0;
  --fete-bright: #6FA8FF;
  --fete-gold: #FFD24D;
  --fete-bg: #0f1b3d;
  --fete-surface: #16245a;
  background: var(--fete-bg);
  min-height: 100vh;
  /* Pull the container up to eat the .main-content padding-top so the
     hero gradient fills flush against the topbar (no dark gap). */
  margin-top: -32px;
  padding-bottom: 80px;
}
.ev-fete[data-theme="fete-canada"] {
  --fete-accent: #C8102E;
  --fete-bright: #FF5A6E;
  --fete-bg: #2a0a12;
  --fete-surface: #4a1620;
}

/* ───────────────────────────────────────────────────────────
   HERO — fills flush to the top, clears topbar with padding
─────────────────────────────────────────────────────────── */
.ev-fete-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  /* top padding = topbar height + recouped 32px margin so content clears the topbar */
  padding: calc(var(--topbar-height, 48px) + 32px + 14px) 18px 22px;
  min-height: calc(var(--topbar-height, 48px) + 120px);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% 10%, #1e57c8 0%, transparent 55%),
    linear-gradient(155deg, #001a5c 0%, var(--fete-accent) 55%, #0a2880 100%);
}

/* ── PHOTO HERO — image + scrim variant ────────────────────────────────────
   When a theme hero image exists, .ev-fete-hero--photo overrides the pure
   gradient with a two-layer background:
     1. A directional scrim — left/bottom deeply dark for white text (AA)
     2. The actual photo — positioned RIGHT so its own "Fête nationale du
        Québec" wordmark stays on the illuminated right side, well away from
        our H1 which sits on the dark left.
   The gradient-only fallback is unaffected.
──────────────────────────────────────────────────────────────────────────── */
.ev-fete-hero--photo {
  background-image:
    linear-gradient(
      105deg,
      rgba(0, 20, 80, .97)  0%,
      rgba(0, 36, 120, .90) 38%,
      rgba(0, 46, 150, .62) 58%,
      rgba(0, 26, 92, .18)  100%
    ),
    var(--fete-hero-img);
  /* Zoom in on the left fleur-de-lys/bokeh art; the image's own wordmark
     (upper-right of the source) is cropped off on narrow viewports so there
     is no text-on-text collision with our white H1 */
  background-size: 180% auto;
  background-position: left center;
  /* Override the pure-gradient rule on the base class */
  background-color: #001a5c;
}

/* On wider screens: cover-size, position right so the blue/white art shows
   on screen but image wordmark is pushed toward or past the right edge */
@media (min-width: 600px) {
  .ev-fete-hero--photo {
    background-image:
      linear-gradient(
        105deg,
        rgba(0, 20, 80, .97)  0%,
        rgba(0, 36, 120, .90) 35%,
        rgba(0, 46, 150, .75) 58%,
        rgba(0, 26, 100, .68) 80%,
        rgba(0, 20, 80, .62)  100%
      ),
      var(--fete-hero-img);
    background-size: cover;
    /* Push image right so the fleur-de-lys art fills the hero left zone
       and the image's own wordmark (upper-right of portrait source) is
       pushed toward/past the right edge of the landscape hero */
    background-position: 110% center;
  }
}

/* Suppress the radial gold glow when a photo is present — not needed */
.ev-fete-hero--photo::after { display: none; }

/* Gold radial glow behind text */
.ev-fete-hero::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 120px;
  background: radial-gradient(ellipse, rgba(255, 210, 77, .12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ev-fete[data-theme="fete-canada"] .ev-fete-hero::after {
  background: radial-gradient(ellipse, rgba(255, 90, 110, .12) 0%, transparent 70%);
}

/* Watermark */
.ev-fete-hero__watermark {
  position: absolute;
  right: -30px;
  top: -20px;
  width: 200px;
  height: 200px;
  color: var(--fete-gold);
  opacity: .22;
  z-index: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 1px rgba(255, 210, 77, .4));
  line-height: 1;
  font-size: 160px;
}
.ev-fete-hero__watermark svg { display: block; width: 200px; height: 200px; }
.ev-fete[data-theme="fete-canada"] .ev-fete-hero__watermark { color: inherit; filter: none; }

.ev-fete-back {
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  flex-shrink: 0;
}

.ev-fete-emblem {
  font-size: 30px;
  z-index: 1;
  flex-shrink: 0;
}
.ev-fete-emblem--svg {
  color: var(--fete-gold);
  filter: drop-shadow(0 0 10px rgba(255, 210, 77, .55));
  display: flex;
  align-items: center;
}
.ev-fete-emblem--svg svg { display: block; }

.ev-fete-hero-txt { z-index: 1; flex: 1; min-width: 0; }

.ev-fete-eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fete-gold);
  margin-bottom: 4px;
  opacity: .9;
}
.ev-fete[data-theme="fete-canada"] .ev-fete-eyebrow { color: var(--fete-bright); }

.ev-fete-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0 0 6px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5), 0 0 40px rgba(0, 50, 160, .4);
  line-height: 1.15;
}

.ev-fete-flourish {
  display: block;
  width: 54px;
  height: 2px;
  margin: 0 0 8px;
  background: linear-gradient(90deg, var(--fete-gold), transparent);
  border-radius: 2px;
  opacity: .8;
}
.ev-fete[data-theme="fete-canada"] .ev-fete-flourish {
  background: linear-gradient(90deg, var(--fete-bright), transparent);
}

.ev-fete-dates {
  margin: 0;
  font-size: .85rem;
  color: #c8d8ff;
  font-weight: 500;
  letter-spacing: .3px;
}

/* ───────────────────────────────────────────────────────────
   DAY BAR
─────────────────────────────────────────────────────────── */
.ev-fete-days {
  display: flex;
  gap: 8px;
  padding: 10px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--fete-bg);
}
.ev-fete-days::-webkit-scrollbar { display: none; }
.ev-fete-day {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: transparent;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
  font-size: .85rem;
}
.ev-fete-day.is-active {
  background: #fff;
  color: var(--fete-accent);
  border-color: #fff;
  font-weight: 800;
}

/* ───────────────────────────────────────────────────────────
   TABS — segmented pill
─────────────────────────────────────────────────────────── */
.ev-fete-tabwrap {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(15, 27, 61, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ev-fete-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 24px;
}
.ev-fete-tab {
  flex: 1;
  min-height: 40px;
  border-radius: 20px;
  border: 0;
  background: none;
  color: inherit;
  opacity: .7;
  cursor: pointer;
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
  padding: 0 8px;
  transition: background .15s, color .15s, opacity .15s;
}
.ev-fete-tab.is-active {
  background: #fff;
  color: var(--fete-accent);
  opacity: 1;
  font-weight: 800;
}

/* ───────────────────────────────────────────────────────────
   PANEL & SHARED UTILITIES
─────────────────────────────────────────────────────────── */
.ev-fete-panel { padding: 16px; }
.ev-fete-empty { opacity: .55; text-align: center; padding: 32px 0; margin: 0; }

/* FEQ-style section header — small, uppercase, accent color */
.ev-fete-subh {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--fete-bright);
  opacity: .85;
  margin: 20px 0 8px;
  padding-left: 2px;
}
.ev-fete-subh--affiche { margin-top: 22px; }
.ev-fete-subh--carte { margin-top: 24px; }

/* ───────────────────────────────────────────────────────────
   SHARED CHIPS — FEQ-grade pill badges
─────────────────────────────────────────────────────────── */
.ev-fete-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .10);
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.ev-fete-chip--act {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .18);
  cursor: default;
}
.ev-fete-chip--free {
  background: rgba(74, 222, 128, .18);
  color: #4ade80;
  border-color: rgba(74, 222, 128, .25);
  cursor: default;
}
.ev-fete-chip.is-active {
  background: var(--fete-accent);
  border-color: var(--fete-accent);
  color: #fff;
}
.ev-fete-chip--drop { font-weight: 800; cursor: pointer; }

/* ───────────────────────────────────────────────────────────
   TIME MARKERS — en cours / bientot
─────────────────────────────────────────────────────────── */
.ev-fete-marker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}
.ev-fete-marker--live {
  background: rgba(248, 113, 113, .18);
  color: #f87171;
}
.ev-fete-marker--soon {
  background: rgba(111, 168, 255, .18);
  color: var(--fete-bright);
}

/* ───────────────────────────────────────────────────────────
   SHARED EVENT ROW — FEQ-grade
   time gutter | title + meta line | chips
─────────────────────────────────────────────────────────── */
.ev-fete-timeline {
  display: flex;
  flex-direction: column;
  /* no gap — rows separated by border-top for FEQ feel */
}

.ev-fete-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, .06);
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
  border-left: 3px solid var(--fete-bright);
  padding: 11px 13px 11px 12px;
  color: inherit;
  cursor: pointer;
  transition: background .12s;
}
.ev-fete-row:first-child { border-top: none; border-radius: 10px 10px 0 0; }
.ev-fete-row:last-child { border-radius: 0 0 10px 10px; }
.ev-fete-row:first-child:last-child { border-radius: 10px; }
.ev-fete-row:active { background: rgba(255, 255, 255, .12); }

.ev-fete-row__time {
  font-size: .85rem;
  font-weight: 800;
  color: var(--fete-bright);
  min-width: 42px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.ev-fete-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ev-fete-row__titleline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.ev-fete-row__title {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ev-fete-row__meta {
  font-size: .72rem;
  opacity: .7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-fete-row__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

/* ───────────────────────────────────────────────────────────
   Onglet 1 — A l'affiche
─────────────────────────────────────────────────────────── */
.ev-fete-headliner {
  background:
    radial-gradient(120% 90% at 80% 10%, #1e57c8 0%, transparent 55%),
    linear-gradient(135deg, #001a5c, var(--fete-accent));
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  padding: 0;
  color: #fff;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* When cover_image_url is available, class --poster uses it via inline style */
.ev-fete-headliner--poster {
  background-size: cover;
  background-position: left center;
}

.ev-fete-headliner__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 18, 60, .88) 0%, rgba(0, 18, 60, .35) 55%, transparent 100%);
  z-index: 0;
  border-radius: 18px;
}

.ev-fete-headliner__body {
  position: relative;
  z-index: 1;
  padding: 18px;
}

.ev-fete-headliner__tag {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--fete-gold);
  margin-bottom: 8px;
}

.ev-fete-headliner__title {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
}

.ev-fete-headliner__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  opacity: .9;
  margin-bottom: 10px;
}

.ev-fete-headliner__time {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--fete-bright);
}

.ev-fete-headliner__venue::before { content: '\00B7'; margin-right: 6px; opacity: .6; }

.ev-fete-headliner__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* ───────────────────────────────────────────────────────────
   Onglet 2 — Par quartier
─────────────────────────────────────────────────────────── */
.ev-fete-hoodgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* FEQ-style hood tiles: photo + dark scrim + bottom text overlay */
.ev-fete-hoodcard {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 120px;
  background: var(--fete-surface) center/cover no-repeat;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  text-align: left;
  color: #fff;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.ev-fete-hoodcard:active { transform: scale(.97); }

.ev-fete-hoodcard__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .18) 55%, transparent 100%);
  border-radius: 14px;
}

.ev-fete-hoodcard__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 10px 10px;
}

.ev-fete-hoodcard__kicker {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fete-bright);
  opacity: .85;
  margin-bottom: 2px;
}

.ev-fete-hoodcard__name {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
  margin-bottom: 3px;
}

.ev-fete-hoodcard__meta {
  font-size: .7rem;
  opacity: .8;
}

/* Hood detail — back button + header */
.ev-fete-hoodback {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  color: var(--fete-bright);
  font-size: .9rem;
  cursor: pointer;
  padding: 4px 0 14px;
  font-weight: 700;
}

.ev-fete-hoodhdr {
  margin-bottom: 16px;
}

.ev-fete-hoodhdr__kicker {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--fete-bright);
  opacity: .85;
  margin: 0 0 4px;
}

.ev-fete-hoodhdr__name {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
}

.ev-fete-hoodhdr__desc {
  font-size: .82rem;
  opacity: .75;
  margin: 0;
  line-height: 1.45;
}

/* ───────────────────────────────────────────────────────────
   Onglet 3 — Carte + filtres + liste groupée
─────────────────────────────────────────────────────────── */
.ev-fete-scrollwrap { position: relative; }

.ev-fete-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 10px;
}
.ev-fete-filters::-webkit-scrollbar { display: none; }

.ev-fete-scrollhint {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 10px;
  width: 32px;
  display: none;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--fete-bg) 70%);
  color: var(--fete-bright);
}
.ev-fete-scrollwrap--overflow .ev-fete-scrollhint { display: flex; }

/* Hood dropdown panel */
.ev-fete-hooddrop {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 12px;
}

.ev-fete-map {
  height: 48vh;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  isolation: isolate;
}

.ev-fete-cartelist { margin-top: 8px; }

/* ───────────────────────────────────────────────────────────
   Reduced motion + breakpoints
─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ev-fete * { animation: none !important; transition: none !important; }
}
@media (max-width: 360px) {
  .ev-fete-hoodgrid { grid-template-columns: 1fr; }
}
@media (min-width: 600px) {
  .ev-fete-hoodgrid { grid-template-columns: repeat(3, 1fr); }
  .ev-fete-headliner__title { font-size: 1.55rem; }
}
