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

@layer page {
/* Styles généraux et styles pour ordinateur de bureau */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

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

    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: ;
        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;
    }

    nav {
        width: 100%;
        background-color: #0b7a3e;
        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: #003366;
        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%;
        background-color: #0b7a3e;
        color: white;
        padding: 6px 20px;
        font-size: 1.2em;
        font-weight: bold;
        margin: 30px 0 5px 10px; /* réduit ici de 20px à 5px */
        text-align: left;
        font-family: 'Inter', sans-serif;
    }
    .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;
    }

    /* Styles pour la section des publications (consolidé) */
    .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;
    }


    /* Media queries pour le design responsive */
    @media (max-width: 768px) {
        /* Ajustements responsive généraux */
        .gauche, .droite {
            float: none !important;
            width: 100% !important;
        }

        header {
            flex-direction: column;
        }

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

     nav {
        width: 100%; /* S'assure que la nav prend toute la largeur disponible */
        justify-content: center; /* CECI EST LE CHANGEMENT CLÉ : Centre les éléments flex enfants (ul) */
        padding: 10px 0; /* Ajuste le padding pour un meilleur centrage visuel */
    }

    nav ul {
        flex-direction: column;
        align-items: center; /* Centre les éléments de liste verticalement */
        gap: 5px; /* Réduit l'espace entre les éléments de menu empilés */
        width: 100%; /* S'assure que la liste prend toute la largeur pour centrer les liens */
    }

    nav ul li {
        width: 90%; /* Pour que chaque bouton de menu puisse être centré et avoir un peu de marge latérale */
        max-width: 250px; /* Limite la largeur des boutons de menu individuels */
    }

    nav ul li a {
        padding: 10px 14px; /* Ajuste le padding des liens pour les rendre plus cliquables */
        text-align: center; /* S'assure que le texte dans chaque bouton est centré */
    }

    nav ul li .submenu {
        width: 100%; /* S'assure que le sous-menu prend toute la largeur de l'élément parent */
        max-width: 250px; /* Limite la largeur du sous-menu pour correspondre aux éléments principaux */
    }

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

        .bandeau-section {
            width: 100% !important;
            background-color: #0b7a3e;
            color: white;
            padding: 10px 20px;
            font-size: 1.2em;
            font-weight: bold;
            margin: 30px 0 5px 0;
            text-align: left;
            font-family: 'Inter', sans-serif;
            box-sizing: border-box;
        }

        /* Ajustements responsive pour section-with-photo */
        .section-with-photo {
            display: flex !important; /* Assurez-vous que flex est actif */
            flex-direction: column-reverse; /* Ceci devrait placer le texte au-dessus de l'image */
            align-items: center;
            text-align: center;
        }

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

        .photo-pub {
            width: 100% !important;
            height: auto !important;
            margin-bottom: 15px !important;
        }

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

       /* Styles spécifiques pour guiton2.jpg et le titre "Président" */
    .guiton-section-container {
        flex-direction: column; /* Empile les éléments verticalement */
        align-items: center; /* Centre les éléments horizontalement (pour les éléments flex) */
        text-align: center; /* Centre le texte dans le conteneur */
        margin: 20px auto; /* Centre le conteneur lui-même */
        width: 90%; /* Optionnel : pour donner un peu de marge sur les bords */
        max-width: 400px; /* Optionnel : limite la largeur du conteneur */
    }

    .guiton-image-wrapper {
        flex: none; /* Supprime le dimensionnement flex */
        width: 100%; /* Fait en sorte que l'habillage de l'image prenne toute la largeur */
        text-align: center; /* Centre l'image si elle est inline ou inline-block */
        margin-bottom: 15px; /* Ajoute un espace sous l'image */
    }

    .guiton-image-wrapper img {
        display: block; /* Rend l'image un élément de bloc */
        margin: 0 auto; /* Centre l'image en tant qu'élément de bloc */
        max-width: 100%; /* Assure que l'image est responsive */
        height: auto;
    }

    .guiton-text-wrapper {
        flex: none; /* Supprime le dimensionnement flex */
        width: 100%; /* Fait en sorte que l'habillage du texte prenne toute la largeur */
        padding-left: 0; /* Supprime le remplissage gauche */
        text-align: center; /* Centre le texte */
    }

    .guiton-name,
    .guiton-title {
        text-align: center !important; /* Force l'alignement au centre pour le texte */
    }

    /* NOUVEAUX STYLES RESPONSIVES pour la section "DICTIONNAIRE" */
    .ligne-publication {
        flex-direction: column; /* Empile les éléments verticalement pour les petits écrans */
        align-items: center; /* Centre les éléments flex */
        gap: 15px; /* Réduit l'espace entre les éléments empilés */
    }

    .ligne-publication .img-hover {
        flex: none; /* Supprime le dimensionnement flex pour l'habillage d'image */
        width: 80%; /* Augmente la largeur des images */
        max-width: 250px; /* Limite la taille maximale de l'image */
    }

    .ligne-publication .img-hover img {
        width: 100%; /* S'assure que l'image remplit son conteneur */
        height: auto;
        display: block; /* Assure un bon centrage */
        margin: 0 auto; /* Centre l'image */
    }

    .ligne-publication .texte {
        flex: none; /* Supprime le dimensionnement flex pour le texte */
        width: 90%; /* Permet au texte de prendre plus de largeur */
        font-size: 1.2em; /* Réduit la taille de la police du titre */
        text-align: center; /* Centre le texte du titre */
    }
	.jean-marius-section {
        flex-direction: column; /* Empile Jean-Loup ROUYER au-dessus de Marius RABETSIMAMANGA */
        padding: 10px; /* Ajuste le rembourrage pour les petits écrans */
        margin: 20px auto; /* Centre la section sur les petits écrans */
        width: 90%; /* Prend plus de largeur */
    }

    /* S'assure que le texte dans ces sections est centré en vue responsive */
    .jean-marius-section > div {
        padding-left: 0 !important; /* Outrepasse le rembourrage en ligne pour l'alignement du texte */
        text-align: center !important; /* Centre le texte */
        width: 100%; /* S'assure que chaque bloc de texte prend toute la largeur */
    }

   }
  
/* === Correctifs Guiton/Marius PC + responsive === */
.guiton-section-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    margin: 20px 0;
    background-color: #d9ebff;
    border: 2px solid #1E90FF;
    padding: 20px;
    max-width: 900px;
}
.guiton-image-wrapper img {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 20px 0 0;
    border-radius: 0;
}
.guiton-text-wrapper {
    flex: 1;
    text-align: left;
    padding-left: 20px;
}
@media (max-width: 768px) {
    .guiton-section-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .guiton-image-wrapper img {
        margin: 0 auto 15px auto;
    }
    .guiton-text-wrapper {
        padding-left: 0;
        text-align: center;
    }
}



.inline-style-1 { display: flex; align-items: center; justify-content: flex-start; margin: 20px 10px; background-color: #d9ebff; border: 2px solid #1E90FF; padding: 20px; max-width: 900px; }
.inline-style-2 { font-size: 3em; color: darkred; font-weight: bold; }
.inline-style-3 { max-width:900px; margin:0 auto 40px 10px; background-color:#e6f0ff; padding:20px; border-radius:10px; font-family:Arial, sans-serif; color:black; text-align:left; }
.inline-style-4 { background-color: #f7d9a9; }
.inline-style-5 { border: 1px solid red; }
.inline-style-6 { margin: 10px 0 0 0; font-weight: bold; font-size: 1.2em; text-align: justify }
.inline-style-7 { flex: 0 0 auto; text-align: left; }
.inline-style-8 { margin-top:20px; text-align: justify }
.inline-style-9 { width:50%; background-color:#003366; color:white; padding:20px; font-size:1.2em; font-weight:bold; margin:40px 0 20px 10px; text-align:left; }
.inline-style-10 { margin-left:40px; }
.inline-style-11 { max-width: 200px; height: auto; border-radius: 0px; }
.inline-style-12 { text-align: center; margin-top: 40px; }
.inline-style-13 { max-width: 100%; height: auto; }
.inline-style-14 { color:green; font-weight:bold; margin-top:20px; margin-bottom:5px; }
.inline-style-15 { display:flex; justify-content:space-between; }
.inline-style-16 { width:50%; background-color:#3399ff; color:white; padding:20px; font-size:1.2em; font-weight:bold; margin:40px 0 20px 10px; text-align:left; }
.inline-style-17 { color:green; font-weight:bold; margin-top:2px; margin-bottom:5px; }
.inline-style-18 { margin: 0; font-weight: bold; font-size: 1.2em; text-align: justify }
.inline-style-19 { flex: 1; text-align: left; padding-left: 20px; }
.inline-style-20 { margin-left:20px; line-height:1.6; }
.inline-style-21 { margin-top:20px; }
.inline-style-22 { flex: 1; text-align: center; padding-left: 20px; }
.inline-style-23 { margin-left: 40px; }
.inline-style-24 { margin: 0; font-style: italic; font-size: 0.9em; text-align: justify }
.inline-style-25 { margin-top:20px; font-weight:bold; text-align: justify }
.inline-style-26 { width: 80%; text-align: justify; padding:20px; margin:40px 0 20px 10px; text-align:left }
.inline-style-27 { font-size: 1.2em; color: darkred; letter-spacing: 2px; }
.inline-style-28 { border-collapse: collapse; width: 100%; }
.inline-style-29 { max-width:900px; margin:20px auto 40px 10px; background-color:#cce0e0; padding:30px; border-radius:10px; font-family:Arial, sans-serif; color:black; text-align:left; }
.inline-style-30 { text-align: center; font-family: Arial, sans-serif; margin: 20px 0; }
.inline-style-31 { display: flex; align-items: center; justify-content: flex-start; margin: 20px 10px; background-color: #d9ebff; border: 2px solid #1E90FF; padding: 0px; max-width: 900px; }
.inline-style-32 { display:flex; justify-content:space-between; color:blue; }
.inline-style-33 { color: red; font-weight: bold; }
.inline-style-34 { text-align: justify }
.inline-style-35 { color: red; }
}
/* ================================
   BOUTONS DE RETOUR (ACCUEIL + PUBLICATIONS)
   Même visuel garanti
   ================================ */

/* Wrapper : alignement et décalage */
.retour-accueil-wrapper,
.retour-publications-wrapper {
    width: 100%;
    text-align: right;
    margin: 10px 0;
    margin-right: 5px; /* décalage vers la gauche */
}

/* Bouton : même style pour les deux */
.retour-accueil-btn,
.retour-publications-btn {
    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;
}

/* Hover identique */
.retour-accueil-btn:hover,
.retour-publications-btn:hover {
    background-color: #8b0000;
    color: #ffffff;
    border-color: #8b0000;
}

/* Pour éviter que :visited ne passe en bleu */
.retour-accueil-btn:visited,
.retour-publications-btn:visited {
    color: #0b7a3e;
}
/* ================================
   BOUTON "RETOUR AUX PUBLICATIONS"
   ================================ */

.retour-publications-container {
    width: 100%;
    text-align: right;
    margin: 10px 0;
    margin-right: 5px; /* décale légèrement vers la gauche */
}

.retour-publications-btn {
    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;
}

/* Hover identique à "Retour à l'accueil" */
.retour-publications-btn:hover {
    background-color: #8b0000;
    color: #ffffff;
    border-color: #8b0000;
}

/* Empêche le violet / bleu des liens visités */
.retour-publications-btn:visited {
    color: #0b7a3e;
}
/* ==========================================
   BOUTON "RETOUR AUX PUBLICATIONS"
   (même visuel que Retour à l'accueil)
   ========================================== */

.retour-publications-container {
    display: flex;                 /* annule l'effet de text-align: justify */
    justify-content: flex-end;     /* pousse le bouton à droite */
    width: 100%;
    margin: 10px 0;
    margin-right: 5px;             /* petit décalage vers la gauche */
}

.retour-publications-btn {
    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;
}

/* Hover identique à Retour à l'accueil */
.retour-publications-btn:hover {
    background-color: #8b0000;
    color: #ffffff;
    border-color: #8b0000;
}

/* Empêcher le violet/bleu des liens visités */
.retour-publications-btn:visited {
    color: #0b7a3e;
}
