/* Site public SubAqua des Iles. Couleur principale : le bleu marine du logo du club (#00295c). */
:root {
    --fond: #f6f9fb;
    --surface: #ffffff;
    --texte: #102a3a;
    --texte-doux: #4b6475;
    --primaire: #00295c;
    --primaire-fonce: #001a3d;
    --accent: #1aa3a3;
    --bordure: #d7e3ea;
    --alerte: #a14a00;
    --rayon: 10px;
    --ombre: 0 1px 3px rgb(16 42 58 / 8%), 0 4px 16px rgb(16 42 58 / 6%);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fond: #0d1b24;
        --surface: #142834;
        --texte: #e6eef3;
        --texte-doux: #a9bdc9;
        --primaire: #8fb3e8;
        --primaire-fonce: #b9d0f2;
        --accent: #4fd1c5;
        --bordure: #24404f;
        --alerte: #f0a15c;
        --ombre: none;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--fond);
    color: var(--texte);
    font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--primaire); }
a:hover { color: var(--primaire-fonce); }
img { max-width: 100%; height: auto; }
h1, h2, h3, .h3 { line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 1.5rem 0 1rem; }
h2 { font-size: 1.4rem; margin-top: 2rem; }
h3, .h3 { font-size: 1.15rem; margin: .25rem 0 .5rem; }

.conteneur { width: min(1100px, 100% - 32px); margin-inline: auto; }

.aller-au-contenu { position: absolute; left: -9999px; }
.aller-au-contenu:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: .5rem 1rem; }

/* Barre d'information défilante (Nicolas, 30.11.2026) : en pause au survol, fixe si l'appareil demande moins d'animations. */
.barre-info { overflow: hidden; background: #00295c; color: #fff; padding-block: .45rem; font-weight: 600; white-space: nowrap; }
.barre-info span { display: inline-block; padding-left: 100vw; animation: barre-info 24s linear infinite; }
.barre-info:hover span { animation-play-state: paused; }
@keyframes barre-info { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
    .barre-info { white-space: normal; text-align: center; padding-inline: 16px; }
    .barre-info span { padding-left: 0; animation: none; }
}
@media print { .barre-info { display: none; } }

/* En-tête et menu */
/* Aperçu « comme un membre simple » : rappel visible en haut de chaque page, avec le retour. */
.bandeau-vue-membre { background: #fff4d6; color: #5c3d00; border-bottom: 1px solid #e8cf8a; }
.bandeau-vue-membre .conteneur { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding-block: .4rem; }
.bandeau-vue-membre form { margin: 0; }
.entete { background: color-mix(in srgb, var(--primaire) 8%, var(--surface)); border-bottom: 1px solid var(--bordure); position: sticky; top: 0; z-index: 5; }
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.marque { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--texte); }
.marque span { display: flex; flex-direction: column; line-height: 1.2; }
.marque small { color: var(--texte-doux); }

.menu { list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; color: var(--texte); display: block; padding: .5rem .75rem; border-radius: 6px; }
.menu a:hover, .menu a:focus-visible { background: var(--fond); color: var(--primaire); }
.menu ul { list-style: none; padding-left: 1rem; margin: 0; }
.acces-membres a { color: var(--primaire); font-weight: 600; }

.menu-telephone summary {
    cursor: pointer; list-style: none; padding: .5rem .9rem;
    border: 1px solid var(--bordure); border-radius: var(--rayon); font-weight: 600;
}
.menu-telephone summary::-webkit-details-marker { display: none; }
.menu-telephone[open] nav {
    position: absolute; left: 0; right: 0; top: 64px;
    background: var(--surface); border-bottom: 1px solid var(--bordure);
    padding: .5rem 16px 1rem; max-height: calc(100vh - 64px); overflow-y: auto;
}
.menu-ordinateur { display: none; }

@media (min-width: 900px) {
    .menu-telephone { display: none; }
    .menu-ordinateur { display: block; }
    .menu-ordinateur .menu { display: flex; gap: .25rem; align-items: center; }
    .menu-ordinateur li { position: relative; }
    .menu-ordinateur ul ul {
        display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: .4rem;
        background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre);
    }
    .menu-ordinateur li.a-sous-menu:hover > ul,
    .menu-ordinateur li.a-sous-menu:focus-within > ul { display: block; }
}

body { min-height: 100vh; display: flex; flex-direction: column; }
main { padding-bottom: 3rem; flex: 1 0 auto; }

/* Blocs */
.bandeau {
    margin-top: 1.5rem; padding: clamp(1.25rem, 4vw, 2.5rem); border-radius: var(--rayon);
    background: linear-gradient(135deg, var(--primaire-fonce), var(--primaire) 60%, var(--accent));
    color: #fff;
}
.bandeau { position: relative; overflow: hidden; }
.bandeau > :not(.bandeau-deco) { position: relative; max-width: 680px; }
.bandeau h1 { margin-top: 0; }
.bandeau-deco { position: absolute; right: -20px; top: -10px; width: min(320px, 45%); height: auto; fill: none; stroke: rgb(255 255 255 / 35%); stroke-width: 2.5; }
.bandeau a:not(.bouton) { color: #fff; }

.grille { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.deux-colonnes { display: grid; gap: 0 2rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1rem 1.1rem; box-shadow: var(--ombre); margin-bottom: 1rem; }
.carte h2 a, .carte h3 a { text-decoration: none; }
.carte-date { margin: 0; color: var(--texte-doux); font-size: .9rem; }
.carte-date::first-letter { text-transform: uppercase; }
.carte-lieu { margin: 0 0 .5rem; color: var(--texte-doux); }
.carte-image { border-radius: 6px; margin-bottom: .5rem; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.carte-actions { margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.delai { font-size: .9rem; color: var(--accent); font-weight: 600; margin: .25rem 0; }
.delai-passe { color: var(--alerte); }

.bouton {
    display: inline-block; padding: .55rem 1.1rem; border-radius: 999px; font-weight: 600; text-decoration: none;
    background: #fff; color: var(--primaire-fonce); border: 2px solid #fff; margin: .25rem .25rem .25rem 0;
}
main .bouton { background: var(--primaire); color: #fff; border-color: var(--primaire); }
main .bouton:hover { background: var(--primaire-fonce); color: #fff; }
.bouton-secondaire, main .bouton-secondaire { background: transparent; color: var(--primaire); border-color: currentColor; }
.bandeau .bouton-secondaire { color: #fff; }
/* Dans le bandeau bleu marine, le bouton principal est blanc pour rester visible. */
.bandeau .bouton:not(.bouton-secondaire) { background: #fff; color: var(--primaire-fonce); border-color: #fff; }
.bandeau .bouton:not(.bouton-secondaire):hover { background: color-mix(in srgb, #fff 85%, var(--accent)); color: var(--primaire-fonce); }

.page-texte { max-width: 760px; }
.page-texte > .carte-date:first-child { margin-top: 1.75rem; }
.page-texte > .carte-date:first-child + h1 { margin-top: .25rem; }
.page-texte table { border-collapse: collapse; width: 100%; margin: 1rem 0; background: var(--surface); }
.page-texte th, .page-texte td { border: 1px solid var(--bordure); padding: .5rem .75rem; text-align: left; }
.description { white-space: pre-line; }
.note { color: var(--texte-doux); font-size: .9rem; }
.image-pleine { border-radius: var(--rayon); margin: 1rem 0; }

.comite { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; }
.comite dt { font-weight: 600; }
.comite dd { margin: 0; }

.liste-simple, .liste-documents { padding-left: 1.1rem; }
.liste-simple li { margin-bottom: .4rem; }
.liste-simple time { color: var(--texte-doux); margin-right: .5rem; }

.pagination { display: flex; justify-content: space-between; margin-bottom: 1rem; }

.pied { border-top: 1px solid var(--bordure); background: var(--surface); padding: 1.5rem 0; font-size: .95rem; }
.pied-colonnes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); align-items: start; }
.pied nav { display: flex; flex-direction: column; gap: .25rem; }
.pied-copyright { color: var(--texte-doux); }

/* Infos pratiques (accueil) */
.infos-pratiques { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); margin-top: 1.25rem; }
.info {
    display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; text-decoration: none;
    background: var(--surface); border: 1px solid var(--bordure); border-left: 4px solid var(--accent); border-radius: var(--rayon);
    color: var(--texte); box-shadow: var(--ombre);
}
.info strong { color: var(--primaire); font-size: 1.05rem; }
.info span { color: var(--texte-doux); font-size: .92rem; }
.info:hover { border-left-color: var(--primaire); }

/* Carte d'activité avec pastille de date */
.carte-activite { display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; align-content: start; }
.carte-activite > :not(.pastille-date) { grid-column: 2; }
.pastille-date {
    grid-row: 1 / span 5; display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 3.4rem; height: 3.6rem; border-radius: 8px; background: var(--primaire); color: #fff; line-height: 1.1;
}
.pastille-date .jour { font-size: 1.4rem; font-weight: 700; }
.pastille-date .mois { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }

/* Formulaire de contact */
.formulaire { display: grid; gap: 1rem; margin-top: 1.5rem; }
.champ { display: grid; gap: .3rem; }
.champ label { font-weight: 600; }
.champ input, .champ select, .champ textarea {
    font: inherit; color: var(--texte); background: var(--surface);
    border: 1px solid var(--bordure); border-radius: 8px; padding: .6rem .7rem; width: 100%;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--primaire); outline-offset: 1px; }
.validation-message { color: var(--alerte); font-size: .9rem; }
.invalid { border-color: var(--alerte) !important; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.formulaire .bouton { justify-self: start; border: none; cursor: pointer; font: inherit; font-weight: 600; }
.message-ok, .message-erreur { padding: 1rem 1.1rem; border-radius: var(--rayon); margin-top: 1.5rem; }
.message-ok { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); border: 1px solid var(--accent); }
.message-erreur { background: color-mix(in srgb, var(--alerte) 12%, var(--surface)); border: 1px solid var(--alerte); }

/* Texte riche des news : la police, la taille et les couleurs sont toujours celles du site. */
.texte-riche, .texte-riche * { font-family: inherit; font-size: inherit; color: inherit; }
.texte-riche p { margin: 0 0 .75rem; }
.texte-riche ul, .texte-riche ol { margin: 0 0 .75rem; padding-left: 1.3rem; }
.texte-riche a { color: var(--primaire); }
.actualite-image { border-radius: 8px; margin-bottom: .75rem; max-height: 320px; width: 100%; object-fit: cover; }

/* Programme : choix liste / fiches */
.choix-vue { display: inline-flex; border: 1px solid var(--bordure); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; }
.choix-vue a { padding: .4rem 1rem; text-decoration: none; color: var(--texte); }
.choix-vue a[aria-current="page"] { background: var(--primaire); color: #fff; }
.tableau-programme { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.tableau-programme th, .tableau-programme td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.tableau-programme th { background: var(--fond); font-size: .9rem; }
.tableau-programme .passee { color: var(--texte-doux); }
.tableau-programme .date-courte { white-space: nowrap; }
@media (max-width: 640px) {
    .tableau-programme thead { display: none; }
    .tableau-programme tr { display: block; padding: .6rem .8rem; border-bottom: 1px solid var(--bordure); }
    .tableau-programme td { display: block; padding: .1rem 0; border: none; }
}

/* News sur l'accueil : image (affiche) à gauche, texte à droite, comme sur le site actuel. */
/* Inscription en un clic (membre connecté). */
.inscription-rapide { display: inline; margin: 0; }
.inscrit-ok { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border-radius: 999px; font-weight: 600;
    color: var(--succes, #1d7a46); background: color-mix(in srgb, var(--succes, #1d7a46) 12%, var(--surface)); }
.lien-discret { font-size: .9rem; color: var(--texte-doux); align-self: center; }
.news-accueil { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
/* Accueil : infos du club (large) et prochaines activités (étroit) côte à côte ; empilés sur tablette et téléphone. */
.accueil-colonnes { display: grid; gap: 0 2rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.accueil-colonnes .news-accueil { grid-template-columns: 1fr; }
.accueil-prochaines .pile { display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 860px) { .accueil-colonnes { grid-template-columns: 1fr; } }
.news { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 0; }
.news-image { flex: 0 0 120px; }
.news-image img { width: 120px; height: 160px; object-fit: cover; border-radius: 6px; display: block; }
.news h3 { margin-top: .1rem; }
@media (max-width: 480px) {
    .news { flex-direction: column; }
    .news-image, .news-image img { width: 100%; height: auto; max-height: 260px; flex-basis: auto; }
}

/* Espace membres */
.page-etroite { max-width: 520px; }
.page-large { max-width: none; }
.cases { display: grid; gap: .4rem; }
.cases label { display: flex; gap: .5rem; align-items: center; font-weight: normal; }
.cases input { width: auto; }
.formulaire-ligne { display: inline-flex; gap: .4rem; align-items: center; margin: .15rem .3rem .15rem 0; }
.formulaire-ligne select { font: inherit; padding: .3rem .4rem; border: 1px solid var(--bordure); border-radius: 6px; background: var(--surface); color: var(--texte); }
.bouton-petit {
    font: inherit; font-size: .88rem; padding: .3rem .7rem; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--primaire); background: transparent; color: var(--primaire);
}
.bouton-petit:hover { background: var(--primaire); color: #fff; }
.menu .bouton-connexion { background: var(--primaire); color: #fff; border-radius: 999px; padding: .45rem 1rem; }
.menu .bouton-connexion:hover { background: var(--primaire-fonce); color: #fff; }
.bouton.bouton-desactive, .bouton.bouton-desactive:hover { background: #e5e7eb; color: #9ca3af; border-color: #e5e7eb; cursor: not-allowed; box-shadow: none; }
/* Espace membres désactivé pour l'instant : grisé, non cliquable */
.lien-desactive { display: inline-block; padding: .45rem 1rem; border-radius: 999px; background: #e5e7eb; color: #9ca3af; font-weight: 600; cursor: not-allowed; user-select: none; }
.formulaire-colonnes { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); align-items: end; }
.tableau-acces .actions { white-space: nowrap; }

/* Photos d'un reportage */
.photos { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); margin: 1rem 0; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.photos figcaption { font-size: .85rem; color: var(--texte-doux); margin-top: .25rem; }
.sous-titre { color: var(--texte-doux); font-size: 1.05rem; margin-top: -.5rem; }

/* Vidéos */
.videos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.video-cadre { position: relative; aspect-ratio: 16 / 9; margin-bottom: .75rem; border-radius: 6px; overflow: hidden; background: #000; }
.video-cadre iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Moniteurs */
.moniteurs { display: grid; gap: 1rem; }
.moniteur { display: flex; gap: 1rem; align-items: flex-start; margin: 0; }
.moniteur img { width: 96px; height: 116px; object-fit: cover; border-radius: 6px; flex: none; }
.moniteur h3 { margin-top: 0; }

/* Gestion du site */
details.carte > summary { cursor: pointer; }
details.carte[open] > summary { margin-bottom: .75rem; }
.zone-danger { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--bordure); }
.bouton-danger { border-color: var(--alerte); color: var(--alerte); }
.bouton-danger:hover { background: var(--alerte); color: #fff; }
.photos-gestion figure { display: grid; gap: .3rem; }
.photos-gestion .formulaire-ligne input { width: 100%; font: inherit; padding: .25rem .4rem; border: 1px solid var(--bordure); border-radius: 6px; }
.case { display: flex; gap: .5rem; align-items: center; font-weight: normal; }
.case input { width: auto; }
code { background: var(--fond); padding: 0 .25rem; border-radius: 4px; font-size: .9em; }
fieldset.champ { border: 1px solid var(--bordure); border-radius: 6px; padding: .75rem 1rem; display: grid; gap: .6rem; }
fieldset.champ legend { font-weight: 600; padding: 0 .3rem; }
.label { font-weight: 600; }
.tableau-defilant { overflow-x: auto; }
.complet { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--alerte); color: #fff; font-size: .85rem; font-weight: 600; }

/* Éditeur de texte (gestion) : même police que le site */
.editeur template { display: none; }
.editeur-actif { display: grid; gap: 0; }
.editeur-barre { display: flex; flex-wrap: wrap; gap: .25rem; padding: .35rem; border: 1px solid var(--bordure); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--fond); }
.editeur-barre button { font: inherit; font-size: .9rem; padding: .2rem .55rem; border: 1px solid var(--bordure); border-radius: 4px; background: var(--surface); color: inherit; cursor: pointer; }
.editeur-barre button:hover, .editeur-barre button[aria-pressed="true"] { border-color: var(--primaire); background: var(--primaire); color: #fff; }
.editeur-barre .gras { font-weight: 700; }
.editeur-barre .italique { font-style: italic; }
.editeur-zone { min-height: 12rem; padding: .6rem .75rem; border: 1px solid var(--bordure); border-radius: 0 0 6px 6px; background: var(--surface); font: inherit; overflow-wrap: anywhere; }
.editeur-zone:focus { outline: 2px solid var(--primaire); outline-offset: 1px; }
.editeur-actif + .note, .editeur-actif > .note { margin-top: .4rem; }
.liens-activite { list-style: none; padding: 0; display: grid; gap: .5rem; }
.liens-activite li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions-activite { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Impression (liste des inscrits) : seulement le contenu utile */
/* Liste des participants à imprimer (gestion du programme). */
.lien-imprimer { margin-left: .4rem; text-decoration: none; font-size: 1.1rem; }
.liste-club { margin: 0; color: var(--texte-doux); font-size: .9rem; }
.tableau-liste tfoot th { background: var(--fond); }
.case-presence { display: inline-block; width: 1.1rem; height: 1.1rem; border: 1.5px solid currentColor; border-radius: 3px; }

@media print {
    .entete, .pied, .pas-imprimer, .message-ok, .message-erreur { display: none !important; }
    @page { margin: 1.2cm; }
    .liste-participants { max-width: none; padding: 0; }
    .liste-participants h1 { font-size: 16pt; margin: .2rem 0; }
    .tableau-liste { box-shadow: none; border: 1px solid #000; }
    .tableau-liste th, .tableau-liste td { border: 1px solid #000; padding: 4pt 6pt; }
    .tableau-liste tr { break-inside: avoid; }
    body { background: #fff; color: #000; }
    .tableau-programme { font-size: 10pt; }
    .tableau-programme a { color: #000; text-decoration: none; }
}

/* Photos du club : bande de l'accueil, et paragraphes de photos des pages Markdown (cabane, domaine des Iles). */
.photos-club { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: .75rem; margin: 1.5rem 0; }
.photos-club img, .page-texte p:has(> img) img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; display: block; }
.page-texte p:has(> img) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: .75rem; }
/* Pages avec photos : galerie sur toute la largeur, au plus 4 colonnes ; le texte garde sa largeur de lecture. */
.page-texte.page-photos { max-width: none; }
.page-photos > :not(p:has(> img)) { max-width: 760px; }
.page-photos p:has(> img) { grid-template-columns: repeat(auto-fill, minmax(max(min(220px, 100%), calc((100% - 3 * .75rem) / 4)), 1fr)); }
@media print { .photos-club { display: none; } }

/* Gestion des membres et du comité : liste à gauche, fiche en panneau à droite (empilés sur téléphone). */
.visuellement-cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gestion-membres { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.liste-membres { flex: 999 1 520px; min-width: 0; }
.liste-membres .entete-ligne { flex-wrap: wrap; min-height: 0; }
.liste-membres h1 { margin: 0; }
.actions-ligne { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filtres-membres { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin: 1rem 0; }
.filtres-membres .champ { margin: 0; }
.tableau-membres tr.choisi td { background: color-mix(in srgb, var(--primaire) 12%, var(--surface)); }
.tableau-compact td { padding: .4rem .5rem; }
.tableau-compact tr.passe td { color: var(--texte-doux); }
.tableau-compact .actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.etiquette { display: inline-block; margin-left: .4rem; padding: 0 .5rem; border-radius: 999px; font-size: .8rem; background: var(--bordure); color: var(--texte); }
.lien-bouton { background: none; border: 0; padding: .25rem 0; min-height: 32px; color: var(--primaire); text-decoration: underline; font: inherit; cursor: pointer; }
.panneau-fiche { flex: 1 1 380px; max-width: 480px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: clip; }
.panneau-bandeau { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem .6rem .9rem; background: #00295c; color: #fff; }
.panneau-bandeau h2 { flex: 1; margin: 0; font-size: 1.05rem; color: #fff; }
.pastille-logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.panneau-fermer { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .8rem; border: 1px solid rgb(255 255 255 / 60%); border-radius: 6px; color: #fff; text-decoration: none; }
.panneau-fermer:hover { background: rgb(255 255 255 / 15%); color: #fff; }
.panneau-contenu { padding: 1rem; display: flex; flex-direction: column; gap: 1.1rem; }
.panneau-contenu .zone-danger { margin-top: 0; }
.titre-section { font-size: 1rem; margin: 0 0 .5rem; padding: 0; }
.sans-cadre { border: 0; padding: 0; margin: 0; min-width: 0; }
.grille-fiche { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .75rem; align-items: end; }
.grille-fiche .champ { margin: 0; }
.grille-fiche .large { grid-column: 1 / -1; }
.fiche-photo { display: flex; gap: 1rem; align-items: flex-start; }
.fiche-photo p { margin: .2rem 0 .5rem; }
.fiche-photo input[type="file"] { max-width: 100%; }
.portrait, .portrait-petit, .comite-cartes img, .comite-cartes .portrait-vide { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.portrait { width: 96px; height: 96px; }
.portrait-petit { width: 44px; height: 44px; }
.portrait-vide { display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--primaire) 18%, var(--surface)); color: var(--primaire-fonce); font-weight: 700; }
.portrait.portrait-vide { font-size: 1.8rem; }
.qui { display: inline-flex; align-items: center; gap: .6rem; }
td.ordre form { display: flex; gap: .25rem; }
.bouton-ordre { width: 40px; height: 40px; border: 1px solid var(--bordure); border-radius: 6px; background: var(--surface); color: var(--texte); font: inherit; cursor: pointer; }
.bouton-ordre:disabled { opacity: .35; cursor: default; }
@media (max-width: 480px) { .grille-fiche { grid-template-columns: 1fr; } }

/* Page publique « Le comité » : fonction, nom et photo. */
/* Au plus 4 colonnes sur les grands écrans, au moins 180 px par carte. */
.comite-cartes { list-style: none; padding: 0; display: grid; gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(max(min(180px, 100%), calc((100% - 3 * 1.25rem) / 4)), 1fr)); }
.comite-cartes li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding: 1rem; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); }
.comite-cartes img, .comite-cartes .portrait-vide { width: 120px; height: 120px; margin-bottom: .4rem; }
.comite-cartes .portrait-vide { font-size: 2rem; }
.icone { vertical-align: -3px; }
.lien-ecrire { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-top: .2rem;
    border-radius: 50%; color: var(--primaire); border: 1px solid var(--bordure); }
.lien-ecrire:hover, .lien-ecrire:focus-visible { background: var(--primaire); color: var(--surface); }
.logo-instructeur { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--bordure); }
.moniteur img { object-fit: contain; }

/* ---------- Statistiques (comité) */
.tuiles-stat { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 1rem 0; }
.tuile-stat { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: .9rem 1rem; box-shadow: var(--ombre); }
.tuile-stat strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--primaire); font-variant-numeric: tabular-nums; }
.tuile-stat span { color: var(--texte-doux); font-size: .92rem; }
.graphe { width: 100%; height: auto; display: block; }
.graphe .grille-graphe { stroke: var(--bordure); stroke-width: 1; }
.graphe .axe-zero { stroke: var(--texte-doux); stroke-width: 1; }
.graphe .axe { fill: var(--texte-doux); font-size: 12px; font-variant-numeric: tabular-nums; }
.graphe .valeur { fill: var(--texte); font-size: 12px; font-weight: 600; }
.graphe .zone-survol { fill: transparent; }
.graphe .marque:hover .zone-survol { fill: var(--bordure); opacity: .45; }
.barre-a, .barre-e { fill: var(--primaire); }
.barre-s { fill: var(--accent); }
.legende-graphe { color: var(--texte-doux); font-size: .92rem; margin: 0 0 .5rem; }
.pastille-serie { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; vertical-align: -1px; margin-left: .6rem; }
.pastille-serie:first-child { margin-left: 0; }
span.barre-e { background: var(--primaire); }
span.barre-s { background: var(--accent); }
.gestion-accueil { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .gestion-accueil { grid-template-columns: minmax(0, 1fr) 260px; } }
.encart-stats { background: var(--surface); border: 1px solid var(--bordure); border-top: 4px solid var(--primaire); border-radius: var(--rayon); padding: 1rem 1.1rem; box-shadow: var(--ombre); }
.encart-stats h2 { margin-top: 0; }
.encart-grand { margin: 0 0 .5rem; color: var(--texte-doux); }
.encart-grand strong { display: block; font-size: 2.4rem; line-height: 1; color: var(--primaire); font-variant-numeric: tabular-nums; }
.encart-lignes { margin: 0 0 .75rem; }
.encart-lignes div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--bordure); padding: .3rem 0; }
.encart-lignes dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-graphe { margin-bottom: .5rem; }

/* Dernier reportage sur l'accueil : photo à gauche, texte à droite (pas de photo étirée sur toute la largeur). */
@media (min-width: 700px) {
    .carte-reportage { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.25rem; align-items: start; }
    .carte-reportage .carte-image { margin-bottom: 0; }
}

/* Visionneuse des albums photo (wwwroot/js/visionneuse.js) */
.visionneuse { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 10 25 / 94%); color: #fff; }
.visionneuse::backdrop { background: rgb(0 10 25 / 80%); }
.visionneuse[open] { display: flex; flex-direction: column; }
.visionneuse-bandeau { position: sticky; top: 0; display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem; background: #00295c; }
.visionneuse-titre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visionneuse-compteur { font-variant-numeric: tabular-nums; opacity: .85; }
.visionneuse-fermer { font: inherit; color: #00295c; background: #fff; border: 0; border-radius: 6px; padding: .35rem .8rem; cursor: pointer; }
.visionneuse-scene { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .75rem; }
.visionneuse figure { margin: 0; height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; pointer-events: none; }
.visionneuse figure img { max-width: 100%; max-height: calc(100dvh - 8rem); object-fit: contain; border-radius: 4px; pointer-events: auto; }
.visionneuse figcaption { text-align: center; max-width: 60ch; }
.visionneuse-nav { font-size: 2.5rem; line-height: 1; width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: rgb(255 255 255 / 15%); color: #fff; cursor: pointer; }
.visionneuse-nav:hover, .visionneuse-nav:focus-visible { background: rgb(255 255 255 / 30%); }
@media (max-width: 600px) { .visionneuse-nav { position: absolute; bottom: 1rem; } .visionneuse-nav.precedente { left: 1rem; } .visionneuse-nav.suivante { right: 1rem; } }

/* Mailing : liste des membres à cocher, historique qui défile sur téléphone. */
.liste-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: .25rem .75rem; max-height: 22rem; overflow-y: auto; padding: .5rem; border: 1px solid var(--bordure); border-radius: var(--rayon); margin-top: .5rem; }
.defilement { overflow-x: auto; }
