/* Appliquer le background  */
body {
    background-image: url("../images/main.webp"); /* Chemin vers l'image */
    background-size: cover; /* Couvre toute la page */
    background-position: center; /* Centre l'image */
    background-repeat: no-repeat; /* Évite la répétition */
    background-attachment: fixed; /* Effet de fixation */
}

html, body {
    overflow: hidden; /* ❌ plus de scroll inutile */
}

/* Structure principale */
.page-accueil {
    display: flex;
}

/* Colonne gauche - image */
.photo-gauche {
    flex: 0 0 auto;
    height: 100%;
    overflow: hidden;
}

.photo-gauche img {
    height: 90vh;
    display: block;
    transform: translateX(95px);
}

/* Colonne droite - texte */
.texte-droite {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    font-family: 'Arial', sans-serif;
}

.texte-droite .contenu {
    position: relative; /* indispensable pour le ::after */
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 950px;
    text-align: left;

    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1.2s ease forwards 0.4s;
}

/* Halo animé en pseudo-élément */
.texte-droite .contenu::after {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 35px;
    z-index: -1;
    pointer-events: none;
    box-shadow:
            0 0 60px rgba(106, 178, 170, 0.8),
            0 0 120px rgba(234, 191, 159, 0.5),
            0 0 150px rgba(234, 191, 159, 0.3);
    animation: haloGlow 1.8s ease-in-out infinite alternate;
}

.texte-droite h1 {
    font-size: 2.8em;
    margin-bottom: 5px;
}

.texte-droite p {
    font-size: 1.2em;
    line-height: 2;
}

/* ✅ Ajout : Boutons sous le texte */
.boutons-accueil {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-rdv,
.btn-map {
    background-color: #6BBBAE;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-rdv:hover,
.btn-map:hover {
    background-color: #579f94;
}

/* ✅ Ajout : Bloc Google Map */
#map-accueil {
    display: none;
    margin-top: 30px;
    border-radius: 15px;
    overflow: hidden;
}

#map-accueil.map-visible {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* "Version tablette" */
@media screen and (max-width: 1058px) {
    .photo-gauche {
        display: flex;
        justify-content: center; /* centre horizontalement */
        height: auto;            /* laisse la hauteur s'ajuster */
    }

    .photo-gauche img {
        height: 90vh;
        width: 500px;
        transform: translateX(-1px);
    }
}

/* "Version mobile" */
@media screen and (max-width: 927px) {
    .photo-gauche {
        display: none;
    }

    html, body {
        overflow-y: auto !important;
    }

    .texte-droite {
        min-height: 100vh;
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        padding: 5px 20px 20px;
        text-align: center;
    }

    .texte-droite .contenu {
        position: relative; /* indispensable pour le ::after */
        z-index: 1;
        background-color: rgba(0, 0, 0, 0.5);
        color: white;
        padding: 30px;
        border-radius: 20px;
        max-width: 950px;
        text-align: left;

        opacity: 0;
        transform: translateY(40px);
        animation: fadeInUp 1.2s ease forwards 0.4s;
    }

    .texte-droite .contenu::after {
        z-index: -1;
        pointer-events: none;
        content: "";
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
        border-radius: 30px;
        z-index: -1;
        box-shadow: 0 0 30px rgba(106, 178, 170, 0.5),
        0 0 60px rgba(234, 191, 159, 0.3);
        animation: haloGlow 2s ease-in-out infinite alternate;
    }
}

/* ✅ Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes haloGlow {
    0% {
        box-shadow:
                0 0 30px rgba(106, 178, 170, 0.4),
                0 0 60px rgba(234, 191, 159, 0.2),
                0 0 80px rgba(234, 191, 159, 0.1);
    }
    100% {
        box-shadow:
                0 0 60px rgba(106, 178, 170, 1),
                0 0 120px rgba(234, 191, 159, 0.6),
                0 0 160px rgba(234, 191, 159, 0.4);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
