.text-justify{
    text-align: justify;
}
.border-sfa{
    border-color: rgba(10, 63, 107, 1) !important;
}

/* Header */
    header {
        background-color: rgba(10, 63, 107, 1); 
        color: aliceblue;
    }

    header h1 {
       font-size: 36px;
    }

    header h6 {
        font-style: italic;
    }
    .logo-sfa{
        top: -113px;
    }
    @media only screen and (max-width: 550px) {
        .logo-sfa{
            width: 75px;
            height: 75px;
        }
    }

    @media only screen and (min-width: 768px) {
        .logo-sfa{
            left: 5%;
        }
    }

    @media only screen and (min-width: 991px) {
        .logo-sfa{
            left: 10%;
        }
    }
    @media only screen and (min-width: 1200px) {
        .logo-sfa{
            left: 15%;
        }
    }
    @media only screen and (min-width: 1400px) {
        .logo-sfa{
            left: 20%;
        }
    }
    .navbar {
        background-color:#f8c818;
    }
    .navbar-nav .nav-link {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        font-weight: 700;
    }

    .dropdown-toggle::after {
        border-top: .4em solid rgba(10, 63, 107, 1);
        border-bottom: 0 solid rgba(10, 63, 107, 1);
    }
    .dropdown-menu.show{
        display: inline-block;
    }
    .titre-header{
        position: absolute;
        bottom: 30px;
    }

    .event-banner {
        z-index: 1000;
        background-color: rgba(10, 63, 107, 1);
        color: white;
        font-weight: 600;
    }
    .event-banner #themeEvenement{
        color: #f8c818;
    }
    .event-banner #descriptionEvenement{
        font-weight: 400;
    }
    
/* Header */

/*Section hero*/

    .btn-adherer {
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
        background-color: rgb(31, 88, 134);
        border: 1px solid rgb(177, 212, 233) !important;
        box-shadow: 3px 2px 5px rgb(4, 19, 32);
        color: white;
    }
    .btn-adherer:hover {
        background-color: rgba(10, 63, 107, 1) !important;
        color: white !important;
    }
    .btn-adherer:active {
        background-color: white !important;
        color: rgba(10, 63, 107, 1) !important;
        border: 1px solid rgba(10, 63, 107, 1) !important;
    }
    .decoration {
        background-color: rgba(10, 63, 107, 1); 
        padding: 15px;
    }
  
/*Section hero*/

/* Les titres */

    .section-title-wrapper {
      display: flex;
      justify-content: center; /* Centre horizontalement */
      align-items: center; /* Centre verticalement (si nécessaire) */
    }

    .section-title h2 {
      display: inline-block;
      position: relative;
      padding: 10px 60px;
      font-size: 1.5rem;
      text-align: center;
      color: rgba(10, 63, 107, 1);
    }

    .section-title h2::before,
    .section-title h2::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      height: 2px;
      background-color: rgba(10, 63, 107, 1);
    }

    .section-title h2::before {
      top: 0;
    }

    .section-title h2::after {
      bottom: 0;
    }

/* Les titres */


/*Nos valeurs */

    /* Perspective pour un effet 3D */
    .card-valeur {
        position: relative;
        width: 100%;
        height: 100%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); /* Ombre de base */
        transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; /* Transition sur tous les effets */
        transform-style: preserve-3d; /* Nécessaire pour les transformations 3D */
        perspective: 1000px; /* Distance de la caméra pour l'effet 3D */
        cursor: pointer;
    }

    .card-valeur:hover {
        transform: scale(1.05); /* Agrandissement léger au survol */
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.1); /* Ombrage plus prononcé */
    }

    .card-valeur.flipped {
        transform: rotateY(180deg); /* Rotation sur l'axe Y */
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1); 
    }

    /* Cache l'arrière de la carte lorsqu'elle est retournée */
    .card-valeur img {
        width: 100%;
        height: 100%;
    }

    /* Texte au dos de la carte */
    .card-text-back {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgb(10 63 107 / 80%);
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
        text-align: center;
        backface-visibility: hidden; /* Cache l'arrière de ce texte lorsqu'il est retourné */
        transform: rotateY(180deg); /* Le texte apparaît après la rotation */
        z-index: 4;
    }

    .card-text-back p{
        max-height: 100%;
        overflow: auto;
    }
    .bandeau {
        background-color: rgba(10, 63, 107, 1);
        display: inline-block;
        padding: 10px;
        color: #FFFFFF;
        text-align: center;
        border: 2px solid rgba(10, 63, 107, 1);
        border-radius: 0px 10px 10px 0px ;
        width: 190px; 
        height: 30px;
        line-height: 1px;
        transition: width 0.5s ease;
        overflow: hidden; 
        position: absolute;
        top: 30px;
        left: -10px;
        z-index: 3;
    }

/*Nos valeurs */

/*Nos dernières actualités*/
    .img-derniers-articles{
        width: 100%;
        height: 240px;
        object-fit: cover;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); /* Ombre de base */
        transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; /* Transition sur tous les effets */
        transform-style: preserve-3d; /* Nécessaire pour les transformations 3D */
        perspective: 1000px; /* Distance de la caméra pour l'effet 3D */
        cursor: pointer;
    }
    .img-derniers-articles:hover {
        transform: scale(1.05); /* Agrandissement léger au survol */
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.1); /* Ombrage plus prononcé */
    }

/*Nos dernières actualités*/

/* Assocation */

    .association {
        line-height: 200%;
    }

/* Assocation */

/* Nos elus */

/* Container de la carte pour l'effet de retournement */
    .card-elu {
        background-color: rgba(245, 255, 239, 1);
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); /* Effet de relief */
        transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; /* Toutes les transitions */
        position: relative;
        transform-style: preserve-3d; /* Nécessaire pour les transformations 3D */
        cursor: pointer;
        height: 100%;
    }

    .card-elu:hover {
        background-color: rgba(245, 255, 239, 0.9); /* Changement de fond au survol */
        transform: scale(1.05); /* Agrandissement léger */
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.1); /* Ombrage plus prononcé */
    }

    .card-elu.flipped {
        transform: rotateY(180deg); /* Retourne la carte sur l'axe Y au survol */
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1); /* Accentuation de l'ombre au survol */
    }

    /* Arrière de la carte (qui devient visible au survol) */
    .card-elu .card-front,
    .card-elu .card-back {
        backface-visibility: hidden; /* Cache le côté arrière quand il n'est pas visible */
    }
    .card-back p{
        max-height: 100%;
        overflow: auto;
    }

    /* Côté avant de la carte (image et texte visible au départ) */
    .card-elu .card-front {
        z-index: 2;
    }

    /* Côté arrière de la carte (texte semi-transparent) */
    .card-elu .card-back {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
        text-align: center;
        transform: rotateY(180deg);
    }

    /* Style de l'image */
    .card-elu .card-front img {
        width: 100%;
        height: auto;
        border-radius: 5px;
    }


/* Nos elus */

/*Nos rencontres citoyennes*/

    .carousel-indicators {
        bottom: -50px;
    }

    .carousel-indicators [data-bs-target] {
        box-sizing: content-box;
        flex: 0 1 auto;
        width: 30px;
        height: 3px;
        padding: 0;
        margin-right: 3px;
        margin-left: 3px;
        text-indent: -999px;
        cursor: pointer;
        background-color: rgba(35, 79, 115, 1);
        background-clip: padding-box;
        border: 0;
        border-radius: 2px;
        border-top: 5px solid rgba(35, 79, 115, 1);
        border-bottom: 5px solid rgba(35, 79, 115, 1);
        opacity: none;
        transition: opacity .6s ease;
    }
    .carousel-indicators .active {
        opacity: 1;
        border-bottom: 5px solid rgba(35, 79, 115, 1);
    }
    .image-wrapper {
      overflow: hidden; /* S'assure que tout reste dans les limites de l'image */
      border: 1px solid #ccc; /* Optionnel : ajouter une bordure autour de l'image */
    }

    .text-overlay {
      background-color: rgba(10, 63, 107, 0.7); /* Fond semi-transparent */
      color: white; /* Texte en blanc */
      width: 100%; /* Limite la largeur de la zone de texte */
      border-radius: 5px; /* Coins arrondis pour le texte */
      max-height: 30%;
      overflow-y:auto;
    }
    @media only screen and (max-width: 991px) {
        .text-overlay{
            max-width: 100%; /* Limite la largeur de la zone de texte */
        }
    }

/*Nos rencontres citoyennes*/

/* Newsletter */

    .newsletter-container {
        background-color: #ffffff;
        border: 1px solid rgba(50, 122, 153, 1);
        border-radius: 15px;
        box-shadow: 0 5px 3px rgba(0, 0, 0, 0.2);;
        max-width: 400px;
        width: 100%;
        text-align: center;
        position: fixed;
        bottom: 5%;
        right: 2%;
        z-index: 999;
        padding-top: 30px
    }
    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background: transparent;
        border: none;
        font-size: 25px;
        color: rgba(10, 63, 107, 1);
        cursor: pointer;
    }
    .close-btn:hover {
        color: rgb(31, 88, 134);
    }
    .newsletter-container form {
        width: 80%;
        margin: auto;
    }

    .newsletter-container h2 {
        color: #333333;
    }

    .input-group>.form-control, .input-group>.form-floating, .input-group>.form-select {
        border: 1px solid rgba(50, 122, 153, 1);
        border-top-right-radius: 5px !important;
        border-bottom-right-radius: 5px !important;
    }


    .btn-infolettre {
        background-color: rgb(31, 88, 134);
        color: #ffffff;
        border: none;
        border-top-left-radius: 5px !important;
        border-bottom-left-radius: 5px !important;
        border-top-right-radius: 5px !important;
        border-bottom-right-radius: 5px !important;
        cursor: pointer;
        transition: background-color 0.3s ease;
        box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1), -3px -3px 6px rgba(255, 255, 255, 0.7);
        transition: transform 0.2s ease, box-shadow 0.3s ease;
    }

    .btn-infolettre:hover {
        background-color: rgba(10, 63, 107, 1);
        transform: translateY(-2px);
        box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.15), -4px -4px 8px rgba(255, 255, 255, 0.8);
    }

    @media only screen and (max-width: 576px) {
        .newsletter-container {
            max-width: 90%;
            width: 100%;
            bottom: 5%;
            right: inherit;
            left: 50%; /* Pour le centrer horizontalement */
            transform: translateX(-50%); /* Décale de 50% de la largeur pour centrer */
        }
    }
/* Newsletter */

/* Footer */

    footer {
        background-color: rgba(10, 63, 107, 1);
        color: #FFFFFF;
    }

    footer .nav-link {
        color: #eef5ff;
        text-decoration: none;
    }

/* Footer */



/* Page contact */

    #formulaire-contact .form-control,
    #formulaire-soutien .form-control {
        border: 1px solid rgb(31, 88, 134);
        box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.1), inset -3px -3px 6px rgba(255, 255, 255, 0.7);
        transition: all 0.3s ease-in-out;
    }

    #formulaire-contact .form-control:focus,
    #formulaire-soutien .form-control:focus {
        outline: none;
        box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.15), inset -1px -1px 3px rgba(255, 255, 255, 0.8), 0 0 4px rgba(0, 123, 255, 0.6);
        border-color: #007bff;
    }

    #formulaire-contact .form-control::placeholder,
    #formulaire-soutien .form-control::placeholder {
        color: #aaa;
        font-style: italic;
    }
    #formulaire-contact {
        position: relative; /* Nécessaire pour positionner le fond correctement */
        background-image: url("images/fond-contact.png");
        background-repeat: no-repeat; /* Pas de répétition */
        background-position: center 40px; /* Centré horizontalement et verticalement */
        background-size: 35%; /* Réduction proportionnelle */
    }


/* Page contact */

/* Page actualités */

    .filter-categories {
        display: flex; /* Aligne les catégories sur une ligne */
        flex-wrap: wrap; /* Passe à la ligne si l'espace manque */
        gap: 10px; /* Espace entre les boutons */
        justify-content: left; /* Centre les catégories horizontalement */
        margin: 20px 0;
    }

    @media only screen and (max-width: 991px) {
        .filter-categories {
            justify-content: center; /* Centre les catégories horizontalement */
        }
    }

    .category {
        border: none;
        background: none;
        font-size: 16px;
        color: #bbb8b8; /* Gris clair pour les catégories non sélectionnées */
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 10px;
        border-bottom: 2px solid #bbb8b8;
        margin-right: 20px;
        cursor: pointer;
        transition: all 0.3s ease; /* Animation fluide pour les effets */
    }

    .category:hover {
        color: rgba(10, 63, 107, 1); /* Change la couleur en noir au survol */
        border-bottom: 2px solid rgba(10, 63, 107, 1);

    }

    .category.active {
        color: rgba(10, 63, 107, 1); /* Noir pour la catégorie active */
        border-bottom: 2px solid rgba(10, 63, 107, 1); /* Ligne noire pour l'élément actif */
        font-weight: 600;
    }

    .list-inline-item{
        margin-bottom: 10px;
    }

    .article-date,
    .evenement-date {
        font-weight: bold;
    }

    .article-tags .badge {
        font-size: 12px;
        padding: 5px 10px;
    }

    .bg-tag{
        background-color: rgba(10, 63, 107, 1);
    }

    .read-more{
        font-weight:700;
    }

    .separator {
        position: relative; /* Nécessaire pour positionner les pseudo-éléments */
        width: 100%; /* Prend toute la largeur de la page */
        display: flex;
        justify-content: center; /* Centre le logo */
        align-items: center; /* Centrer le logo verticalement */
    }

    .separator::before,
    .separator::after {
        content: ''; /* Nécessaire pour créer les éléments */
        position: absolute;
        top: 50%; /* Centré verticalement */
        transform: translateY(-50%); /* Assure que la ligne est parfaitement centrée */
        background-color: #e3eba0; /* Couleur des lignes */
        height: 20px; /* Hauteur des lignes */
        width: 150px; /* Largeur des lignes */
    }
    @media only screen and (min-width: 768px) {
        .separator::before,
        .separator::after {
            width: 250px; /* Largeur des lignes */
        }
    }

    @media only screen and (min-width: 991px) {
        .separator::before,
        .separator::after {
            width: 300px; /* Largeur des lignes */
        }
    }
    @media only screen and (min-width: 1200px) {
        .separator::before,
        .separator::after {
            width: 300px; /* Largeur des lignes */
        }    }
    @media only screen and (min-width: 1400px) {
        .separator::before,
        .separator::after {
            width: 500px; /* Largeur des lignes */
        }
    }
    .separator::before {
        left: 0; /* Positionne la ligne à gauche */
    }

    .separator::after {
        right: 0; /* Positionne la ligne à droite */
    }

    .separator-logo {
        margin: 0 20px; /* Un peu d'espace entre le logo et les lignes */
        height: 40px; /* Hauteur du logo */
        object-fit: contain; /* Assure que l'image conserve ses proportions */
    }


    .pagination {
        display: flex;
        justify-content: center; /* Centre la navigation horizontalement */
        align-items: center;
        flex-direction: column; /* Aligne les éléments verticalement */
        margin-top: 30px;
        padding-top: 30px;
        border-top: 3px solid #e3eba0;
    }

    .page-links {
        display: flex; /* Aligne les boutons de page horizontalement */
        gap: 10px; /* Espacement entre les boutons */
    }

    .page-link:hover {
        cursor: pointer;
    }


/* Page actualités */


/* Page article */

    .citation {
        position: relative; /* Nécessaire pour positionner la barre à l'extérieur */
        padding-left: 20px; /* Espacement à gauche pour éviter que le texte soit collé à la barre */
    }

    .citation::before {
        content: ""; /* Pas de texte, juste une barre */
        position: absolute;
        left: -10px; /* Positionne la barre à l'extérieur de la div */
        top: 0;
        bottom: 0;
        width: 10px; /* Largeur de la barre verticale */
        background-color: #e3eba0; /* Couleur de la barre */
    }

    .img-voir-plus {
        box-shadow: -15px 15px 0px rgba(10, 63, 107, 1); /* Ombre bleue */
        width: 300px;
        height: 200px;
        object-fit: cover;
    }
    .description-voir-plus {
        border-bottom: 3px solid rgba(10, 63, 107, 1);
        display: inline-block; /* Limite la bordure à la taille du texte */
    }

    #container-article img{
        max-width: 100%;
    }

    #container-article p{
        line-height: inherit !important;
        font-family: inherit !important;
        font-size: inherit !important;
    }

    #container-article span{
        line-height: inherit !important;
        font-family: inherit !important;
        font-size: inherit !important;
    }
    #container-article strong{
        line-height: inherit !important;
        font-family: inherit !important;
        font-size: inherit !important;
    }
    
/* Page article */

/* Page évènements */

    .description-evenement,
    .description-article{
        display: flex;
        flex-direction: column; /* Empile verticalement les enfants */
        justify-content: center; /* Centre verticalement les enfants dans la div */
        height: auto; /* Hauteur variable */
    }

    .description-evenement.border{
        border: 1px solid rgba(10, 63, 107, 1) !important;
    }

/* Page évènements */


/* Page évènement */
    .grid-container {
        display: grid;
        grid-gap: 20px;
    }

    /* Cas où il n'y a qu'une seule image */
    .grid-1 {
        grid-template-columns: 1fr;
    }

    /* Deux images : en deux colonnes */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Trois images : une grande + deux petites */
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-3 .grid-item:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }

    /* Quatre images : disposition équilibrée */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

    /* Cinq images : une grande + quatre petites */
    .grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-5 .grid-item:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }

    /* Les images */
    .grid-item img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 8px;
        cursor: pointer;
        transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; /* Transition sur tous les effets */
    }
    .grid-item img:hover {
        transform: scale(1.05); /* Agrandissement léger au survol */
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.1); /* Ombrage plus prononcé */
    }
    .lightbox {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .lightbox img {
        max-width: 90%;
        max-height: 90%;
    }

    .close {
        position: absolute;
        top: 20px;
        right: 30px;
        font-size: 40px;
        color: white;
        cursor: pointer;
    }


/* Page évènement */

/* Go To Top */

    #goTopBtn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 75px;
        height: 75px;
        background: none;
        border: none;
        cursor: pointer;
        display: none; /* Caché au début */
    }

    #goTopBtn img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
        transition: opacity 0.3s;
    }

    #goTopBtn:hover img {
        opacity: 0.7;
    }
/* Go To Top */