/* --- POLICES ET VARIABLES (Thème Deauville Vintage) --- */
/* Importation de Playfair (Titres), Montserrat (Texte), et Great Vibes (Calligraphie pour les prénoms) */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Montserrat:wght@300;400;600&family=Playfair+Display:ital,wght@0,700;1,400&display=swap');
 
::-webkit-scrollbar {
    display: none;
}
:root {
    /* Typographie */
    --font-titres: 'Playfair Display', serif; /* Pour le côté "Gazette / Journal" */
    --font-texte: 'Montserrat', sans-serif; /* Moderne et très lisible */
    --font-prenoms: 'Great Vibes', cursive; /* Élégant, comme sur la maquette client */

    /* Palette de couleurs Deauville / Plage pastel */
    --couleur-principale: #1C3F60; /* Bleu marine (rappel marinière et océan) */
    --couleur-secondaire: #F4EEDD; /* Sable / Parchemin clair (fond vintage) */
    --couleur-texte: #2C3E50; /* Gris/Bleu très foncé pour lire confortablement */
    --couleur-prenoms-clair: #aa9c61; /* Ton beige clair */
    --couleur-prenoms-fonce: #d5b845; /* Ton beige foncé */
    --couleur-prenoms-brillant: #eee5c6b9; /* ✨ NOUVEAU : Le reflet de lumière doré ✨ */
    --couleur-bouton: #2C3E50; /* Rouge pastel/brique (rappel des parasols) */
    --couleur-boite: #FFFFFF; /* Blanc pur pour faire ressortir les blocs d'infos */
    --couleur-onglet : #D1E8FF; /* Bleu clair pour les onglets de navigation */
}

body {
    font-family: var(--font-texte);
    margin: 0;
    padding: 0;
    color: var(--couleur-texte);
    background-image: url('images/page.jpeg');
    background-color: var(--couleur-secondaire);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -ms-overflow-style: none;  /* IE et Edge */
    scrollbar-width: none;     /* Firefox */

}

em {
    color : #d4af37; /* Or pour les éléments en italique */
}

/* --- OVERLAY ENVELOPPE (Gazette de Deauville) --- */
#enveloppe-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100dvh;
    
    /* 🌟 LA CORRECTION EST ICI : On applique la texture parchemin 🌟 */
    background-image: url('images/page.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* On garde la couleur sable en sécurité (fallback) au cas où l'image bugge */
    background-color: var(--couleur-secondaire); 
    
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 1s ease-out, visibility 1s;
}

#enveloppe-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#enveloppe-img {
    width: 50%; height: 100%; /* Ajustez selon la taille de votre image */
    cursor: pointer;
}

#flash-ecran {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: white; opacity: 0;
    pointer-events: none; transition: opacity 1.5s ease-out; z-index: 10000;
}
#flash-ecran.active { opacity: 1; }

.instruction-clic {
    position: absolute; bottom: 10%; color: white;
    font-family: var(--font-titres); font-size: 1.2rem;
    pointer-events: none; text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } }

/* --- SITE PRINCIPAL --- */
header {
    position: sticky; top: 0; width: 100%;
    background-image: transparent; /* On garde le header transparent pour voir le fond */;
    text-align: center; z-index: 1000;
}

.hero-section {
    position: relative; display: flex; align-items: center; justify-content: center;
    text-align: center; min-height: 100vh; color: var(--couleur-boite);
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('images/page.jpeg');
    background-size: cover; background-position: center; background-attachment: fixed;
}

.hero-content {
    position: relative; z-index: 2;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2rem; border-radius: 10px; max-width: 90%;

}
.hero-content h1 {
    font-family: var(--font-prenoms);
    font-size: 5.5rem; 
    font-weight: normal; 
    margin : 0 0 1rem 0;
    color: var(--couleur-bouton);
    background-clip: text;
    
    /* On utilise drop-shadow au lieu de text-shadow pour que ça marche avec le dégradé */
    filter: drop-shadow(2px 2px 4px rgba(255,255,255,0.7));
}

.hero-content h2 {
    font-family: var(--font-titres);
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0;
    color: var(--couleur-bouton);
}

/* --- CARROUSEL FLUIDE ET MODERNE --- */
#carrousel-continu { 
    padding: 1rem 0; 
    overflow: hidden; 
    width: 100%;
    background-color: var(--couleur-boite);
}

.scrolling-gallery { 
    width: 100%;
    overflow: hidden;
}

.scrolling-gallery-track { 
    display: flex; 
    width: max-content; /* Permet à la piste de prendre la taille de toutes les photos */
    gap: 10px; /* Espace régulier entre les photos */
    animation: scroll-left 50s linear infinite; /* Temps ajusté pour 14 photos */
}


.scrolling-gallery-track img { 
    height: 150px; 
    width: auto;
    object-fit: cover; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--couleur-boite); /* Petit cadre vintage */    
    transition: transform 0.3s ease;
}

/* Petit effet de zoom sur la photo survolée */
.scrolling-gallery-track img:hover {
    transform: scale(1.05);
}

@keyframes scroll-left { 
    0% { transform: translateX(0%); } 
    /* Le décalage prend en compte la moitié du gap (10px / 2 = 5px) pour une boucle absolument parfaite */
    100% { transform: translateX(calc(-50% - 5px)); } 
}

/* --- COMPTE À REBOURS --- */
#countdown { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
#countdown h2 { width: 100%; font-size: 1.8rem; font-weight: 400; margin-bottom: 1rem; color: var(--couleur-bouton); }
.countdown-box { background-color: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.2); padding: 1rem; border-radius: 8px; min-width: 80px; color: var(--couleur-bouton); }
.countdown-box span { display: block; font-size: 2rem; font-weight: bold; }

/* --- BLOCS INFOS --- */
.page-section { max-width: 900px; margin: 0 auto; padding: 3rem 2rem; text-align: center; }
.page-section h2 { font-family: var(--font-titres); font-size: 2.5rem; color: var(--couleur-bouton); }
.page-section h5 { font-family: var(--font-texte); font-size: 1.1rem; color: var(--couleur-texte); margin-top: 2rem; text-align: right;}
.alternate-bg { background-color: var(--couleur-boite);}
.info-blocks { display: flex; justify-content: space-around; gap: 1.5rem; margin-top: 2rem; }

/* Style des boîtes */
.info-block {
    flex: 1;
    min-width: 250px;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-weight: bolder;
    
    /* --- NOUVEAUX STYLES 'BOITE' --- */
    background-color: var(--couleur-boite); /* Fond blanc pour la boîte */
    padding: 1.5rem; /* Espace intérieur */
    border-radius: 8px; /* Coins arrondis */
    
    /* --- OMBRE SUBTILE AJOUTÉE --- */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Titres "La Mairie" / "La Houppa" : Pas italique */
.info-block h3 {
    font-family: var(--font-prenoms);
    font-size: 1.5rem;
    margin-top: 1rem;
    font-style: normal; 
    text-align: center;
    background-color: var(--couleur-principale); color: var(--couleur-boite); /* Fond bleu marine pour les titres de section */ 
    padding: 0.5rem 1rem; border-radius: 5px; display: inline-block;
    margin-bottom: 1.5rem;
    /* --- OMBRE SUBTILE AJOUTÉE --- */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.info-block h2 { 
    font-family: var(--font-prenoms);
    font-size: 2.3rem;
    font-weight: normal;
    display: block; 
    margin-bottom: 0.5rem; 
    margin-top: 0.5rem;
    
    color: var(--couleur-prenoms-clair);
    background-clip: text;
    filter: drop-shadow(2px 2px 4px rgba(255,255,255,0.7));
    
}

.info-block h4 { font-family: var(--font-titres);
    font-size: 1rem;
    font-style: normal;
    margin-top: 1rem;
    /* --- NOUVEAUX STYLES 'BOITE' --- */
    background-color: var(--couleur-boite);
    color: var(--couleur-bouton); 
    display: inline-block; /* S'adapte à la taille du texte */
    margin-bottom: 0.5rem; /* Espace sous la boîte-titre */
    margin-top: 0.5rem;}

.ligne-partagee { display: flex;
    justify-content: space-between; /* Pousse les éléments aux extrémités */
    align-items: center; /* Aligne verticalement (si jamais) */
    width: 100%; /* Occupe toute la largeur de la boîte */
    margin-top: 1rem;}
.mot-espace { margin-right: 100px; }

.address-link {
    display: block; 
    text-decoration: none; 
    font-weight: bold;
    margin-top: 0.5rem;
    transition: opacity 0.3s ease; /* On utilise l'opacité pour l'animation */
    text-decoration: underline; /* Soulignement subtil au survol */
    text-decoration-color: var(--couleur-prenoms-brillant);
    text-decoration-thickness: 3px;
    background: linear-gradient(105deg, 
        var(--couleur-prenoms-fonce) 0%, 
        var(--couleur-prenoms-clair) 15%, 
        var(--couleur-prenoms-brillant) 28%, /* 1er sommet de la vague (très brillant) */
        var(--couleur-prenoms-clair) 42%, 
        var(--couleur-prenoms-fonce) 55%,    /* Creux de la vague (sombre) */
        var(--couleur-prenoms-clair) 70%, 
        var(--couleur-prenoms-brillant) 82%, /* 2ème sommet (reflet secondaire) */
        var(--couleur-prenoms-clair) 92%,
        var(--couleur-prenoms-fonce) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
}

.address-link:hover {
    opacity: 1; /* Le texte devient très légèrement transparent au survol */
    text-decoration: underline; /* Soulignement subtil au survol */
    text-decoration-color: var(--couleur-prenoms-brillant);
    text-decoration-thickness: 3px;
}

.address-link-transport {
    display: block; 
    text-decoration: none; 
    font-weight: bold;
    margin-top: 0.5rem;
    transition: opacity 0.3s ease;
    color : #346ea5;
    text-decoration: underline; /* Soulignement subtil au survol */
    text-decoration-color: #346ea5;
    text-decoration-thickness: 3px;

}
.address-link-transport:hover {
    opacity: 1; /* Le texte devient très légèrement transparent au survol */
    text-decoration: underline; /* Soulignement subtil au survol */
    text-decoration-color: #346ea5;
    text-decoration-thickness: 3px;
}



/* --- FORMULAIRE RESPONSIVE ET CENTRÉ --- */
#rsvp-form {
    max-width: 600px; 
    margin: 2rem auto; 
    display: flex; 
    flex-direction: column; 
    gap: 2.5rem; /* Espace aéré entre chaque section du formulaire */
}

/* Espacement spécifique pour que les blocs infos ne collent pas aux questions */
.form-separator {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Les conteneurs de questions transparents */
.form-questions { 
    display: flex; 
    flex-direction: column; 
    gap: 1.2rem; 
    text-align: left; /* Centre les questions */
}

.form-group { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
}

/* Les champs de saisie */
.form-questions input[type="text"],
.form-questions input[type="email"],
.form-questions input[type="number"] {
    padding: 1rem; 
    width: 100%; 
    box-sizing: border-box;
    background-color: var(--couleur-boite); 
    color: var(--couleur-bouton);
    border: 1px solid #ccc; 
    border-radius: 5px;
    font-family: var(--font-texte); 
    font-size: 1rem;
    text-align: center; /* ✨ Le texte tapé par l'utilisateur sera centré */
}

/* Centre les boutons radio Oui/Non */
.label-radio { 
    font-weight: bold; 
    margin-bottom: 0.5rem; 
    display: block; 
}

.radio-centre { 
    display: flex; 
    justify-content: center; 
    gap: 3rem; 
}

/* Aligne Adultes et Enfants sur la même ligne au centre */
.form-group-inline {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.mini-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 120px; /* Taille réduite pour les champs chiffrés */
}

.cta-button {
    background-color: var(--couleur-bouton); color: var(--couleur-secondaire);
    padding: 1rem; border: none; border-radius: 5px;
    font-family: var(--font-titres); font-weight: bold; font-size: 1.2rem;
    cursor: pointer; width: 100%; margin-top: 2rem;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--couleur-principale);
}

footer { 
    text-align: center; 
    font-weight: bold;
    padding: 2rem; 
    color: var(--couleur-bouton); 
    background-color: transparent; /* Laisse transparaître le fond du body */
}
/* --- ANIMATIONS SCROLL --- */
.hero-content, .info-block, #rsvp { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.hero-content.is-visible, .info-block.is-visible, #rsvp.is-visible { opacity: 1; transform: translateY(0); }

body.thank-you-page {
    /* Utilise la même image de fond que le Hero */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/page.jpeg');
    background-size: cover;
    background-position: center;
    
    /* Centre tout verticalement et horizontalement */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Prend toute la hauteur de l'écran */
    margin: 0;
    overflow: hidden; /* Pas de scroll */
}

.thank-you-container {
    background-color: rgba(243, 244, 239, 0.9); /* Couleur boîte un peu transparente */
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease-in;
}

.thank-you-container h1 {
    font-family: var(--font-prenoms);
    font-size: 3rem;
    margin-bottom: 1rem;
    
/* 🌟 Le nouveau dégradé Doré (Effet vague / sinusoïdal) 🌟 */
    background: linear-gradient(105deg, 
        var(--couleur-prenoms-fonce) 0%, 
        var(--couleur-prenoms-clair) 15%, 
        var(--couleur-prenoms-brillant) 28%, /* 1er sommet de la vague (très brillant) */
        var(--couleur-prenoms-clair) 42%, 
        var(--couleur-prenoms-fonce) 55%,    /* Creux de la vague (sombre) */
        var(--couleur-prenoms-clair) 70%, 
        var(--couleur-prenoms-brillant) 82%, /* 2ème sommet (reflet secondaire) */
        var(--couleur-prenoms-clair) 92%,
        var(--couleur-prenoms-fonce) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
}

.thank-you-container p {
    font-family: var(--font-texte);
    font-size: 1.2rem;
    color: var(--couleur-texte);
}

.thank-you-container .gros-message {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--couleur-bouton);
    margin: 2rem 0;
    line-height: 1.5;
}

.retour-btn {
    text-decoration: none;
}
/* --- FLÈCHE DE SCROLL --- */
#fleche-scroll {
    position: fixed;
    bottom: 30px;
    left: 50%;
    /* Création du "V" avec des bordures */
    width: 20px;
    height: 20px;
    border-right: 4px solid var(--couleur-texte);
    border-bottom: 4px solid var(--couleur-texte);
    
    /* Rotation pour faire pointer vers le bas et centrage */
    transform: translateX(-50%) rotate(45deg);
    
    cursor: pointer;
    z-index: 5000; /* Au-dessus du site, mais sous l'enveloppe (9999) */
    opacity: 1;
    transition: opacity 0.5s ease;
    animation: rebond 2s infinite;
}

/* Classe pour cacher la flèche */
#fleche-scroll.hidden {
    opacity: 0;
    pointer-events: none; /* Empêche de cliquer dessus quand elle est invisible */
}

/* Petite animation de rebond haut/bas */
@keyframes rebond {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) rotate(45deg) translate(0, 0); }
    40% { transform: translateX(-50%) rotate(45deg) translate(-10px, -10px); }
    60% { transform: translateX(-50%) rotate(45deg) translate(-5px, -5px); }
}

/* Animation d'apparition douce */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =========================================
   --- NAVIGATION MULTI-PAGES (MAQUETTE 2) ---
   ========================================= */
.main-nav {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    z-index: 2000;
    
    /* État par défaut (tout en haut) : Semi-transparent selon ta demande */
    background-color: rgba(0, 0, 0, 0.1); 
    box-shadow: none;
    
    transition: transform 0.4s ease-in-out, background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

/* État quand on n'est plus tout en haut et qu'on scrolle vers le haut */
.main-nav.scrolled {
    background-color: rgba(0, 0, 0, 0.1); /* On garde ta transparence */
    
    /* 🌟 Astuce Pro : Effet verre dépoli (Glassmorphism) */
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); /* Pour Safari */
    
    padding: 1rem; /* On rétrécit un peu la hauteur */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); /* Légère ombre pour le détacher du contenu */
}

/* État quand on scrolle vers le bas (Menu caché) */
.main-nav.hidden-up {
    transform: translateY(-100%); 
}

/* 3. État quand on scrolle vers le bas (Menu caché) */
.main-nav.hidden-up {
    transform: translateY(-100%); /* Pousse le menu hors de l'écran vers le haut */
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap; /* S'adapte sur mobile */
}

.main-nav a {
    text-decoration: none;
    color: var(--couleur-principale);
    font-family: var(--font-titres);
    font-size: 1.2rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.main-nav a:hover, .main-nav a.actif {
    color: var(--couleur-secondaire); /* Devient rouge pastel au survol ou si on est sur la page */
}

/* --- Adaptabilité Mobile --- */
@media (max-width: 768px) {
    .main-nav {
        padding: 1rem 0.5rem; /* On réduit l'espace autour du menu pour gagner de la place */
    }

    .main-nav.scrolled {
        padding: 0.8rem 0.5rem; /* Encore plus fin quand on scrolle */
    }

    .main-nav ul {
        gap: 1rem; /* Réduit l'espace entre les liens sur mobile */
    }

    .main-nav a {
        font-size: 0.8rem; /* On réduit la taille du texte pour que tout rentre */
        text-align: center;
        letter-spacing: -0.5px; /* Resserre un tout petit peu les lettres */
    }

    .info-blocks {
        flex-direction: column;
        gap: 1rem;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content h2 { /* Ajustement pour le h2 du décompte */
        font-size: 1.5rem;
    }
    .countdown-box {
        min-width: 80px;
        padding: 0.8rem;
    }
    .countdown-box span {
        font-size: 2rem;
    }
    .scrolling-gallery-track img {
        height: 100px; /* Taille ajustée pour les téléphones */
    }
    /* --- CORRECTION POUR LE FOND SUR MOBILE --- */
    .hero-section {
        /* Désactive l'effet parallaxe sur mobile */
        background-attachment: scroll;
    }
    .page-section h3 {
        margin-top: 3rem; /* Centre les titres de section sur mobile */
    }
    #enveloppe-img {
        width: 100vw; /* Plus grande sur mobile */
        height: 100dvh;
        cursor: pointer;
        object-fit: contain; /* Recadre l'image large proprement sur mobile */
        padding: 3px;
        box-sizing: border-box;
    }
    .click-instruction {
        font-size: 1rem;
    }
    .thank-you-container {
        width: 85%;
        padding: 2rem;
    }
    .thank-you-container h1 {
        font-size: 2.5rem;
    }
}
