.header-presentation p {
    font-size: 20px !important;
    text-align: center;
}

.flex-even {
    flex: 1;
} 

.logo-seul {
    position: absolute;
    left: 5%;
    top: 2.5%;
    height: 500px;
    opacity: 0.15;
}

/* SECTION "CHIFFRES CLES" */

.rpg-tab-item {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.rpg-tab-item .rpg-tab-text {
    color: var(--secondary);
}
.rpg-tab-item .rpg-tab-text,
.rpg-tab-item .rpg-tab-logos,
.rpg-tab-item .rpg-tab-icon {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.rpg-tab-item.active {
    background-color: var(--secondary);
}

.rpg-tab-item.active .rpg-tab-text {
    color: white;
    opacity: 1;
    font-family: var(--font-family-medium);
}

.rpg-tab-item.active .rpg-tab-logos,
.rpg-tab-item.active .rpg-tab-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
    font-family: var(--font-family-medium);
}

.rpg-tab-item:hover .rpg-tab-text,
.rpg-tab-item:hover .rpg-tab-logos,
.rpg-tab-item:hover .rpg-tab-icon {
    opacity: 0.8;
}

.rpg-tab-content {
    transition: opacity 0.3s ease;
}

.rpg-tab-content a {
    text-decoration: underline;
}

.rpg-tab-logos {
    width: 3rem;
}

.rpg-tab-content .container-collection {
    min-height: 300px;
}

.chart-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.texte-graphique {
    max-width: 90%;
    z-index: 1;
    height: 500px;
    max-height: 500px;
}

/* RESPONSIVE - Petits écrans et ordinateurs portables avec zoom */

/* Écrans d'ordinateurs portables avec zoom (ex: 125%) */
@media (max-width: 1400px) {
    .texte-graphique {
        max-width: 95%;
        gap: 1.5rem !important;
    }

    #chiffres-rpg {
        padding: 1.5rem 1rem;
    }

    .chart-container {
        min-height: 280px;
    }

    .rpg-tab-item .rpg-tab-text {
        font-size: 14px;
    }
}

/* ============================================================
   MISE EN PAGE (valeurs bureau)
   ============================================================ */

.entete-mobile {
    display: none;
}

.briques-entete {
    bottom: 50px;
}

.header-presentation {
    margin: 3rem;
    width: 75%;
}

.bloc-citation {
    width: 75%;
    display: inline-flex;
    justify-content: space-around;
}

.bloc-citation-texte {
    width: 460px;
}

.texte-cn {
    width: 600px;
}

#gestionnaire-collection .fond-gestionnaire {
    padding: 3rem;
}

.texte-gestionnaire {
    width: 600px;
    margin-right: 8rem;
}

#chiffres-rpg {
    width: 100%;
    height: 716px;
}

.fond-chiffres {
    height: 716px;
    width: 918px;
    z-index: 0;
}

.colonne-chiffres {
    width: 360px;
    flex-shrink: 0;
}

.liens-externes-briques {
    z-index: 1;
    top: 170px;
}

/* Cartes GEVES / ministère : logo sur la hauteur disponible, pied commun aligné en bas */
.lien-externe-geves {
    --couleur-lien: var(--primary);
}

.lien-externe-ministere {
    --couleur-lien: var(--blue-rf);
}

.lien-externe-logo {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2.5rem 1rem;
}

.lien-externe-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lien-externe-pied {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    border-top: 1px solid var(--bs-gray-300);
    color: var(--couleur-lien);
    font-weight: 600;
    font-size: 1.05rem;
}

.lien-externe:hover .lien-externe-pied span {
    text-decoration: underline;
}

.liens-externes-photo,
.liens-externes-degrade {
    height: 457px;
    border-radius: 40px;
}

.liens-externes-photo {
    background: url('../../Images/geves.png') 0 0 / 100% 650px no-repeat;
}

.liens-externes-degrade {
    width: 700px;
}

.liens-externes-degrade-gauche {
    background: linear-gradient(90deg, var(--primary-light) 10%, transparent 90%);
}

.liens-externes-degrade-droite {
    background: linear-gradient(-90deg, var(--blue-rf) 10%, transparent 90%);
}

@media (min-width: 1200px) {
    #collection-nationale {
        height: 825px;
    }
}

/* ============================================================
   TABLETTES ET PETITS PORTABLES (< 1200 px) : sections empilées
   ============================================================ */

@media (max-width: 1199.98px) {
    .trait-titre {
        max-width: 100%;
    }

    .illustration-cn {
        width: 100%;
        max-width: 420px;
        height: auto;
    }

    .texte-cn {
        width: 100%;
        max-width: 720px;
    }

    .texte-gestionnaire {
        width: 520px;
        margin-right: 2rem;
    }

    #chiffres-rpg {
        height: auto;
        padding: 2rem 1.5rem;
    }

    .fond-chiffres {
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 40px;
    }

    .texte-graphique {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
    }

    .colonne-chiffres {
        width: 100%;
        max-width: 720px;
    }

    .rpg-tab-content {
        width: 100%;
    }

    .liens-externes-degrade {
        width: 50%;
    }

    /* Briques réduites à 183 × 164 (external.css) */
    .lien-externe-logo {
        padding: 1.25rem 1.25rem 0.5rem;
    }

    .lien-externe-pied {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ============================================================
   TÉLÉPHONES ET TABLETTES EN PORTRAIT (< 992 px)
   ============================================================ */

@media (max-width: 991.98px) {
    /* Bandeau : le visuel bureau est remplacé par une version empilée */
    .entete-bureau,
    .logo-seul {
        display: none;
    }

    .entete-mobile {
        display: block;
        width: 100%;
        overflow: hidden;
        border-radius: 24px;
        background-color: var(--geves-dark);
        color: var(--light);
        padding-bottom: 62px;
    }

    .entete-mobile-photo {
        height: clamp(140px, 32vw, 280px);
        background: url('../../Images/Carotte.jpg') center / cover no-repeat;
    }

    .entete-mobile-texte {
        padding: 1rem 1.25rem 0;
    }

    .entete-mobile-titre {
        margin: 0 0 0.5rem;
        padding-left: 0.5rem;
        border-left: 1px solid currentColor;
        font-family: var(--font-family-regular);
        font-size: clamp(13px, 3.6vw, 18px);
        line-height: 1.25;
    }

    .entete-mobile-sous-titre {
        margin: 0;
        font-family: var(--font-family-regular);
        font-size: clamp(26px, 7vw, 44px);
        line-height: 1.15;
    }

    /* Même police que le mot en italique du bandeau bureau (attribut font-family="Barlow" du SVG) */
    .entete-mobile-sous-titre i {
        font-family: Barlow;
    }

    .header-presentation {
        margin: 1.5rem 0;
        width: 100%;
    }

    .bloc-citation {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .bloc-citation-texte {
        width: 100%;
        max-width: 600px;
    }

    .bloc-citation .guillemets {
        width: 63px;
        height: auto;
    }

    .bloc-citation h3 {
        font-size: 24px;
    }

    .bloc-citation .image-externe {
        width: 100% !important;
        max-width: 600px;
        height: 260px;
        object-fit: cover;
        border-radius: 24px !important;
    }

    /* Gestionnaires : photo en haut, texte sur le fond bleu en dessous */
    #gestionnaire-collection .fond-gestionnaire {
        height: auto;
        padding: clamp(160px, 38vw, 340px) 1.25rem 2rem;
        border-radius: 24px;
        background: linear-gradient(180deg, transparent 0, transparent clamp(60px, 18vw, 160px), var(--tertiary-light) clamp(160px, 38vw, 340px)),
                    url('../../Images/Charly-ROG.jpg') center top / 100% auto no-repeat,
                    var(--tertiary-light);
    }

    .texte-gestionnaire {
        width: 100%;
        max-width: 600px;
        margin-right: 0;
    }
}

/* ============================================================
   TÉLÉPHONES (< 576 px)
   ============================================================ */

@media (max-width: 575.98px) {
    .header-presentation p {
        font-size: 17px !important;
    }

    /* Briques sous le bandeau : trois colonnes égales, libellé court visible */
    .briques-entete {
        width: 100%;
        padding: 0 0.5rem;
    }

    .briques-entete .brick {
        flex: 1 1 0;
        width: auto;
        height: 104px;
    }

    .briques-entete .brick .brick-content {
        margin: 0;
        padding: 0.75rem 0.25rem 0.5rem;
        justify-content: center;
        gap: 0.4rem;
    }

    .briques-entete .brick span.responsive-hider {
        display: block;
        font-size: 12px;
        line-height: 1.2;
    }

    .illustration-cn {
        max-width: 280px;
    }

    #chiffres-rpg {
        padding: 1.5rem 1rem;
    }

    .fond-chiffres {
        border-radius: 24px;
    }

    .rpg-tab-item {
        padding: 0.5rem;
    }

    /* Liens GEVES / ministère : deux briques côte à côte, qui chevauchent le haut d'une photo moins haute */
    .liens-externes-briques {
        top: 0;
        margin-bottom: -70px;
        width: 100%;
        padding: 0 0.75rem;
    }

    .liens-externes-briques .brick-link {
        flex: 1 1 0;
        width: auto;
        height: 140px;
    }

    .liens-externes-photo,
    .liens-externes-degrade {
        height: 260px;
        border-radius: 24px;
    }

    .liens-externes-photo {
        background-size: cover;
        background-position: center bottom;
    }
}
