
/* Police de secours de même gabarit que Plus Jakarta Sans : le passage de l'une à l'autre se voit à peine. */
@font-face {
    font-family: "Jakarta Fallback";
    src: local("Arial"), local("Helvetica");
    size-adjust: 104%;
    ascent-override: 96%;
    descent-override: 26%;
    line-gap-override: 0%;
}

@font-face {
    font-family: "BUEP-Digits";
    src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Liberation Serif"), local("Times");
    unicode-range: U+0030-0039;
    font-display: swap;
}
/* =========================================
   BUEP-ENS/PN — IDENTITÉ VISUELLE
   ========================================= */

:root {
    --navy: #102744;
    --navy-dark: #091b31;
    --navy-light: #1c3d62;
    --gold: #c9a34f;
    --gold-light: #e5c77e;
    --white: #ffffff;
    --light: #f5f6f8;
    --text: #273444;
    --muted: #748091;
    --border: #e7e9ed;

    --font-main: "BUEP-Digits", 'DM Sans', sans-serif;
    --font-title: "BUEP-Digits", 'Playfair Display', serif;

    --container: 1160px;
    --shadow: 0 12px 35px rgba(16, 39, 68, .08);

    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

/* RESET */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(92%, var(--container));
    margin: 0 auto;
}

.section-padding {
    padding: 60px 0;
}

/* Première section après la bannière de page : espace réduit */
.page-banner + .section-padding {
    padding-top: 40px;
}

/* BARRE INSTITUTIONNELLE */

.topbar {
    background: var(--navy-dark);
    color: rgba(255,255,255,.8);
    font-size: 11px;
    padding: 9px 0;
}

.topbar-content,
.topbar-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.topbar-separator {
    color: var(--gold);
}

/* EN-TÊTE */

.main-header {
    background: var(--white);
    position: relative;
    z-index: 100;
    box-shadow: 0 3px 18px rgba(0,0,0,.04);
}

.header-content {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Pastille du logo : vide tant que le logo n'est pas chargé, aucune lettre de remplacement. */
.brand-logo {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: transparent;
    border: 0;
    border-radius: 50%;
    overflow: hidden;
    font-family: var(--font-title);
    font-size: 25px;
    font-weight: 800;
}

/* Logo téléversé : fond clair pour que le logo reste lisible */
/* Logo en cours de chargement : la pastille reste vide, sans « B » */
.brand-logo.is-pending > span {
    visibility: hidden;
}

.brand-logo.has-logo {
    background: #ffffff;
    border: 2px solid var(--gold);
}

/* Logo déjà enregistré dans le navigateur : affiché dès l'en-tête, sans attente. */
.logo-cached .brand-logo {
    background-color: #ffffff;
    background-image: var(--buep-logo);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 80%;
    border: 2px solid var(--gold);
}

/* Logo par défaut : visible dès le premier affichage, avant même la réponse de la base. */
.brand-logo:not(.has-logo) {
    background-color: #ffffff;
    background-image: url("../img/logo-buep.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 80%;
    border: 2px solid var(--gold);
}

.brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    box-sizing: border-box;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.brand-text strong {
    color: var(--navy);
    font-size: 16px;
    letter-spacing: .5px;
}

.brand-text small {
    color: var(--navy);
    font-size: 12px;
    letter-spacing: .3px;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 21px;
}

.main-nav a {
    color: var(--navy);
    font-size: 12px;
    font-weight: 600;
    position: relative;
    padding: 32px 0;
    transition: color .25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--gold);
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    bottom: 22px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--navy);
    margin: 5px 0;
    transition: .3s;
}

/* HERO */

.hero {
    min-height: 570px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(110deg, rgba(7,25,46,.96), rgba(16,39,68,.82)),
        var(--hero-image, none) center/cover no-repeat,
        var(--navy);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 20%,
        rgba(201,163,79,.16), transparent 35%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    padding-top: 75px;
    padding-bottom: 85px;
}

.hero-label,
.eyebrow {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

.hero h1 {
    font-family: var(--font-title);
    font-size: clamp(38px, 5.5vw, 66px);
    line-height: 1.15;
    max-width: 800px;
    margin: 23px 0;
}

.hero h1 span {
    color: var(--gold-light);
}

.hero-content > p {
    max-width: 580px;
    color: rgba(255,255,255,.8);
    font-size: 15px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 23px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 3px;
    transition: .25s ease;
}

.btn-gold {
    background: var(--gold);
    color: var(--navy-dark);
}

.btn-gold:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid rgba(255,255,255,.65);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--navy);
}

.hero-index {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 65px;
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255,255,255,.65);
}

.hero-index span:first-child {
    color: var(--gold);
    font-weight: 700;
}

.hero-index-line {
    width: 45px;
    height: 1px;
    background: var(--gold);
}

/* TITRES DE SECTION */

.section-heading h2 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.25;
    margin: 10px 0;
}

.section-heading p {
    color: var(--muted);
    font-size: 13px;
}

.gold-line {
    width: 55px;
    height: 3px;
    background: var(--gold);
    margin-top: 19px;
}

.centered {
    text-align: center;
}

.centered .gold-line {
    margin-left: auto;
    margin-right: auto;
}

/* MOT DU PRÉSIDENT */

.president-section {
    background: var(--white);
}

.president-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 75px;
}

.president-content {
    padding-left: 35px;
    border-left: 2px solid var(--gold);
}

.president-content p {
    font-size: 14px;
    color: #596575;
    margin-bottom: 17px;
}

.president-signature {
    display: flex;
    flex-direction: column;
    margin-top: 28px;
}

.president-signature strong {
    color: var(--navy);
    font-size: 13px;
}

.president-signature span {
    color: var(--gold);
    font-size: 11px;
}

/* Colonne gauche : titre + photo du Président */

.president-aside {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.president-photo {
    margin: 0;
    width: 230px;
    max-width: 100%;
}

.president-photo[hidden] {
    display: none;
}

.president-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    border: 4px solid var(--gold);
    box-shadow: 0 14px 34px rgba(16, 39, 68, .18);
}

/* ACTUALITÉS */

.news-section {
    background: var(--light);
}

.section-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 35px;
}

.text-link {
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--gold);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    background: var(--white);
    padding: 55px 20px;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.empty-icon {
    display: inline-grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    color: var(--gold);
    background: #faf5e9;
    font-size: 20px;
    margin-bottom: 12px;
}

.empty-state h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 20px;
}

.empty-state p {
    color: var(--muted);
    font-size: 12px;
    margin-top: 7px;
}

/* ACCÈS RAPIDES */

.quick-section {
    background: var(--white);
}

.quick-section .section-heading {
    margin-bottom: 45px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.quick-card {
    position: relative;
    padding: 28px 22px;
    min-height: 205px;
    background: var(--white);
    border: 1px solid var(--border);
    transition: .3s ease;
}

.quick-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: var(--shadow);
}

.quick-number {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.quick-card h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 19px;
    margin: 20px 0 8px;
}

.quick-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.quick-arrow {
    display: inline-block;
    color: var(--gold);
    font-size: 21px;
    margin-top: 15px;
}

/* PIED DE PAGE */

.main-footer {
    background: var(--navy-dark);
    color: var(--white);
    padding-top: 65px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 55px;
}

.footer-logo .brand-text strong {
    color: var(--white);
}

.footer-logo .brand-text small {
    color: rgba(255,255,255,.55);
}

.footer-brand > p {
    max-width: 330px;
    color: rgba(255,255,255,.6);
    font-size: 12px;
    margin-top: 22px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column h3 {
    color: var(--gold-light);
    font-size: 13px;
    margin-bottom: 8px;
}

.footer-column a {
    color: rgba(255,255,255,.7);
    font-size: 12px;
    transition: .2s;
}

.footer-column a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 18px 0;
}

.footer-bottom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.footer-bottom p,
.footer-bottom span {
    color: rgba(255,255,255,.5);
    font-size: 10px;
}

/* ANIMATIONS */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeUp .8s ease both;
}

/* TABLETTES */

@media (max-width: 1050px) {
    .main-nav {
        gap: 13px;
    }

    .main-nav a {
        font-size: 11px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .president-grid {
        gap: 40px;
    }
}

/* MOBILES */

@media (max-width: 780px) {
    .topbar {
        font-size: 9px;
    }

    .topbar-content {
        justify-content: center;
        text-align: center;
    }

    .topbar-links {
        display: none;
    }

    .header-content {
        min-height: 72px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .brand-text strong {
        font-size: 13px;
    }

    .brand-text small {
        font-size: 11px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 12px 4% 20px;
        box-shadow: 0 12px 20px rgba(0,0,0,.1);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition:
            opacity .3s ease,
            transform .45s var(--ease-out),
            visibility 0s linear .45s;
    }

    .main-nav.open {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition:
            opacity .3s ease,
            transform .45s var(--ease-out),
            visibility 0s;
    }

    .main-nav a {
        padding: 12px 5px;
        border-bottom: 1px solid var(--border);
        font-size: 13px;
    }

    .main-nav a.active::after {
        display: none;
    }

    .hero {
        min-height: 540px;
    }

    .hero-content {
        padding-top: 65px;
        padding-bottom: 65px;
    }

    .hero h1 {
        font-size: 39px;
    }

    .hero-content > p {
        font-size: 13px;
    }

    .hero-index {
        margin-top: 45px;
    }

    .section-padding {
        padding: 44px 0;
    }

    .page-banner + .section-padding {
        padding-top: 28px;
    }

    .president-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .president-content {
        padding-left: 20px;
    }

    .section-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .quick-grid {
        gap: 12px;
    }

    .quick-card {
        padding: 22px 16px;
        min-height: 190px;
    }

    .quick-card h3 {
        font-size: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 35px 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }
}

/* PETITS ÉCRANS */

@media (max-width: 380px) {
    .hero h1 {
        font-size: 33px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: auto;
    }
}

/* ACCESSIBILITÉ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}


/* =========================================
   PAGES INTÉRIEURES — STYLES COMMUNS
   ========================================= */

.page-banner {
    background: linear-gradient(115deg, var(--navy-dark), var(--navy-light));
    color: var(--white);
    padding: 75px 0 65px;
}

.page-banner h1 {
    font-family: var(--font-title);
    font-size: clamp(36px, 5vw, 52px);
    margin: 12px 0;
}

.page-banner p {
    max-width: 650px;
    color: rgba(255,255,255,.75);
    font-size: 14px;
}

.breadcrumb {
    display: flex;
    gap: 9px;
    margin-top: 25px;
    font-size: 11px;
    color: var(--gold-light);
}

.breadcrumb a {
    color: rgba(255,255,255,.75);
}

.breadcrumb a:hover {
    color: var(--gold-light);
}

.institution-content {
    max-width: 850px;
    margin-top: 35px;
}

.institution-content p {
    color: #596575;
    font-size: 14px;
    line-height: 2;
    margin-bottom: 20px;
}

.institution-values {
    background: var(--light);
}

@media (max-width: 780px) {
    .page-banner {
        padding: 55px 0 45px;
    }

    .institution-content p {
        font-size: 13px;
    }
}


/* =========================================
   ORGANIGRAMME DU BUREAU
   ========================================= */

.mandate-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    background: var(--navy);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 3px;
}

.section-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.organigram-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0 30px;
}

.view-button {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--navy);
    padding: 11px 17px;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 3px;
    transition: 0.2s ease;
}

.view-button.active,
.view-button:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.organigram-container {
    width: 100%;
    min-height: 260px;
}

.organigram-empty {
    background: var(--light);
    border: 1px dashed #cbd1da;
    border-radius: 5px;
    text-align: center;
    padding: 55px 20px;
}

.empty-icon {
    color: var(--gold);
    font-size: 35px;
    margin-bottom: 12px;
}

.organigram-empty h3 {
    font-family: var(--font-title);
    color: var(--navy);
    font-size: 21px;
    margin: 10px 0;
}

.organigram-empty p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    max-width: 560px;
    margin: auto;
}

@media (max-width: 780px) {

    .section-top {
        align-items: flex-start;
    }

    .mandate-label {
        margin-top: 5px;
    }

    .organigram-toolbar {
        gap: 8px;
    }

    .view-button {
        flex: 1;
        padding: 11px 8px;
        font-size: 11px;
    }

    .organigram-empty {
        padding: 40px 18px;
    }

}

/* =========================================
   PAGE ACTUALITÉS
   ========================================= */

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.news-filter {
    padding: 10px 17px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--navy);
    border-radius: 3px;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.news-filter:hover,
.news-filter.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.news-empty {
    grid-column: 1 / -1;
    background: var(--light);
    border: 1px dashed #cbd1da;
    border-radius: 5px;
    text-align: center;
    padding: 55px 20px;
}

.news-empty h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 21px;
    margin: 12px 0;
}

.news-empty p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    max-width: 560px;
    margin: auto;
}

@media (max-width: 780px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-filters {
        gap: 8px;
    }

    .news-filter {
        padding: 10px 12px;
        font-size: 11px;
    }
}

/* =========================================
   PAGE NOS ACTIVITÉS
   ========================================= */

.activities-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.activities-empty {
    grid-column: 1 / -1;
    background: var(--light);
    border: 1px dashed #cbd1da;
    border-radius: 5px;
    text-align: center;
    padding: 55px 20px;
}

.activities-empty h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 21px;
    margin: 12px 0;
}

.activities-empty p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    max-width: 560px;
    margin: auto;
}

@media (max-width: 780px) {
    .activities-grid {
        grid-template-columns: 1fr;
    }

    .activities-empty {
        padding: 40px 18px;
    }
}

/* =========================================
   PAGE VIE ASSOCIATIVE
   ========================================= */

.clubs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.clubs-empty {
    grid-column: 1 / -1;
    background: var(--light);
    border: 1px dashed #cbd1da;
    border-radius: 5px;
    text-align: center;
    padding: 55px 20px;
}

.clubs-empty h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 21px;
    margin: 12px 0;
}

.clubs-empty p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    max-width: 560px;
    margin: auto;
}

.associative-section {
    background: var(--light);
}

@media (max-width: 780px) {
    .clubs-grid {
        grid-template-columns: 1fr;
    }

    .clubs-empty {
        padding: 40px 18px;
    }
}

/* =========================================
   PAGE GALERIE
   ========================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.gallery-empty {
    grid-column: 1 / -1;
    background: var(--light);
    border: 1px dashed #cbd1da;
    border-radius: 5px;
    text-align: center;
    padding: 55px 20px;
}

.gallery-empty h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 21px;
    margin: 12px 0;
}

.gallery-empty p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    max-width: 560px;
    margin: auto;
}

/* Galerie dynamique : filtres, cartes d'albums */

.gallery-wrap {
    margin-top: 30px;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.gallery-filter {
    border: 1px solid #d6dbe3;
    background: #ffffff;
    color: var(--navy);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
}

.gallery-filter:hover,
.gallery-filter.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #ffffff;
}

.gallery-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}

.album-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(16, 39, 68, .08);
    transition: transform .35s ease, box-shadow .35s ease;
}

.album-card[hidden] {
    display: none;
}

.album-card:hover,
.album-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(16, 39, 68, .18);
    outline: none;
}

.album-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--navy);
}

.album-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.album-card:hover .album-cover img {
    transform: scale(1.08);
}

.album-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 31, 58, .65), transparent 55%);
    pointer-events: none;
}

.album-cover-empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--gold-light);
    font-size: 36px;
}

.album-count {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 1;
    background: rgba(255, 255, 255, .94);
    color: var(--navy);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}

.album-info {
    padding: 20px 22px 24px;
}

.album-info h3 {
    font-family: var(--font-title);
    color: var(--navy);
    font-size: 19px;
    margin: 8px 0 6px;
}

.album-info p {
    color: var(--muted);
    font-size: 12px;
}

.album-tag {
    display: inline-block;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* Fenêtre d'album (miniatures) */

.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 18, 34, .82);
    backdrop-filter: blur(4px);
}

.gallery-modal[hidden] {
    display: none;
}

.gallery-modal-panel {
    position: relative;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 34px;
}

.gallery-modal-panel > .gallery-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.gallery-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.gallery-modal-head h2 {
    font-family: var(--font-title);
    color: var(--navy);
    font-size: 26px;
    margin: 8px 0 6px;
}

.gallery-modal-head p {
    color: var(--muted);
    font-size: 13px;
}

.gallery-modal-desc {
    margin-top: 10px;
    line-height: 1.7;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.gallery-thumb {
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--navy);
    cursor: zoom-in;
}

.gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease, opacity .4s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.08);
    opacity: .9;
}

/* Visionneuse plein écran */

.gallery-viewer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 80px;
    background: rgba(5, 12, 24, .95);
}

.gallery-viewer[hidden] {
    display: none;
}

.gallery-viewer > .gallery-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, .15);
}

.gallery-viewer figure {
    margin: 0;
    text-align: center;
    max-width: 100%;
}

.gallery-viewer img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 6px;
    animation: galleryFade .35s ease;
}

.gallery-viewer figcaption {
    color: #ffffff;
    font-size: 14px;
    margin-top: 14px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, .22);
}

.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }

.gallery-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 13px;
    opacity: .8;
}

body.gallery-open {
    overflow: hidden;
}

@keyframes galleryFade {
    from { opacity: 0; transform: scale(.98); }
    to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 780px) {
    .gallery-cards {
        grid-template-columns: 1fr;
    }

    .gallery-modal {
        padding: 12px;
    }

    .gallery-modal-panel {
        padding: 24px 18px;
    }

    .gallery-viewer {
        padding: 56px 12px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .gallery-prev { left: 6px; }
    .gallery-next { right: 6px; }
}

@media (max-width: 780px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-empty {
        padding: 40px 18px;
    }
}

/* =========================================
   PAGE DOCUMENTS
   ========================================= */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.documents-empty {
    grid-column: 1 / -1;
    background: var(--light);
    border: 1px dashed #cbd1da;
    border-radius: 5px;
    text-align: center;
    padding: 55px 20px;
}

.documents-empty h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 21px;
    margin: 12px 0;
}

.documents-empty p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    max-width: 560px;
    margin: auto;
}

@media (max-width: 780px) {
    .documents-grid {
        grid-template-columns: 1fr;
    }

    .documents-empty {
        padding: 40px 18px;
    }
}

/* =========================================
   PAGE CONTACT
   ========================================= */

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    gap: 35px;
    align-items: start;
    margin-top: 35px;
}

.contact-form-wrapper {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--white);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
}

.form-group select {
    appearance: auto;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--white);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 13px;
    outline: none;
}

.form-optional {
    font-weight: 400;
    color: var(--muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-information {
    background: var(--navy);
    color: var(--white);
    border-radius: 5px;
    padding: 30px;
}

.contact-information h3 {
    font-family: var(--font-title);
    font-size: 23px;
    margin-bottom: 15px;
}

.contact-information > p {
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.contact-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.contact-info-item strong {
    color: var(--gold-light);
    font-size: 12px;
}

.contact-info-item span {
    color: var(--white);
    font-size: 13px;
    line-height: 1.6;
}

.contact-feedback {
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 780px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .contact-form-wrapper,
    .contact-information {
        padding: 22px 18px;
    }
}

/* =========================================
   ORGANIGRAMME — DESIGN GRAPHIQUE BUEP
   ========================================= */

.organigram-container {
    padding: 35px 15px;
    background: #f3f6fa;
    border-radius: 16px;
    overflow-x: auto;
}

/* STRUCTURE DES POSTES */

.organigram-hierarchy-view {
    min-width: 300px;
    text-align: center;
}

.organigram-position {
    position: relative;
    text-align: center;
    padding: 0 10px;
    margin: 0 auto 25px;
}

.organigram-position-heading {
    display: inline-block;
    min-width: 190px;
    max-width: 300px;
    padding: 13px 22px;
    margin-bottom: 20px;
    color: #fff;
    background: #06465c;
    border-radius: 8px;
    border-bottom: 4px solid #d5a62e;
    box-shadow: 0 4px 12px rgba(0, 35, 55, 0.12);
}

.organigram-position-heading h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.organigram-position-heading p {
    margin: 6px 0 0;
    font-size: 12px;
    color: #dcebf0;
}

/* CARTES DES MEMBRES */

.organigram-members-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
}

.organigram-member {
    width: 220px;
    min-height: 220px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: 13px;
    border: 1px solid #e2e8ef;
    box-shadow: 0 5px 16px rgba(10, 45, 70, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.organigram-member:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 22px rgba(10, 45, 70, 0.14);
}

.organigram-member-photo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 4px solid #fff;
    outline: 3px solid #d5a62e;
    background: #e9eef3;
    margin-bottom: 17px;
}

.organigram-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #0b607b;
    font-size: 25px;
    font-weight: 700;
}

.organigram-member-info {
    width: 100%;
}

.organigram-member-info h4 {
    color: #073b52;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 7px;
}

.organigram-member-info p {
    color: #526575;
    font-size: 12px;
    line-height: 1.5;
    margin: 5px 0;
}

.organigram-member-info small {
    display: inline-block;
    margin: 3px;
    padding: 5px 10px;
    color: #fff;
    background: #176b88;
    border-radius: 4px;
    font-size: 10px;
}

/* LIAISONS HIÉRARCHIQUES */

.organigram-children {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px 15px;
    padding-top: 40px;
    margin-top: 20px;
}

.organigram-children::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    height: 20px;
    border-left: 2px solid #0b607b;
}

.organigram-children::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 16.66%;
    right: 16.66%;
    border-top: 2px solid #0b607b;
}

.organigram-children > .organigram-position {
    margin: 0;
    padding: 0 5px;
}

.organigram-children > .organigram-position::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    height: 20px;
    border-left: 2px solid #0b607b;
}

/* VUE EN LISTE */

.organigram-list-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 25px;
}

.organigram-list-view > .organigram-position {
    padding: 20px 12px;
    margin: 0;
    background: #eaf0f5;
    border-radius: 12px;
}

.organigram-list-view .organigram-members-list {
    flex-direction: column;
    align-items: center;
}

.organigram-list-view .organigram-member {
    width: 100%;
    max-width: 260px;
}

/* RESPONSIVE */

@media (max-width: 768px) {

    .organigram-children {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .organigram-children::after {
        left: 25%;
        right: 25%;
    }

    .organigram-member {
        width: 190px;
    }
}

@media (max-width: 520px) {

    .organigram-container {
        padding: 25px 8px;
    }

    .organigram-children {
        grid-template-columns: 1fr;
        gap: 25px;
        padding-top: 30px;
    }

    .organigram-children::after {
        display: none;
    }

    .organigram-children > .organigram-position::before {
        top: -30px;
        height: 30px;
    }

    .organigram-member {
        width: 100%;
        max-width: 240px;
    }
}

/* =========================================
   ORGANIGRAMME — DISPOSITION PAR PAIRES
   ========================================= */

/* Deux postes par rangée */
.organigram-children {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 35px 25px;
    position: relative;
    padding-top: 40px;
    margin-top: 20px;
}

/* Liaison verticale depuis le Président */
.organigram-children::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    height: 20px;
    border-left: 2px solid #0b607b;
}

/* Liaison horizontale entre les deux colonnes */
.organigram-children::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    border-top: 2px solid #0b607b;
}

/* Liaison vers chaque poste */
.organigram-children > .organigram-position {
    position: relative;
    margin: 0;
    padding: 0 5px;
}

.organigram-children > .organigram-position::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    height: 20px;
    border-left: 2px solid #0b607b;
}

/* Les cartes restent bien centrées */
.organigram-children .organigram-members-list {
    justify-content: center;
}

/* Adaptation aux petits écrans */
@media (max-width: 360px) {
    .organigram-children {
        grid-template-columns: 1fr;
    }

    .organigram-children::after {
        display: none;
    }
}

/* ALIGNEMENT DES CARTES DE L'ORGANIGRAMME */

.organigram-children > .organigram-position {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.organigram-children > .organigram-position
.organigram-members-list {
    width: 100%;
    align-items: stretch;
}

.organigram-children > .organigram-position
.organigram-member {
    width: 100%;
    max-width: 260px;
    min-height: 260px;
    margin: 0 auto;
}

.organigram-member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* MISE EN ÉVIDENCE DU PRÉSIDENT */

.organigram-hierarchy-view > .organigram-position > .organigram-position-heading {
    min-width: 260px;
    padding: 18px 30px;
    background: #082f49;
    border-bottom: 5px solid #d5a62e;
}

.organigram-hierarchy-view > .organigram-position > .organigram-position-heading h3 {
    font-size: 19px;
    letter-spacing: 0.5px;
}

.organigram-hierarchy-view > .organigram-position > .organigram-members-list
.organigram-member {
    max-width: 290px;
    border: 2px solid #d5a62e;
    background: #fff;
}

.organigram-hierarchy-view > .organigram-position > .organigram-members-list
.organigram-member-photo {
    width: 115px;
    height: 115px;
}

/* =========================================
   LIAISONS DYNAMIQUES
   Menu déroulant, blocs d'accueil, coordonnées
   ========================================= */

/* Menu déroulant (sections du module Navigation) */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: 0;
    padding: 32px 0;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    transition: color .25s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.has-active .nav-dropdown-toggle {
    color: var(--gold);
}

.nav-dropdown-toggle span {
    font-size: 10px;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 50;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 22px 50px rgba(16, 39, 68, .18);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-dropdown-menu a {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--navy);
}

.nav-dropdown-menu a::after {
    display: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: #f3f5f9;
    color: var(--gold);
}

/* Blocs dynamiques de l'accueil */

.home-blocks[hidden] {
    display: none;
}

.home-blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.home-block-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 30px 28px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(145deg, var(--navy), #1d3b63);
    box-shadow: 0 14px 34px rgba(16, 39, 68, .14);
    transition: transform .35s ease, box-shadow .35s ease;
}

.home-block-card::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 163, 79, .38), transparent 70%);
    pointer-events: none;
}

.home-block-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(16, 39, 68, .25);
}

.home-block-card.is-featured {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.home-block-tag {
    color: var(--gold-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.home-block-icon {
    font-size: 26px;
    color: var(--gold);
}

.home-block-card h3 {
    font-family: var(--font-title);
    font-size: 23px;
    line-height: 1.25;
}

.home-block-card p {
    flex: 1;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-line;
}

.home-block-link {
    margin-top: auto;
    color: var(--gold-light);
    font-size: 13px;
    font-weight: 700;
}

.home-block-link:hover {
    color: #ffffff;
}

/* Coordonnées et réseaux (page Contact) */

.contact-subtitle {
    margin: 28px 0 0;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.contact-chips {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.contact-chips[hidden],
.social-chips[hidden] {
    display: none;
}

.contact-chip {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    border-radius: 10px;
    background: #f3f5f9;
    color: var(--navy);
    font-size: 14px;
    transition: background .25s ease, color .25s ease;
}

.contact-chip-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-chip .label {
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

a.contact-chip:hover {
    background: var(--navy);
    color: #ffffff;
}

a.contact-chip:hover .label {
    color: var(--gold-light);
}

.social-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.social-chip {
    padding: 9px 16px;
    border: 1px solid var(--navy);
    border-radius: 999px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    transition: background .25s ease, color .25s ease;
}

.social-chip:hover {
    background: var(--navy);
    color: #ffffff;
}

/* Accès discret à l'administration : icône seule, sans texte */
.admin-access {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 14px;
    border-radius: 50%;
    color: rgba(255, 255, 255, .28);
    transition: color .3s ease, background .3s ease;
}

.admin-access:hover,
.admin-access:focus-visible {
    color: var(--gold);
    background: rgba(255, 255, 255, .06);
}

/* =========================================
   VIE ASSOCIATIVE : cartes des clubs
   ========================================= */

.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
    margin-top: 36px;
}

.club-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(16, 39, 68, .08);
    transition: transform .35s ease, box-shadow .35s ease;
}

.club-tile:hover,
.club-tile:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 24px 46px rgba(16, 39, 68, .18);
    outline: none;
}

.club-tile-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--navy);
}

.club-tile-media > img:first-child {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.club-tile:hover .club-tile-media > img:first-child {
    transform: scale(1.07);
}

.club-tile-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 31, 58, .55), transparent 60%);
    pointer-events: none;
}

.club-tile-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--gold-light);
    font-size: 40px;
}

.club-tile-logo {
    position: absolute;
    left: 18px;
    bottom: -26px;
    z-index: 1;
    width: 64px;
    height: 64px;
    object-fit: contain;
    padding: 6px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--gold);
    box-shadow: 0 8px 18px rgba(16, 39, 68, .2);
}

.club-tile-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 36px 22px 22px;
}

.club-tile-body h3 {
    font-family: var(--font-title);
    color: var(--navy);
    font-size: 20px;
    line-height: 1.25;
}

.club-tile-excerpt {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.club-tile-cta {
    margin-top: auto;
    padding-top: 8px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
}

.club-tag {
    display: inline-block;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* Fenêtre de détail d'un club */

.club-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 18, 34, .8);
    backdrop-filter: blur(4px);
}

.club-modal[hidden] {
    display: none;
}

.club-modal-panel {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    padding: 36px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
    animation: clubFade .3s ease;
}

.club-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.club-modal-head {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 40px;
    margin-bottom: 18px;
}

.club-modal-head h2 {
    font-family: var(--font-title);
    color: var(--navy);
    font-size: 28px;
    margin: 6px 0 4px;
}

.club-modal-logo {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    object-fit: contain;
    padding: 8px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--gold);
    box-shadow: 0 8px 18px rgba(16, 39, 68, .15);
}

.club-modal-resp {
    color: var(--muted);
    font-size: 13px;
}

.club-modal-text {
    color: var(--text, #2b3445);
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 18px;
}

.club-modal-block {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e6eaf1;
}

.club-modal-block h4 {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.club-modal-block p {
    font-size: 14px;
    line-height: 1.7;
}

.club-modal-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.club-modal-photos img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.club-modal-contact span {
    display: block;
    margin-bottom: 6px;
}

.club-modal-contact a {
    color: var(--navy);
    font-weight: 600;
    font-size: 14px;
}

body.club-open {
    overflow: hidden;
}

@keyframes clubFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 780px) {
    .clubs-grid {
        grid-template-columns: 1fr;
    }

    .club-modal {
        padding: 12px;
    }

    .club-modal-panel {
        padding: 26px 18px;
    }

    .club-modal-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================
   CLUBS : activités et publications dans la fenêtre
   ========================================= */

.club-modal-panel {
    overflow-x: hidden;
}

.club-modal-panel * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.club-items {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

/* Carte d'activité : badge de date à gauche */

.club-activity-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    background: #fbfcfe;
    border: 1px solid #e6eaf1;
    border-left: 4px solid var(--gold);
}

.club-activity-card.is-past {
    border-left-color: #c3cad6;
    opacity: .8;
}

.club-activity-body {
    flex: 1;
    min-width: 0;
}

.club-activity-body h5 {
    font-family: var(--font-title);
    color: var(--navy);
    font-size: 17px;
    margin: 4px 0 6px;
}

.club-activity-body p {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
}

.club-date-badge {
    flex-shrink: 0;
    width: 62px;
    padding: 8px 0;
    text-align: center;
    border-radius: 10px;
    background: var(--navy);
    color: #ffffff;
}

.club-date-badge b {
    display: block;
    font-family: var(--font-title);
    font-size: 22px;
    line-height: 1.1;
}

.club-date-badge small {
    display: block;
    color: var(--gold-light);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.club-state {
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.club-meta {
    color: var(--muted, #6b7689);
    font-size: 13px;
    line-height: 1.5;
}

/* Ligne de publication : bordure bleue, icône */

.club-pub-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f3f5f9;
    border-left: 4px solid var(--navy);
}

.club-pub-icon {
    flex-shrink: 0;
    color: var(--navy);
    font-size: 20px;
    line-height: 1.2;
}

.club-pub-body {
    flex: 1;
    min-width: 0;
}

.club-pub-body h5 {
    font-family: var(--font-title);
    color: var(--navy);
    font-size: 16px;
    margin-bottom: 2px;
}

.club-pub-body p {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
}

/* Bloc « voir les autres » */

.club-more {
    margin-top: 12px;
}

.club-more summary {
    cursor: pointer;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 0;
}

.club-more[open] .club-items {
    margin-top: 12px;
}

@media (max-width: 560px) {
    .club-activity-card {
        padding: 12px;
        gap: 12px;
    }

    .club-date-badge {
        width: 52px;
    }

    .club-date-badge b {
        font-size: 18px;
    }

    .club-pub-row {
        padding: 12px;
    }
}

/* Texte réduit avec bouton « Voir plus » (activités et publications des clubs) */

.club-text p {
    margin: 0;
}

.club-text.is-clamped:not(.is-open) p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.club-toggle {
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--gold);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.club-toggle:hover {
    color: var(--navy);
}

/* =========================================
   ACTUALITÉS — cartes de publication
   ========================================= */

.news-grid .news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.news-grid .news-card:hover,
.news-grid .news-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(16, 39, 68, .14);
    border-color: var(--gold);
    outline: none;
}

.news-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--light);
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--gold-light);
    font-size: 2.6rem;
}

.news-kind {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--navy);
    color: var(--white);
}

/* Même badge pour toutes les catégories : charte bleu marine et or */
.news-kind-communique,
.news-kind-annonce { background: var(--navy); color: var(--gold-light); }

.news-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: 22px 22px 20px;
    min-width: 0;
}

.news-card-content h3 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--navy);
    overflow-wrap: anywhere;
}

.news-card-content p {
    color: var(--muted);
    line-height: 1.6;
    font-size: .95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: auto;
    font-size: .8rem;
    color: var(--muted);
}

.news-card-meta small {
    font-size: inherit;
}

.news-card-cta {
    margin-top: 8px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--gold);
}

.news-card:hover .news-card-cta {
    color: var(--navy);
}

.news-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 30px 0;
}

/* =========================================
   PUBLICATION — page de lecture
   ========================================= */

.pub-article {
    max-width: 820px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.pub-cover {
    position: relative;
    overflow: hidden;
    margin: 8px 0 30px;
    border-radius: 18px;
    padding: clamp(24px, 4vw, 40px) clamp(16px, 3vw, 32px);
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fond flouté, tiré de la même image, pour une ambiance douce */
.pub-cover::before {
    content: "";
    position: absolute;
    inset: -40px;
    background: var(--cover) center / cover no-repeat;
    filter: blur(34px) saturate(1.25);
    opacity: .45;
    transform: scale(1.1);
}

.pub-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9,27,49,.15), rgba(9,27,49,.55));
}

.pub-cover a {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    cursor: zoom-in;
    border-radius: 14px;
    padding: 8px;
    background: var(--white);
    box-shadow: 0 24px 55px rgba(0, 0, 0, .35);
    transition: transform .35s ease, box-shadow .35s ease;
}

.pub-cover a:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 65px rgba(0, 0, 0, .42);
}

.pub-cover img {
    display: block;
    max-width: 100%;
    max-height: 560px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    margin: 0 auto;
}

.pub-body {
    padding: 36px clamp(20px, 5vw, 56px) 44px;
    min-width: 0;
}

.pub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 14px;
}

.pub-title {
    font-family: var(--font-title);
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.2;
    color: var(--navy);
    margin-bottom: 14px;
    overflow-wrap: anywhere;
}

.pub-summary {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--text);
    padding-left: 16px;
    border-left: 3px solid var(--gold);
    margin-bottom: 26px;
    overflow-wrap: anywhere;
}

.pub-text p {
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
    overflow-wrap: anywhere;
}

.pub-share {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.pub-share h2 {
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 12px;
}

.pub-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pub-share-buttons button,
.pub-share-buttons a {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--navy);
    background: var(--white);
    color: var(--navy);
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.pub-share-buttons button:hover,
.pub-share-buttons a:hover {
    background: var(--navy);
    color: var(--white);
}

.pub-state {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

@media (max-width: 640px) {
    .news-card-content { padding: 18px 16px; }
    .pub-cover img { max-height: 400px; }
}

.news-kind-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--navy);
    color: var(--white);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.pub-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.pub-gallery a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 10px 28px rgba(16, 39, 68, .12);
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform .3s ease, box-shadow .3s ease;
}

.pub-gallery a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(16, 39, 68, .2);
}

.pub-gallery img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}


/* =========================================
   DOCUMENTS — cartes stylées (charte du site)
   ========================================= */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 26px;
    margin-top: 36px;
}

.document-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.document-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.document-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(16, 39, 68, .14);
    border-color: rgba(201, 163, 79, .5);
}

.document-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px 24px 24px;
    flex: 1;
    min-width: 0;
}

.document-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.document-category,
.document-access {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.document-category {
    background: var(--navy);
    color: var(--white);
}

.document-access {
    background: #eef6ee;
    color: #2e6b3a;
}

.document-card h3 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    line-height: 1.3;
    color: var(--navy);
    overflow-wrap: anywhere;
}

.document-description {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: .82rem;
    color: var(--muted);
}

.document-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.document-meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
    margin-right: 8px;
    display: none;
}

.document-files {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.document-files h4 {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}

.document-file {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--light);
    border-radius: 12px;
    min-width: 0;
}

.document-file:last-child {
    margin-bottom: 0;
}

.document-file-info {
    min-width: 0;
}

.document-file-info strong {
    display: block;
    font-size: .9rem;
    color: var(--navy);
    overflow-wrap: anywhere;
}

.document-file-info small {
    display: block;
    margin-top: 3px;
    font-size: .76rem;
    color: var(--muted);
}

.document-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.document-file-actions a {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--navy);
    background: var(--white);
    color: var(--navy);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.document-file-actions a:first-child {
    background: var(--navy);
    color: var(--white);
}

.document-file-actions a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-dark);
}

.documents-empty {
    grid-column: 1 / -1;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 56px 24px;
}

.documents-empty .empty-icon {
    color: var(--gold);
    font-size: 2rem;
}

.documents-empty h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 1.35rem;
    margin: 12px 0;
}

.documents-empty p {
    color: var(--muted);
    line-height: 1.7;
    max-width: 560px;
    margin: auto;
}

@media (max-width: 640px) {
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .document-card-content {
        padding: 22px 18px 20px;
    }
}

/* =========================================
   ACTIVITÉS ET PROJETS — cartes stylées
   ========================================= */

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 26px;
    margin-top: 36px;
}

.activity-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(16, 39, 68, .14);
    border-color: rgba(201, 163, 79, .5);
}

.activity-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--light);
    overflow: hidden;
}

.activity-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .5s ease;
}

.activity-card:hover .activity-card-image img {
    transform: scale(1.03);
}

.activity-photos {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(9, 27, 49, .85);
    color: var(--white);
    font-size: .74rem;
    font-weight: 600;
}

.activity-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 24px 22px;
    flex: 1;
    min-width: 0;
}

.activity-card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-type,
.activity-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.activity-type {
    background: var(--navy);
    color: var(--white);
}

.activity-status {
    background: #fbf3e0;
    color: #8a6418;
}

.activity-card h3 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    line-height: 1.3;
    color: var(--navy);
    overflow-wrap: anywhere;
}

.activity-description {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.activity-meta {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 7px;
}

.activity-meta p {
    font-size: .86rem;
    line-height: 1.5;
    color: var(--text);
    overflow-wrap: anywhere;
}

.activity-meta strong {
    color: var(--gold);
    font-weight: 700;
    margin-right: 4px;
}

.activities-empty {
    grid-column: 1 / -1;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    text-align: center;
    padding: 56px 24px;
}

.activities-empty .empty-icon {
    color: var(--gold);
    font-size: 2rem;
}

.activities-empty h3 {
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 1.35rem;
    margin: 12px 0;
}

.activities-empty p {
    color: var(--muted);
    line-height: 1.7;
    max-width: 560px;
    margin: auto;
}

@media (max-width: 640px) {
    .activities-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .activity-card-content {
        padding: 22px 18px 20px;
    }
}

/* =========================================
   ACTIVITÉS — filtres, cartes cliquables, détail
   ========================================= */

.activity-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 34px;
}

.activity-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.activity-filter-label {
    min-width: 64px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold);
}

.activity-filters .news-filter {
    cursor: pointer;
}

a.activity-card {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.activity-card:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.activity-card-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--gold-light);
    font-size: 2.4rem;
}

.activity-cta {
    margin-top: 4px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--gold);
}

.activity-card:hover .activity-cta {
    color: var(--navy);
}

.activity-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 26px 0 30px;
}

.activity-fact {
    background: var(--light);
    border-left: 3px solid var(--gold);
    border-radius: 12px;
    padding: 14px 16px;
    min-width: 0;
}

.activity-fact span {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold);
}

.activity-fact p {
    margin-top: 5px;
    color: var(--text);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.act-section {
    margin-top: 30px;
}

.act-section h2 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.act-list {
    list-style: none;
    display: grid;
    gap: 10px;
}

.act-list li {
    position: relative;
    padding-left: 26px;
    line-height: 1.65;
    color: var(--text);
    overflow-wrap: anywhere;
}

.act-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: .6em;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gold);
}

.activity-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fbf3e0;
    color: #8a6418;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .activity-filter-label {
        width: 100%;
    }
}

.activity-filters .news-filter.active,
.activity-filters .news-filter.active:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

/* =========================================
   ORGANIGRAMME — arbre à cartes uniformes
   ========================================= */

:root {
    --org-card-w: 300px;
    --org-card-h: 390px;
    --org-line: #c9a34f;
}

.org-scroll {
    overflow-x: auto;
    padding: 8px 4px 24px;
}

.org-row + .org-row {
    margin-top: 0;
}

.org-tree {
    width: max-content;
    margin: 0 auto;
}

/* Niveaux : une rangée centrée par niveau, liens dessinés par SVG */
.org-tree {
    position: relative;
}

.org-row {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 64px;
}

.org-row:last-child {
    margin-bottom: 0;
}

.org-lines {
    position: absolute;
    left: 0;
    top: 0;
    overflow: visible;
    pointer-events: none;
}

.org-lines path {
    fill: none;
    stroke: var(--org-line);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Carte : taille identique pour tous les postes */
.org-card {
    width: var(--org-card-w);
    height: var(--org-card-h);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(16, 39, 68, .10);
    cursor: pointer;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.org-card:hover,
.org-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(16, 39, 68, .18);
    outline: none;
}

.org-card-title {
    flex: 0 0 auto;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white);
    font-family: var(--font-title);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    overflow: hidden;
}

.org-card-title span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.org-card.is-root .org-card-title {
    background: var(--gold);
    color: var(--navy-dark);
}

.org-card-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    overflow: hidden;
}

.org-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.org-photo {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    background: var(--light);
    flex: 0 0 auto;
}

.org-photo-placeholder {
    display: grid;
    place-items: center;
    background: var(--navy);
    color: var(--gold-light);
    font-weight: 700;
    font-size: 1.2rem;
}

.org-name {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    font-size: 1.05rem;
    color: var(--navy);
}

.org-role {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    font-size: .9rem;
    line-height: 1.35;
    color: var(--muted);
}

.org-more {
    font-size: .74rem;
    font-weight: 700;
    color: var(--gold);
}

.org-vacant {
    font-size: .86rem;
    font-style: italic;
    color: var(--muted);
}

/* Vue liste : mêmes cartes, en grille */
.org-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--org-card-w));
    justify-content: center;
    gap: 26px;
}

/* Fiche détaillée */
.org-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    height: fit-content;
    border: none;
    padding: 0;
    background: transparent;
    max-width: min(640px, calc(100vw - 32px));
    width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    overflow: visible;
}

.org-dialog::backdrop {
    background: rgba(9, 27, 49, .6);
}

.org-dialog-inner {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    padding: 30px 28px 26px;
    max-height: 86vh;
    overflow-y: auto;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}

.org-dialog-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--navy);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.org-dialog-kicker {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
}

.org-dialog h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--navy);
    margin: 6px 0 10px;
}

.org-dialog-desc {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 18px;
}

.org-dialog-person {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.org-dialog-photo-link {
    flex: 0 0 auto;
    display: block;
    border-radius: 50%;
    cursor: zoom-in;
    transition: transform .25s ease;
}

.org-dialog-photo-link:hover {
    transform: scale(1.04);
}

.org-dialog-photo {
    display: block;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    flex: 0 0 auto;
}

.org-dialog-photo.org-photo-placeholder {
    width: 150px;
    height: 150px;
    font-size: 1.6rem;
}

.org-dialog-person strong {
    display: block;
    font-size: 1.05rem;
    color: var(--navy);
    overflow-wrap: anywhere;
}

.org-dialog-person .org-role {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    margin-top: 2px;
}

.org-dialog-person small {
    display: block;
    color: var(--muted);
    font-size: .82rem;
}

.org-dialog-person p {
    margin-top: 8px;
    line-height: 1.6;
    color: var(--text);
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    :root {
        --org-card-w: 270px;
        --org-card-h: 360px;
    }

    .org-dialog-inner {
        padding: 26px 18px 20px;
    }

    .org-dialog-person {
        flex-direction: column;
    }
}

.document-card[hidden] {
    display: none;
}

/* Fond de page adouci : les cartes restent blanches pour bien ressortir */
:root {
    --page-bg: #f3f5f8;
}

body {
    background: var(--page-bg);
}

/* =========================================
   FORMULAIRE DE CONTACT (habillage)
========================================= */

.contact-form-wrapper {
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 4px solid var(--gold);
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(16, 39, 68, .10);
    padding: 34px 32px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.contact-form .form-group label {
    font-size: .88rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: .01em;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    padding: 13px 15px;
    border: 1px solid #d5dbe5;
    border-radius: 10px;
    background: var(--page-bg);
    font-size: .95rem;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.contact-form .form-group input:hover,
.contact-form .form-group textarea:hover {
    border-color: #b8c2d1;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    background: var(--white);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 163, 79, .18);
}

.contact-form .form-group textarea {
    min-height: 160px;
    line-height: 1.6;
}

.contact-form .btn-primary {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white);
    border: 0;
    cursor: pointer;
    font-size: .92rem;
    align-self: flex-start;
    min-width: 220px;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 10px 22px rgba(16, 39, 68, .18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.contact-form .btn-primary:hover:not(:disabled) {
    background: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(16, 39, 68, .24);
}

.contact-form .btn-primary:disabled {
    opacity: .7;
    cursor: wait;
}

.contact-feedback {
    margin: 0;
    min-height: 0;
    font-size: .95rem;
    font-weight: 600;
}

.contact-feedback:not(:empty) {
    padding: 12px 16px;
    border-radius: 10px;
}

.contact-feedback.is-success {
    background: #e9f6ee;
    color: #1d6b3a;
    border: 1px solid #bfe3cc;
}

.contact-feedback.is-error {
    background: #fdecec;
    color: #9b2c2c;
    border: 1px solid #f1c2c2;
}

@media (max-width: 640px) {
    .contact-form-wrapper {
        padding: 24px 18px;
    }

    .contact-form .btn-primary {
        width: 100%;
        align-self: stretch;
    }
}

/* =========================================
   ORGANIGRAMME : photos rectangulaires entières
========================================= */

:root {
    --org-card-h: 390px;
    --org-photo-w: 156px;
    --org-photo-h: 186px;
    --org-dialog-photo-w: 190px;
    --org-dialog-photo-h: 230px;
}

@media (max-width: 640px) {
    :root {
        --org-card-h: 360px;
        --org-photo-w: 134px;
        --org-photo-h: 160px;
    }
}

.org-photo {
    width: var(--org-photo-w);
    height: var(--org-photo-h);
    border-radius: 6px;
    object-fit: contain;
    object-position: center;
    background: var(--light);
    border: 2px solid var(--gold);
    box-shadow: 0 6px 16px rgba(16, 39, 68, .14);
    flex: 0 0 auto;
}

.org-photo-placeholder {
    border-radius: 6px;
}

.org-dialog-photo {
    width: var(--org-dialog-photo-w);
    height: var(--org-dialog-photo-h);
    border-radius: 6px;
    object-fit: contain;
    background: var(--light);
    border: 2px solid var(--gold);
}

.org-dialog-photo.org-photo-placeholder {
    width: var(--org-dialog-photo-w);
    height: var(--org-dialog-photo-h);
}

.org-dialog-photo-link {
    border-radius: 6px;
}

/* =========================================
   ORGANIGRAMME : cartes au modèle validé
   (bandeau marine, photo portrait, nom en capitales)
========================================= */

:root {
    --org-card-w: 300px;
    --org-card-h: 510px;
}

@media (max-width: 640px) {
    :root {
        --org-card-w: 270px;
        --org-card-h: 470px;
    }
}

.org-card {
    padding: 15px;
    gap: 14px;
    border-radius: 12px;
    border: 0;
    box-shadow: 0 12px 30px rgba(16, 39, 68, .12);
}

.org-card-title {
    flex: 0 0 auto;
    height: auto;
    min-height: 58px;
    padding: 12px 14px;
    border-radius: 6px;
    background: var(--navy);
    color: var(--white);
    border-bottom: 3px solid var(--gold);
    font-size: 1.12rem;
    font-variant: small-caps;
    letter-spacing: .05em;
}

.org-card.is-root .org-card-title {
    background: var(--navy);
    color: var(--white);
}

.org-card-body {
    flex: 1;
    min-height: 0;
    justify-content: flex-start;
    gap: 10px;
    padding: 0;
    overflow: hidden;
}

.org-person {
    gap: 8px;
}

.org-photo-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.org-photo {
    display: block;
    width: 100%;
    height: 320px;
    border-radius: 6px;
    object-fit: cover;
    object-position: center 20%;
    border: 3px solid var(--gold);
    background: var(--light);
    box-shadow: none;
}

.org-photo-placeholder {
    width: 100%;
    height: 320px;
    border-radius: 6px;
    font-size: 2.2rem;
}

@media (max-width: 640px) {
    .org-photo,
    .org-photo-placeholder {
        height: 290px;
    }
}


.org-name {
    position: relative;
    padding-bottom: 10px;
    font-family: var(--font-title);
    font-variant: small-caps;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--navy);
}

.org-name::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 44px;
    height: 2px;
    background: var(--gold-light);
}

.org-role {
    font-size: .9rem;
    color: var(--muted);
}

/* Fiche détaillée : même cadre, en plus grand */
.org-dialog-photo {
    width: 190px;
    height: 240px;
    border-radius: 6px;
    object-fit: cover;
    object-position: center 20%;
}

.org-dialog-photo.org-photo-placeholder {
    width: 190px;
    height: 240px;
}

/* Corrections : initiales centrées, nom sur une ligne */
.org-photo-placeholder {
    display: grid;
    place-items: center;
    background: var(--navy);
    color: var(--gold-light);
    font-weight: 700;
}

.org-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ajustements : cartes un peu plus petites, intitulés sur une ligne, président en or */
:root {
    --org-card-w: 280px;
    --org-card-h: 470px;
}

@media (max-width: 640px) {
    :root {
        --org-card-w: 260px;
        --org-card-h: 440px;
    }
}

.org-photo,
.org-photo-placeholder {
    height: 292px;
}

@media (max-width: 640px) {
    .org-photo,
    .org-photo-placeholder {
        height: 262px;
    }
}

.org-card-title {
    min-height: 52px;
    padding: 10px 12px;
    font-size: .98rem;
    letter-spacing: .02em;
}

.org-card-title span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.org-card.is-root .org-card-title {
    background: var(--gold);
    color: var(--navy-dark);
}

/* Format du site : casse normale, noms et postes entièrement affichés, cadres un peu plus petits */
:root {
    --org-card-w: 260px;
    --org-card-h: 440px;
}

@media (max-width: 640px) {
    :root {
        --org-card-w: 240px;
        --org-card-h: 410px;
    }
}

.org-card-title {
    font-variant: normal;
    letter-spacing: 0;
    font-size: .98rem;
    min-height: 56px;
}

.org-card-title span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
}

.org-photo,
.org-photo-placeholder {
    height: 240px;
}

@media (max-width: 640px) {
    .org-photo,
    .org-photo-placeholder {
        height: 210px;
    }
}

.org-name {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-variant: normal;
    letter-spacing: 0;
    font-size: 1.02rem;
    line-height: 1.3;
    padding-bottom: 10px;
}

.org-role {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .88rem;
}

/* Hauteur ajustée pour noms et fonctions sur deux lignes */
:root {
    --org-card-h: 452px;
}

@media (max-width: 640px) {
    :root {
        --org-card-h: 420px;
    }
}

/* Resserrement : cadre à taille normale, nom souligné au plus près de la photo */
:root {
    --org-card-h: 420px;
}

@media (max-width: 640px) {
    :root {
        --org-card-h: 392px;
    }
}

.org-photo,
.org-photo-placeholder {
    height: 220px;
}

@media (max-width: 640px) {
    .org-photo,
    .org-photo-placeholder {
        height: 196px;
    }
}

.org-card-body {
    gap: 4px;
}

.org-person {
    gap: 4px;
}

.org-name {
    padding-bottom: 6px;
}

/* Carte ajustée à son contenu : photo, nom et trait doré, sans fonction (visible dans la fiche) */
.org-card .org-role {
    display: none;
}

:root {
    --org-card-h: 372px;
}

@media (max-width: 640px) {
    :root {
        --org-card-h: 348px;
    }
}

/* Page Activités : la photo de couverture remplit toujours le haut du cadre, quel que soit son format */
.activity-card-image {
    aspect-ratio: 16 / 10;
}

.activity-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Page Actualités / Communiqués / Annonces : la photo de couverture remplit le haut du cadre */
.news-card-image {
    aspect-ratio: 16 / 9;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* =========================================
   AFFICHAGE PAR TRANCHES DE 9 (« Voir plus »)
========================================= */

.load-more {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.load-more[hidden],
.news-card[hidden],
.activity-card[hidden],
.document-card[hidden],
.album-card[hidden],
[data-club-id][hidden] {
    display: none !important;
}

.load-more-btn {
    min-width: 200px;
    padding: 13px 28px;
    border: 1px solid var(--navy);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-main);
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.load-more-btn:hover,
.load-more-btn:focus-visible {
    background: var(--navy);
    color: var(--gold-light);
    border-color: var(--navy);
    transform: translateY(-2px);
    outline: none;
}

/* Barre de navigation : Voir moins / Revenir au début à gauche, Voir plus à droite, puis Fin */
.load-more {
    display: block;
    margin-top: 28px;
}

.load-more[hidden] {
    display: none;
}

.load-more-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.load-more-left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.load-more-btn[hidden],
.load-end[hidden] {
    display: none !important;
}

.load-end {
    margin: 22px 0 0;
    text-align: center;
    font-family: var(--font-title);
    font-size: 1rem;
    font-style: italic;
    letter-spacing: .08em;
    color: var(--gold);
}

.load-end::before,
.load-end::after {
    content: "";
    display: inline-block;
    width: 48px;
    height: 1px;
    background: var(--gold-light);
    vertical-align: middle;
    margin: 0 12px;
}

.load-less-btn,
.load-top-btn {
    background: transparent;
    border-color: #c5ccd8;
    color: var(--muted);
}

.load-less-btn:hover,
.load-less-btn:focus-visible,
.load-top-btn:hover,
.load-top-btn:focus-visible {
    background: var(--light);
    color: var(--navy);
    border-color: var(--navy);
}

@media (max-width: 640px) {
    .load-more-bar {
        justify-content: center;
    }

    .load-more-left,
    .load-next-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   DEMANDE D'ACCÈS AUX DOCUMENTS (bouton, fenêtre, formulaire)
========================================= */

.document-request-toggle {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white);
    font-family: var(--font-main);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(16, 39, 68, .16);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.document-request-toggle:hover,
.document-request-toggle:focus-visible {
    background: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-2px);
    outline: none;
}

.document-request-form[hidden] {
    display: none !important;
}

/* Fenêtre centrée */
.access-dialog {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.access-dialog[hidden] {
    display: none;
}

.access-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 27, 49, .6);
    backdrop-filter: blur(3px);
}

.access-dialog-box {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px 28px 26px;
    background: var(--white);
    border-top: 4px solid var(--gold);
    border-radius: 14px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
}

.access-dialog-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--light);
    color: var(--navy);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.access-dialog-close:hover {
    background: var(--navy);
    color: var(--white);
}

body.access-open {
    overflow: hidden;
}

/* Formulaire */
.document-request-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.document-request-form h4 {
    margin: 0 0 4px;
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--navy);
    padding-right: 36px;
}

.document-request-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--navy);
}

.document-request-form input,
.document-request-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d5dbe5;
    border-radius: 10px;
    background: var(--page-bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: .95rem;
    font-weight: 400;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.document-request-form input:focus,
.document-request-form textarea:focus {
    background: var(--white);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 163, 79, .18);
}

.document-request-form textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.document-request-form > button[type="submit"] {
    align-self: flex-start;
    min-width: 200px;
    min-height: 46px;
    padding: 12px 28px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white);
    font-family: var(--font-main);
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(16, 39, 68, .18);
    transition: transform .2s ease, background .2s ease;
}

.document-request-form > button[type="submit"]:hover:not(:disabled) {
    background: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-2px);
}

.document-request-form > button[type="submit"]:disabled {
    opacity: .7;
    cursor: wait;
}

.document-request-status {
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
}

.document-request-status:not(:empty) {
    padding: 12px 16px;
    border-radius: 10px;
}

.document-request-status.is-success {
    background: #e9f6ee;
    color: #1d6b3a;
    border: 1px solid #bfe3cc;
}

.document-request-status:not(.is-success):not(:empty) {
    background: #fdecec;
    color: #9b2c2c;
    border: 1px solid #f1c2c2;
}

@media (max-width: 640px) {
    .access-dialog-box {
        padding: 26px 18px 20px;
    }

    .document-request-form > button[type="submit"] {
        width: 100%;
        align-self: stretch;
    }
}

/* Demande d'accès : rappel du document et explication */
.document-request-doc {
    margin: -6px 0 4px;
    font-size: .92rem;
    font-weight: 700;
    color: var(--gold);
}

.document-request-note {
    margin: 0 0 6px;
    font-size: .9rem;
    line-height: 1.55;
    color: var(--muted);
}


/* Présentation du BUEP : texte et photos gérés depuis l'administration */
.institution-content .presentation-paragraph {
    white-space: pre-line;
}

.presentation-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    width: 100%;
    margin-top: 35px;
}

.presentation-photos + .institution-content {
    margin-top: 30px;
}

.presentation-photos:empty {
    display: none;
}

.presentation-photos figure {
    margin: 0;
    min-width: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(16, 39, 68, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.presentation-photos figure:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(16, 39, 68, 0.14);
}

.presentation-photos img {
    display: block;
    width: 100%;
    height: 320px;
    max-width: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .presentation-photos {
        grid-template-columns: 1fr;
    }

    .presentation-photos img {
        height: 220px;
    }
}


/* Bouton de langue FR / EN dans l'en-tête */
.lang-switch {
    margin-right: 12px;
    padding: 7px 14px;
    border: 1px solid var(--navy);
    border-radius: 999px;
    background: transparent;
    color: var(--navy);
    font: 600 12px/1 var(--font-main);
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch:hover,
.lang-switch:focus-visible {
    background: var(--navy);
    color: #fff;
}


/* Recherche du site */
.search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 8px;
    border: 1px solid var(--border, #e3e8f0);
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.search-toggle:hover,
.search-toggle:focus-visible {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 9vh 16px 16px;
    background: rgba(16, 39, 68, 0.55);
    backdrop-filter: blur(3px);
}

.search-overlay[hidden] {
    display: none;
}

.search-card {
    width: 100%;
    max-width: 680px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 60px rgba(8, 20, 38, 0.3);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--gold);
}

.search-input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d9dfe9;
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    color: var(--navy);
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 163, 79, 0.2);
}

.search-close {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.search-status {
    margin: 12px 2px;
    color: #6b7789;
    font-size: 13px;
}

.search-results {
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results li + li {
    border-top: 1px solid #eef1f6;
}

.search-results a {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 10px;
    border-radius: 8px;
    color: var(--navy);
    text-decoration: none;
    transition: background 0.15s ease;
}

.search-results a:hover,
.search-results a:focus-visible {
    background: #fbf7ec;
}

.search-results strong {
    font-family: var(--font-title);
    font-size: 16px;
}

.search-results small {
    color: #6b7789;
    font-size: 13px;
}

.search-kind {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.search-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .search-overlay {
        padding-top: 6vh;
    }

    .search-card {
        padding: 16px;
    }
}

.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

/* =========================================================
   V2 — MOUVEMENT, ORGANIGRAMME EN BANDES, GALERIE EN MOSAÏQUE
   Palette : marine et or uniquement (identité de l'école)
   ========================================================= */

/* Transitions de page */

@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes pageOut {
    to   { opacity: 0; transform: translateY(-8px); }
}

body > main {
    animation: pageIn .7s var(--ease-out) both;
}

body.is-leaving > main {
    animation: pageOut .26s var(--ease-in-out) forwards;
}

/* Accueil : texte qui se pose en cascade */

@keyframes riseIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}

.hero-content > * {
    animation: riseIn .9s var(--ease-out) both;
}

.hero-content > :nth-child(2) { animation-delay: .12s; }
.hero-content > :nth-child(3) { animation-delay: .24s; }
.hero-content > :nth-child(4) { animation-delay: .36s; }
.hero-content > :nth-child(5) { animation-delay: .48s; }

@keyframes glowDrift {
    from { transform: translate3d(-3%, 0, 0) scale(1); }
    to   { transform: translate3d(3%, -2%, 0) scale(1.06); }
}

.hero-overlay {
    animation: glowDrift 16s ease-in-out infinite alternate;
    will-change: transform;
}

/* Apparition au défilement (activée par JavaScript, classe .motion) */

.motion [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity .8s var(--ease-out),
        transform .8s var(--ease-out);
    transition-delay: var(--reveal-delay, 0s);
}

.motion [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Trait doré : toujours visible (pas d'animation, sur toutes les pages) */

/* Boutons */

.btn {
    transition:
        transform .45s var(--ease-out),
        background-color .3s ease,
        color .3s ease,
        border-color .3s ease,
        box-shadow .45s var(--ease-out);
}

.btn:active {
    transform: scale(.98);
}

/* Menu mobile : panneau qui glisse, croix animée */

.menu-toggle span {
    transition: transform .4s var(--ease-out), opacity .25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ORGANIGRAMME EN BANDES */

/* Direction : carte marine mise en avant */

/* GALERIE EN MOSAÏQUE */

.gallery-cards.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 210px;
    grid-auto-flow: dense;
    gap: 12px;
}

.album-tile {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 6px;
    background: var(--navy);
    color: var(--white);
    cursor: pointer;
}

.album-tile.is-large {
    grid-column: span 2;
    grid-row: span 2;
}

.album-tile:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.album-tile-media {
    position: absolute;
    inset: 0;
}

.album-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.1s var(--ease-out);
}

.album-tile-media .album-cover-empty {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--gold);
    font-size: 34px;
    background: linear-gradient(135deg, var(--navy-light), var(--navy-dark));
}

.album-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to top,
        rgba(9, 27, 49, .92) 0%,
        rgba(9, 27, 49, .35) 45%,
        rgba(9, 27, 49, 0) 70%);
}

.album-count {
    position: absolute;
    top: 14px;
    right: 14px;
    bottom: auto;
    z-index: 2;
    white-space: nowrap;
    padding: 5px 10px;
    border: 1px solid rgba(229, 199, 126, .45);
    border-radius: 999px;
    background: rgba(9, 27, 49, .7);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
}

.album-tile-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 20px;
    transform: translateY(6px);
    transition: transform .6s var(--ease-out);
}

.album-tile:hover .album-tile-media img,
.album-tile:focus-visible .album-tile-media img {
    transform: scale(1.06);
}

.album-tile:hover .album-tile-info,
.album-tile:focus-visible .album-tile-info {
    transform: none;
}

.album-tile .album-tag {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--gold-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.album-tile h3 {
    color: var(--white);
    font-family: var(--font-title);
    font-size: 19px;
    line-height: 1.25;
}

.album-tile.is-large h3 {
    font-size: 28px;
}

.album-tile p {
    margin-top: 4px;
    color: rgba(255, 255, 255, .8);
    font-size: 12px;
}

/* Responsive */

@media (max-width: 900px) {
    .gallery-cards.gallery-mosaic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 190px;
    }
}

@media (max-width: 640px) {

    .gallery-cards.gallery-mosaic {
        gap: 8px;
        grid-auto-rows: 170px;
    }

    .album-tile h3 {
        font-size: 16px;
    }

    .album-tile.is-large h3 {
        font-size: 20px;
    }

    .album-count {
        top: 10px;
        right: 10px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-overlay {
        animation: none;
    }
}


/* ORGANIGRAMME : présidence, rattachements en colonnes, postes en cascade */

:root {
    --accent-blue: #1d4f8c;
}

/* Barre dorée reliant les colonnes de rattachement (2 ou 3 colonnes) */

/* Vice-présidents : carte centrée, avec liseré doré */

/* Postes rattachés : liste en cascade le long d'un filet doré */

@media (max-width: 640px) {
}

/* Contenus en base : squelette pendant le chargement, masqués s'ils sont vides */

[hidden] {
    display: none !important;
}

@keyframes dbShimmer {
    to { background-position: -200% 0; }
}

[data-db]:empty:not([hidden]) {
    min-height: 1.4em;
    border-radius: 4px;
    background: linear-gradient(90deg,
        rgba(127, 127, 127, .10) 25%,
        rgba(127, 127, 127, .20) 50%,
        rgba(127, 127, 127, .10) 75%) 0 0 / 200% 100%;
    animation: dbShimmer 1.3s linear infinite;
}

/* ORGANIGRAMME RAYONNANT (bureau) : présidence au centre, postes sur l'anneau */

@media (max-width: 900px) {
}

/* ORGANIGRAMME : bloc présidence (président + vice-présidents), puis postes rattachés à l'ensemble */

/* Tige dorée entre la présidence et les postes rattachés */

@media (max-width: 720px) {
}

/* ===== ORGANIGRAMME : cartes avec photo bien visible, mise en page souple ===== */

.on-board {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1040px;
    min-width: 0;
    margin: 0 auto;
}

/* Bloc présidence */

.on-presidency {
    position: relative;
    min-width: 0;
    padding: clamp(20px, 3vw, 30px);
    background: var(--navy);
    border-top: 3px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(16, 39, 68, .18);
}

.on-group-label {
    margin-bottom: 22px;
    text-align: center;
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.on-leaders {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(12px, 2vw, 20px);
    align-items: center;
}

.on-side,
.on-centre {
    display: grid;
    gap: 16px;
    min-width: 0;
    align-content: center;
}

/* Liaison vers les postes rattachés */

.on-stem-down {
    width: 2px;
    height: 56px;
    margin: 0 auto;
    background: linear-gradient(var(--gold), var(--gold-light));
}

.on-team-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.on-team-label::before,
.on-team-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}

.on-team-label::after {
    background: linear-gradient(90deg, var(--gold), transparent);
}

.on-team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: clamp(14px, 2vw, 22px);
    width: 100%;
    min-width: 0;
}

/* Carte d'un poste */

.on-node {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(16, 39, 68, .08);
    cursor: pointer;
    transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}

.on-node:hover,
.on-node:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(16, 39, 68, .14);
    outline: none;
}

.on-node:focus-visible {
    box-shadow: 0 0 0 3px rgba(201, 163, 79, .5), 0 16px 34px rgba(16, 39, 68, .14);
}

/* Photo : grande, cadrée sur le visage */

.on-avatar {
    flex: none;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(160deg, var(--navy-light), var(--navy-dark));
}

.on-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.on-initials {
    color: var(--gold-light);
    font-family: var(--font-title);
    font-size: clamp(34px, 4.5vw, 52px);
    font-weight: 700;
}

.on-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 16px 16px 18px;
    text-align: center;
}

.on-title {
    color: var(--accent-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    line-height: 1.4;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.on-name {
    position: relative;
    display: block;
    padding-bottom: 12px;
    color: var(--navy);
    font-size: clamp(15px, 1.5vw, 17px);
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

/* Petite ligne dorée centrée sous chaque nom */
.on-name::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 40px;
    height: 2px;
    transform: translateX(-50%);
    background: var(--gold);
}

.on-role {
    color: var(--text);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.on-parent,
.on-more {
    color: var(--muted);
    font-size: 12px;
}

.on-vacant {
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
}

/* Président : mis en avant sur fond marine */

.on-presidency .on-node.is-head {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(229, 199, 126, .5);
    border-top: 3px solid var(--gold);
}

.on-presidency .on-node.is-head .on-title {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 2.5px;
}

.on-presidency .on-node.is-head .on-name {
    color: var(--white);
}

.on-presidency .on-node.is-head .on-role,
.on-presidency .on-node.is-head .on-more {
    color: rgba(255, 255, 255, .75);
}

/* Liste */

.on-list {
    display: grid;
    gap: 14px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.on-list .on-node {
    flex-direction: row;
}

.on-list .on-avatar {
    flex: 0 0 120px;
    width: 120px;
    aspect-ratio: auto;
}

.on-list .on-text {
    align-items: flex-start;
    justify-content: center;
    padding: 14px 18px;
    text-align: left;
}

/* Mobile : président en premier, photos plus petites, une colonne */

@media (max-width: 720px) {
    .on-centre {
        order: -1;
    }

    .on-leaders {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .on-presidency {
        padding: 18px 14px 20px;
    }

    .on-presidency .on-avatar,
    .on-team .on-avatar {
        aspect-ratio: 4 / 3;
    }

    .on-team {
        grid-template-columns: minmax(0, 1fr);
    }

    .on-stem-down {
        height: 36px;
    }

    .on-list .on-avatar {
        flex-basis: 96px;
        width: 96px;
    }
}

/* Mobile : postes rattachés en lignes (photo à gauche). Présidence et vice-présidents restent en colonne. */
@media (max-width: 720px) {
    .on-team .on-node {
        flex-direction: row;
    }

    .on-team .on-avatar {
        flex: 0 0 112px;
        width: 112px;
        aspect-ratio: auto;
    }

    .on-team .on-text {
        align-items: flex-start;
        justify-content: center;
        padding: 14px 16px;
        text-align: left;
    }
}

:root {
    --accent-blue: #1d4f8c;
}

/* Postes rattachés : grille alignée, général en haut et adjoint en dessous */
.on-team {
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    align-items: stretch;
}

.on-slot {
    display: flex;
    min-width: 0;
}

.on-slot > .on-node {
    flex: 1;
}

@media (max-width: 720px) {
    .on-team {
        grid-template-columns: minmax(0, 1fr);
    }

    .on-slot {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .on-slot--adj {
        margin-left: 22px;
    }
}

/* HEADER : rubriques sur une seule ligne. Burger seulement sur mobile (sous 780 px). */

.main-nav a {
    white-space: nowrap;
}

@media (min-width: 781px) and (max-width: 1200px) {
    .header-content {
        gap: 18px;
    }

    .main-nav {
        gap: 12px;
    }

    .main-nav a {
        font-size: 11px;
    }
}


@media (min-width: 781px) and (max-width: 1000px) {
    .header-content {
        gap: 14px;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
    }

    .main-nav {
        gap: 9px;
    }

    .main-nav a {
        font-size: 10px;
        letter-spacing: 0;
    }
}

/* VUE LISTE : toutes les cartes à la même taille */

.on-list .on-node {
    height: 140px;
}

.on-list .on-avatar {
    flex: 0 0 140px;
    width: 140px;
    height: 100%;
    aspect-ratio: auto;
}

.on-list .on-text {
    justify-content: center;
    height: 100%;
    overflow: hidden;
}

@media (max-width: 720px) {
    .on-list .on-node {
        height: 124px;
    }

    .on-list .on-avatar {
        flex-basis: 124px;
        width: 124px;
    }
}

/* En vue liste, le texte est aligné à gauche : le trait doré suit */
.on-list .on-name::after {
    left: 0;
    transform: none;
}


/* RÉSEAUX : icônes dans le pied de page et sur la page Contact */
.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.footer-social a {
    display: grid;
    place-items: center;
    border-radius: 50%;
    transition: filter .25s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
    background: var(--gold);
    color: var(--navy);
}

.social-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px 5px 5px;
}

.social-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ffffff;
    flex-shrink: 0;
}

.social-chip:hover .social-chip-icon {
    filter: brightness(1.12);
}

.net-facebook { background: #1877f2; }
.net-whatsapp { background: #25d366; }
.net-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b 55%, #8134af); }
.net-youtube { background: #ff0000; }
.net-tiktok { background: #010101; }
.net-telegram { background: #26a5e4; }
.net-linkedin { background: #0a66c2; }
.net-x { background: #000000; }

.footer-social a {
    border: none;
    width: 40px;
    height: 40px;
    color: #ffffff;
}

.footer-social a:hover,
.footer-social a:focus-visible {
    background: none;
    color: #ffffff;
    filter: brightness(1.12);
}


/* Réseaux dans le panneau sombre de la page Contact */
.contact-information .social-chip {
    color: #ffffff;
    border-color: rgba(255, 255, 255, .35);
    background: transparent;
}

.contact-information .social-chip:hover {
    background: #ffffff;
    color: var(--navy);
    border-color: #ffffff;
}


/* Mandature du Président (accueil) */
.president-mandate {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--accent-blue);
    text-transform: uppercase;
}

/* Devise institutionnelle (page Le BUEP) : bandeau aligné sur le titre */
.institution-motto {
    display: flex;
    align-items: center;
    margin: 0 0 36px;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--navy);
}



/* =========================================
   FILTRES (Activités et Documents) : un seul panneau,
   libellés alignés, boutons de même taille
   ========================================= */

.activity-filters {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 34px;
    padding: 6px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(16, 39, 68, .06);
}

.activity-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
}

.activity-filter-group + .activity-filter-group {
    border-top: 1px solid var(--border);
}

.activity-filter-label {
    flex: 0 0 120px;
    min-width: 0;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
}

.activity-filters .news-filter {
    min-width: 116px;
    height: 40px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .activity-filters {
        padding: 4px 16px;
    }

    .activity-filter-group {
        gap: 8px;
        padding: 14px 0;
    }

    .activity-filter-label {
        flex: 0 0 100%;
        margin-bottom: 2px;
    }

    .activity-filters .news-filter {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }
}


/* Filtres : chaque rangée est un bloc de même longueur, segments égaux */
.activity-filters .activity-filter-group {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}

.activity-filters .activity-filter-label {
    flex: 0 0 110px;
}

.activity-filter-options {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    width: min(100%, 620px);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--white);
}

.activity-filters .activity-filter-options .news-filter {
    height: 44px;
    min-width: 0;
    padding: 0 12px;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 13px;
}

.activity-filters .activity-filter-options .news-filter + .news-filter {
    border-left: 1px solid var(--border);
}

.activity-filters .activity-filter-options .news-filter.active,
.activity-filters .activity-filter-options .news-filter.active:hover {
    border-left-color: var(--navy);
}

@media (max-width: 640px) {
    .activity-filters .activity-filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .activity-filters .activity-filter-label {
        flex: none;
    }

    .activity-filter-options {
        width: 100%;
    }

    .activity-filters .activity-filter-options .news-filter {
        font-size: 12px;
        padding: 0 6px;
    }
}


/* Actualités : filtres centrés, même style que la page Activités */
.news-filters {
    display: flex;
    justify-content: center;
    margin: 30px 0 40px;
}

.news-filters .activity-filter-options {
    width: min(100%, 640px);
    grid-auto-columns: minmax(0, 1fr);
}

.news-filters .activity-filter-options .news-filter {
    height: 44px;
    min-width: 0;
    padding: 0 12px;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 13px;
    white-space: nowrap;
}

.news-filters .activity-filter-options .news-filter + .news-filter {
    border-left: 1px solid var(--border);
}

.news-filters .activity-filter-options .news-filter.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

@media (max-width: 780px) {
    .news-filters .activity-filter-options {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-flow: row;
        border-radius: 14px;
    }

    .news-filters .activity-filter-options .news-filter {
        height: auto;
        min-height: 46px;
        padding: 8px 10px;
        font-size: 12px;
        line-height: 1.25;
        white-space: normal;
    }

    .news-filters .activity-filter-options .news-filter + .news-filter {
        border-left: 0;
    }

    .news-filters .activity-filter-options .news-filter:nth-child(even) {
        border-left: 1px solid var(--border);
    }

    .news-filters .activity-filter-options .news-filter:nth-child(n+3) {
        border-top: 1px solid var(--border);
    }
}


/* Nom et devise : largeur ajustée au texte, pour la mesure de la devise */
.brand-text strong,
.brand-text small {
    align-self: flex-start;
}


/* Liens légaux (bas du pied de page) */
.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.legal-links a {
    font-size: 12px;
    color: rgba(255, 255, 255, .72);
}

.legal-links a:hover {
    color: var(--gold-light);
}

/* Pages juridiques */
.legal-content {
    max-width: 820px;
}

.legal-content h2 {
    margin-top: 34px;
    font-size: 22px;
}

.legal-content p,
.legal-content li {
    line-height: 1.75;
    color: var(--muted);
}

.legal-content ul {
    margin: 12px 0 0 20px;
    list-style: disc;
}

.legal-content li + li {
    margin-top: 8px;
}

.legal-content a {
    color: var(--navy);
    text-decoration: underline;
}

.legal-draft {
    padding: 10px 14px;
    border-left: 3px solid var(--gold);
    background: #fff;
    color: var(--navy) !important;
    font-size: 13px;
}

/* Bouton « Suivre mon message » à côté de l'envoi */
/* Pièces jointes du formulaire de contact */
.contact-files {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.contact-files li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border, #e5e0d3);
    border-radius: 8px;
    font-size: .9rem;
}

.contact-files li span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-files li small {
    color: var(--muted, #6b7689);
    white-space: nowrap;
}

.contact-file-remove {
    border: 0;
    background: transparent;
    color: var(--navy, #0b1f3a);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}

.field-hint {
    font-weight: 400;
    color: var(--muted, #6b7689);
    font-size: .85rem;
}

/* Boutons « Envoyer » et « Suivre mon message » : même taille, côte à côte sur PC, empilés et pleine largeur sur mobile */
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.contact-actions .btn-primary,
.contact-actions .btn-track {
    box-sizing: border-box;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: auto;
    width: auto;
    min-width: 240px;
    height: 52px;
    margin: 0;
    padding: 0 30px;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.contact-actions .btn-track {
    background: transparent;
    border: 2px solid var(--navy, #0b1f3a);
    color: var(--navy, #0b1f3a);
}

.contact-actions .btn-track:hover {
    background: var(--navy, #0b1f3a);
    color: #fff;
}

@media (max-width: 640px) {
    .contact-actions {
        flex-direction: column;
    }

    .contact-actions .btn-primary,
    .contact-actions .btn-track {
        width: 100%;
        min-width: 0;
    }
}

/* Codes et numéros : zéro barré (0 ≠ O), chiffres alignés */
.ref-code, .track-code, input[type="number"] {
    font-family: "BUEP-Digits", 'Inter', sans-serif;
    font-feature-settings: "zero" 1, "tnum" 1;
    letter-spacing: .04em;
}

/* Chiffres en Times New Roman partout ; les champs reprennent la police de leur zone */
input, select, textarea, button { font-family: inherit; }

/* Chiffres : police système Times New Roman (script digits.js) */
.digits {
    font-family: "Times New Roman", Times, "Liberation Serif", serif;
    font-variant-numeric: lining-nums;
}



/* Saisie : Atkinson Hyperlegible (prioritaire sur les règles des formulaires) */
input, select, textarea, input[type="number"], input[type="text"], input[type="email"], input[type="tel"], input[type="search"] {
    font-family: "Atkinson Hyperlegible", Arial, sans-serif !important;
}

/* Références et codes : IBM Plex Mono */
.ref-code, .track-code, input.ref-code, .ref-code .digits {
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace !important;
}

/* =========================================
   FORÇAGE DES BOUTONS ET CHAMPS DU CONTACT ET DU SUIVI
   PC : boutons côte à côte, même largeur.
   Mobile (moins de 760 px) : boutons empilés, pleine largeur du formulaire.
   Suivi : le champ de référence et le bouton ont la même largeur.
   ========================================= */
.contact-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
}

.contact-actions .btn-primary,
.contact-actions .btn-track {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    align-self: stretch !important;
    justify-self: stretch;
    box-sizing: border-box;
}

@media (max-width: 759px) {
    .contact-actions {
        grid-template-columns: 1fr !important;
    }
}

#trackForm #trackReference,
#trackForm #trackButton {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    align-self: stretch !important;
    margin: 0 !important;
}

/* =========================================
   FORÇAGE DU PIED DE PAGE SUR MOBILE
   Navigation et informations côte à côte, sous le bloc de marque.
   ========================================= */
@media (max-width: 759px) {
    .main-footer .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 22px 16px !important;
        padding-bottom: 24px !important;
    }

    .main-footer .footer-brand {
        grid-column: 1 / -1 !important;
    }

    .main-footer .footer-brand > p {
        margin-top: 12px;
    }

    .main-footer .footer-column {
        gap: 6px !important;
    }

    .main-footer .footer-column h3 {
        margin-bottom: 4px;
    }

    .main-footer .footer-column a {
        font-size: 12px;
    }

    .main-footer .footer-bottom {
        padding: 12px 0;
    }

    .main-footer .footer-bottom .container {
        gap: 8px;
    }
}

/* Attente des réglages : la marque, le menu et le pied de page restent masqués
   jusqu'à être remplis avec les données (cache ou base). Aucun texte d'attente n'est visible. */
html.brand-pending .brand-text,
html.brand-pending .main-footer {
    visibility: hidden;
}

/* =========================================
   POLICE UNIQUE DU SITE ET DE L'ADMINISTRATION : PLUS JAKARTA SANS
   Une seule famille, déjà disponible sur l'appareil : aucun
   changement de police à l'affichage, y compris les chiffres,
   les champs et les références.
   ========================================= */
html body,
html body *,
html body *::before,
html body *::after,
.digits,
.ref-code,
.ref-code *,
.track-code,
input.ref-code,
.ref-code .digits {
    font-family: "Plus Jakarta Sans", "Jakarta Fallback", Arial, "Helvetica Neue", Helvetica, sans-serif !important;
}

/* Sigle et devise : tailles figées, aucun changement après le chargement. */
.brand-text strong {
    font-size: 22px !important;
}

.brand-text small {
    font-size: 11px !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 759px) {
    .brand-text strong {
        font-size: 20px !important;
    }

    .brand-text small {
        font-size: 10px !important;
    }
}

/* Titres des bandeaux bleus : tous en grandes capitales, comme l'organigramme. */
.page-banner h1 {
    text-transform: uppercase;
    letter-spacing: .02em;
}



/* v74 : espacements resserrés (bandeau bleu, en-tête, pied de page). Mise en page stable. */
.page-banner { padding: 52px 0 42px; }
.header-content { min-height: 74px; }
.main-footer { padding-top: 44px; }
.footer-grid { gap: 44px; padding-bottom: 34px; }
.footer-bottom { padding: 14px 0; }
@media (max-width: 780px) {
    .page-banner { padding: 40px 0 32px; }
}

.legal-note { padding: 12px 16px; border-left: 3px solid var(--gold, #d6ad55); background: rgba(214,173,85,.12); border-radius: 4px; }

/* v75 : accueil, hauteur selon le contenu (plus de bloc vide imposé) */
.hero { min-height: 0 !important; }
.hero-content { padding-top: 56px !important; padding-bottom: 60px !important; }
.hero h1 { margin: 18px 0; }
.hero-actions { margin-top: 26px; }
@media (max-width: 759px) {
    .hero-content { padding-top: 40px !important; padding-bottom: 44px !important; }
    .hero h1 { margin: 14px 0; }
    .hero-actions { margin-top: 22px; }
}

/* v76 : espace entre les mots plus marqué, pour une lecture plus claire */
html body, html body * {
    word-spacing: .14em;
}

/* v83 : nom « LE BUEP » plus grand, étiré pour couvrir toute la largeur de la devise */
.brand-text { width: max-content; }
.brand-text strong {
    font-size: 26px !important;
    width: 100%;
    letter-spacing: 0 !important;
    display: flex !important;
    justify-content: space-between;
    white-space: nowrap;
}
.brand-text strong .wm-sp { width: .3em; }
.brand-text small {
    display: block;
    width: 100%;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap;
    text-align: justify;
    text-align-last: justify;
}
@media (max-width: 759px) {
    .brand-text strong { font-size: 22px !important; }
}

/* v87 : la devise reste visible à toutes les largeurs de l'en-tête */
.main-header .brand-text,
.main-header .brand-text small {
    display: block !important;
}

/* v110 : en-tête immobile. Aucun décalage au chargement, à la navigation ni au défilement. */
html { scrollbar-gutter: stable; }
.main-header .header-content { height: 74px; min-height: 74px; max-height: 74px; }
.main-header .brand-logo,
.main-header .brand-logo.has-logo,
.main-header .brand-logo.logo-cached {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    flex: 0 0 48px;
    box-sizing: border-box;
}
.main-header .brand { flex: 0 0 auto; }
.main-header .brand-text strong,
.main-header .brand-text small,
.main-header .main-nav a,
.main-header .search-toggle,
.main-header .menu-toggle { white-space: nowrap; flex-shrink: 0; }

/* v120 : en-tête mobile sans débordement. Les boutons tiennent dans la largeur,
   donc ouvrir le menu burger ne fait plus glisser la page. */
@media (max-width: 780px) {
    .main-header .header-content {
        gap: 10px;
    }

    .main-header .search-toggle {
        width: 38px;
        height: 38px;
        margin-right: 0;
    }

    .main-header .menu-toggle {
        padding: 6px 4px;
    }
}

@media (max-width: 340px) {
    .main-header .header-content {
        gap: 6px;
    }

    .main-header .search-toggle {
        width: 34px;
        height: 34px;
    }

    .main-header .menu-toggle {
        padding: 4px 2px;
    }

    .main-header .brand-text strong,
    .main-header .brand-text small {
        font-size: 14px;
    }
}

/* Liste déroulante des catégories (documents et galerie) : même style que les filtres du site */
.dynamic-select {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    max-width: 320px;
    min-height: 46px;
    padding: 0 42px 0 16px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23102744' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
    color: var(--navy);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.dynamic-select:hover {
    border-color: var(--gold);
}

.dynamic-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 163, 79, .18);
}

.dynamic-select:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.dynamic-select option {
    color: var(--navy);
    background: var(--white);
    font-weight: 500;
}

.gallery-filters .dynamic-select,
#documentsFilters .dynamic-select {
    max-width: 320px;
}

@media (max-width: 520px) {
    .dynamic-select {
        max-width: 100%;
    }
}
