/* =========================================================================
   oiseau.ch — habillage public « Terrain d'observation »
   Bootstrap reste la base ; ce fichier ne fait que la reteinter aux jetons
   du Cercle ornithologique de Lausanne et ajouter les composants propres au
   site. Aucune règle de présentation ne vit dans les vues.
   ========================================================================= */

/* ---------------------------------------------------------------- Jetons */

:root {
    --paper: #eee9db;
    --surface: #f7f5ee;
    --card: #ffffff;
    --ink: #22281f;
    --ink-prose: #3a3f34;
    --muted: #6b7364;
    --faint: #8a917f;

    --sage: oklch(46% 0.07 150);
    --sage-hover: oklch(41% 0.07 150);
    --sage-dark: oklch(28% 0.05 150);
    --sage-soft: oklch(94% 0.03 150);
    --sage-soft-ink: oklch(42% 0.08 150);
    --sage-pale: oklch(94% 0.05 150);
    --sage-pale-ink: oklch(38% 0.09 150);

    --terra: oklch(52% 0.14 45);
    --terra-light: oklch(72% 0.1 45);
    --terra-light-hover: oklch(66% 0.11 45);
    --terra-soft: oklch(94% 0.03 45);
    --terra-soft-ink: oklch(42% 0.14 45);

    --amber-soft: oklch(94% 0.06 85);
    --amber-soft-ink: oklch(42% 0.12 70);
    --red-soft: oklch(94% 0.04 25);
    --red-soft-ink: oklch(42% 0.16 25);

    --border: rgba(34, 40, 31, .1);
    --border-soft: rgba(34, 40, 31, .08);
    --border-strong: rgba(34, 40, 31, .12);
    --row-hover: #fbfaf5;

    --on-dark: #f7f5ee;
    --on-dark-muted: rgba(247, 245, 238, .78);
    --on-dark-faint: rgba(247, 245, 238, .5);
    --on-dark-veil: rgba(247, 245, 238, .12);
    --on-dark-border: rgba(247, 245, 238, .15);

    --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 28px;
    --pill: 999px;

    /* Report vers Bootstrap : la librairie hérite des jetons, pas l'inverse. */
    --bs-body-bg: var(--surface);
    --bs-body-color: var(--ink);
    --bs-body-font-family: var(--sans);
    --bs-body-font-weight: 500;
    --bs-border-color: var(--border);
    --bs-primary: var(--sage);
    --bs-link-color: var(--ink);
    --bs-link-hover-color: var(--terra);
    --bs-border-radius: var(--radius);
    --bs-border-radius-lg: var(--radius-lg);
    --bs-border-radius-xl: var(--radius-xl);
    --bs-border-radius-pill: var(--pill);
    --bs-focus-ring-color: rgba(34, 40, 31, .25);
}

/* ------------------------------------------------------------- Squelette */

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover,
a:focus-visible {
    color: var(--terra);
}

/* Les zones — barre de navigation, annonces, contenu, pied de page — partagent le même
   conteneur : logo, bandeau et colonnes du pied de page tombent sur le même bord. Le
   contenu ne dépasse pas --content-max-width et se centre au-delà, les fonds restant
   pleine largeur ; la gouttière de grille reste celle de Bootstrap dans les rangées. */
:root {
    --content-max-width: 2000px;
    --page-gutter: clamp(1rem, 3vw, 2.5rem);
}

.masthead > .container-fluid,
.notices > .container-fluid,
.page > .container-fluid,
.footer > .container-fluid {
    max-width: calc(var(--content-max-width) + 2 * var(--page-gutter));
    padding-inline: var(--page-gutter);
}

/* Sur grand écran la marge s'élargit par paliers plutôt que de suivre la largeur en
   continu, sans que les bords soient collés. */
@media (min-width: 1400px) {
    :root {
        --page-gutter: 6rem;
    }
}

@media (min-width: 1800px) {
    :root {
        --page-gutter: 10rem;
    }
}

.page {
    flex: 1 0 auto;
    width: 100%;
    background: var(--surface);
}

/* Rythme vertical seul : l'horizontal appartient au conteneur. */
.section {
    padding-top: clamp(1.75rem, 3vw, 2.75rem);
}

.section--tight {
    padding-top: clamp(1rem, 1.75vw, 1.5rem);
}

.section--last {
    padding-bottom: clamp(2rem, 3.5vw, 2.75rem);
}

/* ---------------------------------------------------------- Typographie */

/* L'échelle appartient aux éléments : un titre prend sa taille de son niveau. Les alias
   .h1 à .h4 de Bootstrap restent la sortie de secours, pour un niveau qui doit prendre
   l'allure d'un autre, ou pour ce qui n'est pas un titre. */
h1, .h1 {
    font-size: clamp(1.75rem, 1.1rem + 1.9vw, 2.625rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.02em;
    margin: 0;
}

h2, .h2 {
    font-size: clamp(1.25rem, 1rem + .6vw, 1.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

h3, .h3 {
    font-size: clamp(.95rem, .85rem + .3vw, 1.0625rem);
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
}

h4, .h4 {
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.lead {
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.65;
    color: var(--muted);
    margin: 0;
    max-width: 70ch;
}

/* Chapô d'une fiche, sous son image : toute la largeur de la colonne. */
.lead--standfirst {
    max-width: 100%;
    font-size: 1.25rem;
}

.lead--standfirst p {
    margin: 0;
}

.lead--standfirst p + p {
    margin-top: .5em;
}

.blurb {
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
}

.meta {
    font-family: var(--mono);
    font-size: .65625rem;
    color: var(--muted);
}

.eyebrow {
    font-family: var(--mono);
    font-size: .65625rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--terra);
}

.mono {
    font-family: var(--mono);
}

.text-sage {
    color: var(--sage) !important;
}

.text-terra {
    color: var(--terra) !important;
}

.bg-sage {
    background: var(--sage) !important;
    color: var(--on-dark);
}

/* Sur fond sombre, le texte courant s'éclaircit sans qu'une vue ait à le dire. */
.bg-sage .lead,
.footer .lead,
.bg-sage .blurb,
.footer .blurb {
    color: var(--on-dark-muted);
}

.bg-sage .meta {
    color: var(--on-dark-faint);
}

.bg-sage .eyebrow,
.donation-card .eyebrow {
    color: var(--terra-light);
}

/* --------------------------------------------------------------- Navbar */

.masthead {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
    padding-block: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    line-height: 1.1;
    min-width: 0;
}

.brand__text {
    min-width: 0;
}

/* Volet replié : base à 0, sinon la barre mesure la marque à sa largeur naturelle et
   renvoie les boutons à la ligne au lieu de tronquer la signature. */
@media (max-width: 1199.98px) {
    .brand {
        flex: 1 1 0;
    }
}

.brand:hover {
    color: inherit;
}

.brand__mark {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    color: var(--on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    overflow: hidden;
}

.brand__mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand__name {
    font-size: 1.25rem;
    font-weight: 700;
}

.brand__tagline {
    font-family: var(--mono);
    font-size: .59375rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* La direction vient de `navbar-nav` : colonne dans le tiroir, ligne dès le dépliage.
   Ne reste ici que l'écart entre les pastilles. */
.mainnav {
    gap: .25rem;
}

.mainnav__link {
    display: block;
    padding: .75rem 1rem;
    border-radius: var(--pill);
    font-size: .875rem;
    font-weight: 700;
    color: var(--ink);
    width: 100%;
    text-align: left;
}

/* Barre dépliée : les onglets se resserrent et ne passent pas à la ligne, la pression
   retombant sur le champ de recherche. */
@media (min-width: 1200px) {
    .mainnav {
        align-items: center;
        flex-wrap: nowrap;
    }

    .mainnav__link {
        padding: .5625rem .75rem;
        font-size: .75rem;
        width: auto;
        white-space: nowrap;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .mainnav {
        gap: 0;
    }

    .mainnav__link {
        padding-inline: .625rem;
    }
}

/* Barre dépliée mais étroite : le panier ne garde que son icône, le libellé restant lu par
   les lecteurs d'écran. */
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .navaction--compact {
        padding-inline: .8125rem;
    }

    .navaction--compact > i {
        line-height: inherit;
    }

    .navaction--compact .navaction__label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

.mainnav__link:hover {
    background: var(--sage-soft);
    color: var(--ink);
}

.mainnav__link.is-active,
.mainnav__link.is-active:hover {
    background: var(--sage);
    color: var(--on-dark);
}

/* Sous xl le corps du tiroir empile ses blocs ; au-delà, Bootstrap le rend `flex` et il
   redevient la droite de la barre. */
.masthead .offcanvas-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

@media (min-width: 1200px) {
    .masthead .offcanvas-body {
        flex-direction: row;
        align-items: center;
    }
}

.masthead .offcanvas-header {
    border-bottom: 1px solid var(--border-soft);
}

.searchbox {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    padding: .3125rem .875rem;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--pill);
}

.searchbox i {
    font-size: .6875rem;
    color: var(--muted);
}

.searchbox input {
    border: 0;
    background: transparent;
    padding: .25rem 0;
    font-size: .75rem;
    font-weight: 500;
    color: var(--ink);
    flex: 1 1 auto;
    min-width: 4rem;
}

@media (min-width: 1200px) {
    .searchbox {
        flex: 0 1 auto;
        min-width: 2.25rem;
    }

    .searchbox input {
        flex: 0 1 9rem;
        width: 9rem;
        min-width: 0;
    }
}

.searchbox input::placeholder {
    color: var(--faint);
}

.searchbox input:focus {
    outline: 0;
}

/* Un onglet qui s'ouvre en menu : même pastille, en bouton. */
.mainnav__link--menu {
    border: 0;
    background: transparent;
    font-family: inherit;
    line-height: inherit;
}

.mainnav__link--menu.dropdown-toggle::after {
    margin-left: .375rem;
    vertical-align: .125em;
}

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .5rem;
    font-size: .8125rem;
    box-shadow: 0 .75rem 2rem rgba(34, 40, 31, .1);
}

.dropdown-item {
    border-radius: 10px;
    font-weight: 500;
    padding: .5rem .75rem;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
    background: var(--sage-soft);
    color: var(--ink);
}

.dropdown-item.active,
.dropdown-item:active {
    background: var(--sage);
    color: var(--on-dark);
}

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

.btn-pill {
    border-radius: var(--pill);
    font-size: .75rem;
    font-weight: 700;
    padding: .625rem 1.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 0;
}

.btn-sage {
    background: var(--sage);
    color: var(--on-dark);
}

.btn-sage:hover,
.btn-sage:focus-visible {
    background: var(--sage-hover);
    color: var(--on-dark);
}

.btn-terra {
    background: var(--terra-light);
    color: var(--ink);
}

.btn-terra:hover,
.btn-terra:focus-visible {
    background: var(--terra-light-hover);
    color: var(--ink);
}

.btn-outline-line {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--ink);
    font-weight: 600;
}

.btn-outline-line:hover,
.btn-outline-line:focus-visible {
    background: var(--surface);
    border-color: var(--terra);
    color: var(--terra);
}

/* --------------------------------------------------------------- Cartes */

.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* Une carte entière cliquable : le curseur et le survol portent sur le bloc. Sa couleur
   est la sienne : un rail de galerie, atténué pour ses légendes, ne la ternit pas. */
.panel--link {
    display: block;
    color: var(--ink);
    transition: border-color .15s ease, transform .15s ease;
}

.panel--link:hover,
.panel--link:focus-visible {
    color: var(--ink);
    border-color: var(--terra);
    transform: translateY(-2px);
}

.panel--link:hover :is(h2, h3, h4, .h2, .h3, .h4) {
    color: var(--terra);
}

.panel__body {
    padding: 1rem;
}

.panel__body--wide {
    padding: 1.5rem;
}

.banner {
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 3rem);
}

/* ------------------------------------------------------------- Annonces */

/* Bandeau en tête de page : une carte par annonce, le niveau porté par un liseré, une
   pastille et une accroche. */
.notices {
    padding-top: clamp(1rem, 1.75vw, 1.5rem);
}

.notice {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem 1rem 1.5rem;
}

/* Liseré posé en pseudo-élément : une bordure épaisse suivrait mal l'arrondi. */
.notice::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--notice-ink);
}

.notice--info {
    --notice-bg: var(--sage-soft);
    --notice-ink: var(--sage-soft-ink);
}

.notice--warning {
    --notice-bg: var(--amber-soft);
    --notice-ink: var(--amber-soft-ink);
}

.notice--danger {
    --notice-bg: var(--red-soft);
    --notice-ink: var(--red-soft-ink);
}

.notice__badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--notice-bg);
    color: var(--notice-ink);
    font-size: 1.125rem;
}

.notice__body {
    min-width: 0;
    flex: 1 1 auto;
}

.notice__kind {
    display: inline-block;
    font-family: var(--mono);
    font-size: .59375rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--notice-ink);
    margin-bottom: .125rem;
}

.notice__title {
    display: block;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

.notice__text {
    margin-top: .375rem;
    color: var(--ink-prose);
    font-size: .9375rem;
    line-height: 1.55;
}

.notice__text > * + * {
    margin-top: .5rem;
}

.notice__text > :last-child {
    margin-bottom: 0;
}

.notice__text a {
    color: var(--terra);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .15em;
}

/* ---------------------------------------------------------------- Chips */

.chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border-radius: var(--pill);
    background: var(--terra-soft);
    color: var(--terra-soft-ink);
    font-family: var(--mono);
    font-size: .5625rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: .25rem .5rem;
}

.chip--lg {
    font-size: .625rem;
    padding: .3125rem .625rem;
}

.chip--veil {
    background: var(--on-dark-border);
    color: var(--on-dark);
    font-weight: 600;
    letter-spacing: .06em;
    padding: .375rem .75rem;
    font-size: .65625rem;
}

/* ------------------------------------------------ Médias et réservations */

.frame {
    display: block;
    position: relative;
    overflow: hidden;
    background: repeating-linear-gradient(135deg, #e7e1d0 0 9px, #efe9db 9px 18px);
    min-width: 0;
}

/* Cadre qui ouvre la visionneuse : le curseur le dit, le survol le confirme. */
a.frame {
    cursor: zoom-in;
}

a.frame > img {
    transition: transform .3s ease;
}

a.frame:hover > img,
a.frame:focus-visible > img {
    transform: scale(1.03);
}

.frame > img,
.frame > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cadre d'une vidéo : la prévisualisation muette annonce la lecture en grand. */
.frame--video {
    background: #12140f;
}

a.frame--video {
    cursor: pointer;
}

.frame__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(18, 20, 15, .62);
    color: #fff;
    font-size: 1.125rem;
    padding-left: 4px;
    transition: background .2s ease, transform .2s ease;
    pointer-events: none;
}

.frame--video.is-playing .frame__play {
    display: none;
}

a.frame--video:hover .frame__play,
a.frame--video:focus-visible .frame__play {
    background: rgba(18, 20, 15, .82);
    transform: translate(-50%, -50%) scale(1.08);
}

.frame--thumb .frame__play {
    width: 40px;
    height: 40px;
    font-size: .875rem;
}

/* Étiquette d'une zone sans visuel : l'image la recouvre dès qu'il y en a une. */
.frame[data-label]::after {
    content: attr(data-label);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font: 400 .625rem/1.4 var(--mono);
    color: rgba(34, 40, 31, .4);
    text-align: center;
    white-space: pre-line;
    padding: 0 .5rem;
}

.frame--hero {
    border-radius: var(--radius-xl);
    min-height: 420px;
    height: 100%;
}

.frame--article {
    border-radius: var(--radius);
    height: clamp(220px, 26vw, 380px);
}

.frame--detail {
    border-radius: var(--radius);
    height: clamp(200px, 24vw, 340px);
}

/* Colonne d'une carte en deux volets : pleine hauteur à côté du texte, hauteur propre
   une fois empilé sous lui. */
.frame--wide {
    height: 100%;
    min-height: clamp(200px, 22vw, 320px);
}

.frame--feature {
    height: 320px;
}

.frame--thumb {
    height: 150px;
}

.frame--tile {
    height: 140px;
}

.frame--cover {
    height: 200px;
    border-radius: var(--radius);
}

.frame--booklet {
    width: 56px;
    height: 76px;
    flex: none;
    border-radius: 10px;
}

/* Vignette d'un document sans couverture : l'icône tient la place du livret. */
.docmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 76px;
    flex: none;
    border-radius: 10px;
    background: var(--sage-soft);
    color: var(--sage-soft-ink);
    font-size: 1.75rem;
}

.frame--avatar {
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: 50%;
}

.frame--avatar-sm {
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 50%;
}

.frame--fill {
    height: 100%;
    min-height: 170px;
}

/* ------------------------------------------------------------ Visionneuse */

/* Un PDF en cadre intégré prend les proportions d'une page A4, à la hauteur de l'écran. */
.f-html {
    padding: 0;
}

.has-iframe > .f-html {
    height: 95vh !important;
    width: calc(95vh * 210 / 297) !important;
    max-width: 96vw !important;
    padding: 0;
}

/* --------------------------------------------------------------- Galerie */

/* Carrousel de fiche : une image par vue dans le cadre habituel, flèches et points aux
   couleurs du site. Les jetons sont ceux de la bibliothèque. */
.gallery {
    --f-carousel-spacing: 12px;
    --f-arrow-width: 40px;
    --f-arrow-height: 40px;
    --f-arrow-svg-width: 20px;
    --f-arrow-svg-height: 20px;
    --f-arrow-border-radius: 50%;
    --f-arrow-bg: rgba(247, 245, 238, .9);
    --f-arrow-hover-bg: var(--card);
    --f-arrow-color: var(--ink);
    --f-arrow-pos: 12px;
    --f-arrow-shadow: 0 2px 8px rgba(34, 40, 31, .18);
    --f-carousel-dots-height: 22px;
    --f-carousel-dot-width: 7px;
    --f-carousel-dot-height: 7px;
    --f-carousel-dot-bg: var(--faint);
    --f-carousel-dot-selected-bg: var(--sage);
    --f-carousel-dot-hover-bg: var(--sage);
    color: var(--muted);
}

.gallery .f-carousel__slide {
    width: 100%;
}

/* Le rognage arrondi se pose sur la fenêtre du carrousel, composée à part : pendant la
   glissade, le cadre animé perd le sien et montrerait des angles droits. */
.gallery .f-carousel__viewport {
    border-radius: var(--radius);
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

.gallery--hero .f-carousel__viewport {
    border-radius: var(--radius-xl);
}

/* Carrousel en fondu : le glissé horizontal revient au script, le défilement vertical à la
   page, et un glissé à la souris ne sélectionne rien. */
.gallery[data-gallery-fade] .f-carousel__viewport {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* Galerie de tête de l'accueil : le carrousel prend toute la hauteur de la colonne, les
   points se posent sur l'image plutôt que sous elle, et le fondu prend son temps. */
.gallery--hero {
    height: 100%;
    min-height: 420px;
    border-radius: var(--radius-xl);
    --f-transition-duration: .8s;
    --f-carousel-slide-height: 100%;
    --f-carousel-dots-position: absolute;
    --f-carousel-dots-top: auto;
    --f-carousel-dots-bottom: 10px;
    --f-carousel-dot-bg: rgba(247, 245, 238, .65);
    --f-carousel-dot-hover-bg: var(--on-dark);
    --f-carousel-dot-selected-bg: var(--on-dark);
}

/* Rail de vignettes : vues à leur largeur propre, sans arrondi de fenêtre ni points ;
   les flèches se posent sur les bords. */
.gallery--rail {
    --f-carousel-gap: 1rem;
    --f-carousel-slide-width: 150px;
    --f-arrow-pos: -.5rem;
}

.gallery--rail .f-carousel__slide {
    width: var(--f-carousel-slide-width);
}

/* Marge verticale compensée : la fenêtre rogne, et une carte se soulève au survol. À
   l'horizontale rien, la bibliothèque mesurant la fenêtre marge comprise. */
.gallery--rail .f-carousel__viewport {
    border-radius: 0;
    padding: .375rem 0;
    margin: -.375rem 0;
}

.gallery--agenda {
    --f-carousel-slide-width: 230px;
}

/* En butée, la flèche n'a plus de sens : elle disparaît plutôt que de grisonner. */
.gallery .f-button.is-arrow[aria-disabled] {
    display: none;
}

.gallery--hero.has-dots {
    margin-bottom: 0;
}

.gallery--hero .frame {
    height: 100%;
    min-height: 0;
}

/* ----------------------------------------------------- Bandeau du don */

.support-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--sage-dark);
    color: var(--on-dark);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
}

.support-banner__eyebrow {
    font-family: var(--mono);
    font-size: .65625rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--terra-light);
    margin-bottom: .25rem;
}

.support-banner__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.support-banner__button {
    background: var(--terra-light);
    border-color: var(--terra-light);
    color: var(--ink);
    font-weight: 700;
}

.support-banner__button:hover,
.support-banner__button:focus-visible {
    background: var(--terra-light-hover);
    border-color: var(--terra-light-hover);
    color: var(--ink);
}

/* --------------------------------------------------------- Chiffres clés */

.stats__value {
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1.1;
}

.stats__label {
    font-family: var(--mono);
    font-size: .59375rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
}

/* --------------------------------------------------------------- Icônes */

.icon {
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sage-soft);
    color: var(--sage-soft-ink);
}

.icon--sm {
    width: 34px;
    height: 34px;
    font-size: .8125rem;
}

.icon--md {
    width: 38px;
    height: 38px;
    font-size: .875rem;
}

.icon--terra {
    background: var(--terra-soft);
    color: var(--terra-soft-ink);
}

.icon--veil {
    background: var(--on-dark-veil);
    color: var(--on-dark);
    width: 36px;
    height: 36px;
}

/* ------------------------------------------------- Informations clés */

/* Sous le texte du bandeau : deux par ligne sur téléphone, toutes sur une ligne au-delà,
   chacune centrée sur sa part de la carte. */
.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .facts {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
    }
}

.facts__item {
    text-align: center;
}

/* À côté du texte, sur grand écran : chacune à sa largeur propre. */
@media (min-width: 992px) {
    .facts {
        display: flex;
        flex-wrap: wrap;
        flex-shrink: 0;
    }

    .facts__item {
        width: 6rem;
    }
}

.facts__icon {
    font-size: 1.125rem;
    color: var(--terra-light);
}

/* --------------------------------------------------------- Bloc de date */

.datebox {
    background: var(--sage);
    color: var(--on-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem .5rem;
    text-align: center;
}

.datebox__dow,
.datebox__month {
    font-family: var(--mono);
    font-size: .625rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.datebox__dow {
    color: var(--terra-light);
}

.datebox__day {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.05;
}

.dayno {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.dayno--sm {
    font-size: 1.375rem;
}

/* ------------------------------------------------------ Rails et lignes */

.rows {
    overflow: hidden;
}

.rows__row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    color: inherit;
}

.rows__row:last-child {
    border-bottom: 0;
}

a.rows__row:hover,
a.rows__row:focus-visible {
    background: var(--row-hover);
    color: inherit;
}

.rows__date {
    font-family: var(--mono);
    font-size: .65625rem;
    color: var(--muted);
    width: 88px;
    flex: none;
}

.rows__title {
    font-size: .84375rem;
    font-weight: 700;
    flex: 1;
    min-width: 0;
}

.rows__date--label {
    width: auto;
    max-width: 11rem;
}

.rows__heading {
    border-bottom: 1px solid var(--border-soft);
}

/* Dates d'un cours : une ligne par date, l'encart d'inscription déplié sous la date choisie. */
.course-dates {
    overflow: hidden;
}

.course-dates__list,
.course-dates__item + .course-dates__item {
    border-top: 1px solid var(--border-soft);
}

.course-dates__row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .875rem 1.5rem;
    color: inherit;
}

a.course-dates__row:hover,
a.course-dates__row:focus-visible,
a.course-dates__row[aria-expanded="true"] {
    background: var(--row-hover);
    color: inherit;
}

a.course-dates__row[aria-expanded="true"] {
    box-shadow: inset 3px 0 0 var(--sage);
}

.course-dates__row--past {
    color: var(--muted);
}

.course-dates__body {
    flex: 1;
    min-width: 0;
}

.course-dates__day {
    display: block;
    font-size: .84375rem;
    font-weight: 700;
}

.course-dates__chevron {
    flex: none;
    color: var(--muted);
    transition: transform .2s ease;
}

a.course-dates__row[aria-expanded="true"] .course-dates__chevron {
    transform: rotate(180deg);
}

.course-dates__item[aria-busy="true"] .course-dates__row {
    cursor: progress;
    opacity: .6;
}

#inscription,
.course-dates__panel {
    scroll-margin-top: 6rem;
}

.course-dates__panel > .panel {
    border: 0;
    border-top: 1px solid var(--border-soft);
    border-radius: 0;
}

.rows__index {
    font-family: var(--mono);
    font-size: .8125rem;
    font-weight: 700;
    color: var(--terra);
    width: 32px;
    flex: none;
}

/* Ligne de conférence : colonne de date, intitulé, thématique, chevron. */
.agenda__row {
    display: grid;
    grid-template-columns: 5.5rem 1fr auto auto;
    align-items: center;
    gap: 1rem;
    padding: .875rem 1.25rem;
    border-bottom: 1px solid var(--border-soft);
    color: inherit;
}

.agenda__row:last-child {
    border-bottom: 0;
}

a.agenda__row:hover,
a.agenda__row:focus-visible {
    background: var(--row-hover);
    color: inherit;
}

.agenda__date {
    flex: 0 0 4.5rem;
    text-align: center;
}

/* ------------------------------------------------------- Listes de liens */

.linklist > * {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: .78125rem;
    font-weight: 500;
    color: inherit;
}

.linklist > *:last-child {
    border-bottom: 0;
}

.linklist a:hover,
.linklist a:focus-visible {
    color: var(--terra);
}

.linklist__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5em;
    height: 1.5em;
    flex: none;
}

.linklist__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.linklist__icon {
    width: 1.25em;
    flex: none;
    text-align: center;
}

.linklist__count {
    font-family: var(--mono);
    font-size: .65625rem;
    color: var(--muted);
}

/* Icône d'action en bout de ligne : la police d'icônes doit rester la sienne. */
.linklist__action {
    flex: none;
    font-size: .6875rem;
    color: var(--muted);
}

/* Listes longues (archives de la gazette, documents d'une fiche) : la carte ne suit pas leur nombre. */
.archive-list {
    max-height: 26rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .5rem;
}

/* -------------------------------------------------------------- Filtres */

.filters {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.filters__field {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.filters__field select {
    appearance: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--pill);
    padding: .5625rem 2rem .5625rem .875rem;
    font-family: var(--sans);
    font-size: .75rem;
    font-weight: 500;
    color: var(--ink);
}

.filters__field select:focus {
    outline: 0;
    border-color: var(--sage);
}

.filters__field i {
    position: absolute;
    right: .875rem;
    font-size: .5625rem;
    color: var(--muted);
    pointer-events: none;
}

.filters__count {
    font-family: var(--mono);
    font-size: .6875rem;
    color: var(--muted);
    margin-left: auto;
}

/* --------------------------------------------------------- Appel au don */

.donation-card {
    background: var(--sage-dark);
    color: var(--on-dark);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

/* ------------------------------------------------------ Corps rédactionnel */

.prose {
    color: var(--ink-prose);
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.8;
}

.prose > * + * {
    margin-top: 1rem;
}

.prose h2 {
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ink);
    margin-top: 1.75rem;
}

.prose h3 {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--ink);
    margin-top: 1.5rem;
}

.prose a {
    color: var(--terra);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.prose ul,
.prose ol {
    padding-left: 1.25rem;
}

.prose blockquote {
    border-left: 3px solid var(--sage);
    padding-left: 1rem;
    color: var(--muted);
}

/* Le script enveloppe chaque tableau : sans lui, un tableau large déborde de la colonne. */
.prose__scroller {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    line-height: 1.5;
}

.prose__scroller > table {
    min-width: 32rem;
}

.prose th,
.prose td {
    border: 1px solid var(--border);
    padding: .5rem .75rem;
    text-align: left;
    vertical-align: top;
}

.prose thead th,
.prose tr:first-child th {
    background: var(--sage-soft);
    color: var(--sage-soft-ink);
    font-weight: 700;
}

.prose tbody tr:nth-child(even) > td {
    background: rgba(34, 40, 31, .03);
}

.prose caption {
    caption-side: bottom;
    font-size: .8125rem;
    color: var(--muted);
    padding-top: .5rem;
    text-align: left;
}

/* Alignement posé par l'éditeur : une classe, l'assainisseur retirant l'attribut style. */
.prose .rte-align-left {
    text-align: left;
}

.prose .rte-align-center {
    text-align: center;
}

.prose .rte-align-right {
    text-align: right;
}

.prose .rte-align-justify {
    text-align: justify;
}

/* --------------------------------------------------------------- Tarifs */

.tier {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tier__price {
    font-family: var(--mono);
    font-size: .9375rem;
    font-weight: 700;
    color: var(--terra);
    margin-top: .375rem;
}

.tier__list {
    flex: 1 1 auto;
    margin: .875rem 0 0;
    list-style: none;
    padding: 0;
}

.tier__list li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .3125rem 0;
    font-size: .75rem;
    line-height: 1.4;
    color: var(--muted);
}

.tier__list i {
    color: var(--sage);
    font-size: .625rem;
    margin-top: .25rem;
}

/* ------------------------------------------------------ Retour et vides */

.backlink {
    margin-bottom: 1.5rem;
}

.empty {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    font-size: .8125rem;
}

/* ----------------------------------------------------------- Pagination */

.pager {
    display: flex;
    gap: .375rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pager a,
.pager span {
    min-width: 2rem;
    padding: .375rem .625rem;
    border-radius: var(--pill);
    border: 1px solid var(--border);
    background: var(--card);
    font-family: var(--mono);
    font-size: .6875rem;
    text-align: center;
}

.pager .is-current {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--on-dark);
}

/* ---------------------------------------------------------- Pied de page */

.footer {
    flex-shrink: 0;
    background: var(--sage-dark);
    color: var(--on-dark);
    padding-block: 3rem 1.25rem;
}

.footer a {
    color: var(--on-dark-muted);
}

.footer a:hover,
.footer a:focus-visible {
    color: var(--terra-light);
}

.footer__title {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--terra-light);
}

.footer__links {
    list-style: none;
    padding: 0;
    margin: .375rem 0 0;
    font-size: .78125rem;
    line-height: 2.1;
    color: var(--on-dark-muted);
}

.footer__note {
    font-family: var(--mono);
    font-size: .65625rem;
    color: var(--on-dark-faint);
    border-top: 1px solid rgba(247, 245, 238, .12);
    margin-top: 1.5rem;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Mention de l'auteur du site : logo et texte dans un seul lien. */
.footer__credit {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

.footer__credit img {
    display: block;
    max-height: 50px;
    width: auto;
}

/* ------------------------------------------------------ Boutons d'action */

.btn-pill--sm {
    padding: .4375rem .875rem;
    font-size: .6875rem;
}

/* Bouton rond d'action secondaire : rectifier, retirer. */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: .75rem;
}

.btn-icon:hover,
.btn-icon:focus-visible {
    border-color: var(--terra);
    color: var(--terra);
}

/* Pastille en contour sur fond sombre. */
.btn-outline-veil {
    background: transparent;
    border: 1px solid rgba(247, 245, 238, .35);
    color: var(--on-dark);
}

.btn-outline-veil:hover,
.btn-outline-veil:focus-visible {
    background: var(--on-dark-veil);
    border-color: var(--on-dark-muted);
    color: var(--on-dark);
}

/* ---------------------------------------------------------- Chips d'état */

.chip--sage {
    background: var(--sage-pale);
    color: var(--sage-pale-ink);
}

.chip--muted {
    background: var(--paper);
    color: var(--muted);
}

/* ---------------------------------------------------------- Adaptations */

@media (max-width: 991.98px) {
    .masthead {
        padding-block: .75rem;
    }

    .frame--hero,
    .gallery--hero {
        min-height: 260px;
    }

    .agenda__row {
        grid-template-columns: 4.5rem 1fr auto;
    }

    .agenda__chevron {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .rows__row {
        flex-wrap: wrap;
        padding-inline: 1rem;
    }

    .rows__date--label {
        max-width: 6.5rem;
    }

    .footer__note {
        justify-content: flex-start;
    }

    /* Deux couvertures centrées par vue : leur largeur laisse aux voisines une bande fixe. */
    .gallery--issues {
        --gallery-peek: 2rem;
        --f-carousel-slide-width: calc((100% - 3 * var(--f-carousel-gap) - 2 * var(--gallery-peek)) / 2);
    }
}

@media print {
    .masthead,
    .footer,
    .donation-card,
    .backlink {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .panel--link,
    .course-dates__chevron {
        transition: none;
    }

    .panel--link:hover,
    .panel--link:focus-visible {
        transform: none;
    }
}
