/* --- VARIABLES & BASE (Design Liquid Glass) --- */
:root {
    --color-primary-light: #D81B60; 
    --color-secondary-dark: #4A148C; 
    --color-accent: #00e5ff; 
    --color-bg: #0a0816; 
    --color-text-light: #ffffff;
    --color-text-dim: #b0bec5;
    --color-accent-gradient: linear-gradient(90deg, var(--color-primary-light), var(--color-secondary-dark));
    
    /* 💧 LIQUID GLASS VARIABLES 💧 */
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-highlight: rgba(255, 255, 255, 0.2); /* Biseau lumineux */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15); /* Ombre douce */
    --glass-shadow-hover: 0 12px 40px 0 rgba(0, 0, 0, 0.25);
}

html, body {
    margin: 0; padding: 0;
    background-color: var(--color-bg); 
    font-family: 'Poppins', 'Roboto', sans-serif;
    color: var(--color-text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

body { padding: 10px; }

/* --- FOND ANIMÉ (BLOBS CYBERPUNK) --- */
.background-blobs {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0; overflow: hidden; pointer-events: none;
}

.blob {
    position: absolute; border-radius: 50%; 
    filter: blur(120px); opacity: 0.25; 
    animation: blobFloat 20s infinite alternate ease-in-out; 
    transform-origin: center center;
}

.blob-1 { width: 50vw; height: 50vw; background: var(--color-primary-light); top: -20%; left: -10%; }
.blob-2 { width: 40vw; height: 40vw; background: var(--color-secondary-dark); bottom: -10%; right: -10%; animation-delay: -5s; }
.blob-3 { width: 30vw; height: 30vw; background: var(--color-accent); top: 30%; left: 40%; animation-delay: -10s; opacity: 0.15; }

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(80px, 40px) scale(1.1) rotate(20deg); }
}

/* ---------------- HEADER & NAVIGATION ---------------- */
#header-container {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-left: 1px solid var(--glass-highlight);
    padding: 15px 20px; border-radius: 15px; box-shadow: var(--glass-shadow);
    margin-bottom: 25px; position: relative; z-index: 100;
}

#logo-link { display: flex; justify-content: center; flex-grow: 1; }
#header-logo { width: auto; max-width: 180px; height: auto; }
#nav-menu { display: none; }

#nav-menu a {
    text-decoration: none; color: var(--color-text-light);
    font-weight: 500; margin-left: 20px; transition: color 0.2s;
}
#nav-menu a:hover { color: var(--color-accent); }
#nav-menu a i { margin-right: 6px; color: var(--color-primary-light); }

.menu-icon {
    width: 30px; height: 20px; position: absolute; right: 20px;
    display: flex; flex-direction: column; justify-content: space-between;
    cursor: pointer; z-index: 1000;
}
.menu-icon div {
    width: 100%; height: 3px; background-color: var(--color-text-light);
    border-radius: 2px; transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    #header-container { padding-right: 60px; }
    #logo-link { justify-content: flex-start; flex-grow: 0; }
    
    #nav-menu {
        display: none; position: fixed; top: 0; right: 0;
        width: 70%; max-width: 300px; height: 100vh;
        background: rgba(10, 8, 22, 0.85); backdrop-filter: blur(24px) saturate(150%);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5); border-left: 1px solid var(--glass-highlight);
        flex-direction: column; padding: 80px 20px 20px; z-index: 999; 
        transition: transform 0.3s ease-in-out; transform: translateX(100%);
    }
    #nav-menu.open { display: flex; transform: translateX(0); }
    #nav-menu a { margin: 10px 0; padding: 15px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
    
    .instagram-menu, .facebook-menu, .email-menu { display: block; }
    .menu-contact-separator { display: block; height: 1px; background-color: rgba(255,255,255,0.1); margin: 20px 0; }
}

@media (min-width: 769px) {
    .menu-icon { display: none; }
    #nav-menu { display: flex; flex-direction: row; align-items: center; flex-grow: 0; }
    .instagram-menu, .facebook-menu, .email-menu, .menu-contact-separator { display: none !important; }
}

/* ---------------- BANNER (H1) ---------------- */
.info-bar {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-left: 1px solid var(--glass-highlight);
    padding: 30px 20px; border-radius: 15px; box-shadow: var(--glass-shadow);
    margin-bottom: 30px;
}
.info-bar h1 { font-size: 2em; font-weight: 800; margin: 0 0 10px 0; letter-spacing: 1px; }
.info-bar span { font-size: 0.95em; color: var(--color-text-dim); }
.gradient-text { background: var(--color-accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; }

/* ---------------- GRILLE D'ÉVÉNEMENTS ---------------- */
.event-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.event-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-right: 5px solid; 
    border-radius: 15px; padding: 25px; box-shadow: var(--glass-shadow);
    transition: all 0.4s ease; display: flex; flex-direction: column; justify-content: space-between;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(255,255,255,0.2);
}

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.event-date { font-weight: 700; color: var(--color-accent); font-size: 0.9em; letter-spacing: 1px;}
.status-indicator { font-size: 0.75em; font-weight: 800; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 1px; }

.indicator-upcoming { background: rgba(0, 229, 255, 0.15); color: var(--color-accent); border: 1px solid rgba(0, 229, 255, 0.3); }
.indicator-update { background: rgba(216, 27, 96, 0.15); color: #ff4081; border: 1px solid rgba(216, 27, 96, 0.3); }
.indicator-finished { background: rgba(255, 255, 255, 0.05); color: #888; border: 1px solid rgba(255, 255, 255, 0.1); }

@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
.blinking { animation: blink 2s linear infinite; }

.status-text { font-size: 0.9em; font-weight: 400; color: var(--color-text-dim); }
.event-name { font-size: 1.4em; font-weight: 800; margin: 5px 0 5px 0; }
.event-location { font-size: 0.85em; color: var(--color-text-dim); margin: 5px 0 15px 0; font-weight: 500; }
.event-location i { margin-right: 5px; color: var(--color-primary-light); }

.status-avenir { border-right-color: var(--color-accent); }
.status-maj { border-right-color: var(--color-primary-light); }
.status-standard { border-right-color: #555; }

/* LIENS D'ACTION */
.link-action {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; border-radius: 8px; font-weight: 700; text-decoration: none;
    margin-top: 15px; transition: all 0.3s;
}
.link-available { background: var(--color-accent-gradient); color: white; box-shadow: 0 4px 15px rgba(216, 27, 96, 0.2); }
.link-available:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(216, 27, 96, 0.4); }
.link-available i { color: white; }

.link-unavailable { background: rgba(255,255,255,0.05); color: #777; cursor: default; border: 1px solid rgba(255,255,255,0.1); }
.link-unavailable:hover { transform: none; }
.link-unavailable i { color: #777; }

/* ---------------- FOOTER ---------------- */
#footer {
    text-align: center; padding: 40px 20px;
    background: var(--glass-bg); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-left: 1px solid var(--glass-highlight);
    border-radius: 15px; box-shadow: var(--glass-shadow); margin-top: 40px;
}
#footertxt { margin-bottom: 25px; color: var(--color-text-dim); }

.social-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.social-link { text-decoration: none; font-size: 1em; display: flex; align-items: center; font-weight: 600; color: var(--color-text-light); }
.social-link i {
    margin-right: 10px; border-radius: 50%; padding: 10px; width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center; color: white; font-size: 1.1rem;
    transition: all 0.3s; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.2);
}
.social-link:hover i { transform: scale(1.15) translateY(-3px); box-shadow: 0 5px 15px rgba(216, 27, 96, 0.4); background: var(--color-primary-light); border-color: var(--color-primary-light);}

.footer-urls { margin-top: 20px; font-size: 0.9em; font-weight: 500; color: var(--color-text-dim); }
.footer-link { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--color-primary-light); }

/* ---------------- GALERIE DES ALBUMS ---------------- */
.album-card {
    background: var(--glass-bg); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-left: 1px solid var(--glass-highlight);
    border-radius: 15px; overflow: hidden; box-shadow: var(--glass-shadow); transition: all 0.4s ease;
    text-decoration: none; color: var(--color-text-light); display: flex; flex-direction: column;
}
.album-card:hover { transform: translateY(-8px); box-shadow: var(--glass-shadow-hover); border-color: rgba(216, 27, 96, 0.4); }

.album-cover { width: 100%; height: 220px; object-fit: cover; background-color: #111; display: block; }

.album-info { padding: 20px; }
.album-title { font-size: 1.3em; font-weight: 800; margin: 0 0 10px 0; color: white; }
.album-meta { display: flex; justify-content: space-between; font-size: 0.9em; color: var(--color-text-dim); margin-bottom: 15px; font-weight: 500;}
.album-meta i { color: var(--color-accent); }

.album-stats {
    background: rgba(216, 27, 96, 0.15); color: #ff4081; border: 1px solid rgba(216, 27, 96, 0.3);
    padding: 6px 12px; border-radius: 20px; font-size: 0.85em; font-weight: 700; display: inline-block;
}

/* ---------------- CARROUSEL INDEX ---------------- */
.albums-carousel-section { margin: 40px 0; }
.section-title { font-size: 1.8em; margin-bottom: 20px; text-align: left; color: white; font-weight: 900;}

.albums-carousel {
    display: flex; overflow-x: auto; gap: 20px; padding-bottom: 20px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: var(--color-primary-light) rgba(255,255,255,0.05);
}
.albums-carousel::-webkit-scrollbar { height: 6px; }
.albums-carousel::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
.albums-carousel::-webkit-scrollbar-thumb { background: var(--color-primary-light); border-radius: 4px; }

.carousel-album-card {
    flex: 0 0 260px; scroll-snap-align: start;
    background: var(--glass-bg); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-left: 1px solid var(--glass-highlight);
    border-radius: 15px; overflow: hidden; box-shadow: var(--glass-shadow);
    text-decoration: none; color: white; transition: all 0.4s ease; display: flex; flex-direction: column;
}
.carousel-album-card:hover { transform: translateY(-5px); box-shadow: var(--glass-shadow-hover); border-color: rgba(216, 27, 96, 0.3); }

.carousel-album-card img { width: 100%; height: 160px; object-fit: cover; }
.carousel-album-info { padding: 15px; }
.carousel-album-info h3 { margin: 0 0 5px 0; font-size: 1.1em; color: white; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carousel-album-info span { font-size: 0.85em; color: var(--color-text-dim); }

.view-all-card {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.2); transition: all 0.3s;
}
.view-all-card:hover { background: rgba(255,255,255,0.1); border-color: var(--color-accent); color: var(--color-accent) !important; }
.view-all-card i { font-size: 2.5em; margin-bottom: 10px; color: var(--color-accent); }

/* ---------------- MOSAÏQUE & SLIDER ---------------- */
.photo-mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 10px 0; margin-bottom: 40px; }
.mosaic-item { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: all 0.3s; }
.mosaic-item:hover { transform: scale(1.05); z-index: 2; border: 1px solid var(--color-primary-light); box-shadow: 0 10px 25px rgba(0,0,0,0.5);}
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) { .photo-mosaic { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 8px; } }

.viewer-container {
    position: relative; max-width: 1000px; margin: 0 auto;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-left: 1px solid var(--glass-highlight);
    border-radius: 15px; overflow: hidden; box-shadow: var(--glass-shadow);
}
.slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.slider::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; justify-content: center; align-items: center; position: relative; min-height: 50vh; max-height: 80vh; }
.slide img { max-width: 100%; max-height: 80vh; object-fit: contain; }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.2);
    width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; color: white;
    cursor: pointer; z-index: 10; transition: all 0.3s; display: flex; justify-content: center; align-items: center;
}
.slider-btn:hover { background: var(--color-primary-light); border-color: var(--color-primary-light); }
.prev-btn { left: 15px; } .next-btn { right: 15px; }
@media (max-width: 768px) { .slider-btn { width: 40px; height: 40px; font-size: 1.2rem; } }

.action-bar {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; padding: 20px;
    background: var(--glass-bg); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border); border-top: 1px solid var(--glass-highlight); border-left: 1px solid var(--glass-highlight);
    border-radius: 15px; margin-top: 25px; box-shadow: var(--glass-shadow);
}
.action-btn {
    padding: 12px 25px; border-radius: 30px; text-decoration: none; font-weight: 700; font-size: 0.95em;
    display: flex; align-items: center; gap: 10px; cursor: pointer; border: none; color: white; transition: all 0.3s;
}
.action-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

/* BOUTON PARTAGE (CORRIGÉ POUR LE THÈME SOMBRE) */
.btn-share { 
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1); 
    border-top: 1px solid rgba(255,255,255,0.2);
    color: white; 
}
.btn-share:hover { background: rgba(255,255,255,0.15); }

/* LIGHTBOX */
.lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 4, 11, 0.95); backdrop-filter: blur(15px); z-index: 99999; flex-direction: column; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox-close { position: absolute; top: 20px; right: 20px; color: white; background: rgba(255, 255, 255, 0.05); width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; cursor: pointer; z-index: 100000; transition: all 0.3s; border: 1px solid rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.2); }
.lightbox-close:hover { background: var(--color-primary-light); transform: rotate(90deg); border-color: var(--color-primary-light); }
.lightbox .viewer-container { max-width: 100%; width: 100%; height: 75vh; background: transparent; box-shadow: none; margin: 0; border-radius: 0; border: none; }
.lightbox .slide { min-height: 75vh; max-height: 75vh; }
.lightbox .slide img { max-height: 75vh; }
.lightbox .action-bar { background: transparent; border: none; box-shadow: none; margin-top: 10px; padding: 0; }

/* --- OPTIMISATION MOBILE POUR LE MODE ADMIN --- */
@media (max-width: 768px) {
    .admin-quick-panel {
        width: calc(100% - 40px) !important; /* Prend presque toute la largeur */
        left: 20px !important;
        top: 10px !important;
        padding: 12px !important;
    }
    
    .admin-react-select {
        font-size: 16px !important; /* Évite le zoom auto forcé sur iPhone */
        height: 45px; /* Plus facile à cliquer avec le pouce */
    }

    .reaction-overlay {
        font-size: 0.85em !important;
        width: 80%;
        white-space: normal !important; /* Permet au texte de passer à la ligne si trop long */
        text-align: center;
    }
}