/*
 * Bagad – Personnalisations : charte graphique (lot 2, 15/11/2026).
 *
 * Les sections de la page d'accueil portent la classe « bagad-section »
 * (Avancé → Classes CSS supplémentaires dans l'éditeur). Les sections mises
 * en avant portent en plus « bagad-carte », et la plus importante
 * « bagad-carte-orange ». Ces règles s'appliquent toutes seules à toute
 * section qui porte ces classes.
 *
 * Une section = étiquette orange (titre H6 avec emoji)
 *             + titre (H2) + trait orange + texte d'introduction.
 */

:root {
    --bagad-blanc: #fafafa;
    --bagad-orange: #fb7b12;
    --bagad-fond-carte: #1e1e27;
    --bagad-arrondi: 10px;
    --bagad-espace-section: 80px;
    --bagad-titre: 36px;
    --bagad-texte: 18px;
    --bagad-texte-carte: 16px;
    --bagad-interligne: 1.6;
}

@media (max-width: 1024px) {
    :root {
        --bagad-espace-section: 64px;
        --bagad-titre: 32px;
    }
}

@media (max-width: 781px) {
    :root {
        --bagad-espace-section: 48px;
        --bagad-titre: 28px;
        --bagad-texte: 16px;
        --bagad-texte-carte: 15px;
    }
}

/* ---------- Espacement régulier entre les sections ---------- */

.wp-block-post-content > main > .bagad-section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.wp-block-post-content > main > .bagad-section ~ .bagad-section {
    margin-top: var(--bagad-espace-section) !important;
}

.wp-block-post-content > main {
    padding-bottom: var(--bagad-espace-section) !important;
}

/* Marges internes héritées de l'ancienne mise en page, remplacées par
   l'espacement ci-dessus. */
.bagad-section-ecole {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.bagad-section-qui > .wp-block-columns:first-child {
    margin-top: 0 !important;
}

.bagad-section-archives {
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.bagad-section-archives > .wp-block-themeisle-blocks-advanced-columns:first-child {
    padding-top: 0 !important;
}

.bagad-section-archives > .wp-block-themeisle-blocks-advanced-columns:last-of-type {
    padding-bottom: 0 !important;
}

.bagad-section-soutiens > .bagad-carte,
.bagad-section-articles .bagad-carte {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ---------- Cartes : sections mises en avant ---------- */

.bagad-carte {
    background-color: var(--bagad-fond-carte) !important;
    border-radius: var(--bagad-arrondi) !important;
    padding: 48px 38px !important;
}

.bagad-carte-orange {
    border: 1px solid var(--bagad-orange) !important;
}

@media (max-width: 781px) {
    .bagad-carte {
        padding: 32px 16px !important;
    }
}

/* ---------- En-tête de section (et de page : Contact, Partitions,
   Mentions légales) ---------- */

:is(.bagad-section, .bagad-page-texte, .wp-block-post-content) h6.wp-block-heading:has(+ :is(h1, h2)) {
    font-size: 14px !important;
    line-height: 1.4;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

:is(.bagad-section, .bagad-page-texte, .wp-block-post-content) h6.wp-block-heading + :is(h1, h2) {
    font-size: var(--bagad-titre) !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    color: var(--bagad-blanc) !important;
    margin-top: 16px !important;
    margin-bottom: 0 !important;
}

:is(.bagad-section, .bagad-page-texte, .wp-block-post-content) h6.wp-block-heading + :is(h1, h2) + hr.wp-block-separator {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
}

/* ---------- Textes ---------- */

/* (les fiches du bureau gardent les réglages de l'extension Team Section) */
.bagad-section p:not(.bagad-agenda *):not(.tsbTeamMembers *) {
    font-size: var(--bagad-texte) !important;
    line-height: var(--bagad-interligne) !important;
}

.bagad-section p:not(.bagad-agenda *):not([class*="-color"]) {
    color: var(--bagad-blanc);
}

/* Textes des petites cartes (particularités) */
.bagad-section-particularites .wp-block-column p {
    font-size: var(--bagad-texte-carte) !important;
}

/* Paragraphes centrés : largeur limitée pour rester lisibles. */
.bagad-section p.has-text-align-center:not(.bagad-agenda *) {
    max-width: 820px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------- Boutons ---------- */

/* Boutons pleins orange (les boutons à contour des cartes « Cours de… »
   gardent leur style). */
.bagad-section .wp-block-button:not(.wp-block-cover *) > .wp-block-button__link {
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    padding: 12px 26px !important;
    border-radius: 40px !important;
}

@media (max-width: 781px) {
    .bagad-section .wp-block-button:not(.wp-block-cover *) > .wp-block-button__link {
        font-size: 16px !important;
        padding: 11px 23px !important;
    }
}

/* ---------- Tablette et téléphone : tout centré ---------- */

@media (max-width: 1024px) {
    .bagad-section :is(h6, h1, h2, h3):not(.tsbTeamMembers *),
    .bagad-section p:not(.bagad-agenda *):not(.bagad-actu-texte *):not(.tsbTeamMembers *) {
        text-align: center !important;
    }

    .bagad-section hr.wp-block-separator {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .bagad-section .wp-block-buttons {
        justify-content: center !important;
    }
}

/* Un seul blanc pour les textes (le blanc pur réglé dans l'éditeur sur
   certains blocs passe au blanc du site). */
.bagad-section .has-white-color:not(.wp-block-cover *),
.bagad-section .has-foregound-alt-color {
    color: var(--bagad-blanc) !important;
}

/* « Nos articles à lire » : la grille des 3 derniers articles est centrée
   sous le titre (elle était calée à gauche). */
.bagad-carte .wp-block-query {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------- Tablette et téléphone : mises en page ---------- */

@media (max-width: 1024px) {

    /* Retours à la ligne forcés des titres, pensés pour l'ordinateur. */
    .bagad-section :is(h1, h2) br {
        display: none;
    }

    /* Archives et partitions : le texte passe sur toute la largeur
       (il était serré dans une colonne étroite), les images en dessous. */
    .bagad-section-archives .wp-block-themeisle-blocks-advanced-columns > .innerblocks-wrap {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center;
        gap: 24px !important;
    }

    .bagad-section-archives .innerblocks-wrap > .wp-block-themeisle-blocks-advanced-column {
        padding: 0 !important;
        margin: 0 !important;
    }

    .bagad-section-archives .innerblocks-wrap > section.wp-block-themeisle-blocks-advanced-column {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        order: -1;
    }

    .bagad-section-archives .innerblocks-wrap > div.wp-block-themeisle-blocks-advanced-column {
        flex: 1 1 40% !important;
        max-width: 340px !important;
    }

    .bagad-section-archives .innerblocks-wrap > div.wp-block-themeisle-blocks-advanced-column img {
        width: 100% !important;
        height: auto !important;
        margin: 0 auto;
        display: block;
    }

    .bagad-section-archives section p {
        max-width: 600px;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Tablette : les fiches du bureau sur 2 colonnes, photo au-dessus du texte
   (elles s'empilaient l'une sous l'autre, photo à gauche). */
@media (min-width: 600px) and (max-width: 1024px) {
    .bagad-section-bureau .tsbTeamMembers {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        column-gap: 40px !important;
    }

    .bagad-section-bureau .tsbTeamMembers .tsbMember {
        flex-direction: column;
        align-items: flex-start;
    }

    .bagad-section-bureau .tsbTeamMembers .tsbMember .memberDetails {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Téléphone : les Archives prennent toute la largeur disponible ; les cartes
   « Cours de… » sont moins hautes (elles occupaient chacune un écran entier). */
@media (max-width: 781px) {
    .bagad-section-archives {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .bagad-section-ecole .wp-block-cover {
        min-height: 220px !important;
    }
}

/* ======================================================================
   Pages au modèle « Page standard » (Contact, Partitions, Mentions légales)
   ====================================================================== */

/* Marges sur les côtés : le contenu touchait les bords de l'écran. */
body.page-template-page-classic-avec-header-et-footer-ok .wp-block-post-content {
    padding-left: var(--bagad-marge-page) !important;
    padding-right: var(--bagad-marge-page) !important;
}

:root {
    --bagad-marge-page: 38px;
}

@media (max-width: 781px) {
    :root {
        --bagad-marge-page: 20px;
    }
}

/* Espace sous l'en-tête du site quand la page commence par une étiquette. */
.wp-block-post-content > h6.wp-block-heading:first-child,
.bagad-page-texte > h6.wp-block-heading:first-child {
    padding-top: var(--wp--preset--spacing--70);
}

/* ---------- Mentions légales (groupe « bagad-page-texte ») ---------- */

.bagad-page-texte {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-bottom: var(--bagad-espace-section);
}

.bagad-page-texte :is(p, li) {
    font-size: var(--bagad-texte) !important;
    line-height: var(--bagad-interligne) !important;
    text-align: left !important;
    color: var(--bagad-blanc) !important;
}

/* Titres des rubriques (Informations générales, Politique de confidentialité…) */
.bagad-page-texte h3.wp-block-heading {
    font-size: var(--bagad-sous-titre) !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    margin-top: 56px !important;
    margin-bottom: 0 !important;
}

.bagad-page-texte h3.wp-block-heading + hr.wp-block-separator {
    margin-top: 16px !important;
    margin-bottom: 24px !important;
}

:root {
    --bagad-sous-titre: 28px;
}

@media (max-width: 781px) {
    :root {
        --bagad-sous-titre: 24px;
    }
}

/* Contact : sur téléphone, le cadre du formulaire a des marges internes
   réduites, comme les cartes de l'accueil. */
@media (max-width: 781px) {
    .wp-block-post-content .wp-block-group.has-background:has(form) {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* ======================================================================
   Nouvelles sections de l'accueil (15/11/2026)
   ====================================================================== */

/* Prochaine sortie : carte remplie automatiquement depuis form_presta. */
.bagad-sortie {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 760px;
    margin: 0 auto 8px;
    padding: 24px;
    background: var(--bagad-fond-carte);
    border-radius: var(--bagad-arrondi);
    text-align: left;
}

.bagad-sortie-date {
    flex: 0 0 auto;
    width: 84px;
    padding: 12px 0;
    border-radius: var(--bagad-arrondi);
    background: var(--bagad-orange);
    color: #fff;
    text-align: center;
    line-height: 1.1;
}

.bagad-sortie-jour {
    display: block;
    font-size: 36px;
    font-weight: 700;
}

.bagad-sortie-mois {
    display: block;
    font-size: 15px;
    text-transform: uppercase;
}

.bagad-section .bagad-sortie .bagad-sortie-quand {
    margin: 0 0 4px;
    color: var(--bagad-orange);
    font-size: 14px !important;
    font-weight: 600;
    text-transform: uppercase;
}

.bagad-section .bagad-sortie h3.bagad-sortie-titre {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.3;
    text-align: left !important;
}

.bagad-section .bagad-sortie p {
    margin: 8px 0 0;
    text-align: left !important;
}

@media (max-width: 1024px) {
    .bagad-sortie {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 20px 16px;
    }

    .bagad-sortie-date {
        width: auto;
        padding: 8px 16px;
        display: flex;
        gap: 8px;
        align-items: baseline;
    }

    .bagad-sortie-jour {
        font-size: 24px;
    }
}

/* Rejoindre le bagad : une petite carte par cours. */
.bagad-section-rejoindre .wp-block-columns {
    margin-top: 32px;
    margin-bottom: 32px;
    gap: 24px;
}

.bagad-section-rejoindre .wp-block-column {
    padding: 24px;
    background: var(--bagad-fond-carte);
    border-radius: var(--bagad-arrondi);
    border-top: 3px solid var(--bagad-orange);
}

.bagad-section-rejoindre .wp-block-column h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.bagad-section-rejoindre .wp-block-column p {
    margin: 6px 0 0;
    font-size: var(--bagad-texte-carte) !important;
}

/* Réserver le bagad : texte centré à largeur de lecture. */
.bagad-section-reserver p {
    max-width: 700px;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 1024px) {
    .bagad-section .bagad-sortie :is(h3, p) {
        text-align: center !important;
    }
}

/* ---------- Images : toutes arrondies de la même façon ----------
   (photos, vidéos et cartes à image de fond des pages et des articles ;
   les photos rondes du bureau gardent leur forme). */
.wp-block-post-content :is(.wp-block-image img, .wp-block-video video, .wp-block-cover, .wp-block-post-featured-image img) {
    border-radius: var(--bagad-arrondi) !important;
}

.wp-block-post-content .wp-block-cover {
    overflow: hidden;
}

/* ---------- Partenaires (liste gérée sur /form_sponsors/) ----------
   Ordre tiré au hasard à chaque visite (inc/partenaires.php). Au-delà de
   4 partenaires : défilement automatique et flèches (assets/js/accueil.js). */

.bagad-partenaires {
    position: relative;
    margin: 8px -38px 0;
}

.bagad-partenaires-fenetre {
    overflow: hidden;
    padding: 10px 0 14px;
}

/* Sans JavaScript, la bande reste défilable à la main. */
.bagad-partenaires-defile:not(.bagad-js) .bagad-partenaires-fenetre {
    overflow-x: auto;
}

/* Bords en fondu pour que les cartes apparaissent et disparaissent en douceur. */
.bagad-partenaires-defile .bagad-partenaires-fenetre {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
}

.bagad-partenaires-piste {
    display: flex;
    width: max-content;
    will-change: transform;
}

.bagad-partenaires:not(.bagad-partenaires-defile) .bagad-partenaires-piste {
    width: auto;
    justify-content: center;
}

.bagad-partenaires-liste {
    display: flex !important;
    flex-wrap: nowrap;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.bagad-partenaires:not(.bagad-partenaires-defile) .bagad-partenaires-liste {
    flex-wrap: wrap;
    justify-content: center;
}

/* Une carte : logo sur fond blanc, nom et ville en dessous. */
.bagad-partenaire {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    width: 220px;
    margin: 0 14px !important;
    padding: 14px 14px 18px;
    background: #2a2a35;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.bagad-partenaire:hover {
    transform: translateY(-4px);
    border-color: var(--bagad-orange);
}

.bagad-partenaire-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 124px;
    padding: 14px;
    background: #fff;
    border-radius: var(--bagad-arrondi);
}

.bagad-partenaire-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.bagad-partenaire-nom {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    margin-top: 14px;
    color: var(--bagad-blanc);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.bagad-partenaire-ville {
    margin-top: 6px;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(251, 123, 18, 0.12);
    color: #f3c9a5;
    font-size: 13px;
    line-height: 1.6;
}

/* Flèches précédent / suivant */
.bagad-partenaires-fleche {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0 0 4px;
    border: 0;
    border-radius: 50%;
    background: var(--bagad-orange);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.bagad-partenaires-fleche:hover {
    transform: scale(1.08);
    background: #e06a08;
}

.bagad-partenaires-fleche:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.bagad-partenaires-precedent {
    left: 12px;
}

.bagad-partenaires-suivant {
    right: 12px;
}

@media (max-width: 781px) {
    .bagad-partenaires {
        margin-left: -16px;
        margin-right: -16px;
    }

    .bagad-partenaire {
        width: 180px;
        margin: 0 8px !important;
        padding: 10px 10px 14px;
    }

    .bagad-partenaire-logo {
        height: 104px;
        padding: 10px;
    }

    .bagad-partenaires-defile .bagad-partenaires-fenetre {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .bagad-partenaires-fleche {
        width: 38px;
        height: 38px;
        margin-top: -19px;
        font-size: 26px;
    }

    .bagad-partenaires-precedent {
        left: 6px;
    }

    .bagad-partenaires-suivant {
        right: 6px;
    }
}

/* ======================================================================
   Cookies : contenus externes bloqués et bandeau (inc/consentement.php,
   assets/js/consentement.js)
   ====================================================================== */

.bagad-externe {
    position: relative;
}

.bagad-externe iframe[data-bagad-src] {
    visibility: hidden;
}

.bagad-externe-masque {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: #1e1e27;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: var(--bagad-arrondi);
    text-align: center;
}

.bagad-externe-autorise .bagad-externe-masque {
    display: none;
}

.bagad-externe-texte {
    margin: 0 !important;
    max-width: 320px;
    color: #cfcfcf !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.bagad-externe-texte strong {
    display: block;
    margin-bottom: 4px;
    color: var(--bagad-blanc);
    font-size: 16px;
}

.bagad-externe-autoriser,
.bagad-cookies button {
    padding: 10px 20px;
    border: 0;
    border-radius: 40px;
    background: var(--bagad-orange);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.bagad-externe-autoriser:hover,
.bagad-cookies .bagad-cookies-accepter:hover {
    background: #e06a08;
}

.bagad-externe-lien {
    color: #cfcfcf !important;
    font-size: 13px;
}

/* Bandeau */
.bagad-cookies {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2147483000;
    width: min(440px, calc(100vw - 32px));
    padding: 20px;
    background: #1e1e27;
    border: 1px solid rgba(251, 123, 18, 0.5);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: var(--bagad-blanc);
    font-size: 15px;
    line-height: 1.5;
}

.bagad-cookies p {
    margin: 0 0 12px;
}

.bagad-cookies-titre {
    font-size: 17px;
    font-weight: 700;
}

.bagad-cookies-texte {
    color: #cfcfcf;
    font-size: 14px;
}

.bagad-cookies a {
    color: var(--bagad-orange);
}

.bagad-cookies-boutons {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.bagad-cookies-boutons button {
    flex: 1;
}

/* Refuser aussi visible qu'Accepter (recommandation de la CNIL). */
.bagad-cookies .bagad-cookies-refuser {
    background: transparent;
    border: 2px solid var(--bagad-orange);
    color: var(--bagad-blanc);
}

.bagad-cookies .bagad-cookies-refuser:hover {
    background: rgba(251, 123, 18, 0.15);
}

.bagad-cookies-services {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.bagad-cookies-services label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
}

.bagad-cookies-services input {
    width: 18px;
    height: 18px;
    accent-color: var(--bagad-orange);
}

@media (max-width: 600px) {
    .bagad-cookies {
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
    }
}

/* ======================================================================
   Page Partitions (inc/partitions.php, assets/js/partitions.js)
   ====================================================================== */

.bagad-partitions {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: var(--bagad-espace-section);
}

.bagad-partitions-etiquette,
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.bagad-partitions-outils {
    top: 0;
    z-index: 5;
    margin: 0 -12px 8px;
    padding: 16px 12px 12px;
    background: var(--wp--preset--color--background-alt, #131318);
    border-radius: 0 0 var(--bagad-arrondi) var(--bagad-arrondi);
}

.bagad-partitions-recherche {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid rgba(251, 123, 18, 0.6);
    border-radius: 40px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 17px;
}

.bagad-partitions-recherche:focus {
    outline: none;
    border-color: var(--bagad-orange);
    box-shadow: 0 0 0 4px rgba(251, 123, 18, 0.25);
}

.bagad-partitions-filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.bagad-filtre {
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 40px;
    background: #1e1e27;
    color: var(--bagad-blanc);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.bagad-filtre span {
    opacity: 0.6;
    font-size: 12px;
}

.bagad-filtre:hover {
    border-color: var(--bagad-orange);
}

.bagad-filtre[aria-pressed="true"] {
    background: var(--bagad-orange);
    border-color: var(--bagad-orange);
    color: #fff;
}

.bagad-filtre[aria-pressed="true"] span {
    opacity: 0.85;
}

.bagad-partitions-az {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 12px;
}

.bagad-partitions-az a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 6px;
    color: #cfcfcf !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.bagad-partitions-az a:hover,
.bagad-partitions-az a:focus-visible {
    background: rgba(251, 123, 18, 0.15);
    color: var(--bagad-orange) !important;
}

.bagad-partitions-compte,
.bagad-partitions-aucun,
.bagad-partitions-maj {
    margin: 8px 0 !important;
    color: #cfcfcf !important;
    font-size: 14px !important;
    text-align: left !important;
}

.bagad-partitions-groupe ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bagad-partitions-lettre {
    margin: 28px 0 10px !important;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--bagad-orange);
    color: var(--bagad-orange) !important;
    font-size: 24px !important;
    scroll-margin-top: 110px;
}

.bagad-air {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    margin-bottom: 8px;
    padding: 14px 18px;
    background: #1e1e27;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--bagad-arrondi);
}

.bagad-air[hidden],
.bagad-partitions-groupe[hidden] {
    display: none;
}

.bagad-air-entete {
    flex: 1 1 260px;
    min-width: 0;
}

.bagad-air-titre {
    margin: 0 !important;
    color: var(--bagad-blanc) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

.bagad-air-infos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 4px 0 0 !important;
    color: #a9a9b3 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.bagad-air-categorie,
.bagad-air-pupitre {
    color: #f3c9a5;
}

.bagad-air-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bagad-air-bouton {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1px solid rgba(251, 123, 18, 0.7);
    border-radius: 40px;
    color: var(--bagad-blanc) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.bagad-air-bouton:hover,
.bagad-air-bouton:focus-visible,
.bagad-air-bouton-actif {
    background: var(--bagad-orange);
    color: #fff !important;
}

.bagad-air-pdf {
    background: var(--bagad-orange);
    border-color: var(--bagad-orange);
    color: #fff !important;
}

.bagad-air-pdf:hover {
    background: #e06a08;
}

.bagad-air-lecteur {
    flex: 1 1 100%;
}

.bagad-air-lecteur audio {
    width: 100%;
}

.bagad-air-lecteur video {
    width: 100%;
    max-height: 70vh;
    background: #000;
    border-radius: var(--bagad-arrondi);
}

.bagad-air-lecteur-nom {
    margin: 6px 0 0 !important;
    color: #a9a9b3 !important;
    font-size: 13px !important;
    text-align: left !important;
}

.bagad-air-lecteur-nom a {
    color: var(--bagad-orange) !important;
}

@media (max-width: 781px) {
    .bagad-partitions-outils {
        position: static;
    }

    .bagad-air {
        padding: 12px 14px;
    }

    .bagad-air-actions {
        width: 100%;
    }

    .bagad-air-bouton {
        flex: 1 1 auto;
        justify-content: center;
    }

    .bagad-partitions-lettre {
        scroll-margin-top: 90px;
    }
}

/* Partitions : encart réservé aux administrateurs connectés */
.bagad-partitions-admin {
    margin: 0 0 24px;
    padding: 18px 20px;
    background: #fff4e5;
    border-left: 5px solid var(--bagad-orange);
    border-radius: var(--bagad-arrondi);
    color: #2a2a2a;
}

.bagad-partitions-admin p {
    margin: 0 0 8px !important;
    color: #2a2a2a !important;
    font-size: 15px !important;
    text-align: left !important;
}

.bagad-partitions-admin .bagad-partitions-admin-titre {
    font-size: 17px !important;
    font-weight: 700;
}

.bagad-partitions-admin-titre span,
.bagad-partitions-admin .bagad-partitions-admin-maj {
    color: #6b6b6b !important;
    font-size: 13px !important;
    font-weight: 400;
}

.bagad-partitions-admin-liste {
    margin: 4px 0 14px;
    padding-left: 22px;
    color: #2a2a2a;
    font-size: 15px;
    line-height: 1.6;
}

.bagad-partitions-admin-alerte {
    color: #9b1c1c;
    font-weight: 600;
}

.bagad-partitions-admin-info {
    color: #555;
}

.bagad-partitions-admin-bouton {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 40px;
    background: var(--bagad-orange);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
}

.bagad-partitions-admin-bouton:hover {
    background: #e06a08;
}

.bagad-partitions-admin-boutons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.bagad-partitions-admin-form {
    margin: 0;
}

button.bagad-partitions-admin-bouton {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.bagad-partitions-admin .bagad-partitions-admin-secondaire {
    background: transparent;
    border: 2px solid var(--bagad-orange);
    color: #b45309 !important;
}

.bagad-partitions-admin .bagad-partitions-admin-secondaire:hover {
    background: rgba(251, 123, 18, 0.12);
}

.bagad-partitions-admin .bagad-partitions-admin-retour {
    padding: 8px 12px;
    background: #e7f7ec;
    border-radius: 8px;
    color: #17642f !important;
    font-weight: 600;
}

.bagad-partitions-admin .bagad-partitions-admin-aide {
    margin: 8px 0 0 !important;
    color: #6b6b6b !important;
    font-size: 13px !important;
}

/* Partitions : noms d'origine des fichiers, visibles seulement par un administrateur connecté */
.bagad-air-fichiers {
    margin: 8px 0 0;
    padding: 6px 10px;
    list-style: none;
    background: rgba(251, 123, 18, 0.08);
    border: 1px dashed rgba(251, 123, 18, 0.45);
    border-radius: 6px;
    color: #f3c9a5;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
    word-break: break-all;
}

/* ======================================================================
   Agenda des sorties de l'accueil (inc/agenda.php, assets/js/accueil.js)
   ====================================================================== */

.bagad-agenda {
    position: relative;
    margin: 28px 0 8px;
}

.bagad-agenda-liste {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.bagad-agenda-carte {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 300px;
    padding: 30px 32px;
    background: var(--bagad-agenda-fond, linear-gradient(135deg, #fb7b12, #ffb52e));
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
    color: #fff;
    text-align: center;
}

.bagad-agenda-carte p {
    margin: 0 !important;
    color: #fff !important;
    text-align: center !important;
}

.bagad-agenda .bagad-agenda-quand {
    padding: 3px 12px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bagad-agenda .bagad-agenda-titre {
    margin: 6px 0 4px !important;
    color: #fff !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.bagad-agenda .bagad-agenda-date {
    padding: 4px 14px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 20px;
    font-size: 16px !important;
    font-weight: 600;
}

.bagad-agenda .bagad-agenda-lieu {
    font-size: 16px !important;
    font-weight: 600;
}

.bagad-agenda .bagad-agenda-texte {
    max-width: 46ch;
    margin-top: 8px !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
}

/* Une seule sortie : une carte centrée */
.bagad-agenda-seul .bagad-agenda-carte {
    max-width: 620px;
    margin: 0 auto;
}

/* Deux sorties : côte à côte */
.bagad-agenda-duo .bagad-agenda-liste {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto !important;
}

/* Trois à dix sorties : carrousel */
.bagad-agenda-carrousel {
    padding: 0 56px 8px;
    overflow: hidden;
}

.bagad-agenda-carrousel .bagad-agenda-liste {
    position: relative;
    height: 340px;
}

.bagad-agenda-carrousel .bagad-agenda-carte {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(560px, 76%);
    transform: translateX(-50%);
    transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
    will-change: transform;
}

.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="0"] {
    z-index: 5;
}

.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="-1"],
.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="1"] {
    z-index: 4;
    opacity: 0.6;
    filter: saturate(0.8) brightness(0.85);
    cursor: pointer;
}

.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="-1"] {
    transform: translateX(-108%) scale(0.86);
}

.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="1"] {
    transform: translateX(8%) scale(0.86);
}

.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="-2"],
.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="2"] {
    z-index: 3;
    opacity: 0.3;
    filter: saturate(0.6) brightness(0.7);
    cursor: pointer;
}

.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="-2"] {
    transform: translateX(-150%) scale(0.72);
}

.bagad-agenda-carrousel .bagad-agenda-carte[data-pos="2"] {
    transform: translateX(50%) scale(0.72);
}

/* Cartes plus éloignées : cachées (elles arrivent par les côtés). */
.bagad-agenda-carrousel .bagad-agenda-carte:not([data-pos="0"]):not([data-pos="1"]):not([data-pos="-1"]):not([data-pos="2"]):not([data-pos="-2"]) {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scale(0.6);
}

.bagad-agenda-fleche {
    position: absolute;
    top: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -36px;
    padding: 0 0 4px;
    border: 0;
    border-radius: 50%;
    background: #fafafa;
    color: #fb7b12;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}

.bagad-agenda-fleche:hover {
    transform: scale(1.08);
}

.bagad-agenda-fleche:focus-visible,
.bagad-agenda-points button:focus-visible {
    outline: 2px solid #fb7b12;
    outline-offset: 3px;
}

.bagad-agenda-precedent {
    left: 4px;
}

.bagad-agenda-suivant {
    right: 4px;
}

.bagad-agenda-points {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    margin-top: 14px;
}

.bagad-agenda-points button {
    min-width: 0;
    width: 30px;
    height: 26px;
    padding: 0;
    border: 0;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.bagad-agenda-points button::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    margin: 0 auto;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.35);
    transition: width 0.25s ease, background-color 0.25s ease;
}

.bagad-agenda-points button[aria-current="true"]::before {
    width: 24px;
    background: #fb7b12;
}

/* Aucune sortie annoncée */
.bagad-agenda-vide {
    max-width: 620px;
    margin: 24px auto 8px;
    padding: 28px;
    border: 1px dashed rgba(251, 123, 18, 0.5);
    border-radius: 18px;
    text-align: center;
}

.bagad-agenda-vide p {
    margin: 0 !important;
    text-align: center !important;
}

.bagad-agenda-vide .bagad-agenda-vide-lien {
    margin-top: 10px !important;
    font-size: 15px !important;
}

/* Tablette et téléphone */
@media (max-width: 781px) {
    .bagad-agenda-duo .bagad-agenda-liste {
        grid-template-columns: 1fr;
    }

    .bagad-agenda-carte {
        min-height: 0;
        padding: 24px 18px;
    }

    .bagad-agenda .bagad-agenda-titre {
        font-size: 24px !important;
    }

    .bagad-agenda .bagad-agenda-texte,
    .bagad-agenda .bagad-agenda-date,
    .bagad-agenda .bagad-agenda-lieu {
        font-size: 15px !important;
    }

    .bagad-agenda-carrousel {
        margin-left: -16px;
        margin-right: -16px;
        padding: 0 0 4px;
    }

    .bagad-agenda-carrousel .bagad-agenda-carte {
        width: 78%;
    }

    .bagad-agenda-carrousel .bagad-agenda-carte[data-pos="-1"] {
        transform: translateX(-136%) scale(0.88);
    }

    .bagad-agenda-carrousel .bagad-agenda-carte[data-pos="1"] {
        transform: translateX(36%) scale(0.88);
    }

    .bagad-agenda-carrousel .bagad-agenda-carte[data-pos="-2"],
    .bagad-agenda-carrousel .bagad-agenda-carte[data-pos="2"] {
        opacity: 0;
        pointer-events: none;
    }

    .bagad-agenda-fleche {
        width: 38px;
        height: 38px;
        font-size: 26px;
    }
}

/* Téléphone : carte plus large, flèches descendues à côté des points */
@media (max-width: 600px) {
    .bagad-agenda-carrousel {
        overflow: hidden;
        margin-left: -16px !important;
        margin-right: -16px !important;
        width: calc(100% + 32px) !important;
        max-width: none !important;
        padding-bottom: 6px;
    }

    .bagad-agenda-carrousel .bagad-agenda-carte {
        width: 84%;
    }

    .bagad-agenda-carrousel .bagad-agenda-carte[data-pos="-1"] {
        transform: translateX(-156%) scale(0.9);
    }

    .bagad-agenda-carrousel .bagad-agenda-carte[data-pos="1"] {
        transform: translateX(56%) scale(0.9);
    }

    .bagad-agenda-fleche {
        top: auto;
        bottom: 0;
        margin-top: 0;
    }

    .bagad-agenda-precedent {
        left: 8px;
    }

    .bagad-agenda-suivant {
        right: 8px;
    }

    .bagad-agenda-points {
        align-items: center;
        min-height: 38px;
        margin-top: 16px;
        gap: 0;
        padding: 0 50px;
    }

    .bagad-agenda-points button {
        width: 18px;
    }
}

/* =====================================================================
   Pages de contenu (Réserver, École de musique, Agenda…) – 2026-11-21
   ===================================================================== */

/* Questions fréquentes (bloc « Détails ») */
.bagad-section .wp-block-details {
    margin: 0 0 12px !important;
    padding: 0 !important;
    background: #1e1e27;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    text-align: left;
}

.bagad-section .wp-block-details > summary {
    position: relative;
    padding: 16px 48px 16px 20px;
    color: #fafafa;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.bagad-section .wp-block-details > summary::-webkit-details-marker {
    display: none;
}

.bagad-section .wp-block-details > summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 20px;
    color: #fb7b12;
    font-size: 26px;
    font-weight: 400;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.bagad-section .wp-block-details[open] > summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.bagad-section .wp-block-details > :not(summary) {
    margin: 0 !important;
    padding: 0 20px 18px !important;
    text-align: left !important;
}

/* Étapes numérotées et cartes des pages */
.bagad-etapes .wp-block-column,
.bagad-cartes .wp-block-column {
    padding: 28px 24px;
    background: #1e1e27;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
}

.bagad-etapes .wp-block-column > h3,
.bagad-cartes .wp-block-column > h3 {
    margin-top: 0 !important;
}

.bagad-etapes .bagad-etape-numero {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 14px !important;
    border-radius: 50%;
    background: #fb7b12;
    color: #fff !important;
    font-size: 20px !important;
    font-weight: 800;
}

/* Liste « Bon à savoir » */
.bagad-liste-infos {
    max-width: 760px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    list-style: none;
    text-align: left;
}

.bagad-liste-infos li {
    margin: 0 0 14px;
    padding-left: 34px;
    position: relative;
}

.bagad-liste-infos li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #fb7b12;
    font-weight: 800;
}

/* Historique des sorties passées */
.bagad-agenda-historique {
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
}

.bagad-agenda-historique h3.bagad-agenda-annee {
    margin: 28px 0 12px !important;
    color: #fb7b12 !important;
    font-size: 22px !important;
    text-align: left !important;
}

.bagad-agenda-historique ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bagad-agenda-historique li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bagad-agenda-hdate {
    display: flex;
    flex: 0 0 58px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 58px;
    border-radius: 10px;
    background: #2a2a35;
    color: #a9a9b3;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.bagad-agenda-hdate b {
    color: #fafafa;
    font-size: 22px;
}

.bagad-agenda-hinfos strong,
.bagad-agenda-hinfos small {
    display: block;
}

.bagad-agenda-hinfos small {
    color: #a9a9b3;
    font-size: 15px;
}

/* Pages de contenu : même espacement entre sections que sur l'accueil. */
.wp-block-post-content > .bagad-section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.wp-block-post-content > .bagad-section:first-child {
    margin-top: var(--bagad-espace-section) !important;
}

.wp-block-post-content > .bagad-section ~ .bagad-section {
    margin-top: var(--bagad-espace-section) !important;
}

.wp-block-post-content > .bagad-section:last-child {
    margin-bottom: var(--bagad-espace-section) !important;
}

.bagad-section .wp-block-details {
    max-width: 860px;
    margin-left: auto !important;
    margin-right: auto !important;
}

.bagad-liste-infos li {
    font-size: 18px;
    line-height: 1.6;
}

@media (max-width: 781px) {
    .bagad-liste-infos li,
    .bagad-section .wp-block-details > summary {
        font-size: 16px;
    }
}

.bagad-agenda-hinfos strong {
    font-size: 18px;
    line-height: 1.35;
}

.bagad-agenda-hinfos small {
    margin-top: 2px;
    font-size: 15px;
}

/* ---------- Articles du blog (écrits depuis le portail) ----------
   Le thème centre tout le contenu des articles : les paragraphes, intertitres
   et listes « simples » sont remis à gauche, dans une colonne de lecture.
   Les blocs déjà mis en forme à la main (alignement, styles) ne changent pas. */

.single-post .wp-block-post-content > p:not([class*="has-text-align"]),
.single-post .wp-block-post-content > .wp-block-heading:not([class*="has-text-align"]),
.single-post .wp-block-post-content > .wp-block-list {
    max-width: 760px;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: left;
}

.single-post .wp-block-post-content > p:not([class]):not([style]) {
    margin-top: 1em !important;
    margin-bottom: 0 !important;
    font-size: var(--bagad-texte);
    line-height: 1.7;
}

.single-post .wp-block-post-content > .wp-block-heading:not([class*="has-text-align"]):not([style]) {
    margin-top: 1.6em !important;
    margin-bottom: 0 !important;
    color: var(--bagad-orange);
    font-size: calc(var(--bagad-titre) * 0.8);
    line-height: 1.25;
}

.single-post .wp-block-post-content > h3.wp-block-heading:not([class*="has-text-align"]):not([style]) {
    font-size: calc(var(--bagad-titre) * 0.62);
}

.single-post .wp-block-post-content > .wp-block-list {
    margin-top: 1em !important;
    margin-bottom: 0 !important;
    padding-left: 1.4em;
    font-size: var(--bagad-texte);
    line-height: 1.7;
}

.single-post .wp-block-post-content > .wp-block-heading:not([style]) + p:not([class]),
.single-post .wp-block-post-content > .wp-block-heading:not([style]) + .wp-block-list {
    margin-top: 0.5em !important;
}

.single-post .wp-block-post-content > :first-child {
    margin-top: 0 !important;
}

.single-post .wp-block-post-content > .wp-block-list li {
    margin-bottom: 0.3em;
}

.single-post .wp-block-post-content > .wp-block-list li::marker {
    color: var(--bagad-orange);
}

.single-post .wp-block-post-content a:not(.wp-element-button) {
    color: var(--bagad-orange);
}

.single-post .wp-block-post-content > .wp-block-gallery {
    max-width: 1000px;
    margin: 2em auto !important;
}

.single-post .wp-block-post-content > .wp-block-gallery img {
    border-radius: var(--bagad-arrondi);
}
