/* =================== RÉINITIALISATION =================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =================== CORPS DU DOCUMENT =================== */
body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
  min-width: 320px;
}

/* Justification des paragraphes */
p {
  text-align: left;
}


/* =================== ENTÊTE =================== */
.header-principal {
  position: relative; /* pour ancrer le menu absolute juste dessous */
}

/* Barre supérieure : Logo et zone de recherche */
.barre-superieure {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 10px 20px;
  background: #fff;
}
.logo img {
  height: 80px;
  width: auto;
}

/* Recherche desktop */
.boite-recherche-desktop {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 5px 10px;
}

.boite-recherche-desktop input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  width: 150px;
}

.boite-recherche-desktop .icone-recherche {
  font-size: 1.1rem;
  margin-left: 5px;
  cursor: pointer;
}

/* Burger menu */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger-menu span {
  display: block;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Menu principal (desktop) */
.menu-principal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  position: relative;
  z-index: 1000;
}

/* Liste des liens de navigation */
.menu-principal .liste-liens {
  display: flex;
  list-style: none;
  flex: 1;
  justify-content: space-evenly;
  gap: 20px;
  position: relative;
  margin: 0;
  padding: 0;
}

.liste-liens li {
  position: relative;
  margin-bottom: 15px;
}

/* Style général des liens */
.liste-liens li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
}

/* Pseudo-élément pour la barre sous le lien */
/* Par défaut, la barre n'est pas affichée (largeur 0) */
.liste-liens li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  transition: width 0.3s ease;
}

/* Lors du survol sur un lien NON actif, la barre s'agrandit */
.liste-liens li:not(.lien-actif) a:hover::after {
  width: 100%;
}

/* Pour le lien actif, la barre est toujours à 100% */
.liste-liens li.lien-actif a::after {
  width: 100%;
}

/* =================== COULEURS DES BARRES =================== */
/* Barre jaune pour le lien actif du premier onglet */
.liste-liens li.jaune a::after {
  background: #F8AB02;
}
.liste-liens li.jaune a:hover::after {
  background: #F8AB02;
}

/* Barre bleue pour le deuxième onglet */
.liste-liens li.bleu a::after {
  background: #0098DE;
}
.liste-liens li.bleu a:hover::after {
  background: #0098DE;
}

/* Barre violette pour le troisième onglet */
.liste-liens li.violet a::after {
  background: #891D81;
}
.liste-liens li.violet a:hover::after {
  background: #891D81;
}

/* Barre verte pour le quatrième onglet */
.liste-liens li.vert a::after {
  background: #A5C715;
}
.liste-liens li.vert a:hover::after {
  background: #A5C715;
}

/* Barre rouge pour le cinquième onglet */
.liste-liens li.rouge a::after {
  background: #ff0000;
}
.liste-liens li.rouge a:hover::after {
  background: #ff0000;
}

/* Barre turquoise pour le sixième onglet */
.liste-liens li.turquoise a::after {
  background: #40e0d0;
}
.liste-liens li.turquoise a:hover::after {
  background: #40e0d0;
}

/* Contenu mobile caché par défaut */
.mobile-extra {
  display: none;
}

/* Le bouton burger (caché sur desktop) */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 20px;
  z-index: 10;
}

.burger-menu span {
  display: block;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ========== MOBILE (<768px) ========== */
@media (max-width: 768px) {
  /* Barre supérieure : cacher la recherche desktop, afficher le burger */
  .boite-recherche-desktop {
    display: none;
  }
  .burger-menu {
    display: flex;
  }

  /* Menu principal déplacé absolute juste sous la barre */
  .menu-principal {
    position: absolute;
    top: 100%;       /* juste sous .barre-superieure */
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .menu-principal .liste-liens {
    flex-direction: column;
    width: 100%;
    padding: 20px;
    gap: 15px;
  }

  /* Afficher extra mobile (recherche + langue) dans le menu */
  .mobile-extra {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 20px 20px;
    gap: 15px;
  }
  .mobile-extra .boite-recherche-mobile {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 5px 10px;
    width: 25%;
  }
  .mobile-extra .boite-recherche-mobile input {
    border: none;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
  }

  /* Quand on ouvre : agrandit le menu */
  .menu-principal.ouvert {
    max-height: 500px; /* assez pour tout faire apparaître */
  }
  .menu-principal.ouvert .mobile-extra {
    display: flex;
  }

  /* Animation croix du burger */
  .burger-menu.ouvert span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .burger-menu.ouvert span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.ouvert span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}

/* =================== SÉLECTEUR DE LANGUE =================== */
.selecteur-langue {
  display: flex;
  align-items: center;
  position: relative;
  gap: 5px;
  cursor: pointer;
}

.trait-langue {
  width: 1px;
  height: 20px;
  background: #333;
}

.texte-langue {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.fleche-langue {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #333;
  transition: transform 0.3s;
}

/* Rotation de la flèche quand le selecteur est ouvert */
.selecteur-langue.ouvert .fleche-langue {
  transform: rotate(180deg);
}

/* Menu déroulant de langue, caché par défaut */
.menu-langue {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  list-style: none;
  min-width: 80px;
  border: 1px solid #ccc;
  margin-top: 5px;
  display: none;
  z-index: 99;
}

.menu-langue li {
  padding: 10px;
  text-align: center;
  transition: background 0.2s;
}

.menu-langue li:hover {
  background: #F8AB02;
  color: #fff;
}

/* Sélecteur de langue - desktop */
.selecteur-langue-desktop {
  display: flex;
  gap: 5px;
  margin: 0 20px;
  align-items: center;
}
/* Cacher le dropdown par défaut */
.selecteur-langue-desktop .menu-langue {
  display: none;
}

/* Cacher la version desktop en mobile */
@media (max-width: 768px) {
  .selecteur-langue-desktop { display: none; }
}

/* Version mobile à l’intérieur du burger */
.selecteur-langue-mobile {
  display: none;
  flex-direction: row;
  gap: 10px;
}
.selecteur-langue-mobile .menu-langue {
  display: none;
  position: static; /* hérite du menu principal */
  border: 1px solid #ccc;
}
@media (max-width: 768px) {
  .selecteur-langue-mobile {
    display: flex;
    align-items: center;
  }
}




/* =================== CARROUSEL =================== */
.carrousel {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.diapositive {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Zone de texte superposée au carrousel */
/* Largeur fixée à environ 25% avec fond quasi-transparent et padding égal */
.zone-texte {
  position: absolute;
  top: 0;
  left: 0;
  width: 35%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: #fff;
}

.contenu-zone h2 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.contenu-zone p {
  margin-bottom: 15px;
  line-height: 1.4;
}

/* Bouton d'appel à l'action */
.carrousel .bouton-cta {
  background: #F8AB02;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.bouton-cta:hover {
  background: #CD9724;
}

/* Navigation du carrousel (flèches) */
.navigation-carrousel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.fleche-carrousel {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
  line-height: 1;
}

.fleche-carrousel:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* =================== RESPONSIVITÉ =================== */
@media (max-width: 768px) {
  /* Réorganisation de la barre supérieure en colonne */
  .barre-superieure {
    flex-direction: column;
    align-items: flex-start;
  }
  .boite-recherche {
    margin-top: 10px;
    width: 100%;
  }
  .boite-recherche input {
    width: 100%;
  }
  /* Menu principal en colonne */
  .menu-principal {
    flex-direction: column;
    align-items: flex-start;
  }
  .liste-liens {
    flex-wrap: wrap;
    gap: 10px;
  }
  /* Élargissement de la zone de texte du carrousel sur mobile */
  .zone-texte {
    width: 50%;
    padding: 0 10px;
  }
}





/* =================== SECTION INFO =================== */
.zone-info {
  display: flex;
  flex-wrap: wrap;        /* Permet d'empiler les colonnes sur mobile */
  justify-content: space-between;
  align-items: center;
  padding: 40px;          /* Pour ne pas coller le contenu aux bords */
  background: #fff;
  margin-top: 40px;
}

.contenu-gauche,
.contenu-droite {
  flex: 1;                /* Chaque zone occupe une part égale */
  min-width: 300px;       /* Empêche que les blocs ne deviennent trop petits */
  margin: 10px;
}

/* Style du titre */
.contenu-gauche h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 20px;
}

/* Cibler uniquement le span contenant "IREIS" */
.titre-ireis {
  position: relative;
  display: inline-block;
}

/* Ajouter la barre fixe en dessous uniquement du mot "IREIS" */
.titre-ireis::after {
  content: "";
  display: block;
  width: 85px;          /* Adaptable selon la longueur désirée */
  height: 5px;
  background: #F80289;  /* Couleur de la barre */
  margin-top: -5px;      /* Espacement entre le texte et la barre */
  /* Optionnel : centrer la barre sous le mot */
  margin-left: auto;
  margin-right: auto;
}

/* Paragraphe justifié */
.contenu-gauche p {
  text-align: justify;
  margin-bottom: 20px;
}

/* Groupe des boutons CTA */
.zone-info .boutons-cta {
  display: flex;
  gap: 10px;
}

/* Bouton d'appel à l'action (similaire à la barre CTA précédente) */
.zone-info .bouton-cta {
  background: #F80289;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.zone-info .bouton-cta:hover {
  background: #d00275; /* version plus foncée de #F80289 */
}

/* Contenu droite : Image avec coins haut-droite et bas-gauche arrondis */
.contenu-droite img {
  width: 100%;
  height: auto;
  display: block;
  border-top-right-radius: 50px;
  border-bottom-left-radius: 50px;
}

/* =================== RESPONSIVITÉ =================== */
/* Pour les écrans moyens et petits, les éléments s'empilent verticalement */
@media (max-width: 768px) {
  .zone-info {
    flex-direction: column;
    padding: 20px;
  }
  .contenu-gauche, 
  .contenu-droite {
    margin: 10px 0;
  }
}





/* ===== SECTION CHIFFRES CLÉS ===== */
.section-chiffres {
  width: 100%;
  background: #F6F9E8;
  padding: 20px;
  box-sizing: border-box;
}

/* Titre sans retour à la ligne */
.section-chiffres h2 {
  font-size: 2rem;
  color: #333;
  margin: 0 0 20px;
  white-space: nowrap;
  overflow-x: auto;
}

/* Barre sous "CHIFFRES" */
.titre-chiffres {
  position: relative;
  display: inline-block;
}
.titre-chiffres::after {
  content: "";
  display: block;
  width: 85px;
  height: 5px;
  background: #4C7718;
  margin-top: -5px;
}

/* Galerie */
.galerie-chiffres {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}

/* Images à taille naturelle */
.galerie-chiffres img {
  flex: 0 0 auto;          /* Pas de redimensionnement */
  width: auto;
  height: auto;
  max-width: 100%;         /* Sécurité pour éviter tout débordement */
  display: block;
}

/* Ajustement sur écrans moyens : on réduit juste l'espacement */
@media (max-width: 900px) {
  .galerie-chiffres {
    justify-content: space-around;
  }
}

/* Sur très petit écran, on autorise le wrap sans modifier la taille */
@media (max-width: 500px) {
  .galerie-chiffres {
    justify-content: center;
  }
}





/* ========== SECTION ARTICLES ========== */
.section-articles {
  padding: 40px;
  background: #fff;
}

.articles-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

/* Carte Article */
.carte-article {
  background: #F2FAFD;
  border-radius: 15px;
  padding: 15px;
  flex: 1 1 calc(50% - 20px); /* 2 colonnes */
  box-sizing: border-box;
  position: relative;
  min-width: 260px;
  display: flex;
  flex-direction: column;
}

.carte-article h3 {
  color: #0098DE;
  font-weight: bold;
  margin-bottom: 15px;
}

.carte-article p {
  flex: 1; /* occupe l’espace entre titre et bouton */
  text-align: justify;
  margin-bottom: 20px;
}

/* Bouton "+" */
.btn-plus {
  width: 32px;
  height: 32px;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: #0098DE;
  color: #F2FAFD;
  font-size: 2.5rem;
  cursor: pointer;
  align-self: flex-start;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== MODAL & OVERLAY ========== */
/* Couvre tout et masque le contenu en dessous */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(200,200,200,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 50;
}

/* Fenêtre modale */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: #0098DE;
  color: #fff;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100;
}

.modal-contenu h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.modal-contenu p {
  text-align: justify;
}

/* Classes d’activation */
.overlay.actif {
  opacity: 1;
  visibility: visible;
}

.modal.actif {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .carte-article {
    flex: 1 1 calc(50% - 20px);
  }
}

@media (max-width: 600px) {
  .carte-article {
    flex: 1 1 100%;
  }
}





/* ========== SECTION DÉFIS ========== */
.section-defis {
  width: 100%;
  background: #fff;
  padding: 40px;
  box-sizing: border-box;
}

.contenu-defis {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;

  /* on retire la largeur maximale et le centrage */
  width: 100%;
}

/* Partie gauche : image avec coins arrondis */
.defis-gauche {
  flex: 1;              /* prend tout l'espace restant à gauche */
}

.defis-gauche .img-defis {
  width: 100%;
  height: auto;
  display: block;
  border-top-left-radius: 50px;
  border-bottom-right-radius: 50px;
}

/* Partie droite : texte + barre */
.defis-droite {
  flex: 1;              /* prend tout l'espace restant à droite */
  display: flex;
  align-items: flex-start;
}

.texte-defis {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Titre violet */
.texte-defis h2 {
  color: #891D81;
  font-weight: bold;
  margin: 0 0 20px 0;
}

/* Bloc paragraphe + bouton, avec barre à gauche */
.bloc-texte {
  position: relative;
  padding-left: 15px;    /* espace pour la barre */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Barre violette sur toute la hauteur du bloc-texte */
.bloc-texte::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: #891D81;
  border-radius: 2px;
}

/* Paragraphe justifié */
.bloc-texte p {
  margin: 0;
  text-align: justify;
  line-height: 1.6;
}

/* Bouton CTA */
.bloc-texte .bouton-cta {
  background: #891D81;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  align-self: flex-start;
  transition: background 0.3s ease;
}

.bloc-texte .bouton-cta:hover {
  background: #700f63;
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 768px) {
  .contenu-defis {
    flex-direction: column;
    gap: 30px;
  }
  .defis-gauche, .defis-droite {
    width: 100%;
  }
  .defis-gauche .img-defis {
    max-width: none;
    width: 100%;
  }
}





/* ========== SECTION SOCIÉTAL ========== */
.section-societal {
  width: 100%;
  background: #FEF7E6;
  padding: 40px 20px;
  box-sizing: border-box;
}

.contenu-societal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* Partie gauche : texte */
.societal-gauche {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.titre-societal {
  color: #F8AB02;
  font-weight: bold;
  margin: 0 0 20px 0;
}

.paragraphe-societal {
  text-align: justify;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

/* Première phrase en couleur */
.premiere-phrase {
  color: #F8AB02;
  font-weight: normal;
}

/* Bouton CTA */
.bouton-societal {
  background: #F8AB02;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  align-self: flex-start;
  transition: background 0.3s ease;
}

.bouton-societal:hover {
  background: #d29307;
}

/* Partie droite : image arrondie */
.societal-droite {
  flex: 1;
}

.img-societal {
  width: 100%;
  height: auto;
  display: block;
  border-top-right-radius: 50px;
  border-bottom-left-radius: 50px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .contenu-societal {
    flex-direction: column;
    gap: 30px;
  }
  .img-societal {
    width: 100%;
  }
  .societal-gauche,
  .societal-droite {
    width: 100%;
  }
  .bouton-societal {
    align-self: center;
  }
}






/* =================== PIED DE PAGE =================== */
.footer {
  position: relative;
  width: 100%;
  height: 240px; /* Fixe la hauteur pour éviter le débordement */
  font-family: Arial, sans-serif;
  overflow: hidden;
}

/* Image de fond responsive */
.footer-bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Filtre violet semi-transparent */
.footer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(137, 29, 129, 0.5);
  z-index: 1;
}

/* Contenu principal */
.footer-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px;
  height: 100%;
  box-sizing: border-box;
}

.footer-left {
  display: flex;
  flex-direction: column;
  width: 25%;
  max-width: 300px;
}

.footer-logo {
  width: 121px;
  height: auto;
  margin-bottom: 20px;
}

.footer-infos {
  color: white;
  margin-top: auto;
  margin-bottom: auto;
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25%;
  max-width: 300px;
  height: 100%;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.footer-links a {
  color: white;
  text-decoration: none;
}

.bold-link {
  font-weight: bold;
}

.cta-link {
  background-color: #0098DE;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
  text-decoration: none;
}

/* Mentions légales */
.footer-bottom {
  position: absolute;   /* place la ligne en bas du footer */
  bottom: 10px;         /* à 10px du bas */
  left: 0;              /* coller à gauche */
  width: 100%;          /* occuper toute la largeur */
  margin: 0;            /* supprimer tout décalage */
  text-align: center;   /* centrer le texte */
  z-index: 2;           /* au-dessus du filtre */
  color: white;
}

.footer-bottom a {
  color: white;
  text-decoration: none; /* plus de soulignement */
  cursor: pointer;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .footer {
    height: auto;
    padding: 0;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 30px;
    padding: 40px 20px;
  }

  .footer-left,
  .footer-right {
    width: 100%;
    max-width: none;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    align-items: center;
  }

  .cta-link {
  margin-bottom: 20px;
  }

  .footer-bottom {
    margin: 20px 0;
  }
}
