/* =========================================
   1. VARIABLES & RESET (La base)
   ========================================= */
:root {
    --primary: #d4af37; /* Or mat (le côté chic) */
    --dark: #2c3e50;    /* Bleu nuit très sombre */
    --light: #ecf0f1;
    --success: #27ae60; /* Vert pour "Présent" */
    --danger: #c0392b;  /* Rouge pour "Absent" */
    
    /* Polices chargées via Google Fonts dans le HTML */
    --font-fancy: 'Great Vibes', cursive;
    --font-body: 'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; } /* Défilement fluide quand on clique sur un lien */

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: #f4f4f4;
    color: var(--dark);
    line-height: 1.6;
}

/* =========================================
   2. HERO HEADER (Bloc 1 - La Plage)
   ========================================= */
.hero {
    /* ATTENTION: Assure-toi que l'image s'appelle bien plage.jpg */
    background-image: url('plage.png'); 
    height: 100vh; /* Prend tout l'écran */
    background-attachment: fixed; /* L'effet Parallax (l'image reste fixe quand on scrolle) */
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    color: white;
}

.overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); /* Assombrit la photo pour lire le texte */
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeIn 2s ease-in; /* Petite animation d'arrivée */
}

.grandiloquent {
    font-family: var(--font-fancy);
    font-size: 5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Ombre portée sous le texte */
}

.date {
    font-size: 1.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 10px;
    font-weight: 300;
}

.scroll-indicator {
    margin-top: 30px;
    font-size: 2rem;
    animation: bounce 2s infinite;
    opacity: 0.8;
}

/* =========================================
   3. BANNIÈRE SÉPARATRICE (Photo N&B)
   ========================================= */
.banner-separator {
    /* ATTENTION: Assure-toi que l'image s'appelle bien banniere_nb.jpg */
    background-image: url('banniere_nb.png');
    height: 300px;
    background-position: center;
    background-size: cover;
    filter: grayscale(100%) contrast(1.2); /* Force le N&B et le contraste */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5); /* Ombre intérieure */
}

/* =========================================
   4. CONTENEUR PRINCIPAL & CARTES
   ========================================= */
.container {
    max-width: 900px; /* Un peu plus large pour faire tenir les 2 maps */
    margin: -60px auto 50px; /* Chevauchement sur la bannière du haut */
    position: relative;
    padding: 0 20px;
    z-index: 10;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* L'ombre qui donne du volume */
    margin-bottom: 40px;
    text-align: center;
}

h2 {
    font-family: var(--font-fancy);
    font-size: 3rem;
    color: var(--dark);
    margin-top: 0;
    margin-bottom: 10px;
}

.subtitle {
    font-style: italic;
    color: #777;
    margin-bottom: 30px;
}

/* =========================================
   5. NOUVEAU : GESTION DU SPLIT (Église / Salle)
   ========================================= */
.split-container {
    display: flex;              /* Flexbox pour mettre côte à côte */
    justify-content: space-between; 
    align-items: flex-start;    
    gap: 20px;                  
    margin-top: 20px;
}

.split-col {
    flex: 1;                    /* Force largeur égale */
    text-align: center;
    background: #fdfdfd;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.split-col h3 {
    font-family: var(--font-fancy);
    font-size: 2rem;
    color: var(--primary);
    margin: 0 0 10px 0;
}

.split-col .time {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 5px 0;
    color: var(--dark);
    display: block;
}

.split-col .address {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    min-height: 45px; /* Évite le décalage si une adresse est plus longue */
}

.split-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ccc; /* Gris clair discret */
    padding-top: 80px; /* Descend la flèche au niveau visuel des maps */
}

/* Gestion des Iframes Google Maps */
.map-responsive {
    overflow: hidden;
    position: relative;
    height: 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Format standard (si utilisé ailleurs) */
.map-responsive iframe {
    left: 0; top: 0; height: 100%; width: 100%; position: absolute;
}

/* Format spécifique pour le split (plus carré) */
.map-responsive.small-map {
    padding-bottom: 80%; /* Ratio 4:5 */
}

/* =========================================
   6. FORMULAIRE & BOUTONS
   ========================================= */
.form-group { margin-bottom: 20px; text-align: left; }

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    box-sizing: border-box; /* Important pour ne pas déborder */
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Radio buttons stylisés */
.radio-group {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.radio-label {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: 0.3s;
    background: #fafafa;
}

.radio-label:hover { border-color: var(--primary); }
input[type="radio"] { display: none; } /* On cache le vrai bouton moche */

/* Si coché */
input[type="radio"]:checked + span { color: var(--primary); font-weight: bold; }
.radio-label:has(input:checked) { border-color: var(--primary); background: white; }

/* Bouton Envoyer */
.btn-submit {
    background: var(--dark);
    color: white;
    padding: 15px 50px;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50px;
    transition: transform 0.2s, background 0.2s;
    margin-top: 10px;
}
.btn-submit:hover { 
    transform: scale(1.05); 
    background: var(--primary); 
}

/* Messages d'alerte PHP */
.alert {
    background: var(--success);
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* =========================================
   7. LISTE INVITÉS (Bonus)
   ========================================= */
.guest-list { margin-top: 50px; }

.guest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    text-align: left;
}

.guest-card {
    background: white;
    padding: 15px;
    border-radius: 5px;
    border-left: 5px solid var(--success);
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.guest-card.is-absent { 
    border-left-color: var(--danger); 
    opacity: 0.7; 
}

.status { display: block; font-size: 0.8rem; margin-top: 5px; color: #666; }
.guest-msg { font-style: italic; color: #888; font-size: 0.8rem; margin-top: 5px; }

/* =========================================
   8. FOOTER
   ========================================= */
footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 0.8rem;
    margin-bottom: 20px;
}

/* =========================================
   9. ANIMATIONS & MEDIA QUERIES
   ========================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .grandiloquent { font-size: 3rem; }
    
    .banner-separator { height: 150px; }
    
    /* Transformation du Split en colonne verticale */
    .split-container {
        flex-direction: column;
        gap: 0;
    }

    .split-separator {
        transform: rotate(90deg); /* La flèche pointe vers le bas */
        padding: 10px 0;
    }
    
    .split-col {
        width: 100%;
        box-sizing: border-box; /* Empêche le débordement du padding */
        margin-bottom: 10px;
    }

    .radio-group {
        flex-direction: column; /* Boutons radios l'un sous l'autre sur mobile */
    }
}