/* Reset basique */
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    /* Sécurité anti-scroll horizontal */
    overflow-x: hidden;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
}

/* --- Styles pour la Page 1 (Plein écran) --- */

.main-wrapper {
    width: 100%;
    padding: 0;
    /* Important : Zéro marge pour toucher les bords */
    display: block;
}

.conteneur-image {
    position: relative;
    width: 100%;
    /* Force le conteneur à prendre toute la largeur */
    max-width: 100%;
    /* On supprime la limite de 1000px */
    margin: 0;
    line-height: 0;
    /* Supprime le petit espace vide sous l'image */
}

.image-fond {
    width: 100%;
    /* L'image s'étire pour remplir l'écran */
    height: auto;
    /* La hauteur suit proportionnellement */
    display: block;
}

/* Le bouton magique */
.bouton-magique {
    position: absolute;
    z-index: 10;

    /* --- RÉGLAGE DE LA POSITION --- */
    top: 62%;
    left: 30%;
    transform: translate(-50%, -50%);
    /* ------------------------------ */

    /* Apparence du bouton */
    background-color: transparent;
    /* Bouton invisible */
    color: transparent;
    /* Astuce : on utilise 'vw' pour que la taille du texte s'adapte à la largeur de l'écran */
    font-size: max(16px, 2vw);
    padding: 1em 2em;

    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: none;
    transition: transform 0.2s;
    white-space: nowrap;
    opacity: 0;
    /* Totalement invisible mais cliquable */
}

.bouton-magique:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: #e03e00;
    cursor: pointer;
}

/* --- Styles pour la Galerie (Premium Light Mode) --- */
.galerie-body {
    background-color: #fdfbf7;
    /* Crème léger */
    color: #333;
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    position: relative;
}

#fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.galerie-wrapper {
    position: relative;
    z-index: 1;
    max-width: 800px;
    /* Plus étroit pour l'affichage en colonne */
    margin: 0 auto;
    padding: 2em;
}

.galerie-header {
    text-align: center;
    margin-bottom: 3em;
    padding-top: 2em;
    animation: fadeInDown 1s ease-out;
}

.titre-anniversaire {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin: 0;
    /* Gradient plus soutenu pour le fond clair */
    background: linear-gradient(45deg, #d4af37, #ff4500, #c71585);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sous-titre {
    font-size: 1.2rem;
    color: #666;
    margin-top: 0.5em;
    font-weight: 300;
}

.bouton-retour {
    display: inline-block;
    margin-top: 1.5em;
    padding: 0.8em 1.5em;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    color: #333;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.bouton-retour:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Grille en Colonne (une seule photo par ligne) */
.grille-premium {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 4em;
    align-items: center;
    /* Centre les photos */
}

.carte-photo {
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Largeur max agréable */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    /* Ombre plus douce */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out both;
}

/* Délai d'animation en cascade (simplifié) */
.carte-photo:nth-child(odd) {
    animation-delay: 0.1s;
}

.carte-photo:nth-child(even) {
    animation-delay: 0.2s;
}

.carte-photo:nth-child(3n) {
    animation-delay: 0.3s;
}

.carte-photo:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 69, 0, 0.3);
    z-index: 2;
}

.carte-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Animations Keyframes */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .titre-anniversaire {
        font-size: 2.5rem;
    }

    .grille-premium {
        grid-template-columns: 1fr;
    }
}