
/* --- POLICES ET VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@300;400&display=swap');
/* Cacher la barre de défilement pour Chrome, Safari et Opera */
::-webkit-scrollbar {
    display: none;
}
:root {
    --font-titres: 'Playfair Display', serif;
    --font-texte: 'Playfair Display', serif; /* Playfair PARTOUT */
    --couleur-principale: #6D7455;
    --couleur-secondaire: #E7E8DC;
    --couleur-texte: #333;
    --couleur-bouton: #6D7455;
    --couleur-bouton-hover: #97A97C;
    --couleur-boite: #F3F4EF;
}

body {
    font-family: var(--font-texte);
    margin: 0;
    padding: 0;
    color: var(--couleur-texte);
    background-color: var(--couleur-secondaire);
    -ms-overflow-style: none;  /* IE et Edge */
    scrollbar-width: none;     /* Firefox */

}

/* --- OVERLAY ENVELOPPE --- */
#enveloppe-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100dvh;
    background-color: var(--couleur-secondaire);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 1s ease-out, visibility 1s;
}

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

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

#enveloppe-img {
    width: 100vw; height: 100dvh;
    object-fit: cover; /* Recadre l'image large proprement sur mobile */
    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: url('images/fond.jpg');
    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/fond.jpg');
    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-titres); font-size: 4rem; margin: 0 0 1rem 0;
}

/* --- CARROUSEL --- */
#carrousel-continu { padding: 2rem 0; background-color: var(--couleur-boite); overflow: hidden; }
.scrolling-gallery { white-space: nowrap; display: inline-block; animation: scroll-left 40s linear infinite; }
.scrolling-gallery-track { display: flex; }
.scrolling-gallery img { height: 150px; margin: 0 10px; object-fit: cover; border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
@keyframes scroll-left { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }

/* --- 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-boite); }
.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-boite); }
.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-principale); }
.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-titres);
    font-size: 1.5rem;
    margin-top: 1rem;
    font-style: normal; 
    background-color: var(--couleur-principale); color: var(--couleur-boite);
    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-titres);
    font-size: 2rem;
    font-style: normal;
    margin-top: 1rem;
    /* --- NOUVEAUX STYLES 'BOITE' --- */
    background-color: var(--couleur-boite);
    color: var(--couleur-principale); 
    display: inline-block; /* S'adapte à la taille du texte */
    margin-bottom: 0.5rem; /* Espace sous la boîte-titre */
    margin-top: 0.5rem;}
.info-block h4 { font-family: var(--font-titres);
    font-size: 2rem;
    font-style: normal;
    margin-top: 1rem;
    /* --- NOUVEAUX STYLES 'BOITE' --- */
    background-color: var(--couleur-boite);
    color: var(--couleur-principale); 
    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; /* Prend toute la largeur disponible */
    color: var(--couleur-principale); /* Utilise votre couleur principale */
    text-decoration: none; /* Enlève le soulignement par défaut */
    font-weight: bold;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.address-link:hover {
    text-decoration: underline; /* Souligne au survol */
    color: var(--couleur-bouton); /* Change légèrement de couleur au survol */
}


/* --- FORMULAIRE CORRIGÉ --- */
form {
    max-width: 500px; margin: 2rem auto; text-align: left;
    /* CORRECTION 2 : On utilise Flexbox avec 'gap' pour éviter l'écrasement */
    display: flex; flex-direction: column; gap: 1.2rem;
}

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

/* CORRECTION 3 : Playfair Display forcé dans les champs */
.form-group input {
    padding: 0.8rem; width: 100%; box-sizing: border-box;
    background-color: var(--couleur-boite);
    border: 1px solid #ccc; border-radius: 5px;
    font-family: var(--font-texte); /* Force Playfair */
    font-size: 1rem;
}

.label-radio { font-weight: bold; margin-bottom: 0.5rem; display: block; }
.radio-group { display: flex; gap: 2rem; margin-bottom: 0.5rem; }

.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.1rem;
    cursor: pointer; width: 100%; margin-top: 1rem;
}

footer { text-align: center; padding: 2rem; color: var(--couleur-principale); background-color: var(--couleur-secondaire); }

/* --- 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); }

/* --- MOBILE --- */
@media (max-width: 768px) {
    .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 img {
        height: 100px; /* Réduit la taille des images du carrousel sur mobile */
    }
    /* --- CORRECTION POUR LE FOND SUR MOBILE --- */
    .hero-section {
        /* Désactive l'effet parallaxe sur mobile */
        background-attachment: scroll;
    }
}
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/fond.jpg');
    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-titres);
    color: var(--couleur-principale);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.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-principale);
    margin: 2rem 0;
    line-height: 1.5;
    font-style: italic;
}

.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-secondaire);
    border-bottom: 4px solid var(--couleur-secondaire);
    
    /* 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); }
}

/* --- Adaptabilité Mobile --- */
@media (max-width: 768px) {
    .envelope {
        width: 100%; /* Plus grande sur mobile */
        height: 100%;
    }
    .click-instruction {
        font-size: 1rem;
    }
    .thank-you-container {
        width: 85%;
        padding: 2rem;
    }
    .thank-you-container h1 {
        font-size: 2.5rem;
    }
}
