/* ===== EVENT HERO SECTION ===== */
.event-hero {
    height: 50vh;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.event-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.event-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 var(--space-6);
}

.event-hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--space-4);
    color: var(--white);
}

.event-meta-hero {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: var(--space-4) 0;
    background: var(--gray-100);
}

.breadcrumb nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--gray-600);
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* ===== EVENT CONTENT ===== */
.event-content {
    padding: var(--space-16) 0;
}

.event-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-16);
}

.event-description {
    background: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

.event-description p {
    color: var(--gray-900);
}

.event-description h3 {
    color: var(--primary);
}

.event-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.sidebar-card {
    background: var(--white);
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.sidebar-card h3 {
    margin-bottom: var(--space-4);
    color: var(--primary);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    border-radius: var(--radius);
    transition: background var(--transition-base);
}

.info-item a {
    text-decoration: none;
}

.info-item:hover {
    background: var(--gray-100);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ===== GALLERY CAROUSEL STYLES ===== */
.gallery-section {
    margin-bottom: var(--space-16);
    padding: 0 var(--space-4);
}

.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

/* ===== CAROUSEL WRAPPER ===== */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--black);
}

/* ===== CAROUSEL TRACK ===== */
.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: var(--black);
}

.carousel-slide:hover img {
    transform: scale(1.02);
}

/* ===== NAVIGATION BUTTONS ===== */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(0.8);
}

.carousel-wrapper:hover .carousel-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.carousel-nav:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav--prev {
    left: 20px;
}

.carousel-nav--next {
    right: 20px;
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.carousel-nav:disabled:hover {
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    transform: translateY(-50%) scale(0.9);
}

/* ===== DOTS NAVIGATION ===== */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--white);
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* ===== THUMBNAILS ===== */
.carousel-thumbnails {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--gray-50);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--gray-200);
}

.carousel-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.carousel-thumbnails::-webkit-scrollbar-track {
    background: var(--gray-200);
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.carousel-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.carousel-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 1;
}

.carousel-thumbnail:hover::before {
    background: rgba(0, 0, 0, 0.2);
}

.carousel-thumbnail.active {
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.carousel-thumbnail.active::before {
    background: rgba(99, 102, 241, 0.1);
}

.carousel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== PROGRESS BAR ===== */
.carousel-progress {
    height: 4px;
    background: var(--gray-200);
    position: relative;
    overflow: hidden;
}

.carousel-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.6s ease;
    position: relative;
}

.carousel-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* ===== COUNTER ===== */
.carousel-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* ===== MODAL STYLES ===== */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image-container {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image-container img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease;
}

/* ===== MODAL NAVIGATION ===== */
.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.gallery-modal-content:hover .gallery-modal-close {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.gallery-modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(0.8);
}

.gallery-modal-content:hover .gallery-modal-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.gallery-modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.gallery-modal-nav--prev {
    left: 30px;
}

.gallery-modal-nav--next {
    right: 30px;
}

/* ===== MODAL INFO ===== */
.gallery-modal-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.gallery-modal-counter {
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* ===== LOADING STATE ===== */
.carousel-slide.loading {
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== TOUCH INDICATORS ===== */
.carousel-wrapper::after {
    content: '👆 Glissez pour naviguer';
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    opacity: 0;
    animation: fadeInOut 3s ease 2s;
    pointer-events: none;
    z-index: 5;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
    }

    20%,
    80% {
        opacity: 1;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-nav--prev {
        left: 10px;
    }

    .carousel-nav--next {
        right: 10px;
    }

    .carousel-counter {
        top: 10px;
        right: 10px;
        font-size: 0.8rem;
    }

    .carousel-thumbnail {
        width: 60px;
        height: 45px;
    }

    .gallery-modal-nav {
        width: 50px;
        height: 50px;
    }

    .gallery-modal-nav--prev {
        left: 15px;
    }

    .gallery-modal-nav--next {
        right: 15px;
    }

    .gallery-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .carousel-wrapper::after {
        font-size: 0.7rem;
        bottom: 50px;
    }
}

@media (max-width: 480px) {
    .carousel-thumbnails {
        padding: var(--space-2);
        gap: var(--space-2);
    }

    .carousel-thumbnail {
        width: 50px;
        height: 38px;
    }

    .carousel-dots {
        bottom: 15px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .event-hero {
        margin-top: 95px;
        height: 45vh;
    }

    .event-hero h1 {
        font-size: 1.8rem;
        padding: 0 var(--space-4);
    }

    .video-section {
        padding: var(--space-3);
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

    .carousel-track,
    .carousel-progress-bar,
    .carousel-nav,
    .carousel-dot,
    .carousel-thumbnail,
    .gallery-modal-image-container img {
        transition: none;
    }

    .carousel-slide img {
        transform: none !important;
    }

    .carousel-wrapper::after {
        animation: none;
        opacity: 1;
    }
}

/* Focus styles for keyboard navigation */
.carousel-nav:focus,
.carousel-dot:focus,
.carousel-thumbnail:focus,
.gallery-modal-close:focus,
.gallery-modal-nav:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .carousel-nav,
    .carousel-dot {
        border: 2px solid var(--primary);
    }

    .carousel-nav:hover,
    .carousel-dot.active {
        background: var(--primary);
        border-color: var(--primary);
    }
}

/* ===== VIDEO SECTION ===== */
.video-section {
    background: var(--gray-100);
    padding: var(--space-12);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--space-16);
}

.video-player {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== PROGRAM SECTION ===== */
.program-section {
    background: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-16);
}

.program-timeline {
    position: relative;
    padding-left: var(--space-8);
}

.program-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.program-item {
    position: relative;
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-left: var(--space-4);
}

.program-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 24px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--white);
}

.program-time {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.program-title {
    font-weight: 600;
    margin: var(--space-2) 0;
}

/* ===== BACK BUTTON ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
    margin-bottom: var(--space-8);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== SHARE SECTION ===== */
.share-section {
    background: var(--gradient-primary);
    color: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.share-btn:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all var(--transition-base);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 5% auto;
    padding: var(--space-6);
    border-radius: var(--radius-2xl);
    max-width: 90%;
    max-height: 85%;
    overflow-y: auto;
}

.video-modal-content {
    max-width: 80%;
    padding: var(--space-4);
}

.legal-modal-content {
    max-width: 800px;
}

.close-btn {
    color: var(--gray-600);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--primary);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .event-hero {
        margin-top: 90px;
    }

    .event-hero h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    .event-details-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .event-meta-hero {
        flex-direction: column;
        align-items: center;
        gap: var(--space-4);
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .video-section {
        padding: var(--space-3);
    }
}

/* ===== OPTIMISATIONS POUR TRÈS PETITS ÉCRANS ===== */
@media (max-width: 380px) {
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .share-buttons {
        gap: var(--space-2);
    }

    .share-btn {
        width: 45px;
        height: 45px;
    }

    .modal-content {
        margin: 10% auto;
        max-width: 95%;
    }

    .video-modal-content {
        max-width: 95%;
    }

    .video-section {
        padding: var(--space-3);
    }
}

.video-section {
    display: none !important;
}