/* EventSika — carrousel en perspective. Charger après style.css. */
#heroCarousel {
    position: relative;
    height: auto;
    min-height: 0;
    padding: 50px 0 80px;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 35%, #30234c, #0b1020 75%);
    isolation: isolate;
}
#heroCarousel .hero-slides {
    position: relative;
    height: 560px;
    perspective: 1400px;
    transform-style: preserve-3d;
}
#heroCarousel .hero-slide {
    position: absolute;
    inset: 0 auto auto 50%;
    width: min(390px, 76vw);
    height: 540px;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 24px;
    background: #151b2d;
    box-shadow: 0 24px 60px #0007;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateZ(-300px) scale(.8);
    transition: transform .65s ease, opacity .65s ease, filter .65s ease;
}
#heroCarousel .hero-slide[data-position="0"] {
    z-index: 5;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%);
    filter: none;
}
#heroCarousel .hero-slide[data-position="-1"],
#heroCarousel .hero-slide[data-position="1"] {
    z-index: 3;
    opacity: .85;
    visibility: visible;
    filter: brightness(.75);
}
#heroCarousel .hero-slide[data-position="-1"] {
    transform: translateX(calc(-50% - 265px)) translateZ(-160px) rotateY(24deg) scale(.9);
}
#heroCarousel .hero-slide[data-position="1"] {
    transform: translateX(calc(-50% + 265px)) translateZ(-160px) rotateY(-24deg) scale(.9);
}
#heroCarousel .hero-slide[data-position="-2"],
#heroCarousel .hero-slide[data-position="2"] {
    z-index: 1;
    opacity: .65;
    visibility: visible;
    filter: brightness(.6);
}
#heroCarousel .hero-slide[data-position="-2"] {
    transform: translateX(calc(-50% - 455px)) translateZ(-280px) rotateY(32deg) scale(.8);
}
#heroCarousel .hero-slide[data-position="2"] {
    transform: translateX(calc(-50% + 455px)) translateZ(-280px) rotateY(-32deg) scale(.8);
}
#heroCarousel .hero-slide-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
}
#heroCarousel .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(8,13,28,.3) 50%, #080d1cf5 100%);
}
#heroCarousel .hero-container {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    box-sizing: border-box;
}
#heroCarousel .hero-content {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(12,18,34,.9);
    border-top: 1px solid #ffffff30;
    text-align: left;
    transform: none;
}
#heroCarousel .hero-event-category {
    display: inline-block;
    margin: 0 0 10px;
    padding: 5px 9px;
    border: 1px solid #c4b5fd50;
    border-radius: 6px;
    background: #6d28d940;
    color: #ddd6fe;
    font-size: 10px;
    letter-spacing: 1px;
}
#heroCarousel .hero-featured-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(22px, 3vw, 29px);
    line-height: 1.2;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
#heroCarousel .hero-event-info {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: #e2e8f0;
    box-shadow: none;
}
#heroCarousel .hero-event-info > span {
    min-width: 0;
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
#heroCarousel .hero-event-info i { color: #c4b5fd; }
#heroCarousel .hero-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin: 0 0 15px;
    padding: 0;
    border: 0;
    background: none;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.65;
    box-shadow: none;
}
#heroCarousel .hero-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
#heroCarousel .hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 11px;
    text-decoration: none;
}
#heroCarousel .hero-buttons .btn-primary { background: #7c3aed; color: #fff; }
#heroCarousel .hero-buttons .btn-outline { background: #ffffff12; border: 1px solid #ffffff50; color: #fff; }
#heroCarousel .hero-arrow {
    position: absolute;
    top: auto;
    bottom: 20px;
    width: 42px;
    height: 42px;
    border: 1px solid #ffffff40;
    border-radius: 50%;
    background: #1b2038;
    color: #fff;
    transform: none;
    z-index: 10;
    cursor: pointer;
}
#heroCarousel .hero-prev { left: calc(50% - 62px); right: auto; }
#heroCarousel .hero-next { left: calc(50% + 20px); right: auto; }
#heroCarousel .hero-thumbnails,
#heroCarousel .hero-indicators { display: none; }
#heroCarousel :is(a, button):focus-visible { outline: 3px solid #c4b5fd; outline-offset: 3px; }
html[data-theme="light"] #heroCarousel { background: radial-gradient(ellipse at 50% 35%, #ddd6fe, #f5f7fc 75%); }
/* Le bandeau reste sombre dans les deux thèmes pour contraster avec les photos. */
html[data-theme="light"] #heroCarousel .hero-content { background: rgba(12,18,34,.93); }
html[data-theme="light"] #heroCarousel .hero-featured-title { color: #fff; text-shadow: none; }
html[data-theme="light"] #heroCarousel .hero-description { color: #cbd5e1; background: none; box-shadow: none; }
html[data-theme="light"] #heroCarousel .hero-event-info { color: #e2e8f0; background: none; box-shadow: none; }
html[data-theme="light"] #heroCarousel .hero-event-info i { color: #c4b5fd; }
html[data-theme="light"] #heroCarousel .hero-event-category { background: #6d28d940; color: #ddd6fe; }
html[data-theme="light"] #heroCarousel .hero-buttons .btn-outline { background: #ffffff12; color: #fff; border-color: #ffffff50; }
@media (max-width: 700px) {
    #heroCarousel { padding-top: 28px; }
    #heroCarousel .hero-slides { height: 540px; }
    #heroCarousel .hero-slide { height: 520px; }
    #heroCarousel .hero-content { padding: 17px; }
    #heroCarousel .hero-event-info { flex-direction: row; }
    #heroCarousel .hero-slide[data-position="-1"] { transform: translateX(calc(-50% - 190px)) translateZ(-220px) rotateY(24deg) scale(.85); }
    #heroCarousel .hero-slide[data-position="1"] { transform: translateX(calc(-50% + 190px)) translateZ(-220px) rotateY(-24deg) scale(.85); }
    #heroCarousel .hero-slide[data-position="-2"],
    #heroCarousel .hero-slide[data-position="2"] { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    #heroCarousel .hero-slide { transition: none; }
}

/* ==========================================
   CARTES CLIQUABLES ET THÈMES
========================================== */

#heroCarousel {
    --hero-card-bg: #121a30;
    --hero-card-text: #f8fafc;
    --hero-card-muted: #cbd5e1;
    --hero-card-border: #35405c;
    --hero-card-accent: #c4b5fd;
    --hero-card-badge: #302052;
}

html[data-theme="light"] #heroCarousel {
    --hero-card-bg: #ffffff;
    --hero-card-text: #172033;
    --hero-card-muted: #475569;
    --hero-card-border: #ddd6fe;
    --hero-card-accent: #6d28d9;
    --hero-card-badge: #ede9fe;
}

/* Carte */

#heroCarousel .hero-slide {
    background: var(--hero-card-bg);
    border-color: var(--hero-card-border);
}

/* Le conteneur couvre toute la carte et porte le lien étendu. */

#heroCarousel .hero-container {
    position: relative;
    isolation: isolate;
}

#heroCarousel .hero-content {
    position: static;
    padding: 22px;
    background: var(--hero-card-bg);
    border-top: 1px solid var(--hero-card-border);
}

html[data-theme="light"] #heroCarousel .hero-content {
    background: var(--hero-card-bg);
}

/* Titre */

#heroCarousel .hero-featured-title,
html[data-theme="light"] #heroCarousel .hero-featured-title {
    color: var(--hero-card-text);
    text-shadow: none;
}

/* Description et informations */

#heroCarousel .hero-description,
html[data-theme="light"] #heroCarousel .hero-description {
    background: none;
    color: var(--hero-card-muted);
    box-shadow: none;
}

#heroCarousel .hero-event-info,
html[data-theme="light"] #heroCarousel .hero-event-info {
    background: none;
    color: var(--hero-card-muted);
    box-shadow: none;
}

#heroCarousel .hero-event-info i,
html[data-theme="light"] #heroCarousel .hero-event-info i {
    color: var(--hero-card-accent);
}

/* Catégorie */

#heroCarousel .hero-event-category,
html[data-theme="light"] #heroCarousel .hero-event-category {
    background: var(--hero-card-badge);
    border-color: var(--hero-card-border);
    color: var(--hero-card-accent);
}

/* Lien étendu sur toute la carte */

#heroCarousel .hero-card-link {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: block;
    border-radius: inherit;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(124, 58, 237, 0.15);
}

/* Texte accessible, masqué visuellement */

#heroCarousel .hero-card-link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Indication au survol et au clavier */

#heroCarousel .hero-slide[data-position="0"]:hover,
#heroCarousel .hero-slide[data-position="0"]:focus-within {
    border-color: var(--hero-card-accent);
    box-shadow:
        0 0 0 2px var(--hero-card-accent),
        0 24px 60px rgba(0, 0, 0, 0.25);
}

#heroCarousel .hero-card-link:focus-visible {
    outline: 3px solid var(--hero-card-accent);
    outline-offset: -5px;
}

/* Fond du carrousel — modes sombre et clair */

#heroCarousel,
html[data-theme="light"] #heroCarousel {
    background-color: #020914;
    background-image:
        linear-gradient(
            to bottom,
            rgba(2, 9, 20, 0.15),
            rgba(2, 9, 20, 0.45)
        ),
        url("../images/jpg/BG-carossel.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* HERO — CONTRASTE ET LISIBILITÉ */

#heroCarousel {
    --hero-readable-text: #f8fafc;
    --hero-readable-muted: #d5def0;
    --hero-readable-icon: #c4b5fd;
}

html[data-theme="light"] #heroCarousel {
    --hero-readable-text: #172033;
    --hero-readable-muted: #475569;
    --hero-readable-icon: #6d28d9;
}

/* Supprime l’ombre qui brouille les textes. */

#heroCarousel .hero-content,
#heroCarousel .hero-content * {
    text-shadow: none !important;
}

/* Titre proportionné à la carte. */

#heroCarousel .hero-featured-title {
    color: var(--hero-readable-text) !important;
    font-size: clamp(24px, 2.5vw, 30px) !important;
    line-height: 1.2;
}

/* Date, heure, organisateur et lieu. */

#heroCarousel .hero-event-info,
#heroCarousel .hero-event-info > span {
    color: var(--hero-readable-muted) !important;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1.65;
    opacity: 1 !important;
}

#heroCarousel .hero-event-info {
    gap: 8px 14px;
}

#heroCarousel .hero-event-info i {
    color: var(--hero-readable-icon) !important;
    font-size: 14px;
}

/* Description. */

#heroCarousel .hero-description {
    color: var(--hero-readable-muted) !important;
    font-size: 14px !important;
    font-weight: 400;
    line-height: 1.75;
    opacity: 1 !important;
}