/* SECTION BANNIÈRE PAGE D'ACCUEIL */

.banner img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* SECTION INTRODUCTION DU PARC À THÈMES*/

/* Titre de l'intro centré avec padding vertical */
.intro-title {
    text-align: center;
    padding: 2em;
    line-height: 1.5;
}

/* Cadre avec image de fond, padding large pour effet de marge interne */
.text-intro {
    background: url('../images/cadre.webp');
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    padding: 9em;
    margin: 3em auto;
    border-radius: 10%;

}

/* Paragraphe dans l'intro, centré avec marges et espacement */
.text-intro p {
    text-align: center;
    font-size: 1.1rem;
    margin: 3em 8em;
    line-height: 2;
}

/* Première lettre du paragraphe mise en avant */
.text-intro p::first-letter {
    font-size: 3rem;
    color: #ef6c00;
    font-weight: bold;
}

/* Style spécifique pour paragraphes intro en italique */
.intro-p {
    font-style: italic;
    font-weight: 600;
    color: #4e342e;

}


.intro-btn {
    text-align: center;
    padding: 3em;
}

/* Styles pour le bouton */
.btn-coaster {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 2rem;
}



/* SECTION CARROUSEL PRÉSENTANT LES 4 ÉPOQUES (préhistoire, antiquité, moyen-âge, futur) */

/* Conteneur principal du carrousel */
.carousel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2em 1em;
}

/* Zone visible du carrousel avec overflow hidden */
.carousel {
    position: relative;
    width: 80%;
    height: 450px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-top: 3em;
}

/* Chaque élément du carrousel est superposé (position absolute)
   Opacité à 0 par défaut (invisible), puis actif à 1 (visible) */
.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.8s ease-in-out;

}

/* Élément actif visible */
.carousel-item.active {
    opacity: 1;
    z-index: 1;

}

/* Image dans le carrousel adaptée à son conteneur */
.carousel-item img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Cartes d'informations sur le carrousel, fond blanc semi-transparent */
.cards {
    position: absolute;
    bottom: 30%;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin-right: 20%;
    margin-left: 20%;

}

/* Positionnement des boutons précédent et suivant */
.carousel button {
    position: absolute;
    bottom: 10%;
    z-index: 10;
}

/* Bouton précédent à gauche */
#prev {
    left: 15px;
}

/* Bouton suivant à droite */
#next {
    right: 15px;
}

/* Icônes des boutons */
.carousel button img {
    width: 30px;
    height: 30px;
}


/* SECTION ACTUALITÉS DU PARC */

/* Titre section actualités */
.title-actu {
    text-align: center;
    padding: 4em;

}

/* Conteneur des actualités en flexbox avec espace entre */
.actu {
    display: flex;
    align-items: flex-start;
    gap: 2em;
    padding: 40px;
    margin-bottom: 2em;
    background-color: white;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);

}

/* Liste à puces carrées dans les actualités */
.actu li {
    list-style-type: square;
}

/* Images dans les actualités avec style */
.actu img {
    width: 80%;
    height: auto;
    object-fit: cover;
    background-color: white;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
}


/* Texte dans les actualités aligné à gauche */
.text-actu {
    text-align: left;
    line-height: 2;

}

/* Titre h3 sans marge */
.text-actu h3 {
    margin: 0;

}

/* Bouton dans actualités avec taille définie */
.btn-actu {
    margin-top: 10%;
    width: 150px;
    height: 80px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;

}



/* SECTION NEWSLETTER */

.news {
    display: flex;
    flex-direction: row;
    gap: 2em;
    justify-content: center;
    align-items: center;
    line-height: 2;
    background-color: #FFF3DF;
    padding: 0.5em 3em;
    margin-top: 3em;


    h2 {
        margin-bottom: auto;
        margin-top: auto;
    }



    img {
        width: auto;
        height: 50px;
        margin-left: 1em;
        margin-top: 20px;
    }

    form {
        width: 10em;
    }

    .button {
        margin-top: 2em;
        width: 150px;
    }

}



/* RESPONSIVE :PAGE D4ACCUEIL */

/* ordinateur */

@media screen and (max-width: 2560px) {
    .sections-main {
        width: 80%;
        margin: 0 auto;
    }

}

@media screen and (min-width: 2216px) and (max-width: 2560px) {
    .carousel {
        width: 60%;
        height: 660px;
    }

    .news {
        justify-content: space-between;
    }
}

@media screen and (min-width: 1760px) and (max-width: 2215px) {
    .carousel {
        width: 72%;
        height: 655px;
    }

    .news {
        justify-content: space-between;
    }
}

@media screen and (min-width: 1441px) and (max-width: 1760px) {
    .text-intro {
        width: 85%;
    }

    .carousel {
        width: 72%;
        height: 500px;
    }


}

/* tablette */

@media screen and (max-width: 1440px) {
    .text-intro {
        padding: 18em;
    }

    .text-intro p {
        margin: 0em 3em;
    }

    .actu {
        flex-direction: column;
        align-items: center;
    }

}

@media screen and (min-width: 1025px) and (max-width: 1101px) {
    .carousel {
        width: 100%;
        height: 460px;
    }
}


@media screen and (max-width: 1024px) {

    .text-intro p {
        margin: 0;
    }

    .text-intro {
        padding: 7em;
    }

    .carousel-container h3 {
        line-height: 2;
    }

    .carousel {
        width: 100%;
    }

    .actu {
        flex-direction: column;
        align-items: center;
    }

    .actu img {
        width: 100%;
    }

}


@media screen and (min-width: 769px) and (max-width: 970px) {
    .carousel {
        height: 387px;
    }

    .carousel button {
        width: 130px;
    }

    .carousel-container h2 {
        line-height: 2;
    }

    .cards h2 {
        line-height: 1;
    }

    .title-actu h2 {
        line-height: 2;
    }

    .news {
        flex-direction: column;
        margin-top: 6em;
    }

    .news button {
        margin-bottom: 2em;
    }

}


@media screen and (max-width: 768px) {
    .text-intro {
        margin: 0;
        padding: 0.1em;
    }

    .carousel {
        height: 386px;
    }

    .carousel button {
        width: 130px;
    }


    .carousel-container h2 {
        line-height: 2;
    }

    .cards {
        margin-right: 10%;
        margin-left: 10%;
    }

    .cards h2 {
        line-height: 1;
    }


    .title-actu h2 {
        line-height: 2;
    }

    .news {
        flex-direction: column;
        margin-top: 6em;
    }

    .news button {
        margin-bottom: 2em;
    }
}

/* mobile <768px*/

@media screen and (min-width: 425px) and (max-width: 767px) {

    .carousel {
        width: 100%;
        height: 404px;
    }

    .carousel-item img {
        width: 100%;
        height: 404px;
    }

    .carousel button {
        width: 100px;
    }

    .cards {
        margin-right: 10%;
        margin-left: 10%;
    }



}


@media screen and (max-width: 424px) {

    .carousel {
        width: 100%;
        height: 404px;
    }

    .carousel-item img {
        width: 100%;
        height: 404px;
    }

    .carousel button {
        width: 70px;
    }

    .cards {
        margin-right: 10%;
        margin-left: 10%;
    }

    .btn-coaster {
        width: 200px;
    }

    .news img {
        height: 36px;
        margin-left: 0;
    }

}