/* Ajout de la police calligraphique "Great Vibes" */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --text-main: #ffffff;
    --text-muted: #d0d0d0;
    --accent-gold: #d4af37;
    --accent-hover: #f1c40f;
    
    --glass-bg: rgba(20, 20, 20, 0.4); 
    --glass-border: rgba(212, 175, 55, 0.3); 
    --glass-blur: blur(16px); 
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

html { scroll-behavior: smooth; }

/* =========================================
   SCROLLBAR ET SÉLECTION SUR-MESURE
   ========================================= */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

::selection { background: var(--accent-gold); color: #000; }
::-moz-selection { background: var(--accent-gold); color: #000; }

body {
    margin: 0; padding: 0; font-family: 'Montserrat', sans-serif; color: var(--text-main);
    background-color: #121212; min-height: 100vh; overflow-x: hidden;
}

/* Typographie Signature */
.signature-font {
    font-family: 'Great Vibes', cursive !important;
    text-transform: none !important;
    letter-spacing: 2px !important;
    color: var(--accent-gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Écran de chargement (Loader) */
#page-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #101010; z-index: 99999; display: flex;
    justify-content: center; align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader-text { font-size: 4rem; animation: pulse-opacity 1.5s infinite; }
@keyframes pulse-opacity { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Apparition au Scroll (Scroll Reveal) */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* Animation Pulsation (Bouton RSVP) */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}
.btn-pulse { animation: pulse-gold 2s infinite; border-radius: 8px; }

/* =========================================
   LE RESTE DU DESIGN
   ========================================= */
.glass-panel, .login-container, nav, .info-card, .timeline-item, .upload-form, form {
    background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--accent-gold); font-weight: 600; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 2.5rem; }

.btn, button { width: 100%; padding: 14px; background: linear-gradient(135deg, #d4af37 0%, #b5952f 100%); color: #000; border: none; border-radius: 8px; font-family: 'Montserrat', sans-serif; font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: 2px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); }
.btn:hover, button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6); }

.input-group label { display: block; font-size: 0.75rem; margin-bottom: 0.5rem; color: var(--accent-gold); text-transform: uppercase; letter-spacing: 1px; }
.input-group input, .input-group select, .input-group textarea { width: 100%; padding: 12px; background-color: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; color: var(--text-main); font-family: 'Montserrat', sans-serif; box-sizing: border-box; transition: all 0.3s ease; }
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { outline: none; border-color: var(--accent-gold); background-color: rgba(0, 0, 0, 0.7); box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }

.login-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; width: 100%; box-sizing: border-box; padding: 20px; position: relative; z-index: 10; }
.login-container { padding: 3rem; width: 100%; max-width: 450px; text-align: center; }

section { padding: 100px 20px; max-width: 900px; margin: auto; position: relative; z-index: 10; }
#accueil { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0; }
#accueil h1 { font-size: 5rem; margin: 0; }

/* =========================================
   COMPTE À REBOURS & BOUTON
   ========================================= */
.countdown { display: flex; justify-content: center; gap: 40px; margin-top: 40px; }
.countdown div { background: transparent; padding: 0; border: none; min-width: unset; display: flex; flex-direction: column; align-items: center; position: relative; }
.countdown div:not(:last-child)::after { content: ':'; position: absolute; right: -25px; top: 12px; font-size: 2rem; color: var(--accent-gold); font-family: 'Playfair Display', serif; opacity: 0.5; }
.countdown div span:first-child { font-size: 3.5rem; font-family: 'Playfair Display', serif; color: var(--text-main); line-height: 1; text-shadow: 2px 2px 10px rgba(0,0,0,0.5); }
.countdown div span:last-child { display: block; font-size: 0.65rem; font-family: 'Montserrat', sans-serif; text-transform: uppercase; color: var(--accent-gold); letter-spacing: 4px; margin-top: 15px; opacity: 0.8; }

.btn-elegant {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 35px;
    background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--text-main); text-transform: uppercase; letter-spacing: 3px; font-size: 0.7rem;
    font-family: 'Montserrat', sans-serif; border-radius: 50px; text-decoration: none;
    transition: all 0.4s ease; margin-top: 30px; backdrop-filter: blur(5px);
}
.btn-elegant:hover {
    background: rgba(212, 175, 55, 0.1); border-color: var(--accent-gold);
    color: var(--accent-gold); box-shadow: 0 0 20px rgba(212, 175, 55, 0.2); transform: translateY(-2px);
}
.btn-elegant svg { width: 14px; height: 14px; stroke: var(--accent-gold); transition: stroke 0.4s ease; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.info-card { padding: 30px; text-align: center; }
.info-card:hover { transform: translateY(-5px); border-color: var(--accent-gold); }

.timeline-item { padding: 25px; margin-bottom: 25px; border-left: 4px solid var(--accent-gold); }

.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; font-weight: 500; text-align: left; backdrop-filter: blur(5px);}
.alert.success { background-color: rgba(76, 175, 80, 0.2); color: #81c784; border: 1px solid #4CAF50; }
.alert.error { background-color: rgba(244, 67, 54, 0.2); color: #e57373; border: 1px solid #F44336; }
.alert.warning { background-color: rgba(255, 152, 0, 0.2); color: #ffb74d; border: 1px solid #FF9800; }

.toggle-container { display: flex; position: relative; background-color: rgba(0,0,0,0.5); border-radius: 30px; margin-bottom: 25px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1);}
.toggle-btn { flex: 1; padding: 12px 0; text-align: center; cursor: pointer; z-index: 1; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); transition: color 0.3s; }
.toggle-btn.active { color: #000; }
.toggle-slider { position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: linear-gradient(135deg, #d4af37 0%, #b5952f 100%); border-radius: 30px; transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.26, 1.55); z-index: 0; }
.row { display: flex; gap: 15px; } .row .input-group { flex: 1; }

/* 1. Toasts (Notifications flottantes) */
#toast-container { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: rgba(20, 20, 20, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--accent-gold); color: white; padding: 15px 30px; border-radius: 50px; font-size: 0.9rem; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: slideUpToast 0.5s cubic-bezier(0.68, -0.55, 0.26, 1.55) forwards, fadeOutToast 0.5s ease 4s forwards; pointer-events: auto; text-align: center; }
@keyframes slideUpToast { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOutToast { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }
.toast.success { border-left: 4px solid #4CAF50; border-right: 4px solid #4CAF50; }
.toast.error { border-left: 4px solid #F44336; border-right: 4px solid #F44336; }
.toast.warning { border-left: 4px solid #FF9800; border-right: 4px solid #FF9800; }

/* Bouton Retour en haut */
#back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--glass-bg); border: 1px solid var(--accent-gold); color: var(--accent-gold); width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; cursor: pointer; z-index: 999; opacity: 0; visibility: hidden; transition: 0.3s; backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow); text-decoration: none; }
#back-to-top.visible { opacity: 1; visibility: visible; }
#back-to-top:hover { background: var(--accent-gold); color: #000; transform: translateY(-5px); }

/* Carte Interactive Dark Mode */
.map-container { width: 100%; height: 350px; border-radius: 12px; overflow: hidden; margin-top: 20px; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.map-container iframe { width: 100%; height: 100%; border: none; filter: invert(90%) hue-rotate(180deg) grayscale(30%) contrast(110%); transition: filter 0.5s; }
.map-container:hover iframe { filter: invert(90%) hue-rotate(180deg) grayscale(0%) contrast(120%); }

/* Séparateurs Calligraphiques */
.separator { text-align: center; margin: 60px 0; opacity: 0.8; }
.separator svg { width: 120px; fill: var(--accent-gold); filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5)); }

/* Modale RSVP (Cartes de sélection) */
.presence-option { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 15px; margin-bottom: 15px; cursor: pointer; transition: all 0.3s ease; }
.presence-option:hover { border-color: var(--accent-gold); background: rgba(212, 175, 55, 0.1); transform: translateY(-2px); }
.presence-option.selected { border-color: var(--accent-gold); background: var(--accent-gold); color: #000; }
.presence-option.selected div { color: #000 !important; }

/* Espacements formulaires */
.input-group { margin-bottom: 2rem !important; }
.input-group label { margin-bottom: 0.8rem !important; font-size: 0.85rem !important; }
#btn-presence { padding: 15px !important; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
textarea[name="regime"] { min-height: 100px; resize: vertical; padding: 15px !important; }
form.glass-panel { padding: 50px 40px !important; }

/* Transition de Page (Fade Noir) */
#page-transition { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #101010; z-index: 100000; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
#page-transition.active { opacity: 1; pointer-events: auto; }

/* Barre de Progression de Lecture */
#scroll-progress { position: fixed; top: 0; left: 0; width: 0%; height: 3px; background: var(--accent-gold); z-index: 99999; transition: width 0.1s; box-shadow: 0 0 10px var(--accent-gold); }

/* Parallaxe de l'Image de Fond */
#parallax-bg {
    position: fixed; top: -5%; left: -5%; width: 110%; height: 110%;
    background: linear-gradient(rgba(15, 15, 15, 0.75), rgba(15, 15, 15, 0.90)), url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    z-index: -2; 
}

/* =========================================
   GALERIE MASONRY
   ========================================= */
.gallery-grid {
    display: block !important;
    column-count: 3 !important;
    column-gap: 20px !important;
    /* --- CORRECTION DU BUG DE ZOOM --- */
    margin-top: 0 !important; 
    margin-left: -20px !important; /* Compense la marge interne gauche */
    margin-right: -20px !important; /* Compense la marge interne droite */
    padding: 15px 20px 30px 20px !important; /* 🔥 ZONE DE SÉCURITÉ : 30px d'espace vide en bas pour le zoom ! */
}
.gallery-item { 
    position: relative; overflow: hidden; border-radius: 12px; 
    border: 2px solid transparent; transition: 0.3s;
    aspect-ratio: auto; margin-bottom: 20px; break-inside: avoid; 
    display: inline-block; width: 100%;
}
.gallery-item:hover { border-color: var(--accent-gold); transform: scale(1.03); box-shadow: 0 10px 20px rgba(0,0,0,0.5);}
.gallery-item img { width: 100%; height: auto; display: block; }

/* Grille Livre d'Or */
.masonry-grid { column-count: 2; column-gap: 20px; }

/* =========================================
   BILLET D'OR (RSVP) - DESIGN ULTRA PREMIUM
   ========================================= */
.tickets-wrapper {
    display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; margin-bottom: 40px;
    width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
    align-items: stretch; /* S'assure que tous les billets d'une même ligne ont la même hauteur */
}

.golden-ticket {
    position: relative;
    background: linear-gradient(135deg, #dfc269 0%, #a67c00 25%, #f1c40f 50%, #a67c00 75%, #dfc269 100%);
    padding: 6px; border-radius: 16px; width: 100%; max-width: 400px; min-width: 290px;
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3), inset 0 0 15px rgba(255,255,255,0.4);
    transition: box-shadow 0.3s ease; overflow: hidden; cursor: pointer; transform-style: preserve-3d;
    
    /* NOUVEAU : Permet d'étirer l'intérieur */
    display: flex;
    flex-direction: column;
}

.golden-ticket::after {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg); animation: shine 6s infinite; pointer-events: none; z-index: 5;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    20%, 100% { transform: translateX(100%) rotate(30deg); }
}

.ticket-inner {
    background: radial-gradient(circle at center, #2a2a2a 0%, #0a0a0a 100%);
    border: 1px dashed rgba(212, 175, 55, 0.6);
    border-radius: 12px; padding: 30px; position: relative;
    color: var(--text-main); text-align: center;
    transform: translateZ(50px); 
    
    /* NOUVEAU : Prend 100% de la hauteur dispo et aligne les éléments */
    flex: 1; 
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.ticket-inner::before, .ticket-inner::after {
    content:''; position:absolute; top: 50%; transform:translateY(-50%); 
    width: 24px; height: 24px; background-color: #050505; border-radius: 50%;
    border: 1px dashed rgba(212, 175, 55, 0.6); z-index: 10;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.8);
}
.ticket-inner::before { left: -18px; border-left: none; }
.ticket-inner::after { right: -18px; border-right: none; }

.ticket-header { display: flex; justify-content: space-between; font-size: 0.75rem; text-transform: uppercase; color: var(--accent-gold); letter-spacing: 2px; margin-bottom: 20px; border-bottom: 1px solid rgba(212, 175, 55, 0.2); padding-bottom: 10px; }
.ticket-guest { font-size: 2.5rem; margin-bottom: 5px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.8); line-height: 1.2; font-weight: normal;}
.ticket-type { font-size: 0.95rem; font-weight: 600; letter-spacing: 3px; color: var(--accent-gold); margin-bottom: 25px; text-transform: uppercase; }
.ticket-details { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; text-align: left; background: rgba(0,0,0,0.4); padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.05); }
.ticket-barcode { 
    font-family: 'Courier New', monospace; font-size: 1.8rem; letter-spacing: 8px; opacity: 0.3; color: var(--accent-gold); 
    margin-bottom: 0;
    
    /* NOUVEAU : Pousse le code-barre tout en bas du billet, peu importe la taille du nom au-dessus ! */
    margin-top: auto; 
}

.ticket-btn-container { display: flex; justify-content: center; margin-top: 30px; width: 100%; }
.ticket-btn-container .btn-elegant { width: auto !important; min-width: 250px; max-width: 350px; padding: 12px 24px; }


/* =========================================
   ✅ MINI-LECTEUR YOUTUBE ULTRA-PREMIUM
   ========================================= */
#premium-yt-player {
    position: fixed; bottom: 30px; left: 30px;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(212, 175, 55, 0.25); 
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px; 
    display: flex; align-items: center; gap: 15px; 
    padding: 12px 20px 12px 15px;
    z-index: 9999; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.7), 0 0 20px rgba(212, 175, 55, 0.05);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.26, 1.55); 
    max-width: 350px;
}
#premium-yt-player:hover { 
    background: rgba(25, 25, 25, 0.95);
    border-color: rgba(212, 175, 55, 0.5); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 25px rgba(212, 175, 55, 0.15);
}

/* Animation de réduction du lecteur */
#premium-yt-player.minimized {
    transform: translateY(calc(100% + 10px));
    box-shadow: none;
    opacity: 0.9;
}

.yt-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.yt-btn { 
    background: none; border: none; color: var(--text-muted); cursor: pointer; 
    padding: 0; transition: all 0.3s; 
    display:flex; justify-content:center; align-items:center; outline: none;
    flex-shrink: 0; width: 32px; height: 32px; 
}
.yt-btn:hover { color: var(--accent-gold); transform: scale(1.15); }

.yt-play-btn { 
    width: 42px; height: 42px; min-width: 42px; min-height: 42px; border-radius: 50%; 
    flex-shrink: 0; background: linear-gradient(135deg, var(--accent-gold), #b5952f);
    color: #000; box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4); border: none;
}
.yt-play-btn:hover { color: #000; transform: scale(1.1); box-shadow: 0 6px 15px rgba(212, 175, 55, 0.6); }

.yt-info { display: flex; flex-direction: column; overflow: hidden; flex: 1; min-width: 140px; margin-left: 5px; }
.yt-title { color: #fff; font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Montserrat', sans-serif; letter-spacing: 0.5px; }
.yt-subtitle { color: var(--accent-gold); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 2px; opacity: 0.9; }

.yt-eq { display: flex; gap: 4px; height: 16px; align-items: flex-end; opacity: 0.3; transition: opacity 0.3s; margin-left: 10px; flex-shrink: 0; }
.yt-eq.playing { opacity: 1; }
.yt-eq span { width: 3px; background: var(--accent-gold); border-radius: 3px; animation: eq-bounce 1s infinite ease-in-out; transform-origin: bottom; }
.yt-eq span:nth-child(1) { animation-delay: 0.1s; height: 60%; }
.yt-eq span:nth-child(2) { animation-delay: 0.3s; height: 100%; }
.yt-eq span:nth-child(3) { animation-delay: 0.5s; height: 40%; }
.yt-eq span:nth-child(4) { animation-delay: 0.2s; height: 80%; }
@keyframes eq-bounce { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

/* =========================================
   📸 DESIGN GALERIE & JUKEBOX (RESTAURATION MASONRY & FIXES)
   ========================================= */

/* 1. Champs de recherche et de filtres */
.search-input {
    width: 100%; padding: 14px 20px; background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50px;
    color: var(--text-main); font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease; outline: none; box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}
.search-input:focus {
    border-color: var(--accent-gold); background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3), inset 0 2px 5px rgba(0,0,0,0.5);
}

/* 2. Zone de glisser-déposer (Upload Galerie) */
.file-upload-wrapper {
    position: relative; border: 2px dashed rgba(212, 175, 55, 0.5);
    border-radius: 16px; padding: 40px 20px; text-align: center;
    background: rgba(0, 0, 0, 0.3); transition: all 0.3s ease;
    margin-bottom: 20px; cursor: pointer;
}
.file-upload-wrapper:hover { border-color: var(--accent-gold); background: rgba(212, 175, 55, 0.1); }
#file-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; }
.file-upload-ui h4 { color: var(--accent-gold); margin: 0 0 10px 0; font-size: 1.2rem; }

/* 3. Boutons de Diaporama et Accordéons */
.play-global-btn {
    background: linear-gradient(135deg, var(--accent-gold), #b5952f); color: #000;
    border: none; border-radius: 50px; padding: 15px 30px; font-weight: bold; font-size: 1.1rem;
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4); transition: transform 0.3s;
}
.play-global-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(212, 175, 55, 0.6); }
.play-global-btn svg { width: 20px; height: 20px; fill: currentColor; }

.play-circle-btn {
    background: rgba(212, 175, 55, 0.2); border: 1px solid var(--accent-gold);
    color: var(--accent-gold); border-radius: 50%; display: flex; justify-content: center; align-items: center;
    cursor: pointer; transition: all 0.3s; padding: 0; outline: none; flex-shrink: 0;
}
.play-circle-btn:hover { background: var(--accent-gold); color: #000; transform: scale(1.15); }
.play-circle-btn svg { fill: currentColor; width: 45%; height: 45%; }
.author-size { width: 45px; height: 45px; min-width: 45px; }
.album-size { width: 35px; height: 35px; min-width: 35px; }

/* Bloc Album : Paddings explicites */
.album-block {
    padding: 20px 25px !important;
    transition: all 0.4s ease;
}

/* 🎯 ALIGNEMENT HORIZONTAL DES BOUTONS D'ALBUM */
.album-block .accordion-header > div:last-child {
    display: flex !important; flex-direction: row !important; gap: 10px !important;
    justify-content: flex-end; margin-left: auto; flex-wrap: nowrap !important;
    align-items: center !important; 
}
.album-block .accordion-header .btn-elegant {
    width: auto !important; margin-top: 0 !important; margin-bottom: 0 !important;
    white-space: nowrap !important; flex: 0 1 auto;
}

/* Accordéons - Apparence & Comportement */
.accordion-header { cursor: pointer; transition: opacity 0.3s; }
.accordion-header:hover { opacity: 0.8; }
.chevron-wrapper { display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.4); border-radius: 50%; flex-shrink: 0;}
.chevron { transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.collapsed-chevron { transform: rotate(-90deg); }

.accordion-content { 
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s; 
    overflow: hidden; opacity: 1; 
}

/* 4. VRAIE GALERIE MASONRY */
.gallery-grid {
    display: block !important;
    column-count: 3 !important;
    column-gap: 20px !important;
    margin-top: 15px !important;
}

/* 🎯 CORRECTION : SUPPRESSION DU VIDE SOUS L'ALBUM FERMÉ */
/* On force le margin-top à disparaître quand la grille est fermée */
.collapsed-content, .collapsed-content.gallery-grid { 
    max-height: 0 !important; opacity: 0 !important; 
    margin: 0 !important; padding: 0 !important; border: none !important; 
}
.header-collapsed { border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.album-collapsed { padding: 12px 25px !important; margin-bottom: 10px !important; }


/* 🎯 CORRECTION : ZOOM DE LA PHOTO SANS COUPER LA GRILLE */
.gallery-item {
    position: relative !important; display: inline-block !important;
    width: 100% !important; margin: 0 0 20px 0 !important; 
    border-radius: 12px !important; overflow: hidden !important; 
    break-inside: avoid !important; border: 2px solid transparent !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5) !important;
    background: rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
    transform: translateZ(0); /* Empêche les bugs de coupe sur Safari/Chrome */
}
/* On ne fait plus grossir la carte, juste la bordure ! */
.gallery-item:hover { border-color: var(--accent-gold) !important; z-index: 2; box-shadow: 0 10px 25px rgba(0,0,0,0.8) !important; }

/* C'est l'image à l'intérieur qui zoome, sans déborder ! */
.lazy-img {
    position: relative !important; display: block !important;
    width: 100% !important; height: auto !important; 
    z-index: 2; opacity: 0; 
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease !important;
}
.lazy-img.loaded { opacity: 1; }
.gallery-item:hover .lazy-img { transform: scale(1.08) !important; }

.lazy-bg {
    position: absolute; top: -10%; left: -10%; right: -10%; bottom: -10%;
    background-size: cover; background-position: center; filter: blur(15px); z-index: 1;
}

/* 5. BOUTONS D'INTERACTION SUR LES PHOTOS */
.delete-btn {
    position: absolute !important; top: 12px !important; left: 12px !important; right: auto !important; margin: 0 !important; z-index: 10;
    background: rgba(0,0,0,0.6) !important; border: 1px solid #F44336 !important; color: #fff !important;
    width: 34px !important; height: 34px !important; border-radius: 50% !important;
    display: flex !important; justify-content: center !important; align-items: center !important; font-size: 0.9rem !important;
    cursor: pointer; opacity: 0; transition: all 0.3s; padding: 0 !important;
}
.gallery-item:hover .delete-btn { opacity: 1; }
.delete-btn:hover { background: #F44336 !important; transform: scale(1.15) !important; box-shadow: 0 0 10px rgba(244,67,54,0.5) !important; }

.like-btn {
    position: absolute !important; top: 12px !important; right: 12px !important; left: auto !important; bottom: auto !important; margin: 0 !important; z-index: 10;
    
    /* Annulation des styles généraux qui faisaient bugger ce bouton */
    width: auto !important; min-width: 0 !important; text-transform: none !important; letter-spacing: normal !important; 
    
    background: rgba(0,0,0,0.6) !important; border: 1px solid rgba(255,255,255,0.3) !important; border-radius: 20px !important;
    height: 34px !important; padding: 0 12px !important; 
    display: flex !important; align-items: center !important; gap: 6px !important; color: #fff !important;
    cursor: pointer; transition: all 0.3s; font-family: 'Montserrat', sans-serif !important; font-size: 0.8rem !important; font-weight: bold !important;
    box-sizing: border-box !important;
}
.like-btn svg { width: 15px !important; height: 15px !important; fill: rgba(255,255,255,0.5) !important; transition: fill 0.3s; margin: 0 !important; }
.like-btn:hover { background: rgba(0,0,0,0.8) !important; border-color: #F44336 !important; transform: scale(1.05) !important; }
.like-btn.liked svg { fill: #F44336 !important; }
.like-btn.liked { border-color: #F44336 !important; }

.download-pill {
    position: absolute !important; bottom: 12px !important; left: 50% !important; right: auto !important; margin: 0 !important;
    transform: translateX(-50%) !important; z-index: 10; width: auto !important;
    background: rgba(212,175,55,0.85) !important; color: #000 !important; backdrop-filter: blur(5px);
    text-decoration: none !important; font-size: 0.7rem !important; font-weight: bold !important;
    height: 30px !important; padding: 0 15px !important; border-radius: 20px !important;
    opacity: 0; transition: all 0.3s; display: flex !important; align-items: center !important; justify-content: center !important; white-space: nowrap !important;
    box-sizing: border-box !important;
}
.gallery-item:hover .download-pill { opacity: 1; }
.download-pill:hover { background: var(--accent-hover) !important; transform: translateX(-50%) scale(1.05) !important; box-shadow: 0 4px 10px rgba(212,175,55,0.5) !important; }

/* Ajustements Mobile (Responsive) */
@media (max-width: 768px) {
    .gallery-grid { column-count: 2 !important; column-gap: 10px !important; }
    .gallery-item { margin-bottom: 10px !important; }
    .play-global-btn { font-size: 0.9rem; padding: 12px 20px; }
    .download-pill, .delete-btn, .like-btn { opacity: 1; } 
    
    .download-pill { font-size: 0.6rem !important; height: 26px !important; padding: 0 10px !important; bottom: 8px !important; }
    .like-btn { font-size: 0.7rem !important; height: 28px !important; padding: 0 8px !important; top: 8px !important; right: 8px !important; width: auto !important; }
    .delete-btn { width: 28px !important; height: 28px !important; font-size: 0.8rem !important; top: 8px !important; left: 8px !important; }
    
    .album-block .accordion-header { flex-direction: column; align-items: center !important; text-align: center; }
    .album-block .accordion-header > div { justify-content: center; width: 100%; }
    .album-block .accordion-header > div:last-child { flex-wrap: wrap !important; justify-content: center !important; }
    
    /* 🎯 CORRECTION ALIGNEMENT "SOUVENIRS DE..." */
    .author-section > .accordion-header h2 { 
        margin: 0 !important; /* Annule la marge invisible qui poussait le texte vers le haut */
        font-size: 1.8rem !important; /* Réduit un peu le texte pour éviter qu'il ne s'écrase */
    }
    .author-section > .accordion-header { 
        gap: 10px !important; /* Rapproche les boutons du texte */
    }
    /* On réduit un poil les boutons pour que tout rentre sur une seule ligne parfaitement centrée */
    .author-size { width: 35px !important; height: 35px !important; min-width: 35px !important; }
    .chevron-wrapper { width: 30px !important; height: 30px !important; }
}
@media (max-width: 480px) {
    .gallery-grid { column-count: 1 !important; }
}

/* =========================================
   📱 OPTIMISATIONS RESPONSIVE (MOBILES & TABLETTES)
   ========================================= */

@media (max-width: 768px) {
    section { padding: 80px 15px !important; }
    h1.signature-font { font-size: 3.5rem !important; line-height: 1.2; }
    h2 { font-size: 2rem !important; margin-bottom: 1.5rem !important; }

    body { padding-bottom: 120px; } 
    #rsvp { padding-bottom: 60px; }

    /* Mini-Lecteur Audio Mobile */
    #premium-yt-player {
        bottom: 15px !important; 
        left: 15px !important; 
        right: 15px !important; 
        max-width: none !important;
        width: auto !important;
        padding: 10px 15px !important; 
        justify-content: space-between;
    }
    
    #premium-yt-player.minimized {
        transform: translateY(calc(100% + 5px));
    }
    
    .yt-info { min-width: 0; } 
    .yt-title { font-size: 0.75rem; }
    
    .info-grid, .masonry-grid { grid-template-columns: 1fr; column-count: 1; gap: 15px; }
    .info-card, .timeline-item { padding: 20px !important; }
    
    .golden-ticket { max-width: 100%; margin-bottom: 20px; }
    
    .glass-panel { padding: 20px !important; }
    .input-group { margin-bottom: 1.5rem !important; }
    .btn-elegant, .btn-pulse { padding: 12px 20px !important; font-size: 0.7rem !important; }

    #toast-container { width: 90%; bottom: 85px; }
    .toast { padding: 12px 20px; font-size: 0.85rem; }

    /* CORRECTION DE LA MODALE RSVP POUR PERMETTRE LE SCROLL SUR MOBILE */
    .premium-modal-overlay {
        padding: 20px 10px !important;
        align-items: flex-start !important; /* Force la modale à démarrer en haut de l'écran */
        -webkit-overflow-scrolling: touch; /* Rend le défilement fluide sur iOS */
    }
    
    .premium-modal-container {
        margin: 20px auto 100px auto !important; /* Centre parfaitement avec de l'espace autour */
        padding: 30px 20px !important; 
        width: calc(100% - 20px) !important; /* Force la largeur à s'adapter sans déborder */
        box-sizing: border-box !important; /* Oblige le navigateur à inclure le padding dans la largeur */
        max-height: none !important; 
    }
    
    .premium-modal-header h3 {
        font-size: 1.8rem !important; /* Réduit un peu le titre sur petit écran */
    }
}

@media (max-width: 480px) {
    h1.signature-font { font-size: 2.8rem !important; }
    .countdown { gap: 15px; flex-wrap: wrap; }
    .countdown div span:first-child { font-size: 1.8rem !important; }
    .countdown div:not(:last-child)::after { right: -12px; font-size: 1.2rem; top: 6px; }
}

/* =========================================
   EFFETS PREMIUM (DRAW TEXT, SPOTLIGHT, ENVELOPPE)
   ========================================= */

/* L'Effet Calligraphie (Draw Animation) CORRIGÉ DÉFINITIVEMENT POUR IPHONE */
.draw-text {
    color: transparent !important; 
    -webkit-text-fill-color: transparent !important; 
    -webkit-text-stroke: 1px rgba(212, 175, 55, 0.6);
    /* J'ai ajouté un léger dégradé pour un effet or encore plus premium ✨ */
    background-image: linear-gradient(to right, var(--accent-gold) 0%, #b5952f 100%);
    background-repeat: no-repeat; 
    -webkit-background-clip: text; 
    background-clip: text;
    background-size: 0% 100%; 
    padding-right: 30px; margin-right: -30px;
    animation: drawTextAnim 3.5s ease-in-out forwards; 
    animation-delay: 0.8s;
    
    /* 🔥 LA SOLUTION AU BUG SAFARI : On désactive l'ombre qui noircit le texte */
    text-shadow: none !important; 
}

@keyframes drawTextAnim {
    0% { 
        background-size: 0% 100%; 
        -webkit-text-stroke: 1px rgba(212, 175, 55, 0.6); 
    }
    80% { 
        background-size: 150% 100%; 
        -webkit-text-stroke: 1px rgba(212, 175, 55, 0.6); 
    }
    100% { 
        background-size: 150% 100%; 
        -webkit-text-stroke: 0px transparent; 
        /* Plus aucun filtre ici, on laisse l'or pur briller ! */
    }
}

/* L'Effet Spotlight (Lampe Torche) */
.spotlight-card { position: relative; overflow: hidden; }
.spotlight-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle 350px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(212, 175, 55, 0.15), transparent 40%);
    opacity: 0; transition: opacity 0.4s ease; pointer-events: none; z-index: 0;
}
.spotlight-card:hover::before { opacity: 1; }
.spotlight-card > * { position: relative; z-index: 1; } 

/* L'Envol de l'Enveloppe (Livre d'Or) */
.btn-fly-away { animation: flyAway 0.8s forwards cubic-bezier(0.5, 0, 0.2, 1) !important; pointer-events: none; border-color: transparent !important; }
@keyframes flyAway {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    30% { transform: translateY(5px) scale(0.95); opacity: 1; background: var(--accent-gold); color: #000; }
    100% { transform: translateY(-150px) scale(0.5); opacity: 0; }
}

/* =========================================
   TRAÎNÉE MAGIQUE (POUSSIÈRE D'ÉTOILES) ✨ 
   ========================================= */
.magic-particle {
    position: fixed; pointer-events: none; background: #ffffff; border-radius: 50%; z-index: 999999;
    box-shadow: 0 0 8px var(--accent-gold), 0 0 15px var(--accent-gold), 0 0 25px var(--accent-hover);
    animation: magicTrailAnim 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes magicTrailAnim {
    0% { transform: scale(1) translate(0, 0); opacity: 1; }
    100% { transform: scale(0) translate(var(--end-x), var(--end-y)); opacity: 0; }
}

/* =========================================
   LIVRE D'OR VOCAL 🎙️
   ========================================= */
.btn-mic {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 50px; background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2); color: var(--text-main); cursor: pointer;
    transition: all 0.3s; font-family: 'Montserrat', sans-serif; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px;
}
.btn-mic:hover { border-color: var(--accent-gold); background: rgba(212, 175, 55, 0.1); }

/* Le point rouge qui clignote pendant l'enregistrement */
.recording-pulse { display: inline-block; width: 10px; height: 10px; background: #F44336; border-radius: 50%; animation: redPulse 1.5s infinite; margin-right: 5px; }
@keyframes redPulse { 0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); } }

/* Le bouton Lecture sur les cartes du Livre d'Or */
.play-audio-btn { width: 42px; height: 42px; border-radius: 50%; min-width: 42px; background: linear-gradient(135deg, var(--accent-gold), #b5952f); color: #000; border: none; display: flex; justify-content: center; align-items: center; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 10px rgba(212,175,55,0.4); transition: transform 0.3s; }
.play-audio-btn:hover { transform: scale(1.1); }
.play-audio-btn.playing { animation: pulse-gold 1.5s infinite; }

/* Interface d'enregistrement */
.recording-glass-panel { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(12px); border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 50px; padding: 12px 25px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 0 15px rgba(212, 175, 55, 0.1); }
.recording-status { display: flex; align-items: center; gap: 12px; color: var(--accent-gold); font-family: 'Montserrat', sans-serif; font-weight: 500; font-size: 0.9rem; }
.btn-stop-record { background: rgba(244, 67, 54, 0.1); border: 1px solid rgba(244, 67, 54, 0.4); color: #ff8a80; padding: 8px 20px; border-radius: 30px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; }
.btn-stop-record:hover { background: rgba(244, 67, 54, 0.8); color: #fff; border-color: #F44336; box-shadow: 0 0 15px rgba(244, 67, 54, 0.4); transform: scale(1.05); }

/* =========================================
   ✅ MODALE RSVP ULTRA-PREMIUM (CORRIGÉE POUR SCROLL)
   ========================================= */
.premium-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(20,20,20,0.85) 0%, rgba(5,5,5,0.98) 100%);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 9998; justify-content: center; 
    align-items: flex-start; /* Autorise le scroll si la modale est immense */
    overflow-y: auto; padding: 0 15px; opacity: 0; transition: opacity 0.5s ease;
}

.premium-modal-container {
    width: 100%; max-width: 650px; 
    margin: 60px auto 120px auto !important; /* Marges de sécurité haut et bas */
    position: relative;
    background: linear-gradient(145deg, rgba(30,30,30,0.95), rgba(15,15,15,0.98));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-top: 4px solid var(--accent-gold);
    border-radius: 16px; padding: 50px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.9), inset 0 0 40px rgba(212,175,55,0.05);
    transform: translateY(40px) scale(0.95); transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.premium-modal-overlay.open { opacity: 1; }
.premium-modal-overlay.open .premium-modal-container { transform: translateY(0) scale(1); }

.premium-close-btn {
    position: absolute; top: 25px; right: 25px; width: 45px; height: 45px;
    border-radius: 50%; background: rgba(0,0,0,0.4); border: 1px solid rgba(212,175,55,0.3);
    color: var(--accent-gold); display: flex; justify-content: center; align-items: center;
    cursor: pointer; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.26, 1.55);
    backdrop-filter: blur(5px); outline: none; padding: 0;
}
.premium-close-btn:hover { background: var(--accent-gold); color: #000; transform: rotate(90deg) scale(1.1); box-shadow: 0 0 20px rgba(212,175,55,0.5); border-color: var(--accent-gold); }

.premium-modal-header { text-align: center; margin-bottom: 40px; }
.premium-modal-header h3 { font-size: 2.2rem; margin: 0 0 5px 0; letter-spacing: 3px; color: var(--accent-gold); }
.premium-modal-header .subtitle { font-family: 'Great Vibes', cursive; font-size: 2rem; color: var(--text-main); opacity: 0.9; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }

.vip-subcard {
    background: linear-gradient(135deg, rgba(212,175,55,0.08) 0%, rgba(0,0,0,0.6) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2); border-left: 4px solid var(--accent-gold);
    border-radius: 12px; padding: 25px; margin-bottom: 20px; position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5); transition: border-color 0.3s;
}
.vip-subcard:hover { border-color: rgba(212, 175, 55, 0.5); }
.vip-subcard-title { color: var(--accent-gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 20px; font-weight: 600; }

/* =========================================
   ✅ NAVIGATION ULTRA-PREMIUM (CORRIGÉE)
   ========================================= */

/* Suppression stricte des soulignements */
#main-nav a,
#main-nav .nav-items a,
#main-nav .nav-direct-link,
#main-nav .nav-title,
.nav-title {
    text-decoration: none !important;
}

.burger-icon { display: none !important; }

#main-nav {
    position: fixed !important; top: 25px !important; left: 50% !important; transform: translateX(-50%) !important;
    width: max-content !important; padding: 8px 15px !important; background: rgba(15, 15, 15, 0.65) !important;
    backdrop-filter: blur(25px) !important; border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 50px !important; display: flex !important; flex-direction: row !important;
    justify-content: center !important; align-items: center !important; z-index: 1000 !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), inset 0 0 15px rgba(255,255,255,0.05) !important;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important; overflow: visible !important;
}
#main-nav:hover { background: rgba(20, 20, 20, 0.8) !important; border-color: rgba(212, 175, 55, 0.6) !important; box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(212, 175, 55, 0.1) !important; }
.nav-section { position: relative; margin: 0 2px !important; border: none !important; display: flex; align-items: center; }

.nav-title {
    color: var(--text-main) !important; font-size: 0.80rem !important; text-transform: uppercase !important;
    letter-spacing: 1.5px !important; padding: 12px 22px !important; cursor: pointer !important;
    display: flex !important; align-items: center !important; gap: 8px; transition: all 0.3s; font-weight: 500 !important; margin: 0 !important; border-radius: 40px;
}
.nav-title:hover, .nav-section.active .nav-title { background: rgba(212, 175, 55, 0.15) !important; color: var(--accent-gold) !important; }
.nav-arrow { font-size: 0.55rem !important; color: var(--accent-gold); transition: transform 0.4s; }
.nav-section:hover .nav-arrow { transform: rotate(180deg); }

.nav-items {
    position: absolute; top: calc(100% + 15px); left: 50%; transform: translateX(-50%) translateY(15px) scale(0.95);
    min-width: 230px; background: linear-gradient(145deg, rgba(25, 25, 25, 0.95), rgba(10, 10, 10, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.4); border-top: 3px solid var(--accent-gold); border-radius: 16px;
    padding: 12px 0; box-shadow: 0 20px 40px rgba(0,0,0,0.8); opacity: 0; visibility: hidden; transition: all 0.4s;
}
.nav-section:hover .nav-items { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1); }
#main-nav .nav-items a { display: block !important; padding: 12px 25px !important; font-size: 0.85rem !important; color: var(--text-muted) !important; border-radius: 8px !important; transition: all 0.3s; margin: 2px 10px !important;}
#main-nav .nav-items a:hover, #main-nav .nav-items a.active { color: #fff !important; background: rgba(212, 175, 55, 0.2) !important; transform: translateX(5px); }

#main-nav .nav-direct-link { display: block !important; padding: 12px 22px !important; margin: 0 2px !important; font-size: 0.80rem !important; font-weight: 500 !important; text-transform: uppercase !important; letter-spacing: 1.5px !important; color: var(--text-main) !important; border-radius: 40px !important; transition: all 0.3s; }
#main-nav .nav-direct-link:hover, #main-nav .nav-direct-link.active { background: rgba(212, 175, 55, 0.15) !important; color: var(--accent-gold) !important; }

#main-nav a[href*="#rsvp"] { background: linear-gradient(135deg, var(--accent-gold) 0%, #b5952f 100%) !important; color: #000 !important; font-weight: 700 !important; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important; margin-left: 10px !important; }
#main-nav a[href*="#rsvp"]:hover { box-shadow: 0 6px 20px rgba(212, 175, 55, 0.7) !important; transform: translateY(-2px) !important; }

@media (max-width: 1024px) {
    /* BOUTON BURGER (Fixé, Doré et Sans fond) */
    .burger-icon { 
        display: flex !important; 
        position: fixed; /* Reste visible au scroll */
        top: 20px; 
        right: 25px; 
        z-index: 10001; /* Reste TOUJOURS au-dessus du menu ouvert */
        width: 45px; 
        height: 45px; 
        justify-content: center; 
        align-items: center; 
        background: transparent; /* Plus de fond */
        border: none; /* Plus de bordure */
        color: var(--accent-gold); /* Les trois traits en doré */
        font-size: 2.2rem; /* Un peu plus grand pour être cliquable facilement */
        cursor: pointer;
        transition: transform 0.3s ease;
        text-shadow: 0 2px 5px rgba(0,0,0,0.8); /* Léger effet pour bien le voir sur fond clair */
    }
    .burger-icon:hover { transform: scale(1.1); }
    
    /* LE MENU PLEIN ÉCRAN */
    #main-nav { 
        position: fixed !important; 
        top: 0 !important; 
        left: 0 !important; 
        width: 100% !important; 
        max-width: 100% !important; 
        height: 100vh !important; 
        background: rgba(10, 10, 10, 0.98) !important; 
        border-radius: 0 !important; 
        flex-direction: column !important; 
        justify-content: flex-start !important; 
        align-items: center !important; /* Centre tout le contenu */
        padding: 100px 0 30px 0 !important; 
        overflow-y: auto !important; 
        transform: translateX(100%) !important; 
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1) !important; 
    }
    #main-nav.open { 
        transform: translateX(0) !important; 
    }
    
    .nav-section { margin: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; display: flex; flex-direction: column; align-items: center; width: 100%; }
    
    /* Titres centrés */
    .nav-title { padding: 22px 20px !important; border-radius: 0 !important; justify-content: center !important; font-size: 1.1rem !important; width: 100%; text-align: center; position: relative; }
    .nav-title .nav-arrow { position: absolute; right: 30px; } /* Garde la petite flèche à droite pour indiquer le déroulant */

    /* Sous-menus : correction de l'invisibilité */
    .nav-items { 
        position: relative; top: auto; left: auto; transform: none !important; 
        width: 100%; background: rgba(0, 0, 0, 0.3); border: none; 
        max-height: 0 !important; overflow: hidden; 
        opacity: 1 !important; visibility: visible !important; /* Règle le problème d'invisibilité ! */
        box-shadow: none !important; border-radius: 0 !important; padding: 0 !important;
        transition: max-height 0.4s ease-in-out !important; 
    }
    .nav-section.active .nav-items { max-height: 400px !important; }
    
    /* Liens des sous-menus centrés */
    #main-nav .nav-items a { padding: 16px 20px !important; border-radius: 0 !important; margin: 0 !important; text-align: center !important; font-size: 0.95rem !important; border-bottom: 1px solid rgba(255,255,255,0.02); }
    
    /* Liens directs (Admin, Déconnexion) centrés */
    #main-nav .nav-direct-link { padding: 22px 20px !important; margin: 0 !important; border-radius: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; font-size: 1.1rem !important; width: 100%; text-align: center !important; display: block !important; }
    
    /* Bouton RSVP */
    #main-nav a[href*="#rsvp"] { margin: 30px auto !important; width: 80% !important; text-align: center !important; border-radius: 50px !important; border-bottom: none !important; }
}

/* =========================================
   BOUTON SUPPRIMER (ICÔNE CORBEILLE VIP, ENFANTS, AUDIO)
   ========================================= */
.btn-delete-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important; /* Empêche l'écrasement sur mobile */
    padding: 0 !important;
    background: rgba(244, 67, 54, 0.1) !important; /* Fond rouge très léger */
    border: 1px solid rgba(244, 67, 54, 0.3) !important;
    color: #e57373 !important; /* Couleur de l'icône */
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

.btn-delete-icon:hover, 
.btn-delete-icon:active {
    background: rgba(244, 67, 54, 0.9) !important;
    color: #ffffff !important;
    border-color: #F44336 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.4) !important;
}

.btn-delete-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important; /* L'icône prendra automatiquement la couleur du texte */
    margin: 0 !important;
}

/* =========================================
   ✨ RE-DESIGN PREMIUM : LIVRE D'OR & AUDIO PREVIEW
   ========================================= */

/* 1. Ajustement parfait des cartes du Livre d'Or */
.tilt-msg {
    padding-top: 45px !important;
    position: relative;
}

.tilt-msg .btn-delete-msg {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 50 !important;
    margin: 0 !important;
    transform: translateZ(30px) !important; 
}

.tilt-msg .btn-delete-msg:hover {
    transform: translateZ(30px) scale(1.1) !important;
}

/* 2. Le lecteur de prévisualisation (Quand le vocal est prêt) */
.audio-preview-card {
    background: rgba(20, 20, 20, 0.7) !important;
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(212, 175, 55, 0.1) !important;
    position: relative;
    overflow: hidden;
    
    /* 🔥 LA CORRECTION : Forcer l'affichage en colonne quand le JS l'active en flex */
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.audio-preview-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    animation: goldScanline 3s infinite linear;
}
@keyframes goldScanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.audio-preview-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.3) !important;
    width: 100% !important; /* Assure que le header prend toute la largeur */
}

.audio-preview-header span {
    color: var(--accent-gold) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.audio-preview-header .btn-delete-icon {
    position: static !important;
    margin: 0 !important;
}

/* 3. Thème Doré pour le lecteur Audio Natif (Chrome/Safari) */
audio#audio-preview {
    width: 100% !important;
    height: 45px !important;
    outline: none !important;
    border-radius: 30px !important;
    background-color: transparent !important;
}

audio#audio-preview::-webkit-media-controls-panel {
    background-color: rgba(212, 175, 55, 0.1) !important;
    border-radius: 30px !important;
}
audio#audio-preview::-webkit-media-controls-play-button,
audio#audio-preview::-webkit-media-controls-mute-button {
    background-color: var(--accent-gold) !important;
    border-radius: 50%;
}
audio#audio-preview::-webkit-media-controls-current-time-display,
audio#audio-preview::-webkit-media-controls-time-remaining-display {
    color: #fff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* =========================================
   ÉGALISEUR DORÉ (LIVRE D'OR VOCAL)
   ========================================= */
.audio-waveform {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    height: 35px !important;
    flex: 1 !important; /* Permet à l'égaliseur de prendre l'espace disponible au centre */
    justify-content: center !important;
}

.audio-waveform span {
    display: block !important;
    width: 4px !important;
    background: var(--accent-gold) !important;
    border-radius: 4px !important;
    opacity: 0.3 !important; /* Semi-transparent à l'arrêt */
    transition: opacity 0.3s ease !important;
    transform-origin: center !important;
}

/* Quand on clique sur play (la classe 'playing' est ajoutée par ton JS) */
.audio-waveform.playing span {
    opacity: 1 !important; /* Devient or vif */
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6) !important;
    animation: waveformBounce 0.6s infinite alternate ease-in-out;
}

/* Désynchronisation des barres pour un vrai effet d'onde vocale */
.audio-waveform.playing span:nth-child(1) { animation-delay: 0.1s; }
.audio-waveform.playing span:nth-child(2) { animation-delay: 0.4s; }
.audio-waveform.playing span:nth-child(3) { animation-delay: 0.2s; }
.audio-waveform.playing span:nth-child(4) { animation-delay: 0.6s; }
.audio-waveform.playing span:nth-child(5) { animation-delay: 0.3s; }
.audio-waveform.playing span:nth-child(6) { animation-delay: 0.7s; }
.audio-waveform.playing span:nth-child(7) { animation-delay: 0.15s; }
.audio-waveform.playing span:nth-child(8) { animation-delay: 0.45s; }
.audio-waveform.playing span:nth-child(9) { animation-delay: 0.25s; }
.audio-waveform.playing span:nth-child(10) { animation-delay: 0.55s; }

@keyframes waveformBounce {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1.3); }
}

/* =========================================
   UX VIP : FLOATING LABELS, RSVP PULSE & LIVE AUDIO
   ========================================= */

/* 1. Pulsation du bouton RSVP (Si en attente) */
.nav-rsvp-pulse {
    animation: navPulseGold 2.5s infinite !important;
}
@keyframes navPulseGold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* 2. Visualiseur Audio en Temps Réel */
#live-audio-visualizer {
    width: 100px;
    height: 30px;
    margin: 0 15px;
    border-radius: 15px;
}

/* =========================================
   3. Floating Labels (VERSION 100% JAVASCRIPT)
   ========================================= */
.floating-group {
    position: relative !important;
    width: 100% !important;
    margin-bottom: 1.5rem !important;
    display: block !important; 
}

.floating-group input, 
.floating-group textarea {
    width: 100% !important;
    padding: 24px 15px 8px 15px !important; /* Laisse l'espace en haut */
    margin-bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: var(--text-main) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    position: relative !important;
    z-index: 1 !important; /* L'input est en-dessous du label */
}

.floating-group textarea {
    resize: vertical !important;
    min-height: 100px !important;
}

/* Cache le placeholder natif au cas où */
.floating-group input::placeholder,
.floating-group textarea::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

/* --- LE LABEL PAR DÉFAUT (CENTRE) --- */
.floating-group label {
    position: absolute !important;
    top: 24px !important; /* Positionné vers le milieu */
    left: 15px !important;
    transform: translateY(-50%) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.9rem !important;
    pointer-events: none !important; /* Clic passe à travers */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    margin: 0 !important;
    z-index: 10 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 30px) !important;
}

/* --- L'ANIMATION MAGIQUE (DÉCLENCHÉE PAR LE JS) --- */
.floating-group.active label {
    top: 10px !important;
    transform: translateY(0) !important;
    font-size: 0.65rem !important;
    color: var(--accent-gold) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 700 !important;
}

/* =========================================
   ✨ BOUTON RSVP NAVIGATION (ULTRA-PREMIUM V2)
   ========================================= */

/* On neutralise l'ancienne animation qui bloquait le bouton */
.nav-rsvp-pulse { 
    animation: none !important; 
}

/* 1. Le bouton de base : Or profond et texte blanc pur */
#main-nav a[href*="#rsvp"] { 
    position: relative !important;
    background: linear-gradient(135deg, #d4af37 0%, #a67c00 100%) !important; 
    color: #ffffff !important; 
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6) !important; /* Rend le texte parfaitement lisible */
    font-weight: 700 !important; 
    letter-spacing: 2px !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important; 
    margin-left: 15px !important; 
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 50px !important;
    overflow: visible !important; 
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* 🌟 LE SURVOL LUXE : Inversion des couleurs (Fond noir, texte Or) */
#main-nav a[href*="#rsvp"]:hover { 
    background: rgba(15, 15, 15, 0.95) !important; /* Noir presque opaque */
    color: var(--accent-gold) !important; /* Texte Or */
    text-shadow: none !important; /* Plus besoin d'ombre sur fond noir */
    border-color: var(--accent-gold) !important; /* Bordure Or */
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6), inset 0 0 15px rgba(212, 175, 55, 0.2) !important; 
    transform: translateY(-3px) !important; 
}

/* Cache le reflet blanc quand le bouton devient noir au survol */
#main-nav a[href*="#rsvp"]:hover::before {
    opacity: 0 !important;
}

/* 2. Le reflet métallique (Shine) animé en continu */
#main-nav a[href*="#rsvp"]::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.4) 50%, transparent 80%);
    background-size: 200% 100%;
    animation: rsvpShine 3s infinite linear;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    transition: opacity 0.3s ease !important;
}
@keyframes rsvpShine {
    0% { background-position: -150% 0; }
    100% { background-position: 150% 0; }
}

/* 3. L'onde de choc (Pulse Sonar) SI en attente de réponse */
#main-nav a[href*="#rsvp"].nav-rsvp-pulse::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    border: 2px solid var(--accent-gold);
    animation: rsvpSonar 2s infinite ease-out;
    z-index: -1; 
    pointer-events: none;
}
@keyframes rsvpSonar {
    0% { transform: scale(1); opacity: 1; border-width: 2px; }
    100% { transform: scale(1.4); opacity: 0; border-width: 0px; }
}