/* Conteneur global pour chaque section parallax */
.parallax-container {
    width: 100%;
    height: 100vh; /* Chaque section occupe toute la hauteur de la fenêtre */
    position: relative;
    overflow: hidden; /* Empêche les débordements */
}

/* Image de fond */
.parallax-Paral {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1; /* Derrière le contenu */
    filter: blur(0px); /* Applique un flou léger */
    will-change: transform;
    transition: transform 0.2s ease-out; /* Fluidité lors des déplacements */
}

/* Contenu de chaque section avec bande noire centrée */
.content {
    position: relative;
    z-index: 2; /* Superposé à l'image floue */
    text-align: center;
    top: 50%; /* Centre verticalement */
    transform: translate(-50%, -50%);
    left: 50%; /* Centre horizontalement */
    color: #fff;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5); /* Bande noire transparente */
    border-radius: 10px; /* Bords arrondis */
    width: 80%; /* Largeur par défaut pour plus de flexibilité */
    max-width: 600px; /* Limite la largeur sur les grands écrans */
    display: inline-block;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}

/* Titres */
.content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    margin-bottom: 15px;
    opacity: 0;
    animation: zoomIn 1s ease-out forwards;
    transform: translateY(50px);
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.content h2 {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    opacity: 0;
    animation: zoomIn 1s ease-out forwards;
    transform: translateY(50px);
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

/* Paragraphes */
.content p {
    font-size: 1rem;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.5s;
}

/* Boutons */
.content a {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 20px;
    text-decoration: none;
    color: #fff;
    border-radius: 5px;
    background-color: #007bff;
    transition: background-color 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 1s;
}

.content a:hover {
    background-color: #0056b3;
}

/* Animations d'entrée pour les titres */
.content h1.animated,
.content h2.animated {
    animation: fadeInSlide 1s ease-out forwards;
}

/* Effets au survol (hover) ajoutés par JavaScript */
.content h1:hover,
.content h2:hover {
    color: #00bcd4; /* Changement de couleur au survol */
    text-shadow: 0px 4px 6px rgba(0, 255, 255, 0.6); /* Accentuation des ombres */
}

/* Transition fluide pour tous les changements */
.content h1,
.content h2 {
    transition: color 0.3s ease-out, transform 0.3s ease-out, text-shadow 0.3s ease-out;
}

/* Animations */
@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInSlide {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .content {
        width: 90%; /* Plus large pour s'adapter aux tablettes */
        max-width: 500px;
        padding: 15px;
    }

    .content h1 {
        font-size: 2rem;
    }

    .content h2 {
        font-size: 1.5rem;
    }

    .content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .content {
        top: 40%; /* Réduction pour mieux s'ajuster */
        transform: translate(-50%, -40%);
        padding: 10px;
        max-width: 400px;
    }

    .content h1 {
        font-size: 1.8rem;
    }

    .content h2 {
        font-size: 1.2rem;
    }

    .content p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .content {
        top: 30%;
        transform: translate(-50%, -30%);
        padding: 10px;
        width: 95%; /* Presque pleine largeur pour les mobiles */
    }

    .content h1 {
        font-size: 1.5rem;
    }

    .content h2 {
        font-size: 1rem;
    }

    .content p {
        font-size: 0.7rem;
    }
}
