/* ═══════════════════════════════════════════════════════════
   ONI EVENTSHOW — FRONT CSS v1.2.0
   La Tablée Onirique
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Marcellus+SC&family=Inter:wght@400;500;600&display=swap');

:root {
    --oes-gold:     #FFBE7A;
    --oes-gold2:    #F2A663;
    --oes-cream:    #F2E4C9;
    --oes-beige:    #CBBFA2;
    --oes-dark1:    #0A131C;
    --oes-dark2:    #0D1A26;
    --oes-dark3:    #0D2633;
    --oes-mid:      #1F3A4A;
    --oes-btn-bg:   #F2E4C9;
    --oes-btn-tx:   #152635;
    --oes-radius:   14px;
    /* Barre de progression — surchargeable via PHP inline style */
    --oes-bar-color:  #FFBE7A;
    --oes-bar-color2: #F2A663;
    --oes-bar-orb:    #FFBE7A;
    /* Maintenance palette — bleu pétrole */
    --oes-maint-bg1:    #0b1718;
    --oes-maint-bg2:    #0f2226;
    --oes-maint-top:    #4a8a9a;
    --oes-maint-accent: #6ab8ca;
    --oes-maint-text:   #8ac8d4;
    --oes-maint-dim:    #4a7a88;
    /* Expired palette — gris neutre */
    --oes-exp-bg1:    #111114;
    --oes-exp-bg2:    #18181e;
    --oes-exp-top:    #50505e;
    --oes-exp-text:   #70708a;
    /* Coming soon palette — violet mystique */
    --oes-soon-bg1:    #110e1c;
    --oes-soon-bg2:    #171028;
    --oes-soon-top:    #8a5fc8;
    --oes-soon-accent: #b088e8;
    --oes-soon-text:   #c4a0f0;
    --oes-soon-dim:    #7050a8;
}

/* ── WRAPPER ──────────────────────────────────── */
.oes-wrap {
    font-family: 'Inter', sans-serif;
    color: var(--oes-cream);
    background: transparent;
    padding: 8px 0 24px;
    position: relative;
    padding-left: 44px;
    padding-right: 44px;
}

/* ── TRACK ────────────────────────────────────── */
.oes-track-outer {
    overflow: hidden;
    /* Compensation ombre : 24px horizontal, 20px haut, 30px bas */
    padding: 20px 24px 30px;
    margin: -20px -24px -30px;
}
.oes-track {
    display: flex;
    gap: 16px;
    padding: 4px 0 6px;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    justify-content: center;
    align-items: stretch; /* toutes les cartes prennent la hauteur de la plus grande */
}
.oes-track.is-sliding {
    justify-content: flex-start;
}

/* ── CARD BASE ────────────────────────────────── */
/* Largeur calculée et injectée directement par le JS */
.oes-card {
    flex: 0 0 280px;
    width: 280px;
    background: linear-gradient(160deg, var(--oes-dark3) 0%, var(--oes-dark2) 100%);
    border: none;
    border-radius: var(--oes-radius);
    box-shadow: 0 6px 24px rgba(0,0,0,0.45);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.2,0,0.1,1), box-shadow 0.35s ease;
    animation: oes-fade-in 0.5s ease both;
}

/* Bordure intérieure — désactivée */
.oes-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--oes-radius);
    pointer-events: none;
    z-index: 3;
    box-shadow: none;
}

/* ─── HOVER : uniquement sur cartes actives (futur + en cours) ─── */
.oes-card:not(.oes-card--maint):not(.oes-card--soon):not(.oes-card--expired):hover {
    transform: translateY(-7px);
    box-shadow:
        0 14px 26px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,190,122,0.25),
        0 0 14px rgba(255,190,122,0.08);
}
/* En cours : glow vert */
.oes-card--live:not(.oes-card--maint):not(.oes-card--soon):not(.oes-card--expired):hover {
    transform: translateY(-7px);
    box-shadow:
        0 14px 26px rgba(0,0,0,0.35),
        0 0 0 1px rgba(58,223,122,0.25),
        0 0 14px rgba(58,223,122,0.08);
}

/* ─── Aucun effet sur maintenance, bientôt, terminé ─── */
.oes-card--maint,
.oes-card--soon,
.oes-card--expired {
    cursor: default;
}
.oes-card--maint:hover,
.oes-card--soon:hover,
.oes-card--expired:hover {
    transform: none;
    box-shadow: 0 6px 24px rgba(0,0,0,0.45);
}

/* ── CARD IMAGE ───────────────────────────────── */
.oes-card--img::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--oes-radius);
    background-image: var(--oes-bg-img);
    background-size: cover;
    background-position: center;
    z-index: 0;
    /* filtre par défaut — actif */
    filter: saturate(1) brightness(0.95);
    transition: filter 0.3s ease;
}
/* Filtre maintenance : désaturé + teinte bleue froide */
.oes-card--maint.oes-card--img::before {
    filter: saturate(0.25) brightness(0.7) hue-rotate(160deg);
}
/* Filtre bientôt disponible : désaturé + teinte violette */
.oes-card--soon.oes-card--img::before {
    filter: saturate(0.2) brightness(0.65) hue-rotate(240deg);
}
/* Filtre terminé : complètement désaturé, très sombre */
.oes-card--expired.oes-card--img::before {
    filter: saturate(0) brightness(0.45);
}

/* Overlay dégradé sombre */
/* Calque couleur uniforme (couleur + opacité personnalisables) */
.oes-card-overlay {
    position: absolute;
    inset: 0;
    border-radius: var(--oes-radius);
    z-index: 1;
    pointer-events: none;
}
/* Dégradé sombre en bas — toujours présent pour la lisibilité du texte */
.oes-card-gradient {
    position: absolute;
    inset: 0;
    border-radius: var(--oes-radius);
    background: linear-gradient(180deg,
        rgba(10,19,28,0.00) 0%,
        rgba(10,19,28,0.45) 40%,
        rgba(10,19,28,0.92) 70%,
        rgba(10,19,28,0.99) 100%
    );
    z-index: 2;
    pointer-events: none;
}
/* Overlay maintenance : teinte pétrole */
.oes-card--maint .oes-card-overlay {
    background: linear-gradient(180deg,
        rgba(11,23,24,0.20) 0%,
        rgba(11,23,24,0.60) 40%,
        rgba(11,23,24,0.92) 68%,
        rgba(11,23,24,0.98) 100%
    );
}
/* Overlay bientôt : teinte violette */
.oes-card--soon .oes-card-overlay {
    background: linear-gradient(180deg,
        rgba(17,14,28,0.25) 0%,
        rgba(17,14,28,0.62) 40%,
        rgba(17,14,28,0.93) 68%,
        rgba(17,14,28,0.99) 100%
    );
}

/* ── CARD BODY ────────────────────────────────── */
.oes-card-body {
    position: relative;
    z-index: 3;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 240px;
}
.oes-card--img .oes-card-body { min-height: 300px; }

/* ── TITRE ────────────────────────────────────── */
.oes-card-title {
    font-family: 'Marcellus SC', serif;
    font-size: clamp(1.2rem, 3.5vw, 1.7rem);
    color: var(--oes-cream);
    margin: 0;
    line-height: 1.15;
}

/* ═══ CARD MAINTENANCE ════════════════════════════ */
.oes-card--maint {
    background: linear-gradient(160deg, var(--oes-maint-bg1) 0%, var(--oes-maint-bg2) 100%);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.oes-card--maint::after { box-shadow: none; }
.oes-card--maint .oes-card-title { color: #a8cdd6; }
.oes-card--maint .oes-meta li    { color: var(--oes-maint-dim); }
.oes-card--maint .oes-meta li::before { color: var(--oes-maint-top); }
.oes-maint-label {
    font-size: 0.82rem;
    color: var(--oes-maint-text);
    margin: 0;
    font-style: italic;
}

/* ═══ CARD COMING SOON ════════════════════════════ */
.oes-card--soon {
    background: linear-gradient(160deg, var(--oes-soon-bg1) 0%, var(--oes-soon-bg2) 100%);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.oes-card--soon::after { box-shadow: none; }
.oes-card--soon .oes-card-title {
    color: #ceb0f0;
    animation: oes-soon-shimmer 3.5s ease-in-out infinite;
}
.oes-card--soon .oes-meta li    { color: var(--oes-soon-dim); }
.oes-card--soon .oes-meta li::before { color: var(--oes-soon-top); }
.oes-soon-label {
    font-size: 0.82rem;
    color: var(--oes-soon-text);
    margin: 0;
    font-style: italic;
}
@keyframes oes-soon-shimmer {
    0%,100% { text-shadow: none; opacity: 1; }
    50%      { text-shadow: 0 0 20px rgba(176,136,232,0.55); opacity: 0.9; }
}

/* ═══ CARD EXPIRED ════════════════════════════════ */
.oes-card--expired {
    background: linear-gradient(160deg, var(--oes-exp-bg1) 0%, var(--oes-exp-bg2) 100%);
    opacity: 0.72;
    filter: saturate(0.25);
    box-shadow: 0 6px 24px rgba(0,0,0,0.45);
}
.oes-card--expired::after { box-shadow: none; }
.oes-card--expired .oes-card-title { color: var(--oes-exp-text); }
.oes-card--expired .oes-meta li    { color: #505060; }
.oes-card--expired .oes-meta li::before { color: var(--oes-exp-top); }

/* ═══ CARD LIVE ═══════════════════════════════════ */
.oes-card--live {
    box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 18px rgba(58,223,122,0.1);
}
.oes-card--live::after { box-shadow: none; }

/* ── BADGE SVG PARCHEMIN ──────────────────────── */
.oes-badge {
    display: inline-block;
    position: relative;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.55));
    line-height: 0;
    width: fit-content;
}
.oes-badge svg {
    display: block;
    height: 28px;
    width: 100%;
    min-width: 120px;
    overflow: visible;
}
.oes-badge-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    padding: 0 24px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ── META ─────────────────────────────────────── */
.oes-meta {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.oes-meta li {
    font-size: 0.8rem;
    color: var(--oes-beige);
    padding-left: 18px;
    position: relative;
}
.oes-meta li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--oes-gold);
    font-size: 0.75rem;
}

/* ── HEURE EN AVANT ───────────────────────────── */
.oes-time-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 4px 0 2px;
    padding: 6px 0 8px;
    border-bottom: 1px solid rgba(255,190,122,0.15);
}
.oes-time-start {
    font-family: 'Marcellus SC', serif;
    font-size: clamp(1.25rem, 3.5vw, 1.6rem);
    color: var(--oes-gold);
    line-height: 1;
    letter-spacing: 0.03em;
    text-shadow: 0 0 20px rgba(255,190,122,0.35);
}
.oes-time-sep {
    font-size: 0.85rem;
    color: var(--oes-beige);
    opacity: 0.5;
    align-self: center;
}
.oes-time-end {
    font-family: 'Marcellus SC', serif;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: var(--oes-beige);
    line-height: 1;
    opacity: 0.75;
}
.oes-card--live .oes-time-start {
    color: #3adf7a;
    text-shadow: 0 0 20px rgba(58,223,122,0.4);
}
.oes-card--live .oes-time-block {
    border-bottom-color: rgba(58,223,122,0.2);
}

/* ── BARRE DE PROGRESSION ─────────────────────── */
/* La barre (ou le bouton si pas de barre) est toujours ancrée en bas */
.oes-progress-wrap { margin: auto 0 2px; }  /* auto repousse tout ce qui précède vers le haut */
.oes-progress-bar {
    height: 5px;
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    position: relative;
    overflow: visible;
}
.oes-progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--oes-bar-color2), var(--oes-bar-color));
    width: 0%;
    transition: width 1s ease;
    position: relative;
    box-shadow: 0 0 8px color-mix(in srgb, var(--oes-bar-orb) 60%, transparent);
}
.oes-progress-wrap--live .oes-progress-bar  { background: rgba(58,223,122,0.15); }
.oes-progress-wrap--live .oes-progress-fill {
    background: linear-gradient(90deg, #22a855, #3adf7a);
    box-shadow: 0 0 10px rgba(58,223,122,0.7);
}
.oes-progress-wrap--live .oes-progress-orb {
    background: radial-gradient(circle, #fff 0%, #3adf7a 45%, #22a855 100%);
    box-shadow: 0 0 10px 3px rgba(58,223,122,0.8), 0 0 20px 6px rgba(58,223,122,0.4);
    animation: oes-orb-pulse-live 1.5s ease-in-out infinite;
}
.oes-progress-wrap--live .oes-countdown { color: #3adf7a; }

@keyframes oes-orb-pulse-live {
    0%,100% { box-shadow: 0 0 10px 3px rgba(58,223,122,0.8), 0 0 20px 6px rgba(58,223,122,0.4); }
    50%      { box-shadow: 0 0 18px 6px rgba(58,223,122,1),   0 0 36px 12px rgba(58,223,122,0.6); }
}
.oes-progress-orb {
    width: 14px; height: 14px;
    background: radial-gradient(circle, #fff 0%, var(--oes-bar-orb) 45%, var(--oes-bar-color2) 100%);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0%;
    transition: left 1s ease;
    box-shadow: 0 0 10px 3px color-mix(in srgb, var(--oes-bar-orb) 70%, transparent), 0 0 20px 6px color-mix(in srgb, var(--oes-bar-orb) 30%, transparent);
    animation: oes-orb-pulse 2s ease-in-out infinite;
}
@keyframes oes-orb-pulse {
    0%,100% { box-shadow: 0 0 10px 3px color-mix(in srgb, var(--oes-bar-orb) 70%, transparent), 0 0 20px 6px color-mix(in srgb, var(--oes-bar-orb) 30%, transparent); }
    50%      { box-shadow: 0 0 16px 5px color-mix(in srgb, var(--oes-bar-orb) 90%, transparent), 0 0 32px 10px color-mix(in srgb, var(--oes-bar-orb) 50%, transparent); }
}
.oes-progress-fill::after {
    content: '';
    position: absolute;
    right: -2px; top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 6px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.8;
    animation: oes-sparkle 1.2s ease-in-out infinite;
}
@keyframes oes-sparkle {
    0%,100% { opacity: 0.8; transform: translateY(-50%) scale(1); }
    50%      { opacity: 0.3; transform: translateY(-50%) scale(0.4); }
}
.oes-countdown {
    display: block;
    font-size: 0.7rem;
    color: var(--oes-gold);
    margin-top: 5px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* ── BOUTONS ──────────────────────────────────── */
.oes-btn {
    display: inline-block;
    background: var(--oes-btn-bg);
    color: var(--oes-btn-tx);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    width: fit-content;
    margin-top: auto; /* ancre le bouton en bas quand pas de barre */
}
.oes-btn:hover { background: var(--oes-btn-hover, var(--oes-gold)); transform: translateY(-1px); }
/* Quand la barre est présente et visible, le bouton n'a plus besoin de pousser lui-même */
.oes-progress-wrap + .oes-btn,
.oes-progress-wrap ~ .oes-btn { margin-top: 6px; }
.oes-btn--disabled {
    background: rgba(120,120,140,0.12);
    color: #5a5a70;
    cursor: not-allowed;
    opacity: 0.85;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(120,120,140,0.18);
    margin-top: auto;
}
.oes-btn--disabled:hover { transform: none !important; background: rgba(120,120,140,0.12); }

/* Maintenance */
.oes-card--maint .oes-btn--disabled {
    background: rgba(74,138,154,0.1);
    color: var(--oes-maint-dim);
    border-color: rgba(74,138,154,0.22);
}
/* Bientôt disponible — violet assorti */
.oes-btn--soon {
    background: rgba(138,95,200,0.1);
    color: var(--oes-soon-accent);
    border-color: rgba(138,95,200,0.25);
    animation: oes-soon-btn-pulse 2.5s ease-in-out infinite;
}
@keyframes oes-soon-btn-pulse {
    0%,100% { opacity: 0.8; }
    50%      { opacity: 1; box-shadow: 0 0 14px rgba(138,95,200,0.3); }
}
.oes-btn-icon { font-size: 0.9rem; }

/* ── CHEVRONS LATÉRAUX ────────────────────────── */
.oes-wrap {
    position: relative;
    padding-left: 44px;
    padding-right: 44px;
}

.oes-chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    color: var(--chev-color, #F2E4C9);
    backdrop-filter: blur(6px);
    padding: 0;
}
.oes-chevron svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    display: block;
}
.oes-chevron--prev { left: 4px; }
.oes-chevron--next { right: 4px; }

.oes-chevron:hover {
    background: rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
    color: var(--chev-hover, #FFBE7A);
}
.oes-chevron--prev:hover { transform: translateY(-50%) translateX(-2px); }
.oes-chevron--next:hover { transform: translateY(-50%) translateX(2px); }
.oes-chevron:disabled {
    opacity: 0.15;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 640px) {
    .oes-wrap { padding-left: 36px; padding-right: 36px; padding-top: 8px; padding-bottom: 16px; }
    .oes-card-body { padding: 20px 16px 16px; min-height: 200px; }
    .oes-card--img .oes-card-body { min-height: 260px; }
    .oes-btn { font-size: 0.78rem; padding: 8px 16px; }
    .oes-chevron { width: 30px; height: 30px; }
    .oes-chevron svg { width: 15px; height: 15px; }
}

/* ── ANIMATION ENTRÉE ─────────────────────────── */
.oes-card:nth-child(1) { animation-delay: 0.05s; }
.oes-card:nth-child(2) { animation-delay: 0.15s; }
.oes-card:nth-child(3) { animation-delay: 0.25s; }
.oes-card:nth-child(4) { animation-delay: 0.35s; }
.oes-card:nth-child(5) { animation-delay: 0.45s; }

@keyframes oes-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══ BOUTON COMPLET ══════════════════════════════════════ */
.oes-btn--full {
    background: rgba(160, 40, 40, 0.15);
    color: #c97070;
    border: 1px solid rgba(180, 60, 60, 0.35);
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.03em;
    opacity: 0.9;
}
.oes-btn--full:hover { transform: none !important; background: rgba(160, 40, 40, 0.15) !important; }

/* ═══ MINI-SLIDER DE DATES ════════════════════════════════ */
.oes-dates-slider {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0 2px;
}
.oes-ds-btn {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: var(--oes-cream);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.oes-ds-btn:hover:not(:disabled) { background: rgba(255,190,122,0.18); color: var(--oes-gold); }
.oes-ds-btn:disabled { opacity: 0.25; cursor: default; }

.oes-ds-track-wrap {
    flex: 1;
    overflow: hidden;
    scroll-behavior: smooth;
    padding-top: 3px;
    margin-top: -3px;
}
.oes-ds-track {
    display: flex;
    gap: 5px;
    transition: none;
}
.oes-ds-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.15s;
    min-width: 38px;
}
.oes-ds-item:hover:not(.oes-ds-item--past) {
    background: rgba(255,190,122,0.1);
    border-color: rgba(255,190,122,0.3);
    transform: translateY(-1px);
}
.oes-ds-item--active {
    background: rgba(255,190,122,0.15);
    border-color: rgba(255,190,122,0.5);
    box-shadow: 0 0 8px rgba(255,190,122,0.2);
}
.oes-ds-item--past {
    opacity: 0.38;
    cursor: default;
}
.oes-ds-day {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--oes-beige);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.oes-ds-date {
    font-family: 'Marcellus SC', serif;
    font-size: 0.78rem;
    color: var(--oes-gold);
    line-height: 1;
}
.oes-ds-item--active .oes-ds-day  { color: var(--oes-cream); }
.oes-ds-item--active .oes-ds-date { color: var(--oes-gold); text-shadow: 0 0 8px rgba(255,190,122,0.5); }

