/*
 * GUMA DIGITAL — V9-P14
 * Finitions de lecture du Président.
 * Aucun changement du contenu institutionnel.
 */

/* ============================================
   1. ACCUEIL — FINITION DU TITRE
   ============================================ */

body.is-home #mot-du-president
.guma-president-content .guma-eyebrow {
    display: flex;
    align-items: center;
    gap: 13px;
}

body.is-home #mot-du-president
.guma-president-content .guma-eyebrow::before {
    content: "";
    display: inline-block;
    flex: 0 0 25px;
    width: 25px;
    height: 3px;
    background: #f36b1b;
}

/* ============================================
   2. MODALE — HAUTEUR ET DÉFILEMENT
   ============================================ */

.guma-president-modal[aria-hidden="false"] {
    box-sizing: border-box;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.guma-president-modal[aria-hidden="false"]
.guma-president-modal-dialog {
    box-sizing: border-box;
    max-height: min(90dvh, 900px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.guma-president-modal[aria-hidden="false"]
.guma-president-modal-close {
    position: sticky;
    top: 12px;
    z-index: 30;
}

/* ============================================
   3. MODALE — CONFORT DE LECTURE
   ============================================ */

.guma-president-modal[aria-hidden="false"]
.guma-president-official-text {
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    line-height: 1.85;
}

.guma-president-modal[aria-hidden="false"]
.guma-president-official-text p {
    margin-bottom: 1.15em;
}

/* ============================================
   4. ARTICLE — LISIBILITÉ
   ============================================ */

body:not(.is-home)
.guma-president-editorial p {
    font-size: clamp(1rem, 1.12vw, 1.12rem);
    line-height: 1.9;
}

/* ============================================
   5. RESPONSIVE
   ============================================ */

@media (max-width: 760px) {

    .guma-president-modal[aria-hidden="false"] {
        padding: 12px;
    }

    .guma-president-modal[aria-hidden="false"]
    .guma-president-modal-dialog {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
    }

    .guma-president-modal[aria-hidden="false"]
    .guma-president-official-text {
        font-size: 1rem;
        line-height: 1.8;
    }

    body.is-home #mot-du-president
    .guma-president-content h2 {
        text-wrap: balance;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guma-president-modal,
    .guma-president-modal * {
        scroll-behavior: auto !important;
    }
}
