/* =========================================
   VARIABLES & RESET
========================================= */
:root {
    --js-blue: #3B4E98;
    --js-blue-light: #5c6eb3;
    --js-black: #1a1a1a;
    --js-light: #f8f9fa;
    --js-white: #ffffff;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --tile-width: 450px;
    --tile-height: 440px; 
    --tile-gap: 40px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; scroll-behavior: smooth; }
body { background: var(--js-white); color: #444; line-height: 1.6; overflow-x: hidden; }
.container { max-width: 1250px; margin: 0 auto; padding: 0 20px; }

.main-content { background-color: var(--js-black); }
.section-light { background: #252525; padding: 80px 0; }
.section-dark { background: var(--js-black); padding: 80px 0; }

.section-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 30px; text-align: left; color: var(--js-white); }
.text-center { text-align: center; color: var(--js-white); }

/* =========================================
   HEADER & NAVIGATION DYNAMIQUE
========================================= */
header {
    position: fixed; 
    top: 15px; 
    left: 50%; 
    transform: translateX(-50%);
    width: 95%; 
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

header.scrolled {
    background: rgba(26, 26, 26, 0.85);
    padding: 10px 30px;
    border-color: rgba(255,255,255,0.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.logo img { height: 50px; transition: var(--transition); display: block; }
header.scrolled .logo img { height: 40px; }

nav ul { list-style: none; display: flex; gap: 25px; }
nav ul li a { 
    font-size: 1.05rem; 
    display: block; 
    color: rgba(255, 255, 255, 0.8); 
    position: relative;
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s ease;
}
nav ul li a:hover, nav ul li a.active { color: var(--js-white); }

nav ul li a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--js-blue-light); transition: var(--transition);
}
nav ul li a:hover::after, nav ul li a.active::after { width: 100%; }

.menu-toggle { display: none; color: white; font-size: 1.5rem; cursor: pointer; transition: 0.3s; }

/* =========================================
   BOUTONS GENERAUX
========================================= */
.btn-primary { 
    background: var(--js-blue); color: #ffffff; padding: 14px 35px; border-radius: 50px; 
    text-decoration: none; font-weight: 600; transition: var(--transition); border: 2px solid var(--js-blue);
    display: inline-block; box-shadow: 0 5px 15px rgba(59, 78, 152, 0.3);
}
.btn-primary:hover { background: transparent; color: var(--js-white); border-color: var(--js-white); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15); }

/* =========================================
   HERO INDEX & COMPTE À REBOURS
========================================= */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('bleu.jpg') center/cover no-repeat;
    background-attachment: fixed;
    display: flex; align-items: center; justify-content: center; color: white; text-align: center;
    padding: 0 20px;
}
.hero-logo { width: 100%; max-width: 280px; margin-bottom: 25px; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3)); transition: var(--transition); }
.countdown-title { font-size: 1.2rem; letter-spacing: 5px; margin-bottom: 25px; color: var(--js-white); font-weight: 800; text-transform: uppercase; }
.countdown-container { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.countdown-item { 
    background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(15px); padding: 20px 10px; 
    border-radius: 20px; min-width: 100px; border: 1px solid rgba(255,255,255,0.15); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); position: relative; overflow: hidden;
}
.countdown-item::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background: var(--js-blue-light); }
.countdown-item span { font-size: 3rem; font-weight: 800; display: block; line-height: 1; margin-bottom: 5px; color: var(--js-white); text-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.countdown-item p { font-size: 0.75rem; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; color: var(--js-blue-light); }

/* =========================================
   SECTION PRESENTATION & ANIMATIONS
========================================= */
.presentation-flex { display: flex; align-items: center; gap: 50px; }
.pres-text { flex: 1; }
.pres-paragraph { margin-bottom: 30px; color: #e0e0e0; font-size: 1.05rem; }
.pres-image { flex: 1; padding: 10px; }
.image-wrapper { position: relative; width: 100%; max-width: 500px; margin: 0 auto; }
.img-rounded { width: 100%; height: auto; border-radius: 30px; display: block; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

.fade-in-section { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-section.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   LE CARROUSEL GÉANT INTERACTIF & INFINI
========================================= */
.overflow-hidden { overflow: hidden; }

.tiles-wrapper { 
    width: 100%; 
    display: flex; 
    padding: 60px 0;                   
    overflow-x: auto;                  
    scroll-behavior: auto;             
    cursor: grab;                      
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none;             
}
.tiles-wrapper::-webkit-scrollbar { display: none; }
.tiles-wrapper.grabbing { cursor: grabbing; }

.tiles-track {
    display: flex; 
    gap: var(--tile-gap);
    padding: 0 40px;      
    align-items: center;               
}

.event-tile {
    width: var(--tile-width); height: var(--tile-height); flex-shrink: 0; position: relative;
    border-radius: 30px; overflow: hidden; 
    filter: brightness(0.5) blur(1px); 
    transform: scale(0.92);            
    box-shadow: 0 10px 25px rgba(0,0,0,0.4); 
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.6s ease, box-shadow 0.6s ease;
}

.event-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.event-tile.is-focused {
    filter: brightness(1) blur(0px);
    transform: scale(1);
    box-shadow: 0 20px 45px rgba(0,0,0,0.6);
}

.tile-overlay {
    position: absolute; 
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 20%, rgba(0,0,0,0.2) 100%);
    padding: 30px; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    color: white;
    z-index: 2;
}

.tile-header {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--js-blue-light);
    font-weight: 600;
    margin-bottom: 10px;
}
.tile-header i { margin-right: 5px; }

.tile-overlay h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.tile-desc {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 25px;
}

.tile-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    align-items: center;
}

.btn-tile { 
    flex: 1;
    text-align: center; 
    padding: 14px; 
    border-radius: 12px; 
    text-decoration: none; 
    font-weight: 700; 
    transition: var(--transition); 
    display: block; 
}

.btn-tile.active {
    background: var(--js-blue);
    color: var(--js-white);
}
.btn-tile.active:hover {
    background: var(--js-blue-light);
    transform: translateY(-2px);
}

.btn-tile.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

.btn-info {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--js-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-info:hover {
    background: var(--js-blue-light);
    border-color: var(--js-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(92, 110, 179, 0.4);
}

/* =========================================
   NOUVEAU : GALERIE & CATÉGORIES D'ALBUMS
========================================= */
.galerie-hero {
    height: 45vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 40px 20px;
    margin-top: 60px;
}

.galerie-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--js-white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 28px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.category-btn:hover, .category-btn.active {
    background: var(--js-blue);
    border-color: var(--js-blue);
    box-shadow: 0 5px 15px rgba(59, 78, 152, 0.4);
    transform: translateY(-2px);
}

/* =========================================
   NOUVEAU : AUTO LAYOUT INFOS ÉVÉNEMENTS
========================================= */
.event-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
    padding: 20px 0;
}

@media (min-width: 992px) {
    .event-container {
        grid-template-columns: 1.3fr 0.7fr;
    }
}

.event-card-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
    color: #e0e0e0;
}
.event-meta-item:last-child { margin-bottom: 0; }

.event-meta-item i {
    font-size: 1.3rem;
    color: var(--js-blue-light);
    background: rgba(255, 255, 255, 0.05);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* =========================================
   BOUTON RETOUR EN HAUT
========================================= */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 50px; height: 50px; background: var(--js-blue);
    color: white; border: none; border-radius: 50px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 999; opacity: 0; transform: translateY(20px); transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--js-blue-light); transform: scale(1.1); }

/* =========================================
   FOOTER MODERNE
========================================= */
.modern-footer { background: #0f0f0f; color: #aaa; padding: 60px 0 30px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 40px; }
.footer-logo { height: 60px; margin-bottom: 20px; }
.footer-bio { font-size: 0.95rem; margin-bottom: 20px; line-height: 1.7; }

.social-links { display: flex; gap: 15px; }
.social-links a { 
    width: 40px; height: 40px; background: rgba(255,255,255,0.05); color: white; 
    border-radius: 50px; display: flex; align-items: center; justify-content: center; 
    transition: var(--transition); text-decoration: none;
}
.social-links a:hover { background: var(--js-blue); transform: translateY(-3px); }

.footer-col h4 { color: white; font-size: 1.2rem; font-weight: 700; margin-bottom: 25px; position: relative; }
.footer-col h4::after { content: ''; position: absolute; bottom: -8px; left: 0; width: 35px; height: 2px; background: var(--js-blue-light); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #aaa; text-decoration: none; transition: 0.3s; }
.footer-col ul li a:hover { color: white; padding-left: 5px; }

.contact-info p { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.contact-info i { color: var(--js-blue-light); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; display: flex; justify-content: space-between; font-size: 0.9rem; }
.footer-legal a { color: #aaa; text-decoration: none; }
.footer-legal a:hover { color: white; }

/* =========================================
   RESPONSIVE DESIGN (TABLETTE & MOBILE)
========================================= */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .presentation-flex { flex-direction: column; text-align: center; gap: 40px; }
    .section-title { text-align: center; }
}

@media (max-width: 768px) {
    :root { 
        --tile-width: 320px; 
        --tile-height: 390px; 
        --tile-gap: 20px; 
    }
    
    header { padding: 12px 20px; width: 90%; }
    .menu-toggle { display: block; }
    
    /* Système de rideau mobile */
    nav { 
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; 
        background: rgba(20, 20, 20, 0.98); backdrop-filter: blur(20px); 
        padding: 100px 40px; transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    nav.active { right: 0; }
    nav ul { flex-direction: column; gap: 30px; }
    nav ul li a { font-size: 1.3rem; opacity: 0; transform: translateY(-10px); }
    nav.active ul li a { opacity: 1; transform: translateY(0); transition: 0.4s ease; transition-delay: 0.2s; }
    
    /* CORRECTION : Page de garde (Alignement strict 4 compteurs sur mobile) */
    .hero-logo { max-width: 200px; }
    .countdown-container { 
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        width: 100%;
        max-width: 460px;
        margin: 0 auto 40px auto;
    }
    .countdown-item { 
        min-width: unset; 
        padding: 12px 2px; 
        border-radius: 12px; 
    }
    .countdown-item span { font-size: 1.7rem; }
    .countdown-item p { font-size: 0.58rem; letter-spacing: 0px; }
    
    .tile-overlay { padding: 20px; }
    .tile-overlay h3 { font-size: 1.4rem; }
    .tile-desc { font-size: 0.9rem; margin-bottom: 15px; }
    
    .btn-info { width: 48px; height: 48px; font-size: 1rem; border-radius: 10px; }
    .btn-tile { padding: 12px; border-radius: 10px; font-size: 0.9rem; }
    .tile-actions { gap: 8px; }
    
    .footer-bottom { flex-direction: column; text-align: center; gap: 15px; }
}