@layer reset, base, page, header, footer;

@layer page {
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f4;
}

p, li {
    text-align: justify;
}

header {
    display: flex;
    flex-wrap: wrap;
    height: auto;
}

.logo-container {
    width: 15%;
    background-color: #0b7a3e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.logo-container img {
    max-width: 80%;
    height: auto;
}

.banniere-container {
    flex: 1;
    background: url('../img/banniere1.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
}

.titre-institut {
    text-align: center;
    font-size: 2em;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 6px #000;
    margin-top: 40px;
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.titre-institut:hover {
    transform: scale(1.05);
    text-shadow: 4px 4px 8px #000;
}

/* Consolidated Navigation Styles */
nav {
    width: 100%;
    background-color: #0e3f8e;
    padding: 10px 30px;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1000;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    background-color: #cce0ff;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    padding: 8px 14px;
    display: block;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    background-color: #004080;
    color: white;
}

nav ul li .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: transparent;
    flex-direction: column;
    width: 70%;
    font-size: 0.8em;
    z-index: 999;
}

nav ul li:hover .submenu,
nav ul li:focus-within .submenu {
    display: flex;
}

nav ul li .submenu li a {
    color: #003366;
    background-color: #cce0ff;
    padding: 8px 12px;
    display: block;
    text-decoration: none;
    border-radius: 30px;
    white-space: nowrap;
    font-size: 0.9em;
    margin: 0; /* réduit la distance entre sous-titres */
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li .submenu li a:hover {
    background-color: #004080;
    color: white;
}

a:visited {
    color: blue;
}

footer {
    background-color: #0b7a3e;
    color: white;
    text-align: center;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

a.en-savoir-plus {
    color: blue;
    text-decoration: none;
    font-weight: normal;
}

a.en-savoir-plus:hover {
    color: darkblue;
    font-weight: bold;
}

.bandeau-section {
    width: 50%; /* Default width for larger screens */
    background-color: #0b7a3e;
    color: white;
    padding: 6px 20px;
    font-size: 1.2em;
    font-weight: bold;
    margin: 30px 0 5px 10px;
    text-align: left;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box; /* Added for consistent box model */
}

.publication-section {
    margin: 0.5cm;
    text-align: justify;
    text-justify: inter-word;
}
.publication-section ul,
.publication-section ol {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}
em {
    font-size: 0.8em;
}

/* Consolidated Styles for publication lines (ligne-publication) */
.ligne-publication {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    margin: 30px 10px;
    max-width: 900px;
}
.ligne-publication .img-hover {
    flex: 1;
    overflow: hidden;
}
.ligne-publication .img-hover img {
    width: 100%;
    transition: transform 0.3s ease;
    border-radius: 10px;
}
.ligne-publication .img-hover:hover img {
    transform: scale(2);
}
.ligne-publication .texte {
    flex: 2;
    font-size: 2em; /* Taille normale pour PC */
    color: #8b0000; /* rouge foncé */
    font-weight: bold;
    line-height: 1.4;
    text-align: left; /* alignement à gauche */
}

/* Table styles */
table {
    border-collapse: collapse;
    width: 100%;
}
th, td {
    border: 1px solid black;
    padding: 8px;
}
thead tr:first-child {
    background-color: #f7d9a9;
}
tbody tr:nth-child(odd) {
    background-color: #ccf2f4;
}

/* Consolidated Guiton section styles */
.guiton-section-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 20px 10px;
    background-color: #d9ebff;
    border: 2px solid #1E90FF;
    padding: 0px;
    max-width: 900px;
}
.guiton-image-wrapper {
    flex: 0 0 auto;
    text-align: left;
}
.guiton-image-wrapper img {
    max-width: 200px;
    height: auto;
    border-radius: 0px;
}
.guiton-text-wrapper {
    flex: 1;
    text-align: left;
    padding-left: 20px;
}
.guiton-name {
    margin: 0;
    font-weight: bold;
    font-size: 1.2em;
    text-align: justify;
}
.guiton-title {
    margin: 0;
    font-style: italic;
    font-size: 0.9em;
    text-align: justify;
}
.membre-nom {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.icon-croix {
    height: 0.8em;
    vertical-align: middle;
    margin-left: 4px;
}

/* === Centrage vertical des sections membres === */
.membre-section {
    display: flex;
    align-items: center; /* Centre verticalement */
    justify-content: flex-start;
    gap: 30px;
    margin: 30px 0 30px 10px;
    max-width: 900px;
}
.membre-description {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Ne force plus le centre pour tout le texte */
    padding-right: 5px; /* Ajoute une marge à droite du texte */
}



.membre-nom {
    display: flex;
    align-items: center;
    gap: 6px;
}
.icon-croix {
    height: 1em;
}

/* === Centrage visuel du nom de Guiton et Marquetty === */
.membre-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 30px 0 30px 10px;
    max-width: 900px;
}

.membre-photo-container img {
    display: block;
    max-width: 200px;
    height: auto;
}

.membre-description {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Ne force plus le centre pour tout le texte */
}

.membre-nom {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.icon-croix {
    height: 1em;
}

/* === Correction finale des espaces vides pour Guiton et Marquetty === */
.membre-nom {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px; /* Réduit l’espace avec le texte */
}

.icon-croix {
    height: 0.8em; /* Plus petite */
    vertical-align: middle;
    margin-left: 4px;
}

/* Styles pour la structure IESD */
.structure-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* Par défaut : 3 colonnes */
  grid-template-rows: auto auto auto;
  align-items: center;
  justify-items: center;
  gap: 10px;
  padding: 20px;
}

.structure-corner-box {
  background-color: #880e4f;
  color: white;
  padding: 15px;
  border-radius: 12px;
  max-width: 160px; /* Largeur maximale par défaut */
  font-weight: bold;
  font-size: 16px;
  line-height: 1.4;
}

.structure-center-box {
  background-color: #f97ca0;
  color: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  font-weight: bold;
  font-size: 20px;
  line-height: 1.5;
  grid-column: 2 / 3; /* Par défaut : centre dans la 2ème colonne */
}

.structure-arrow-h {
  width: 190px;
  height: auto;
}

.structure-arrow-v {
  width: auto;
  height: 90px;
}
/* Media queries for responsive design */

/* --- Règles par défaut (pour les écrans larges / PC) --- */
#structure-desktop {
    display: block; /* La structure HTML est visible par défaut sur PC */
}

#structure-mobile {
    display: none; /* L'image mobile est cachée par défaut sur PC */
}

@media (max-width: 768px) {
    /* General responsive adjustments */
    .gauche, .droite {
        float: none !important;
        width: 100% !important;
    }

    header {
        flex-direction: column;
    }

    .logo-container, .banniere-container {
        width: 100%;
        max-width: 100%;
    }

    nav {
        width: 100%;
        justify-content: center;
        padding: 10px 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        width: 100%;
    }

    nav ul li {
        width: 90%;
        max-width: 250px;
    }

    nav ul li a {
        padding: 10px 14px;
        text-align: center;
    }

    nav ul li .submenu {
        width: 100%;
        max-width: 250px;
        position: static; /* Added for mobile to flow naturally */
    }

    nav ul li .submenu li a {
        font-size: 0.9em;
        padding: 8px 12px;
    }

    .bandeau-section {
        width: 100%; /* Full width for mobile */
        margin: 30px 0 5px 0; /* Centered for mobile */
    }

    /* Responsive adjustments for section-with-photo */
    .section-with-photo {
        flex-direction: column-reverse; /* Places text above image */
        align-items: center;
        text-align: center;
    }

    .section-with-photo img,
    .photo-pub {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }

    .section-with-photo h3 {
        width: 100%;
    }

    /* Responsive styles for guiton section */
    .guiton-section-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: 20px auto;
        width: 90%;
        max-width: 400px;
    }

    .guiton-image-wrapper {
        flex: none;
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }

    .guiton-image-wrapper img {
        display: block;
        margin: 0 auto;
        max-width: 100%;
        height: auto;
    }

    .guiton-text-wrapper {
        flex: none;
        width: 100%;
        padding-left: 0;
        text-align: center;
    }

    .guiton-name,
    .guiton-title {
        text-align: center !important;
    }

    /* Responsive styles for publication line section ("DICTIONNAIRE") */
    .ligne-publication {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .ligne-publication .img-hover {
        flex: none;
        width: 80%;
        max-width: 250px;
    }

    .ligne-publication .img-hover img {
        width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .ligne-publication .texte {
        flex: none;
        width: 90%;
        font-size: 1.2em;
        text-align: center;
    }

    /* --- Règles pour les écrans plus petits (max-width: 768px) --- */
    #structure-desktop {
        display: none; /* Masque la structure HTML complexe sur mobile */
    }

    #structure-mobile {
        display: block; /* Affiche l'image de la structure sur mobile */
    }

    /* Ajustements pour les éléments de la structure quand l'image n'est pas affichée (sur PC) */
    .structure-container {
      grid-template-columns: 1fr; /* Passe à une seule colonne */
      gap: 20px; /* Augmente l'espacement entre les éléments */
    }

    .structure-corner-box {
      max-width: 90%; /* Permet aux boîtes de prendre plus de largeur sur mobile */
      width: 100%; /* S'assure qu'elles prennent la largeur disponible */
      margin: 0 auto; /* Centre les boîtes */
      font-size: 14px; /* Ajuste la taille de la police */
      text-align: center; /* Centrer le texte dans les boîtes */
    }

    .structure-center-box {
      grid-column: 1 / -1; /* S'étend sur toute la largeur de la colonne unique */
      max-width: 90%; /* Ajuste la largeur pour les petits écrans */
      margin: 0 auto; /* Centre la boîte centrale */
      font-size: 18px; /* Ajuste la taille de la police */
      padding: 20px; /* Ajuste le remplissage */
    }

    .structure-arrow-h {
      display: none; /* Cache les flèches horizontales */
    }

    .structure-arrow-v {
      height: 50px; /* Ajuste la hauteur des flèches verticales pour un empilement plus compact */
      display: block; /* S'assure que les flèches verticales sont visibles */
      margin: 0 auto; /* Centre les flèches verticales */
    }
}


/* ===== IESD Administration (scoped to main.iesd-admin) ===== */
.iesd-admin { font-family: 'Inter', sans-serif; }

/* Bandeau bleu pour le titre Conseil d’Administration (scopé) */


.iesd-admin a.en-savoir-plus { color: blue; text-decoration: none; font-weight: normal; }
.iesd-admin a.en-savoir-plus:hover { color: darkblue; font-weight: bold; }



.iesd-admin .membre-section {
  display: flex; align-items: center; gap: 30px;
  margin: 30px 0 30px 10px; max-width: 900px;
}
.iesd-admin .membre-photo-container { flex-shrink: 0; border: 2px solid #003366; border-radius: 5px; }
.iesd-admin .membre-photo-container img { display: block; max-width: 200px; height: auto; }
.iesd-admin .membre-description { display: flex; flex-direction: column; justify-content: flex-start; }
.iesd-admin .membre-nom { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.iesd-admin .icon-croix { height: .8em; vertical-align: middle; margin-left: 4px; }

.iesd-admin #structure-desktop { display: block; }
.iesd-admin #structure-mobile { display: none; }
.iesd-admin .structure-container {
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto auto;
  align-items: center; justify-items: center; gap: 10px; padding: 20px;
}
.iesd-admin .structure-corner-box {
  background-color: #880e4f; color: white; padding: 15px; border-radius: 12px;
  max-width: 160px; font-weight: bold; font-size: 16px; line-height: 1.4; text-align: center;
}
.iesd-admin .structure-center-box {
  background-color: #f97ca0; color: white; padding: 30px; border-radius: 20px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3); font-weight: bold; font-size: 20px;
  line-height: 1.5; grid-column: 2 / 3; text-align: center;
}
.iesd-admin .structure-arrow-h { width: 190px; height: auto; }
.iesd-admin .structure-arrow-v { width: auto; height: 90px; }

.iesd-admin .section-text-boxed {
  max-width: 900px; margin: 40px auto; background-color: #cce0e0; padding: 30px;
  font-size: 1em; line-height: 1.7; font-family: Arial, sans-serif; color: black;
  border-radius: 10px; text-align: left;
}
.iesd-admin .section-text-boxed p { margin-bottom: 15px; }
.iesd-admin .section-text-boxed ul, .iesd-admin .section-text-boxed ol { margin-left: 20px; margin-bottom: 15px; }
.iesd-admin .liste-identite { list-style: disc; }
.iesd-admin .texte-identite { margin-bottom: 10px; }

@media (max-width: 768px){
  /* Bandeau bleu pour le titre Conseil d’Administration (scopé) */

  .iesd-admin .membre-section { flex-direction: column; align-items: center; text-align: center; margin: 20px auto; width: 90%; max-width: 400px; }
  .iesd-admin .membre-photo-container { width: 100%; text-align: center; margin-bottom: 15px; }
  .iesd-admin .membre-photo-container img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
  .iesd-admin .membre-description { width: 100%; padding: 0; text-align: center; }
  .iesd-admin .membre-description p { text-align: center; }
  .iesd-admin .membre-nom { justify-content: center; }

  .iesd-admin #structure-desktop { display: none; }
  .iesd-admin #structure-mobile { display: block; }
  .iesd-admin #structure-mobile img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
  .iesd-admin .structure-container { grid-template-columns: 1fr; gap: 20px; }
  .iesd-admin .structure-corner-box { max-width: 90%; width: 100%; margin: 0 auto; font-size: 14px; }
  .iesd-admin .structure-center-box { grid-column: 1 / -1; max-width: 90%; margin: 0 auto; font-size: 18px; padding: 20px; }
  .iesd-admin .structure-arrow-h { display: none; }
  .iesd-admin .structure-arrow-v { height: 50px; display: block; margin: 0 auto; }
}

}


@layer page {
  /* Bandeau titre bleu - aligné à gauche */
  

  /* Espacement harmonisé des sections */
  .iesd-admin section {
    margin-bottom: 40px;
  }
}



@layer page {
  /* Bandeau titre bleu - 50% de largeur, aligné à gauche */
  .iesd-admin .bandeau-titre {
    width: 50%;
    background-color: #003366;
    color: #fff;
    padding: 20px 40px;
    font-size: 1.4em;
    font-weight: 700;
    margin: 40px 0 20px;
    text-align: left;
    border: none;
  }

  /* Espacement harmonisé des sections */
  .iesd-admin section {
    margin-bottom: 40px;
  }
}
right: 150px;

.retour-haut-de-page a:visited {
    color: #0b7a3e; /* évite le lien violet */
}
/* ==========================================
   BOUTONS "HAUT DE PAGE" – VERSION SIMPLE
   (tous les boutons de la page)
   ========================================== */

/* Conteneur : prend toute la largeur, aligne à droite,
   et ajoute un "coussin" à droite pour décaler le bouton */
.retour-haut-de-page {
    width: 100%;
    text-align: right;
    margin: 10px 0;
    padding-right: 150px; /* 🔴 C’est ÇA qui décale le bouton vers la gauche */
}

/* Le lien devient un bouton arrondi cohérent avec le reste du site */
.retour-haut-de-page a {
    display: inline-block;
    background-color: #ffffff;
    color: #0b7a3e;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #0b7a3e;
    transition: 0.2s ease;
    font-size: 0.9em;
}

/* Effet au survol */
.retour-haut-de-page a:hover {
    background-color: #8b0000;
    color: #ffffff;
    border-color: #8b0000;
}

/* Couleur quand le lien est "visité" (pour éviter le violet/bleu) */
.retour-haut-de-page a:visited {
    color: #0b7a3e;
}
