/* ============================================================
   Event Hub — Dimension UI  (Phase A)
   Category grammar, entry animations, dimension layout
   All specs from dimension-event-site.md design bible
   ============================================================ */

/* ── Overlay shell ─────────────────────────────────────────── */
.ev-dimension-overlay {
  position: fixed; inset: 0; z-index: 10000;
  overflow-y: auto; overflow-x: hidden;
  opacity: 0; transform: scale(1.02);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.ev-dimension-overlay.ev-dim--entering,
.ev-dimension-overlay.ev-dim--open {
  opacity: 1; transform: scale(1); pointer-events: all;
}
.ev-dimension-overlay.ev-dim--exiting {
  opacity: 0; transform: scale(1.02); pointer-events: none;
}

/* ── Entry veil (covers screen, fades at category speed) ───── */
.ev-dim-veil {
  position: fixed; inset: 0; z-index: 10001;
  background: #050505;
  opacity: 1;
  transition: opacity var(--dim-entry-speed, 700ms) ease;
  pointer-events: none;
}
.ev-dim-veil.ev-dim-veil--gone { opacity: 0; }

/* ── Layout skeleton ───────────────────────────────────────── */
.ev-dim-inner {
  min-height: 100vh;
  padding: 64px 24px 80px;
  position: relative;
  overflow: hidden;
}

.ev-dim-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.35;
  margin-bottom: 14px;
  font-family: 'Space Mono', monospace;
}

.ev-dim-title {
  line-height: 0.88;
  margin: 0;
  word-break: break-word;
}

.ev-dim-portal-line {
  margin-top: 20px;
  margin-bottom: 36px;
  line-height: 1.5;
}

.ev-dim-details {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.ev-dim-presence {
  font-size: 12px;
  opacity: 0.45;
  margin-top: 28px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.06em;
}

/* ── Close button (fixed, top-left) ────────────────────────── */
.ev-dim-close {
  position: fixed;
  top: 16px; left: 16px;
  z-index: 10002;
  background: rgba(0,0,0,0.35);
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: inherit;
  font-size: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s;
}
.ev-dim-close:hover { background: rgba(0,0,0,0.55); }

/* ── Phase badge ────────────────────────────────────────────── */
.ev-dim-phase {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-family: 'Space Mono', monospace;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 32px;
}
.ev-dim-phase--pre  { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.45); }
.ev-dim-phase--live { background: rgba(255,59,48,0.18); color: #FF3B30; border: 1px solid rgba(255,59,48,0.35); }
.ev-dim-phase--live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #FF3B30;
  animation: dim-live-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
.ev-dim-phase--post { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.28); }

@keyframes dim-live-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.75); }
}

/* ── "Enter the Dimension" button in modal footer ───────────── */
.ev-btn-dimension {
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.05);
  color: inherit;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ev-btn-dimension:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}
.ev-btn-dimension-icon {
  font-size: 15px;
  opacity: 0.7;
}


/* ============================================================
   CATEGORY GRAMMAR — Per-slug dimension specs
   Source: dimension-event-site.md §4
   ============================================================ */

/* ── ART / CULTURE ─────────────────────────────────────────── */
.dim--art-culture {
  background: #F4EFE9;
  color: #1C1C1C;
  --dim-accent: #7B6B8D;
  --dim-entry-speed: 1100ms;
}
.dim--art-culture .ev-dim-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 10vw, 108px);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #1C1C1C;
}
.dim--art-culture .ev-dim-portal-line {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  font-weight: 300;
  color: #7B6B8D;
}
.dim--art-culture .ev-dim-label   { color: rgba(28,28,28,0.35); opacity: 1; }
.dim--art-culture .ev-dim-close   { color: #1C1C1C; background: rgba(0,0,0,0.07); }
.dim--art-culture .ev-dim-close:hover { background: rgba(0,0,0,0.14); }
.dim--art-culture .ev-dim-details { color: #3A3A3A; font-family: 'Cormorant Garamond', serif; font-size: 16px; }
.dim--art-culture .ev-dim-phase--pre  { background: rgba(0,0,0,0.06); color: rgba(28,28,28,0.45); }
.dim--art-culture .ev-dim-phase--post { background: rgba(0,0,0,0.04); color: rgba(28,28,28,0.28); }
.dim--art-culture .ev-dim-presence    { color: #3A3A3A; }
.dim--art-culture .ev-btn-dimension   { border-color: rgba(0,0,0,0.12); background: rgba(0,0,0,0.04); color: #1C1C1C; }
.dim--art-culture .ev-btn-dimension:hover { background: rgba(0,0,0,0.08); }


/* ── BAR / NIGHTLIFE ────────────────────────────────────────── */
.dim--bar-nightlife {
  background: #05050E;
  color: #E5E5FF;
  --dim-accent: #FF3366;
  --dim-entry-speed: 900ms;
}
.dim--bar-nightlife .ev-dim-inner::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 55%, rgba(157,78,221,0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 15%, rgba(255,51,102,0.07) 0%, transparent 50%);
  pointer-events: none;
}
.dim--bar-nightlife .ev-dim-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 12vw, 130px);
  letter-spacing: 0.06em;
  color: #FF3366;
  text-shadow: 0 0 50px rgba(255,51,102,0.25);
}
.dim--bar-nightlife .ev-dim-portal-line {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #9D4EDD;
}
.dim--bar-nightlife .ev-dim-details { color: rgba(229,229,255,0.65); font-family: 'Space Mono', monospace; font-size: 12px; }

@keyframes dim-bar-breathe {
  0%,100% { opacity: 0.92; }
  50%     { opacity: 1; }
}
.dim--bar-nightlife .ev-dim-inner { animation: dim-bar-breathe 4s ease-in-out infinite; }


/* ── MUSIQUE / CONCERT ──────────────────────────────────────── */
.dim--musique-concert {
  background: #070707;
  color: #E5E5DC;
  --dim-accent: #FF4500;
  --dim-entry-speed: 700ms;
}
.dim--musique-concert .ev-dim-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 1px; height: 100%;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(255,69,0,0.45) 35%,
    rgba(255,69,0,0.45) 65%,
    transparent 100%);
  pointer-events: none;
}
.dim--musique-concert .ev-dim-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(44px, 9vw, 100px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  animation: dim-vibrate 3.5s ease-in-out infinite;
}
.dim--musique-concert .ev-dim-portal-line {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #FF4500;
}
.dim--musique-concert .ev-dim-details {
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: rgba(229,229,220,0.65);
}

@keyframes dim-vibrate {
  0%,88%,100% { transform: translateX(0); }
  90%  { transform: translateX(-2.5px); }
  92%  { transform: translateX(2.5px); }
  94%  { transform: translateX(-1.5px); }
  96%  { transform: translateX(1.5px); }
}


/* ── FESTIVAL ───────────────────────────────────────────────── */
.dim--festival {
  background: #150A02;
  color: #FFF6EE;
  --dim-accent: #FF6B35;
  --dim-entry-speed: 700ms;
}
.dim--festival .ev-dim-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(52px, 12vw, 132px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #FF6B35;
}
.dim--festival .ev-dim-portal-line {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #FFE66D;
}
.dim--festival .ev-dim-details {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  color: rgba(255,246,238,0.75);
}

@keyframes dim-wind {
  0%,100% { transform: translateX(0) rotate(0deg); }
  30%     { transform: translateX(6px) rotate(0.8deg); }
  70%     { transform: translateX(-5px) rotate(-0.5deg); }
}
.dim--festival .ev-dim-inner { animation: dim-wind 3.5s ease-in-out infinite; }


/* ── PLEIN AIR ──────────────────────────────────────────────── */
.dim--plein-air {
  background: #E6EDE2;
  color: #273B14;
  --dim-accent: #4F7FA8;
  --dim-entry-speed: 800ms;
}
.dim--plein-air .ev-dim-title {
  font-family: 'Lora', serif;
  font-size: clamp(44px, 9vw, 92px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dim--plein-air .ev-dim-portal-line {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 18px;
  color: #4F7FA8;
}
.dim--plein-air .ev-dim-label   { color: rgba(39,59,20,0.35); opacity: 1; }
.dim--plein-air .ev-dim-close   { color: #273B14; background: rgba(0,0,0,0.07); }
.dim--plein-air .ev-dim-close:hover { background: rgba(0,0,0,0.13); }
.dim--plein-air .ev-dim-details { font-family: 'Lora', serif; font-size: 15px; color: #354826; }
.dim--plein-air .ev-dim-phase--pre  { background: rgba(0,0,0,0.06); color: rgba(39,59,20,0.45); }
.dim--plein-air .ev-dim-phase--post { background: rgba(0,0,0,0.04); color: rgba(39,59,20,0.28); }
.dim--plein-air .ev-dim-presence    { color: #354826; }
.dim--plein-air .ev-btn-dimension   { border-color: rgba(0,0,0,0.12); background: rgba(0,0,0,0.04); color: #273B14; }
.dim--plein-air .ev-btn-dimension:hover { background: rgba(0,0,0,0.08); }

@keyframes dim-breeze {
  0%,100% { transform: translateX(0) translateY(0); }
  28%     { transform: translateX(5px) translateY(-3px); }
  72%     { transform: translateX(-4px) translateY(2px); }
}
.dim--plein-air .ev-dim-inner { animation: dim-breeze 5s ease-in-out infinite; }


/* ── RESTAURANT / FOOD ──────────────────────────────────────── */
.dim--restaurant-food {
  background: #100500;
  color: #F2E3CE;
  --dim-accent: #C9A87C;
  --dim-entry-speed: 800ms;
}
.dim--restaurant-food .ev-dim-inner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(201,168,124,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.dim--restaurant-food .ev-dim-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.02em;
  color: #C9A87C;
}
.dim--restaurant-food .ev-dim-portal-line {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 18px;
  color: rgba(242,227,206,0.5);
}
.dim--restaurant-food .ev-dim-details {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: rgba(242,227,206,0.7);
}


/* ── SPORT ──────────────────────────────────────────────────── */
.dim--sport {
  background: #080808;
  color: #FFFFFF;
  --dim-accent: #FF1414;
  --dim-entry-speed: 350ms;
}
.dim--sport .ev-dim-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(56px, 14vw, 148px);
  font-weight: 900;
  text-transform: uppercase;
  -webkit-text-stroke: 2px rgba(255,20,20,0.55);
}
.dim--sport .ev-dim-portal-line {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #FF1414;
}
.dim--sport .ev-dim-details {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.65);
}


/* ── FAMILLE ────────────────────────────────────────────────── */
.dim--famille {
  background: #FFF9F0;
  color: #2D3A1E;
  --dim-accent: #F0A050;
  --dim-entry-speed: 600ms;
}
.dim--famille .ev-dim-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(48px, 10vw, 100px);
  font-weight: 700;
  color: #2D3A1E;
}
.dim--famille .ev-dim-portal-line {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #F0A050;
}
.dim--famille .ev-dim-label   { color: rgba(45,58,30,0.35); opacity: 1; }
.dim--famille .ev-dim-close   { color: #2D3A1E; background: rgba(0,0,0,0.07); }
.dim--famille .ev-dim-close:hover { background: rgba(0,0,0,0.13); }
.dim--famille .ev-dim-details { color: #354826; }
.dim--famille .ev-dim-phase--pre  { background: rgba(0,0,0,0.06); color: rgba(45,58,30,0.45); }
.dim--famille .ev-dim-phase--post { background: rgba(0,0,0,0.04); color: rgba(45,58,30,0.28); }
.dim--famille .ev-dim-presence    { color: #354826; }
.dim--famille .ev-btn-dimension   { border-color: rgba(0,0,0,0.12); background: rgba(0,0,0,0.04); color: #2D3A1E; }
.dim--famille .ev-btn-dimension:hover { background: rgba(0,0,0,0.08); }


/* ── PRIVÉ ──────────────────────────────────────────────────── */
.dim--prive {
  background: #0E0E14;
  color: #DDD8F0;
  --dim-accent: #9B8EC4;
  --dim-entry-speed: 900ms;
}
.dim--prive .ev-dim-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 400;
  font-style: italic;
  color: #DDD8F0;
}
.dim--prive .ev-dim-portal-line {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: #9B8EC4;
}
.dim--prive .ev-dim-details {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: rgba(221,216,240,0.65);
}


/* ── AUTRE ──────────────────────────────────────────────────── */
.dim--autre {
  background: #070707;
  color: #E5E5E5;
  --dim-accent: #FF3366;
  --dim-entry-speed: 700ms;
}
.dim--autre .ev-dim-title {
  font-family: 'Space Mono', monospace;
  font-size: clamp(40px, 9vw, 88px);
  font-weight: 700;
  background: linear-gradient(135deg, #FF3366, #9D4EDD, #00D4FF, #FFE66D);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: dim-gradient-shift 4.5s ease infinite, dim-glitch 7s ease infinite;
}
.dim--autre .ev-dim-portal-line {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(229,229,229,0.38);
}
.dim--autre .ev-dim-details {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: rgba(229,229,229,0.5);
}

@keyframes dim-gradient-shift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
@keyframes dim-glitch {
  0%,87%,100% { transform: translateX(0) skewX(0deg); opacity: 1; }
  88%  { transform: translateX(-4px) skewX(-2deg); opacity: 0.8; }
  92%  { transform: translateX(3px)  skewX(2deg);  opacity: 0.9; }
  96%  { transform: translateX(-1px) skewX(0deg);  opacity: 1; }
}


/* ============================================================
   CARD PEEK HINTS — atmospheric glow per category
   ============================================================ */
.event-card-enhanced[data-dim-slug="bar-nightlife"]   { box-shadow: 0 0 0 1px rgba(157,78,221,0.12), 0 4px 18px rgba(157,78,221,0.07); }
.event-card-enhanced[data-dim-slug="musique-concert"] { box-shadow: 0 0 0 1px rgba(255,69,0,0.12),   0 4px 18px rgba(255,69,0,0.07);  }
.event-card-enhanced[data-dim-slug="festival"]        { box-shadow: 0 0 0 1px rgba(255,107,53,0.12), 0 4px 18px rgba(255,107,53,0.07); }
.event-card-enhanced[data-dim-slug="sport"]           { box-shadow: 0 0 0 1px rgba(255,20,20,0.12),  0 4px 18px rgba(255,20,20,0.07); }
.event-card-enhanced[data-dim-slug="art-culture"]     { box-shadow: 0 0 0 1px rgba(123,107,141,0.12),0 4px 18px rgba(123,107,141,0.07); }
.event-card-enhanced[data-dim-slug="plein-air"]       { box-shadow: 0 0 0 1px rgba(124,184,126,0.14),0 4px 18px rgba(124,184,126,0.08); }
.event-card-enhanced[data-dim-slug="restaurant-food"] { box-shadow: 0 0 0 1px rgba(201,168,124,0.14),0 4px 18px rgba(201,168,124,0.08); }
.event-card-enhanced[data-dim-slug="famille"]         { box-shadow: 0 0 0 1px rgba(240,160,80,0.14), 0 4px 18px rgba(240,160,80,0.08); }
.event-card-enhanced[data-dim-slug="prive"]           { box-shadow: 0 0 0 1px rgba(155,142,196,0.12),0 4px 18px rgba(155,142,196,0.07); }


/* ============================================================
   ACCESSIBILITY — reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ev-dimension-overlay,
  .ev-dim-veil { transition: none !important; }

  .dim--bar-nightlife .ev-dim-inner,
  .dim--festival .ev-dim-inner,
  .dim--plein-air .ev-dim-inner { animation: none !important; }

  .dim--musique-concert .ev-dim-title,
  .dim--autre .ev-dim-title { animation: none !important; }

  @keyframes dim-live-pulse { 0%,100% { opacity: 1; transform: scale(1); } }
}


/* ============================================================
   DESKTOP (≥1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .ev-dim-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 72px 56px 80px;
  }
}
