/* ==========================================================================
   PhotoClubManager — feuille de style de base
   Tirée des maquettes (docs/maquettes/). Les noms de classes des composants
   récurrents sont ceux des planches : .chip .cat .seg .cell .rsvp .agenda
   .pill .dot .ev

   Les quatre couleurs d'accent sont posées sur <html> par le gabarit, depuis
   club.primary_color via AccentPalette. Aucune couleur de marque ici.
   ========================================================================== */

:root {
    /* Neutres — fixes quel que soit le club */
    --bg: #f7f8f5;
    --bg-mobile: #f3f4f1;
    --surface: #fff;
    --border: #e3e6df;
    --border-muted: #c9cdc4;
    --text: #1d221c;
    --text-2: #4d534b;
    --text-3: #808589;
    --warn: #b5651d;
    --warn-bg: #fff6e8;

    /* Couleurs de catégorie du calendrier (la catégorie « thème » prend --accent) */
    --cat-sppq: #1f4f6b;
    --cat-session: #808589;
    --cat-atelier: #b5651d;
    --cat-revue: #4a6f2f;

    /* Formes */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 17px;

    /* Typographie */
    --font-title: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

    /* Mouvement — court, jamais spectaculaire */
    --t: 160ms ease;

    /* Repli si le gabarit n'a pas posé les couleurs du club */
    --accent: #2E8B06;
    --accent-dark: #4A7A3C;
    --accent-light: #8FC17E;
    --accent-tint: #eaf5e4;
}

/* --------------------------------------------------------------------------
   Remise à zéro minimale
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.45;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-title); margin: 0; line-height: 1.25; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-dark); text-decoration: underline; }

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

/* Tout ce qui reçoit le clavier reste visible au focus. */
:focus-visible {
    outline: 2px solid var(--accent-dark);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Alpine.js : rien ne clignote avant l'initialisation. */
[x-cloak] { display: none !important; }

.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;
}

/* --------------------------------------------------------------------------
   Structure de page
   -------------------------------------------------------------------------- */

.page { min-height: 100vh; display: flex; flex-direction: column; }

.entete {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 18px 40px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.entete-marque { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* Le logo du club (décision 133) : rond, à côté du nom dans l'en-tête, plus grand sur les pages de connexion. */
.entete-logo { height: 40px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.marque-logo { height: 84px; width: auto; max-width: 240px; object-fit: contain; display: block; }

/* Vue administration : un liséré accentué et une étiquette à côté du nom (décision 99). */
.entete-admin { border-top: 4px solid var(--accent); background: #fbfcf9; }
.entete-mode {
    font-family: var(--font-title); font-weight: 800; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent); background: var(--accent-tint); border-radius: var(--r-pill); padding: 4px 10px; flex: none;
}
/* Le bouton qui passe d'une vue à l'autre. */
.nav a.entete-bascule {
    min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); display: inline-flex; align-items: center;
    border: 1px solid var(--accent); color: var(--accent); background: var(--surface); font-weight: 700;
    transition: background var(--t), color var(--t);
}
.nav a.entete-bascule:hover { background: var(--accent); color: #fff; }
.entete-admin .nav a.entete-bascule { border-color: var(--border-muted); color: var(--text-2); }
.entete-admin .nav a.entete-bascule:hover { background: var(--text-2); border-color: var(--text-2); color: #fff; }

.entete-nom {
    font-family: var(--font-title); font-weight: 800; font-size: 17px;
    color: var(--accent-dark);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.nav { display: flex; gap: 28px; align-items: center; font-weight: 600; font-size: 15px; }

.nav a {
    color: var(--text-3); text-decoration: none;
    padding-bottom: 4px; border-bottom: 2px solid transparent;
    transition: color var(--t), border-color var(--t);
}
.nav a:hover { color: var(--text-2); text-decoration: none; }
.nav a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Bouton « Menu » (trois barres), visible seulement sous 900 px. */
.entete-burger {
    display: none; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border);
    transition: background var(--t), border-color var(--t);
}
.entete-burger:hover, .entete-burger.ouvert { background: var(--bg); border-color: var(--accent-light); }
.entete-burger span, .entete-burger span::before, .entete-burger span::after {
    display: block; width: 18px; height: 2px; border-radius: 1px; background: var(--text); content: "";
    position: relative; transition: transform var(--t), opacity var(--t);
}
.entete-burger span::before { position: absolute; top: -6px; left: 0; }
.entete-burger span::after { position: absolute; top: 6px; left: 0; }
.entete-burger.ouvert span { background: transparent; }
.entete-burger.ouvert span::before { transform: translateY(6px) rotate(45deg); }
.entete-burger.ouvert span::after { transform: translateY(-6px) rotate(-45deg); }

.avatar {
    width: 34px; height: 34px; border-radius: var(--r-pill); flex: none;
    background: var(--accent-light); color: var(--text);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-title); font-weight: 800; font-size: 13px;
}

.contenu { flex: 1; padding: 28px 40px; }

.colonnes {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px; align-items: start;
}
.colonnes > .principal { grid-column: span 2; display: flex; flex-direction: column; gap: 16px; }
.colonnes > .lateral { display: flex; flex-direction: column; gap: 18px; }

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

.carte {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px 20px;
    display: flex; flex-direction: column; gap: 10px;
}

.carte-accent {
    background: var(--accent); color: #fff; border: none;
    border-radius: var(--r-lg); padding: 18px 20px;
    display: flex; flex-direction: column; gap: 8px;
}
.carte-accent .sur-titre {
    font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; opacity: 0.85;
}
.carte-accent .separateur { height: 1px; background: rgba(255,255,255,0.25); margin: 6px 0; }

.carte-titre { font-family: var(--font-title); font-weight: 700; font-size: 15px; }

.vide {
    padding: 30px; text-align: center; color: var(--text-3); font-size: 14px;
    border: 1px dashed var(--border-muted); border-radius: 14px;
}

/* --------------------------------------------------------------------------
   Composants récurrents des maquettes
   -------------------------------------------------------------------------- */

/* .chip — filtre de période */
.chip {
    height: 34px; padding: 0 14px; border-radius: var(--r-pill);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-title); font-weight: 700; font-size: 13px;
    color: var(--accent-dark); background: transparent;
    border: 1px solid transparent; cursor: pointer;
    transition: background var(--t), color var(--t);
}
.chip:hover { background: var(--accent-tint); }
.chip.on { background: var(--accent); color: #fff; }
.chip.on:hover { background: var(--accent-dark); }

/* .cat — filtre de catégorie avec pastille de couleur */
.cat {
    height: 30px; padding: 0 12px; border-radius: var(--r-sm);
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 600; font-size: 13px; cursor: pointer;
    color: var(--text-2); background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color var(--t), color var(--t), background var(--t);
}
.cat:hover { border-color: var(--border-muted); }
.cat.on { border-color: var(--accent-dark); color: var(--accent-dark); background: var(--accent-tint); }
.cat .compte { color: var(--text-3); font-weight: 600; }
.cat.on .compte { color: var(--accent-dark); }

/* .dot — pastille de catégorie */
.dot { width: 8px; height: 8px; border-radius: 4px; flex: none; }

/* .seg — bascule Liste / Mois */
.seg { display: inline-flex; background: var(--border); border-radius: 10px; padding: 3px; }
.seg button {
    padding: 6px 14px; border-radius: var(--r-sm); border: none; background: transparent;
    font-family: var(--font-title); font-weight: 700; font-size: 13px;
    color: var(--text-2); cursor: pointer;
    transition: background var(--t), color var(--t);
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* .cell — case du mois */
.cell {
    min-height: 96px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-sm);
    padding: 6px; display: flex; flex-direction: column; gap: 4px;
}
.cell.out { background: transparent; border-color: transparent; }
.cell .d { font-size: 12px; font-weight: 700; color: var(--text-3); }
.cell.today .d {
    color: #fff; background: var(--accent); border-radius: 10px;
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
}

/* .ev — événement dans une case du mois */
.ev {
    font-size: 11px; font-weight: 700; padding: 3px 6px; border-radius: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}

/* .agenda — bouton d'abonnement à la saison (F55) */
.agenda {
    min-height: 36px; padding: 0 10px; border-radius: var(--r-sm);
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-title); font-weight: 700; font-size: 13px;
    color: var(--accent-dark); background: var(--accent-tint);
    border: 1px solid var(--accent-light); cursor: pointer;
    white-space: nowrap; text-align: left;
    transition: background var(--t), border-color var(--t);
}
.agenda:hover { background: #fff; border-color: var(--accent-dark); text-decoration: none; }

/* .rsvp — « Je participe » (F56b) */
.rsvp {
    height: 32px; padding: 0 12px; border-radius: var(--r-sm);
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-title); font-weight: 700; font-size: 13px;
    color: var(--accent); background: var(--surface);
    border: 1px solid var(--accent-light); cursor: pointer;
    transition: background var(--t), color var(--t), border-color var(--t);
}
.rsvp:hover { background: var(--accent-tint); }
.rsvp.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rsvp.on:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.rsvp.full { color: var(--text-3); border-color: var(--border-muted); background: var(--surface); }
.rsvp.full:hover { background: var(--accent-tint); color: var(--accent-dark); border-color: var(--accent-light); }

/* .pill — étiquette de statut */
.pill {
    font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 6px;
    white-space: nowrap; display: inline-block;
    background: #eef0ea; color: var(--text-3);
}
.pill.ouvert { background: var(--accent); color: #fff; }
.pill.vote { background: var(--accent-dark); color: #fff; }
.pill.avenir { background: var(--accent-tint); color: var(--accent-dark); }
.pill.termine { background: #f1f1ee; color: var(--text-3); }
.pill.attention { background: var(--warn-bg); color: var(--warn); }

/* --------------------------------------------------------------------------
   Ligne du calendrier en vue liste
   -------------------------------------------------------------------------- */

.ligne-calendrier {
    display: flex; gap: 16px; align-items: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 14px 18px;
    transition: border-color var(--t), box-shadow var(--t);
}
.ligne-calendrier:hover { border-color: var(--border-muted); box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
/* Toute la carte se déplie d'un clic quand elle a quelque chose à montrer (décision 129). */
.ligne-calendrier.ouvrable { cursor: pointer; }
.ligne-calendrier.ouvrable:hover { background: #fbfcfa; }
/* Dépliée, la carte peut être haute (une sortie avec ses consignes) : la date et les boutons restent en haut. */
.ligne-calendrier.deplie { align-items: flex-start; }
.ligne-calendrier.deplie > .date-boite, .ligne-calendrier.deplie .calendrier-actions > * { margin-top: 2px; }
/* Les boutons et l'étiquette en fin de ligne : transparents sur bureau, une ligne à part au cellulaire. */
.calendrier-actions { display: contents; }

.calendrier-texte { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.date-boite {
    width: 54px; flex: none; padding: 8px 0; border-radius: 10px;
    display: flex; flex-direction: column; align-items: center;
}
.date-boite .jour { font-family: var(--font-title); font-weight: 800; font-size: 20px; line-height: 1; }
.date-boite .mois { font-size: 11px; font-weight: 600; text-transform: uppercase; }

.date-avenir { background: var(--accent-tint); color: var(--accent-dark); }
.date-passe  { background: #f1f1ee; color: var(--text-3); }
/* Décision 113 : un événement, c'est un aplat ; une échéance d'appel, un contour, avec le mot dessous. */
.date-evenement { background: var(--accent); color: #fff; }
.date-echeance { background: var(--surface); border: 2px solid var(--accent); color: var(--accent-dark); padding: 6px 0; }
.date-echeance.passe { border-color: var(--border-muted); color: var(--text-3); }
.date-boite .genre { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; max-width: 100%; padding: 0 2px; overflow: hidden; white-space: nowrap; }
.date-boite .genre.long { font-size: 7.5px; letter-spacing: 0; }
.ev.echeance { background: var(--surface); border: 1.5px solid var(--accent); }
.grille-mois { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.grille-mois > div { min-width: 0; }
@media (max-width: 600px) {
    .grille-mois { gap: 3px; }
    .cell { min-height: 64px; padding: 4px; gap: 3px; border-radius: 6px; }
    .ev { font-size: 10px; padding: 2px 4px; border-radius: 4px; }
}

@media (max-width: 600px) {
    /* Au cellulaire : la date et le texte sur la première ligne, les boutons et l'étiquette
       en dessous, alignés sous le texte. */
    .ligne-calendrier { flex-wrap: wrap; gap: 10px 12px; }
    .ligne-calendrier > .calendrier-texte { flex: 1 1 calc(100% - 70px); }
    .calendrier-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; flex: 1 1 100%; margin-left: 66px; }
}

/* --------------------------------------------------------------------------
   Boutons et contrôles de formulaire
   -------------------------------------------------------------------------- */

.bouton {
    min-height: 44px; padding: 0 20px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-title); font-weight: 700; font-size: 15px;
    background: var(--accent); color: #fff; border: 1px solid var(--accent);
    cursor: pointer; transition: background var(--t), border-color var(--t), transform var(--t);
}
.bouton:hover { background: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; color: #fff; }
.bouton:active { transform: translateY(1px); }
.bouton[disabled], .bouton.desactive {
    background: var(--border); border-color: var(--border);
    color: var(--text-3); cursor: not-allowed; transform: none;
}

.bouton-secondaire {
    min-height: 40px; padding: 0 16px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-title); font-weight: 700; font-size: 14px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border-muted);
    cursor: pointer; transition: border-color var(--t), background var(--t);
}
.bouton-secondaire:hover { border-color: var(--text-2); background: #fbfcfa; text-decoration: none; color: var(--text); }

.champ {
    display: flex; flex-direction: column; gap: 6px;
}
.champ > label { font-weight: 600; font-size: 14px; color: var(--text-2); }

input[type="text"], input[type="email"], input[type="search"], input[type="url"], input[type="tel"],
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="number"],
select, textarea {
    min-height: 44px; padding: 10px 12px;
    font-family: var(--font-body); font-size: 15px; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-muted);
    border-radius: var(--r-sm); width: 100%;
    transition: border-color var(--t), box-shadow var(--t);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
/* Un champ verrouillé (ex. : la revue qui suit son appel) se voit : fond grisé, curseur interdit. */
input:disabled, select:disabled, textarea:disabled { background: #f1f1ee; color: var(--text-3); cursor: not-allowed; }

/* Dates et heures : les sélecteurs natifs (bons au cellulaire), habillés comme le reste. */
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
    -webkit-appearance: none; appearance: none; color-scheme: light;
    font-variant-numeric: tabular-nums; line-height: 1.3;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    width: 20px; height: 20px; padding: 2px; margin-left: 6px; border-radius: 6px; cursor: pointer; opacity: 0.85;
    background-color: var(--accent-tint); transition: background var(--t), opacity var(--t);
}
input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="time"]:hover::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator { opacity: 1; background-color: var(--accent-light); }
input::-webkit-datetime-edit { padding: 0; }
input::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input::-webkit-datetime-edit-text { color: var(--text-3); padding: 0 2px; }
input:invalid::-webkit-datetime-edit, input[value=""]::-webkit-datetime-edit { color: var(--text-3); }

input:hover, select:hover, textarea:hover { border-color: var(--text-3); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-tint);
}

.aide { font-size: 13px; color: var(--text-3); }

/* Infobulle « i » : une explication au survol, au clavier (Tab) ou au toucher (décision 102). */
.infobulle {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
    width: 16px; height: 16px; margin-left: 2px; border-radius: 8px; border: 0; cursor: help; position: relative;
    background: var(--accent-tint); color: var(--accent);
    font-family: var(--font-title); font-weight: 800; font-size: 11px; font-style: normal; line-height: 1;
}
.infobulle:hover, .infobulle:focus { background: var(--accent); color: #fff; outline: none; }
/* La bulle est en position fixe — elle n'est coupée ni par une section repliable (overflow: hidden)
   ni par un bord de la fenêtre : app.js la place au survol ou au focus (--tip-x, --tip-y). */
.infobulle::after {
    content: attr(data-tip); position: fixed; left: var(--tip-x, -9999px); top: var(--tip-y, -9999px);
    box-sizing: border-box; width: max-content; max-width: min(280px, calc(100vw - 24px));
    padding: 8px 10px; border-radius: 8px; z-index: 40;
    background: #23271f; color: #fff; font: 400 12.5px/1.45 var(--font-body); text-align: left; white-space: normal;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); opacity: 0; pointer-events: none; transition: opacity var(--t);
}
.infobulle:hover::after, .infobulle:focus::after { opacity: 1; }

/* Calendrier : un titre d'événement cliquable quand il a des détails */
/* Décision 121 : les concours ressortent d'une étoile dorée devant le titre. */
.calendrier-titre .etoile { color: #d9a400; margin-right: 5px; font-size: 15px; }
.calendrier-titre {
    display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; text-align: left;
    font-family: var(--font-title); font-weight: 700; font-size: 17px; color: inherit; cursor: default;
}
.calendrier-titre.ouvrable { cursor: pointer; }
.calendrier-titre.ouvrable:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.calendrier-titre .chevron {
    width: 8px; height: 8px; margin-bottom: 3px; flex: none;
    border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
    transform: rotate(45deg); transition: transform var(--t);
}
.calendrier-titre[aria-expanded="true"] .chevron { transform: rotate(-135deg); margin-bottom: -3px; }
.calendrier-details {
    margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--bg);
    font-size: 14px; line-height: 1.5; color: var(--text-2); display: flex; flex-direction: column; gap: 6px;
}
.calendrier-details a { word-break: break-all; }
.depot-instructions { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-muted); font-weight: 400; }
.depot-instructions p { margin: 0 0 6px; }
.depot-instructions p:last-child { margin-bottom: 0; }
.erreur { font-size: 13px; color: #a32020; font-weight: 600; }

/* --------------------------------------------------------------------------
   Tableaux (membres, présences)
   -------------------------------------------------------------------------- */

.tableau { width: 100%; border-collapse: collapse; background: var(--surface); }
.tableau th {
    text-align: left; font-family: var(--font-title); font-weight: 700;
    font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--text-3); padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.tableau td { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.tableau tr:last-child td { border-bottom: none; }
/* x-show d'Alpine retire la propriété « display » en ligne quand il montre l'élément : un
   « display: flex » écrit dans l'attribut style est perdu. La classe survit (campagne de tests, BUG-34). */
.d-flex { display: flex; }

.cadre-tableau {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden;
}

/* --------------------------------------------------------------------------
   Membres et cotisations — planche Membres
   -------------------------------------------------------------------------- */

.membres-entete {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}

.membres-filtres {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px;
}
.membres-portee { margin-left: auto; }
.membres-recherche {
    min-height: 34px; padding: 4px 12px; font-size: 13px; width: 220px;
    border-radius: var(--r-pill);
}

/* Chips à bordure, comme la planche Membres (fond blanc, bordure grise) */
.chip.chip-bordee { border-color: var(--border-muted); background: var(--surface); color: var(--text); }
.chip.chip-bordee:hover { background: var(--accent-tint); }
.chip.chip-bordee.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Bascule « Voir la page en tant que » */
.who { display: flex; border: 1px solid var(--border-muted); border-radius: var(--r-sm); overflow: hidden; }
.who a {
    padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--text-3);
    background: var(--surface); font-family: var(--font-title); text-decoration: none;
    transition: background var(--t), color var(--t);
}
.who a:hover { color: var(--text); text-decoration: none; }
.who a.on { background: var(--text); color: #fff; }

.btn-court { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-mini { min-height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-lien { font-size: 13px; white-space: nowrap; }

/* La grille du tableau : 7 colonnes, comme la planche (plus une pour les actions) */
/* La colonne des actions a une largeur fixe : chaque ligne est sa propre grille, et un lien de plus
   (« Envoyer l'accès administrateur », qui apparaît avec un rôle) décalait toutes les colonnes de la ligne. */
.membres-ligne {
    display: grid;
    grid-template-columns: 1.7fr 1.9fr 0.9fr 1.4fr 1.5fr 1.5fr 240px;
    gap: 12px; padding: 11px 16px; align-items: center;
    border-bottom: 1px solid #eeefe9; font-size: 14px;
    transition: background var(--t);
}
.membres-ligne:last-child { border-bottom: none; }
.membres-ligne:not(.membres-entete-colonnes):hover { background: #fbfcfa; }
.membres-ligne.inactif { opacity: 0.55; }
.membres-ligne.inactif:hover { opacity: 0.8; }
.membres-entete-colonnes { border-bottom: 1px solid var(--border); padding: 10px 16px; }
.membres-entete-colonnes:hover { background: transparent; }

.th {
    font-family: var(--font-title); font-size: 12px; font-weight: 700;
    color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em;
}

.membres-nom { font-weight: 700; }
.membres-courriel { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.membres-roles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.membres-actions { display: flex; gap: 2px 12px; justify-content: flex-end; flex-wrap: wrap; white-space: nowrap; }

.membres-ajout {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 12px; align-items: end;
}

.membres-paiement {
    background: var(--accent-tint); border-top: 1px solid var(--accent-light);
    border-bottom: 1px solid #eeefe9; padding: 14px 16px;
}
.membres-paiement-form {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end;
}
.membres-paiement-form input, .membres-paiement-form select { min-height: 40px; }
.membres-paiement-boutons {
    grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

.membres-cartes {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px;
}

.carte-lien { text-decoration: none; color: inherit; transition: border-color var(--t), box-shadow var(--t); }
.carte-lien:hover { border-color: var(--accent-light); box-shadow: 0 1px 4px rgba(0,0,0,0.05); text-decoration: none; color: inherit; }

/* Espace de stockage du club : une jauge, verte puis ambre à 90 %, rouge quand c'est plein. */
.stockage-barre { height: 8px; border-radius: 4px; background: #eef0ea; position: relative; overflow: hidden; }
.stockage-barre > div, .stockage-barre > span { position: absolute; left: 0; top: 0; bottom: 0; background: #2f8f4e; border-radius: 4px; transition: width var(--t); }
.stockage-barre.attention > div, .stockage-barre.attention > span { background: #d18a12; }
.stockage-barre.plein > div, .stockage-barre.plein > span { background: #c0392b; }
span.stockage-barre { display: block; }
.stockage-etat { font-size: 13px; font-weight: 700; }
.stockage-etat.attention { color: #a86a00; }
.stockage-etat.plein { color: #c0392b; }

/* Tarifs */
.tarif-ligne {
    display: grid; grid-template-columns: 2fr 1fr auto; gap: 12px; padding: 12px 16px;
    align-items: center; border-bottom: 1px solid #eeefe9; font-size: 14px;
}
.tarif-ligne:last-child { border-bottom: none; }
.tarif-ligne.inactif { opacity: 0.55; }
.tarif-entete { border-bottom: 1px solid var(--border); padding: 10px 16px; }
.tarif-ajout { display: grid; grid-template-columns: 2fr 1fr auto; gap: 12px; align-items: end; }

@media (max-width: 900px) {
    .membres-portee { margin-left: 0; width: 100%; }
    .membres-recherche { width: 100%; }

    /* Chaque ligne devient une carte : nom en gros, le reste en dessous. */
    .membres-ligne {
        grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px;
    }
    .membres-entete-colonnes { display: none; }
    .membres-nom { font-size: 16px; }
    .membres-courriel { grid-column: 1 / -1; white-space: normal; }
    .membres-col5, .membres-roles { grid-column: 1 / -1; }
    .membres-actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 4px; flex-wrap: wrap; white-space: normal; gap: 2px 16px; }
    .membres-actions .btn-lien { min-height: 44px; }

    .membres-ajout, .membres-paiement-form { grid-template-columns: 1fr 1fr; }
    .membres-cartes { grid-template-columns: 1fr; }
    .tarif-ajout { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Écrans étroits et centrés (connexion, confirmations)
   -------------------------------------------------------------------------- */

.ecran-etroit {
    max-width: 420px; margin: 0 auto; width: 100%;
    display: flex; flex-direction: column; gap: 20px;
    padding-top: 64px; padding-bottom: 32px; min-height: 100vh;
}

.marque-centree {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}

.bandeau-info, .bandeau-avertissement {
    padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.45;
}
.bandeau-info { background: var(--accent-tint); border: 1px solid var(--accent-light); color: var(--accent-dark); }
.bandeau-avertissement { background: var(--warn-bg); border: 1px solid var(--warn); color: var(--warn); }

.lien-discret {
    background: none; border: none; padding: 0;
    font-family: var(--font-body); font-weight: 600; font-size: 15px;
    color: var(--text-3); cursor: pointer; transition: color var(--t);
}
.lien-discret:hover { color: var(--text-2); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Message discret — retour d’une écriture en arrière-plan
   -------------------------------------------------------------------------- */

.pcm-message {
    position: fixed; left: 50%; bottom: 24px; z-index: 50;
    transform: translate(-50%, 12px);
    max-width: min(440px, calc(100vw - 40px));
    padding: 12px 18px; border-radius: 10px;
    background: var(--text); color: #fff;
    font-family: var(--font-title); font-weight: 600; font-size: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    opacity: 0; pointer-events: none;
    transition: opacity var(--t), transform var(--t);
}
.pcm-message.visible { opacity: 1; transform: translate(-50%, 0); }
.pcm-message.erreur { background: #8c2020; }

/* --------------------------------------------------------------------------
   Cellulaire — toutes les pages restent utilisables, sans exception
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    body { background: var(--bg-mobile); }

    .entete { padding: 14px 20px; }
    .contenu { padding: 20px; }

    .colonnes { grid-template-columns: 1fr; gap: 18px; }
    .colonnes > .principal { grid-column: auto; }

    /* Menu replié : un bouton dans l'en-tête, la navigation en panneau sous lui. */
    .entete { position: relative; }
    .entete-burger { display: inline-flex; }
    .nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
        flex-direction: column; align-items: stretch; gap: 0; padding: 6px 12px 12px;
        background: var(--surface); border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); font-size: 16px;
    }
    .nav.ouvert { display: flex; }
    .nav a {
        display: flex; align-items: center; min-height: 48px; padding: 0 10px;
        border-bottom: 1px solid var(--border); border-radius: 0;
    }
    .nav a:last-of-type { border-bottom-color: var(--border); }
    .nav a.on { color: var(--accent); border-bottom-color: var(--border); background: var(--accent-tint); border-radius: 8px; }
    .nav form { padding: 12px 10px 0; }
    .nav form .lien-discret { min-height: 44px; display: inline-flex; align-items: center; }
    .nav .avatar { display: none; }
    .nav a.entete-bascule { margin: 8px 0 6px; justify-content: center; min-height: 48px; border-radius: 10px; border-bottom-color: var(--accent); }
    .entete-admin .nav a.entete-bascule { border-bottom-color: var(--border-muted); }
    .entete-mode { display: none; }
    .entete-admin { border-top-width: 3px; }

    h1 { font-size: 22px; }

    /* Zones tactiles d'au moins 44 px sur les contrôles principaux. */
    .chip, .cat, .rsvp, .seg button { min-height: 44px; }
    .carte { border-radius: var(--r-md); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Pastille de date des échéances d'appel (F52) : dépôt ouvert en aplat, vote en foncé */


/* --------------------------------------------------------------------------
   Appels — planche Appels : liste à gauche, panneau de création à droite
   -------------------------------------------------------------------------- */

.appels-colonnes {
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 28px; align-items: start;
}
.appels-panneau { display: flex; flex-direction: column; gap: 14px; }

.appel-ligne {
    display: grid; grid-template-columns: 2.4fr 1fr 1.6fr 1.2fr 1.2fr;
    gap: 12px; padding: 12px 16px; align-items: center;
    border-bottom: 1px solid #eeefe9;
    transition: background var(--t);
}
.appel-ligne:last-child { border-bottom: none; }
.appel-ligne:not(.appel-entete-colonnes):hover { background: #fbfcfa; }
.appel-ligne.choisi { background: var(--accent-tint); }
.appel-entete-colonnes { border-bottom: 1px solid var(--border); padding: 10px 16px; }
.appel-entete-colonnes:hover { background: transparent; }
.appel-nom { font-family: var(--font-title); font-weight: 700; font-size: 16px; }
.appel-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
/* Sur grand écran, les repères (dates, participation, statut) sont des cellules de la grille ;
   les actions vont sous le nom, en seconde rangée. Au cellulaire, tout se réordonne (plus bas). */
.appel-meta { display: contents; }
/* Le nom est placé explicitement : sans cela, quand la rangée d'actions est masquée (rôle
   Lecture), le placement automatique l'envoyait dans la dernière colonne (campagne de tests, BUG-29). */
.appel-ligne > .appel-tete, .evt-ligne > .appel-tete { grid-column: 1; grid-row: 1; }
.appel-ligne > .appel-type, .appel-ligne > .appel-meta > div, .evt-ligne > .appel-meta > div { grid-row: 1 / span 2; }
.appel-ligne > .appel-actions, .evt-ligne > .appel-actions { grid-column: 1; grid-row: 2; margin-top: 0; }

/* Résultats bruts d'un vote (écran Vote de l'éditeur) : rang, vignette, titre, auteur, note. */
.resultat-ligne { grid-template-columns: 44px 72px 1fr 1fr auto; align-items: center; }
.resultat-rang { font-family: var(--font-title); font-weight: 800; }
.resultat-auteur { font-size: 14px; }
.resultat-note { font-family: var(--font-title); font-weight: 800; text-align: right; white-space: nowrap; }

.pill.sppq { background: #e6eef4; color: var(--cat-sppq); }
.pill.interne { background: #eef0ea; color: var(--accent-dark); }
.pill-bouton { border: 1px solid transparent; cursor: pointer; font-family: var(--font-title); transition: background var(--t), color var(--t); }
.pill-bouton:hover { background: var(--accent-tint); color: var(--accent-dark); }
.pill-bouton.ouvert:hover { background: var(--accent-dark); color: #fff; }

/* La page d'un appel (décision 132) : en-tête commun, boutons qui suivent l'état, onglets. */
.appel-entete { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.appel-retour { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent-dark); text-decoration: none; }
.appel-retour:hover { text-decoration: underline; text-underline-offset: 3px; }
.appel-entete-ligne { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.appel-entete-faits { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.appel-entete-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.appel-entete-actions .bouton, .appel-entete-actions .bouton-secondaire { text-decoration: none; }
.menu-porteur { position: relative; }
/* Photos déposées : filtres à gauche, « Télécharger ▾ » à droite (décision 137). */
.depots-outils { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
/* Une photo écartée dans « Mes photos » (décision 139) : présente, mais visiblement hors jeu. */
.depot-ecartee { border-style: dashed; background: #fbfbf8; }
.menu-deroulant {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10); display: flex; flex-direction: column; gap: 2px;
}
/* Accroché à gauche du bouton quand il n'y a pas de place à gauche (cellulaire) — posé par pcm.caserMenu. */
.menu-deroulant.vers-droite { left: 0; right: auto; }
.menu-deroulant > button, .menu-deroulant > a {
    display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 7px; background: none;
    font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-decoration: none; transition: background var(--t);
}
.menu-deroulant > button:hover, .menu-deroulant > a:hover { background: var(--accent-tint); color: var(--accent-dark); }
.onglets { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--border); margin-top: 6px; }
/* En <a> quand l'onglet change d'écran, en <button> quand il filtre la liste à l'écran. */
.onglets > a, .onglets > button {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; margin-bottom: -2px; white-space: nowrap;
    font-family: var(--font-title); font-weight: 700; font-size: 14px; color: var(--text-2); text-decoration: none;
    border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer;
    transition: color var(--t), border-color var(--t);
}
.onglets > a:hover, .onglets > button:hover { color: var(--text); text-decoration: none; }
.onglets > a.on, .onglets > button.on { color: var(--accent-dark); border-bottom-color: var(--accent); }
.onglets > a.inactif { color: var(--text-3); cursor: not-allowed; opacity: 0.7; }
.appel-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.appel-page .appels-panneau { max-width: 820px; }
/* La liste : chaque ligne mène à la page de l'appel. */
a.appel-ligne-lien { color: inherit; text-decoration: none; cursor: pointer; }
a.appel-ligne-lien:hover { text-decoration: none; }
a.appel-ligne-lien:hover .appel-nom { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

.appel-formulaire { display: flex; flex-direction: column; gap: 12px; }
/* Le formulaire d'appel par sections repliables (décision 101) */
.appel-sections-outils { display: flex; gap: 8px; align-items: center; justify-content: flex-end; font-size: 13px; color: var(--text-3); }
.appel-section { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.appel-section-entete {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px;
    background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
    transition: background var(--t);
}
.appel-section-entete:hover { background: var(--bg); }
.appel-section .numero {
    width: 26px; height: 26px; border-radius: 13px; flex: none; display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-tint); color: var(--accent); font-family: var(--font-title); font-weight: 800; font-size: 13px;
    transition: background var(--t), color var(--t);
}
.appel-section.ouvert .numero { background: var(--accent); color: #fff; }
.appel-section .titre { font-family: var(--font-title); font-weight: 800; font-size: 15px; flex: none; }
.appel-section .resume { flex: 1; min-width: 0; font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appel-section.ouvert .resume { opacity: 0; }
.appel-section .chevron {
    width: 9px; height: 9px; flex: none; margin: 0 6px 4px 0;
    border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
    transform: rotate(45deg); transition: transform var(--t);
}
.appel-section.ouvert .chevron { transform: rotate(-135deg); margin-bottom: -4px; }
.appel-section-corps { display: flex; flex-direction: column; gap: 14px; padding: 6px 14px 16px; border-top: 1px solid var(--border); }
.champ-appel { display: flex; flex-direction: column; gap: 6px; }
.lbl { font-weight: 700; font-size: 13px; font-family: var(--font-title); }
.appel-formulaire input[type="text"], .appel-formulaire input[type="number"],
.appel-formulaire input[type="datetime-local"], .appel-formulaire select { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.appel-grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.appel-grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.appel-criteres { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 8px; align-items: center; }
/* Exigences d'image : les champs à gauche, « en clair » à droite (décision 104) */
.appel-image { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); gap: 16px; align-items: start; }
.appel-image-apercu { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--bg); }
.appel-image-dessin { width: 100%; max-height: 180px; overflow: visible; }
.appel-image-dessin .boite { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.appel-image-dessin .paysage { fill: rgba(46, 139, 6, 0.18); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.appel-image-dessin .portrait { fill: rgba(37, 99, 168, 0.16); stroke: #2563a8; stroke-width: 2; vector-effect: non-scaling-stroke; }
.appel-image-lignes { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.4; }
.appel-image-lignes .pill { margin-right: 6px; }
.appel-image-lignes .pill.paysage { background: var(--accent-tint); color: var(--accent-dark); }
.appel-image-lignes .pill.portrait { background: #e3ecf7; color: #1d4f8a; }
@media (max-width: 900px) {
    .appel-image { grid-template-columns: minmax(0, 1fr); }
}
/* L'en-tête du calendrier public (décision 106) : la marque à gauche, « Se connecter » à droite, pas de menu */
.entete-publique { display: flex; align-items: center; gap: 12px; }
/* Ouvert à l'externe (décision 106) : au calendrier et sur la feuille de présences */
.calendrier-externe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.presences-externe { border-top: 1px solid #eeefe9; }
.presences-externe.refusee { opacity: 0.6; }
.appel-juges { display: flex; flex-wrap: wrap; gap: 8px; }
.appel-juge {
    display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 12px;
    border: 1px solid var(--border-muted); border-radius: var(--r-sm); background: var(--surface);
    font-size: 14px; cursor: pointer; transition: border-color var(--t), background var(--t);
}
.appel-juge:hover { border-color: var(--text-3); }
.appel-juge.on { border-color: var(--accent); background: var(--accent-tint); }
.appel-juge input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.externes-ligne {
    display: grid; grid-template-columns: 1.7fr 2fr 1.8fr auto; gap: 12px; padding: 11px 16px; align-items: center;
    border-bottom: 1px solid #eeefe9; font-size: 14px;
}
.externes-ligne:last-child { border-bottom: none; }
.externes-ligne.inactif { opacity: 0.55; }
@media (max-width: 700px) {
    .externes-ligne { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .externes-ligne.membres-entete-colonnes { display: none; }
}
.appel-bascules { display: flex; flex-direction: column; gap: 8px; }
.appel-bascules > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }

/* Bascule à bordure (oui / non), comme dans la planche */
.seg.seg-bordee { background: var(--surface); border: 1px solid var(--border-muted); padding: 0; border-radius: var(--r-sm); overflow: hidden; max-width: 100%; flex-wrap: wrap; }
/* Dans un champ (colonne), le segment prend la largeur de ses boutons, pas celle de la colonne ;
   dans une ligne de bascule, il reste collé à droite même quand la ligne se replie au cellulaire. */
.champ-appel > .seg { align-self: flex-start; }
.appel-bascules > div > .seg { margin-left: auto; flex: none; }
.seg.seg-bordee button { border-radius: 0; padding: 7px 12px; color: var(--text-3); }
.seg.seg-bordee button.on { background: var(--accent); color: #fff; box-shadow: none; }

/* Options radio de la notation */
.opt {
    display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; margin-top: 6px;
    border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; font-size: 13px;
    transition: border-color var(--t), background var(--t);
}
.opt:hover { border-color: var(--border-muted); }
.opt.on { border-color: var(--accent); background: var(--accent-tint); }
.radio { width: 16px; height: 16px; border-radius: 8px; border: 2px solid var(--border-muted); flex-shrink: 0; margin-top: 2px; transition: background var(--t), border-color var(--t); }
.opt.on .radio { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }

/* max-width : au cellulaire, un choix long (« Journée de la culture : bénévoles au parc… · 27 sept. · 9 h »)
   ne doit pas élargir la page — Safari donne au select la largeur de sa plus longue option. */
.select-discret { min-height: 30px; padding: 2px 8px; font-size: 13px; width: auto; max-width: 100%; border-radius: var(--r-sm); }

@media (max-width: 1100px) {
    .appels-colonnes { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    /* Au cellulaire : le nom et l'étiquette de type sur la première ligne, une ligne de repères
       (dates · participation · statut), puis les actions, serrées mais tapables. */
    .appel-ligne, .evt-ligne { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; }
    .appel-entete-colonnes, .evt-ligne.appel-entete-colonnes { display: none; }
    .appel-ligne > .appel-tete, .evt-ligne > .appel-tete { grid-column: 1; grid-row: 1; }
    .appel-ligne > .appel-type { grid-column: 2; grid-row: 1; align-self: start; }
    .appel-ligne > .appel-meta, .evt-ligne > .appel-meta {
        display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
        grid-column: 1 / -1; grid-row: 2; font-size: 13px;
    }
    .appel-ligne > .appel-meta > div, .evt-ligne > .appel-meta > div { grid-row: auto; }
    .appel-ligne > .appel-actions, .evt-ligne > .appel-actions {
        grid-column: 1 / -1; grid-row: 3; gap: 0 18px; margin-top: 2px;
        padding-top: 6px; border-top: 1px dashed var(--border);
    }
    /* Boutons et liens (« Affiche (PNG) ») sur la même ligne de base : un lien n'a pas de
       hauteur minimale par lui-même (campagne de tests, BUG-31). */
    .appel-actions .btn-lien { min-height: 36px; display: inline-flex; align-items: center; }
    /* Résultats bruts au cellulaire : l'auteur passe sous le titre, la note reste à droite
       (campagne de tests, BUG-32). */
    .resultat-ligne { grid-template-columns: 32px 64px minmax(0, 1fr) auto; gap: 2px 10px; }
    .resultat-ligne > .resultat-rang, .resultat-ligne > .resultat-vignette, .resultat-ligne > .resultat-note { grid-row: 1 / span 2; }
    .resultat-ligne > .resultat-titre { grid-column: 3; grid-row: 1; }
    .resultat-ligne > .resultat-auteur { grid-column: 3; grid-row: 2; font-size: 13px; color: var(--text-2); }
    /* minmax(0, …) : un champ de date a une largeur minimale intrinsèque qui, avec « 1fr », élargit
       la colonne et fait déborder le panneau au cellulaire. */
    .appel-grille-2, .appel-grille-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    /* Au cellulaire : une colonne, rien ne dépasse, le résumé de section passe sous le titre. */
    .appel-grille-2, .appel-grille-3 { grid-template-columns: minmax(0, 1fr); }
    .appel-criteres { grid-template-columns: minmax(0, 1fr) 72px auto; }
    .appel-formulaire input, .appel-formulaire select { min-width: 0; max-width: 100%; }
    .appel-section-entete { flex-wrap: wrap; row-gap: 2px; padding: 10px 12px; }
    .appel-section .chevron { margin-left: auto; }
    .appel-section .resume {
        flex-basis: 100%; order: 3; padding-left: 38px; white-space: normal;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    }
    .appel-section.ouvert .resume { display: none; }
    .appel-section-corps { padding: 6px 12px 14px; }
    .appel-bascules > div { flex-wrap: wrap; }
    .appel-sections-outils { justify-content: flex-start; }
}

/* Événements — même disposition que la planche Appels, quatre colonnes */
.evt-ligne {
    display: grid; grid-template-columns: 2.6fr 1.3fr 1.5fr 1fr;
    gap: 12px; padding: 12px 16px; align-items: center;
    border-bottom: 1px solid #eeefe9; transition: background var(--t);
}
.evt-ligne:last-child { border-bottom: none; }
.evt-ligne:not(.appel-entete-colonnes):hover { background: #fbfcfa; }
.evt-ligne.choisi { background: var(--accent-tint); }
.evt-noms { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
/* Déclaré après .evt-ligne, sinon la grille de grand écran l'emporte (même spécificité). */
@media (max-width: 900px) {
    .evt-ligne { grid-template-columns: minmax(0, 1fr) auto; }
}


/* --------------------------------------------------------------------------
   Feuille de presences et scanner — planche Presences (F56d, F56e)
   -------------------------------------------------------------------------- */

.presences-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.presences-compteurs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.presences-compteur { border-radius: 12px; padding: 12px 16px; gap: 2px; }
.presences-compteur .chiffre { font-family: var(--font-title); font-size: 24px; font-weight: 800; color: var(--accent-dark); line-height: 1.1; }

/* Une ligne = un membre ; toute la ligne est cliquable, la case suit. */
.presence-ligne {
    display: grid; grid-template-columns: 56px 2fr 1.4fr 1.6fr 1.2fr;
    gap: 12px; padding: 0 16px; min-height: 46px; align-items: center;
    border-bottom: 1px solid #eeefe9; font-size: 15px; cursor: pointer;
    transition: background var(--t); user-select: none;
}
.presence-ligne:last-of-type { border-bottom: none; }
.presence-ligne:hover { background: #fafbf8; }
.presence-ligne:active { background: var(--accent-tint); }
.presence-ligne:focus-visible { outline: 2px solid var(--accent-light); outline-offset: -2px; }
.presence-ligne.present { background: var(--accent-tint); }
.presence-entete { min-height: 38px; border-bottom: 1px solid var(--border); cursor: default; }
.presence-entete:hover, .presence-entete:active { background: transparent; }
.presence-nom { font-weight: 600; }
.presence-ligne .case {
    width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--border-muted);
    background: var(--surface); color: #fff; font-weight: 800; font-size: 15px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background var(--t), border-color var(--t), transform var(--t);
}
.presence-ligne .case.on { background: var(--accent); border-color: var(--accent); }
.presence-ligne:active .case { transform: scale(0.92); }
.pill.rsvp-oui { background: var(--accent-tint); color: var(--accent-dark); }
.pill.rsvp-non { background: #f1f1ee; color: var(--text-3); }
.pill.rsvp-attente { background: #e6eef4; color: var(--cat-sppq); }
.pill.rsvp-sans { background: var(--warn-bg); color: var(--warn); }

/* Le scanner : panneau sombre, cadre camera, dernier scan en couleur */
.scanner {
    background: var(--text); color: #fff; border-radius: 14px; padding: 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.scanner-cadre {
    position: relative; height: 200px; border-radius: 10px; overflow: hidden;
    background: linear-gradient(160deg, #3a3f38, #23271f);
    box-shadow: inset 0 0 0 3px transparent; transition: box-shadow var(--t);
}
.scanner-cadre video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-cadre.vert { box-shadow: inset 0 0 0 4px var(--accent-light); }
.scanner-cadre.rouge { box-shadow: inset 0 0 0 4px #e0523a; }
.scanner-mire { position: absolute; inset: 22px 60px; border: 2px solid rgba(255,255,255,0.25); border-radius: 8px; pointer-events: none; }
.scanner-consigne {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px;
    background: rgba(0,0,0,0.45); font-size: 12px; text-align: center; line-height: 1.35;
}
.scanner-dernier { background: rgba(255,255,255,0.12); border-radius: 10px; padding: 10px 12px; transition: background var(--t); }
.scanner-dernier.vert { background: var(--accent); }
.scanner-dernier.rouge { background: #b3371f; }
.scanner-dernier .sur-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.85; }
.scanner-journal { display: flex; flex-direction: column; gap: 4px; }
.scanner-journal > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; opacity: 0.85; }
.scanner input { min-height: 40px; }
/* Le scanner au cellulaire (décision 134) : un bouton flottant l'ouvre, il prend tout l'écran. */
.scanner-flottant { display: none; }
.scanner-plein {
    position: fixed; inset: 0; z-index: 60; border-radius: 0; height: 100vh; height: 100dvh; overflow: auto;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(12px + env(safe-area-inset-bottom, 0px));
}
.scanner-plein .scanner-cadre { flex: 1 1 auto; height: auto; min-height: 42vh; }
.scanner-plein .scanner-mire { inset: 12% 10%; }
.scanner-plein .scanner-journal { max-height: 90px; overflow: auto; }
@media (max-width: 1100px) {
    .scanner-flottant {
        display: inline-flex; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50;
        gap: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    }
    /* Le panneau reste en bas de page pour qui préfère le trouver là ; le bouton flottant est le chemin court. */
}

@media (max-width: 1100px) {
    .presences-colonnes { grid-template-columns: 1fr; }
    .presences-compteurs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .presence-ligne { grid-template-columns: 44px 1fr auto; gap: 6px 12px; padding: 10px 14px; }
    .presence-entete { display: none; }
    .presence-ligne > div:nth-child(4), .presence-ligne > div:nth-child(5) { grid-column: 2 / -1; font-size: 13px; }
    .presence-ligne .case { width: 30px; height: 30px; }
}

/* --------------------------------------------------------------------------
   Ma carte de membre — planche Main (F56e)
   -------------------------------------------------------------------------- */

.carte-membre-page { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.carte-membre {
    background: var(--accent); color: #fff; border-radius: 18px; padding: 22px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.carte-membre-club { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.9; }
.carte-membre-qr { background: #fff; border-radius: 14px; padding: 12px; width: 236px; height: 236px; }
.carte-membre-qr img { width: 212px; height: 212px; display: block; image-rendering: pixelated; }
.carte-membre-nom { font-family: var(--font-title); font-weight: 800; font-size: 20px; }
.carte-membre-statut { font-size: 13px; opacity: 0.92; }
.carte-membre-page .bouton, .carte-membre-page .bouton-secondaire { min-height: 44px; width: 100%; }

/* --------------------------------------------------------------------------
   Carte « Mon agenda de la saison » (F55)
   -------------------------------------------------------------------------- */

.agenda-boutons { display: flex; flex-direction: column; gap: 6px; }
.agenda-boutons .agenda { white-space: normal; min-height: 40px; }
.agenda-boutons .agenda-cellulaire { display: none; }
.agenda-ajoute {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--accent-tint); border: 1px solid var(--accent-light);
    border-radius: 12px; padding: 12px 14px;
}
@media (max-width: 700px) {
    .agenda-boutons .agenda { display: none; }
    .agenda-boutons .agenda-cellulaire { display: inline-flex; min-height: 44px; }
}

/* --------------------------------------------------------------------------
   Mes preferences — planche PreferencesBureau (F57)
   -------------------------------------------------------------------------- */

.preferences-colonnes { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.preferences-page { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mes-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.coeur-badge {
    position: absolute; left: 8px; top: 8px; height: 26px; padding: 0 9px; border-radius: 13px; background: #fff; color: var(--accent-dark);
    display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-title); font-weight: 800; font-size: 12px;
}
@media (max-width: 1000px) {
    .preferences-colonnes { grid-template-columns: 1fr; }
}
.pref {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid #eeefe9; font-size: 14px; cursor: pointer;
    min-height: 44px; user-select: none;
}
.pref:last-of-type { border-bottom: none; }
.pref:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; border-radius: 6px; }
.sw {
    width: 40px; height: 22px; border-radius: 11px; background: var(--accent); position: relative; flex-shrink: 0;
    transition: background var(--t);
}
.sw::after {
    content: ''; position: absolute; top: 3px; left: 21px; width: 16px; height: 16px; border-radius: 8px; background: #fff;
    transition: left var(--t);
}
.sw.off { background: var(--border-muted); }
.sw.off::after { left: 3px; }

/* Rôles (F7c) : trois petites bascules dans la colonne, comme des pastilles */
.membres-roles-bascules { display: flex; gap: 4px; flex-wrap: wrap; }
.membres-roles-bascules .chip { min-height: 26px; padding: 2px 8px; font-size: 11px; }

/* --------------------------------------------------------------------------
   Paramètres du club — planche ParametresClub (F75–F77)
   -------------------------------------------------------------------------- */

.parametres-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.parametres-logo {
    width: 72px; height: 72px; border-radius: 12px; border: 1px solid var(--border); background: #fff;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.swatch {
    width: 36px; height: 36px; border-radius: 8px; border: none; cursor: pointer; padding: 0;
    outline: 2px solid transparent; outline-offset: 2px; transition: outline-color var(--t), transform var(--t);
}
.swatch:hover { transform: scale(1.06); }
.swatch.on { outline-color: var(--text); }
.swatch-libre {
    display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px;
    border: 1px dashed rgba(0,0,0,0.25); text-shadow: 0 0 3px rgba(0,0,0,0.5);
}
.parametres-apercus { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.apercu-telephone {
    width: 300px; height: 560px; border-radius: 28px; background: var(--bg); border: 8px solid #2b2b28;
    overflow: hidden; display: flex; flex-direction: column; flex-shrink: 0;
}
@media (max-width: 1100px) {
    .parametres-colonnes { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Administration de l'instance — planche SuperAdmin (S3.1)
   -------------------------------------------------------------------------- */

.instance-page { background: #f4f4f2; }
.instance-entete {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 40px; background: #1c1c1a; color: #fff;
}
.instance-marque { font-family: var(--font-title); font-weight: 800; font-size: 16px; color: #fff; text-decoration: none; }
.instance-marque:hover { color: #fff; text-decoration: none; }
.instance-nav { display: flex; gap: 20px; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.instance-nav a { color: #a8a8a2; text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent; transition: color var(--t); }
.instance-nav a:hover { color: #fff; text-decoration: none; }
.instance-nav a.on { color: #fff; border-bottom-color: #fff; }
.instance-contenu { padding-top: 24px; }
.instance-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.instance-stat { border-radius: 12px; padding: 14px 16px; gap: 4px; border-color: #e4e4e0; }
.instance-stat .chiffre { font-family: var(--font-title); font-weight: 800; font-size: 26px; line-height: 1.1; }
.instance-stat .point { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 8px; background: #2f8f4e; vertical-align: middle; }
.instance-stat .point.attention { background: #d98a1f; }
.instance-colonnes { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.instance-ligne {
    display: grid; grid-template-columns: 2.2fr 1.5fr 0.7fr 1.1fr 1.1fr 1fr 1fr; gap: 12px; padding: 14px 16px;
    border-bottom: 1px solid #eeeeea; align-items: center; color: inherit; text-decoration: none; transition: background var(--t);
}
a.instance-ligne:hover { background: #fbfbf9; text-decoration: none; }
.instance-entete-colonnes { padding: 10px 16px; border-bottom: 1px solid #e4e4e0; }
.instance-pastille { display: inline-block; width: 28px; height: 28px; border-radius: 14px; flex-shrink: 0; }
@media (max-width: 1100px) {
    .instance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .instance-colonnes { grid-template-columns: 1fr; }
    .instance-entete { padding: 14px 20px; }
}
@media (max-width: 760px) {
    .instance-ligne { grid-template-columns: 1fr auto; gap: 6px 12px; }
    .instance-entete-colonnes { display: none; }
    .instance-ligne > div:nth-child(2), .instance-ligne > div:nth-child(3), .instance-ligne > div:nth-child(4), .instance-ligne > div:nth-child(5), .instance-ligne > div:nth-child(6) { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   Dépôt — planche DepotBureau (F16–F20)
   -------------------------------------------------------------------------- */

.depot-colonnes { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
/* Le choix de l'appel : les onglets (ouverts / à venir / fermés) puis les cartes du groupe. */
.depot-choix { display: flex; flex-direction: column; gap: 14px; }
.onglets-depot { margin-top: 0; }
.depot-appels { display: flex; gap: 10px; flex-wrap: wrap; }
.depot-appel {
    flex: 1; min-width: 220px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px;
    padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none;
    transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.depot-appel:hover { border-color: var(--accent-light); text-decoration: none; }
.depot-appel-nom { font-family: var(--font-title); font-weight: 700; font-size: 15px; color: var(--text-2); transition: color var(--t); }
.depot-appel:hover .depot-appel-nom { color: var(--text); }
/* L'appel affiché sous la liste : il doit sauter aux yeux — « où suis-je ? » se répond d'un coup d'œil.
   Pas de fond vert (Cédric, 28 sept.) : la pastille « Vous êtes ici » et le contour suffisent. */
.depot-appel.choisi {
    border: 2px solid var(--accent); padding: 11px 13px; flex-grow: 1.4;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08); cursor: default;
}
.depot-appel.choisi .depot-appel-nom { color: var(--accent-dark); font-size: 17px; }
.depot-appel.choisi .aide { color: var(--accent-dark); }
.depot-appel-ici {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 5px;
    padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent); color: #fff;
    font-family: var(--font-title); font-weight: 800; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
}
/* Décision 143 : le dépôt sans connexion — l'offre de se connecter, les coordonnées, le refus « déjà déposé ». */
.depot-connexion {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    border: 1px solid var(--accent-light); background: var(--surface); border-radius: 12px; padding: 12px 16px;
}
.depot-connexion-titre, .depot-identite-titre { font-family: var(--font-title); font-weight: 700; font-size: 15px; }
.depot-identite { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.depot-identite input:disabled { color: var(--text-3); background: #f4f4f1; }
.depot-deja { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.depot-consignes { background: var(--accent-tint); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--accent-dark); line-height: 1.5; }
.depot-carte { display: flex; flex-direction: column; gap: 14px; }
.depot-zone {
    border: 2px dashed var(--accent-light); background: var(--surface); border-radius: 14px; padding: 36px 24px;
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; transition: border-color var(--t), background var(--t);
}
.depot-zone.pleine { padding: 16px 18px; border-style: solid; border-color: var(--border); text-align: left; }
.depot-consentement { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; position: relative; }
.depot-consentement .case {
    width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--accent); background: var(--surface); flex-shrink: 0;
    color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; transition: background var(--t);
}
.depot-consentement .case.on { background: var(--accent); }
.depot-barre {
    display: flex; align-items: center; gap: 12px; position: sticky; bottom: 0; background: var(--bg);
    padding: 12px 0 4px; border-top: 1px solid var(--border); z-index: 2;
}
.depot-barre .bouton:disabled { opacity: 0.5; cursor: not-allowed; }
.depot-mienne { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.depots-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
/* Décision 143 : une photo déposée sans connexion, pas encore rattachée à un membre. */
.depots-grille .carte.depot-a-rattacher { border: 2px solid var(--warn); }
.depot-rattacher { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); }
.depot-rattacher .pill { align-self: flex-start; }
@media (max-width: 1100px) {
    .depot-colonnes { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .depot-barre { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px; flex-wrap: wrap; }
    .depot-barre .bouton { min-height: 48px; flex: 1; }
    .depot-colonnes { padding-bottom: 120px; }
}

/* --------------------------------------------------------------------------
   Voter — coups de cœur (F32–F36), planche VoteBureau
   -------------------------------------------------------------------------- */

.vote-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.vote-compteur { display: flex; align-items: center; gap: 16px; }
.vote-compteur-nombre { font-family: var(--font-title); font-weight: 800; font-size: 26px; color: var(--text-3); transition: color var(--t); }
.vote-remis { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.vote-themes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.vote-chip-compte { font-weight: 600; color: var(--text-3); margin-left: 6px; }
.chip.on .vote-chip-compte { color: rgba(255,255,255,0.85); }
.chip.plein:not(.on) { border-color: var(--accent-dark); color: var(--accent-dark); background: var(--accent-tint); }
.chip.plein:not(.on) .vote-chip-compte { color: var(--accent-dark); }
.vote-groupe { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.vote-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vote-tuile {
    position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 2; cursor: pointer;
    border: 3px solid transparent; background: #e3e6df; transition: border-color var(--t), transform var(--t), opacity var(--t);
}
.vote-tuile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vote-tuile:hover { transform: translateY(-1px); }
.vote-tuile.on { border-color: var(--accent); }
.vote-tuile.mienne { cursor: default; opacity: 0.5; }
.vote-tuile.mienne:hover { transform: none; }
.vote-tuile.bloquee { opacity: 0.55; cursor: not-allowed; }
.vote-code {
    position: absolute; left: 8px; bottom: 8px; background: rgba(29,34,28,0.75); color: #fff; font-size: 12px; font-weight: 600;
    padding: 3px 7px; border-radius: 6px; font-family: var(--font-title);
}
.vote-badge-theme {
    position: absolute; left: 8px; top: 8px; background: rgba(255,255,255,0.92); color: var(--text); font-size: 11px; font-weight: 700;
    padding: 3px 7px; border-radius: 6px; font-family: var(--font-title);
}
.vote-coche {
    position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 12px; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.vote-loupe {
    position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px; border: none; cursor: pointer;
    background: rgba(29,34,28,0.6); color: #fff; font-size: 14px; opacity: 0; transition: opacity var(--t);
}
.vote-tuile:hover .vote-loupe, .vote-tuile:focus-within .vote-loupe { opacity: 1; }
.vote-agrandie {
    position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 40; display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.vote-dialogue-fond { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.vote-dialogue {
    width: 560px; max-width: 100%; background: var(--bg); color: var(--text); border-radius: 16px; padding: 24px;
    display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.vote-dialogue input[type="datetime-local"] { min-height: 38px; padding: 6px 10px; font-size: 14px; }
.vote-dialogue .champ > span { font-weight: 600; font-size: 13px; }
.vote-admin-colonnes { display: grid; grid-template-columns: minmax(0, 1.6fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1000px) {
    .vote-admin-colonnes { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .vote-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vote-loupe { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Notation par grille (F36b), planche NotationGrille
   -------------------------------------------------------------------------- */

.notation-colonnes { display: grid; grid-template-columns: minmax(0, 1.5fr) 420px; gap: 28px; align-items: start; }
.notation-barre { height: 8px; border-radius: 4px; background: #eef0ea; position: relative; overflow: hidden; }
.notation-barre > div { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; transition: width var(--t); }
.notation-scene {
    background: #111; border-radius: 14px; aspect-ratio: 16 / 9; position: relative; overflow: hidden;
    /* Jamais plus haut que l'écran : la scène se rétrécit plutôt que de faire défiler la grille. */
    width: 100%; max-width: calc(62vh * 16 / 9); align-self: center;
}
/* L'image est hors flux : la scène garde son 16 / 9 quelle que soit la photo. */
.notation-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.notation-scene-haut { position: absolute; left: 14px; top: 12px; display: flex; align-items: center; gap: 10px; }
.notation-badge { background: #fff; color: var(--text); font-family: var(--font-title); font-weight: 800; font-size: 14px; padding: 5px 10px; border-radius: 8px; }
.notation-scene-position { position: absolute; right: 14px; top: 12px; color: #fff; font-size: 13px; opacity: 0.8; }
.notation-vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 5px; }
.notation-vignette {
    aspect-ratio: 3 / 2; border-radius: 6px; cursor: pointer; border: 2px solid transparent; position: relative; padding: 0; overflow: hidden;
    background: #e3e6df; transition: border-color var(--t);
}
.notation-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.notation-vignette.cur { border-color: var(--accent); }
.notation-vignette-note { position: absolute; right: 4px; bottom: 4px; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,0.9); color: var(--text); }
.notation-vignette-theme { position: absolute; left: 3px; top: 3px; font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 3px; background: rgba(255,255,255,0.9); color: var(--text); }
.notation-total { background: var(--accent); color: #fff; border-radius: 14px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.notation-critere { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.notation-pas {
    width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border-muted); background: var(--surface); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 800; font-size: 16px; color: var(--accent-dark);
    transition: background var(--t), border-color var(--t);
}
.notation-pas:hover { background: var(--accent-tint); border-color: var(--accent-light); }
.notation-pas:active { transform: translateY(1px); }
.notation-curseur { width: 100%; accent-color: var(--accent); margin: 0; }
@media (max-width: 1000px) {
    .notation-colonnes { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Projection en session (F21–F25), planche Projection — page autonome, fond noir
   -------------------------------------------------------------------------- */

body.projection { background: #000; color: #fff; margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
/* Décision 148 : la photo remplit tout l'espace au-dessus de la barre, comme sur la planche — agrandie
   au besoin, jamais déformée. La scène est un conteneur ; le cadre prend la plus grande taille qui y
   tient au rapport de la photo (--ratio, relevé au chargement). */
.projection-scene { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px 16px 0; min-height: 0; container-type: size; }
.projection-cadre { --ratio: 1.5; position: relative; display: flex; aspect-ratio: var(--ratio); width: min(100cqw, 100cqh * var(--ratio)); }
.projection-cadre img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; display: block; }
.projection-code {
    position: absolute; left: 16px; bottom: 14px; background: rgba(0,0,0,0.55); padding: 6px 12px; border-radius: 6px;
    font-family: var(--font-title); font-weight: 700; font-size: 18px; letter-spacing: 0.02em;
}
.projection-titre { position: absolute; right: 16px; bottom: 14px; background: rgba(0,0,0,0.55); padding: 6px 12px; border-radius: 6px; font-size: 16px; opacity: 0.9; }
.projection-theme { position: absolute; left: 16px; top: 14px; background: rgba(255,255,255,0.92); color: #1d221c; padding: 5px 10px; border-radius: 8px; font-family: var(--font-title); font-weight: 800; font-size: 14px; }
.projection-vide { color: rgba(255,255,255,0.7); font-size: 18px; }
/* Le zoom de la projection (décision 147) : l'image grossit dans son cadre, qui la rogne. */
.projection-zoomable { overflow: hidden; border-radius: 4px; cursor: zoom-in; touch-action: none; user-select: none; }
.projection-zoomable img { transform-origin: 0 0; transition: transform 160ms ease-out; will-change: transform; }
.projection-zoomable.zoomee { cursor: grab; }
.projection-zoomable.saisie { cursor: grabbing; }
.projection-zoomable.saisie img { transition: none; }
.projection-zoom { display: inline-flex; align-items: center; gap: 6px; }
.projection-niveau { min-width: 52px; text-align: center; color: #fff; font-family: var(--font-title); font-weight: 700; font-variant-numeric: tabular-nums; }
.projection-barre .tb:disabled { opacity: 0.35; cursor: default; }
.projection-grille { flex: 1; padding: 28px 28px 0; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.projection-cellules { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.projection-cellule { position: relative; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: #222; }
.projection-cellule img { width: 100%; height: 100%; object-fit: cover; display: block; }
.projection-cellule.cur { border-color: #fff; }
.projection-cellule .c { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,0.6); font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 4px; font-family: var(--font-title); }
.projection-barre {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 28px 16px;
    font-size: 13px; color: rgba(255,255,255,0.75); transition: opacity 400ms ease;
}
.projection-barre.endormie { opacity: 0; }
.projection-barre:hover { opacity: 1; }
.projection-barre .k {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.35); font-size: 12px; font-family: var(--font-title); font-weight: 700;
}
.projection-barre .tb {
    display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.06); color: #fff; cursor: pointer;
    font-family: var(--font-title); font-weight: 700; font-size: 13px; text-decoration: none; transition: background var(--t);
}
.projection-barre .tb:hover { background: rgba(255,255,255,0.14); text-decoration: none; color: #fff; }
.projection-barre .tb.primary { background: var(--accent, #2E8B06); border-color: var(--accent, #2E8B06); }
@media (max-width: 900px) {
    .projection-cellules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Sélection finale (F41), planche SelectionFinale
   -------------------------------------------------------------------------- */

.selection-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.selection-ligne {
    display: grid; grid-template-columns: 62px 64px 1.4fr 1.6fr 70px 1fr 1.2fr; gap: 10px; padding: 6px 12px;
    border-bottom: 1px solid #eeefe9; align-items: center; font-size: 14px; cursor: pointer; transition: background var(--t);
}
.selection-ligne:last-child { border-bottom: none; }
.selection-ligne:hover { background: #fbfcfa; }
.selection-ligne.on { background: var(--accent-tint); }
.selection-ligne.bloquee { opacity: 0.55; cursor: not-allowed; }
.selection-ligne.figee { cursor: default; }
.selection-bloc { border-bottom: 1px solid #eeefe9; }
.selection-bloc:last-of-type { border-bottom: none; }
.selection-bloc > .selection-ligne { border-bottom: none; }
.selection-detail-bouton { font-size: 12px; font-weight: 500; padding: 0; margin-top: 2px; }
/* Le détail des notes (décision 128) : un tableau juge × critère sous la ligne, dans le même cadre. */
.selection-detail { padding: 4px 12px 12px 74px; background: #fbfcfa; display: flex; flex-direction: column; gap: 6px; }
.selection-detail-defilement { overflow-x: auto; }
.selection-detail-table { border-collapse: collapse; font-size: 13px; min-width: 420px; }
.selection-detail-table th, .selection-detail-table td { padding: 5px 10px; border-bottom: 1px solid #eeefe9; text-align: left; white-space: nowrap; }
.selection-detail-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); font-weight: 600; }
.selection-detail-table th.num, .selection-detail-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.selection-detail-table tr.moyenne td { font-weight: 700; background: var(--accent-tint); }
.selection-detail-table tr.incomplete td { color: var(--text-3); }
.selection-detail-table tr:last-child td { border-bottom: none; }
.selection-entete { cursor: default; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.selection-entete:hover { background: var(--surface); }
.selection-case {
    width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--border-muted); background: var(--surface);
    display: flex; align-items: center; justify-content: center; color: #fff; transition: background var(--t), border-color var(--t);
}
.selection-case.on { background: var(--accent); border-color: var(--accent); }
.selection-quota { background: var(--accent); color: #fff; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.selection-export { font-size: 11px; font-family: var(--font-title); overflow: hidden; border: 1px solid var(--border); border-radius: 8px; }
.selection-export-ligne { display: grid; grid-template-columns: 1fr 1.6fr 1.4fr 1.8fr; gap: 6px; padding: 4px 8px; border-top: 1px solid #eeefe9; white-space: nowrap; }
.selection-export-ligne > div { overflow: hidden; text-overflow: ellipsis; }
.selection-export-entete { background: #f1f1ee; font-weight: 700; color: var(--text-2); border-top: none; padding: 5px 8px; }
.warn { font-size: 12px; font-weight: 700; color: var(--warn); }
.ok { font-size: 12px; font-weight: 700; color: var(--accent-dark); }
@media (max-width: 1100px) {
    .selection-colonnes { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
    .selection-ligne { grid-template-columns: 32px 56px 1fr 1fr; }
    .selection-ligne > div:nth-child(n+5), .selection-entete > div:nth-child(n+5) { display: none; }
    /* « Retenue » ne tient pas dans 32 px : l'en-tête de la colonne des cases se réduit à
       la coche (campagne de tests, BUG-33). */
    .selection-entete > div:first-child { font-size: 0; }
    .selection-entete > div:first-child::before { content: '✓'; font-size: 12px; }
    .selection-ligne > div:nth-child(2) { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   Coups de cœur (F42, F42b), planche CoupsDeCoeur
   -------------------------------------------------------------------------- */

.coups-podium { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.coups-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.coups-tuile { position: relative; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; cursor: zoom-in; background: #e3e6df; }
.coups-tuile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coups-legende {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 5px; font-size: 10px; color: #fff; background: rgba(29,34,28,0.55);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coups-coeur {
    position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 12px; background: #fff; color: var(--accent-dark);
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.projection-coeur {
    position: absolute; left: 16px; top: 14px; height: 34px; padding: 0 14px; border-radius: 17px; background: #fff; color: var(--accent-dark, #4A7A3C);
    display: flex; align-items: center; font-family: var(--font-title); font-weight: 800; font-size: 15px;
}

/* ==========================================================================
   Annonces : la page du membre et les fichiers joints (F63, décision 123)
   ========================================================================== */
.annonces-membre { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; }
.annonce-carte { display: flex; flex-direction: column; gap: 14px; border-radius: 12px; scroll-margin-top: 90px; }
.annonce-carte:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.annonce-sujet { margin: 0; font-size: 19px; line-height: 1.3; font-family: var(--font-title); font-weight: 800; }
.annonce-meta { margin-top: 4px; }
.annonce-texte p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.annonce-texte p:last-child { margin-bottom: 0; }
.annonce-fichiers { display: flex; flex-direction: column; gap: 10px; }
.annonce-vignettes { display: flex; flex-wrap: wrap; gap: 12px; }
.annonce-vignette {
    display: flex; flex-direction: column; gap: 6px; width: 200px; max-width: 100%; text-decoration: none; color: inherit;
    border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: #fff; transition: border-color 150ms, box-shadow 150ms;
}
.annonce-vignette:hover, .annonce-vignette:focus-visible { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.annonce-vignette img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #f3f4f1; }
.annonce-vignette-nom { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.annonce-liste-fichiers { display: flex; flex-direction: column; gap: 6px; }
.annonce-fichier {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px;
    background: #fff; text-decoration: none; color: inherit; transition: border-color 150ms;
}
.annonce-fichier:hover, .annonce-fichier:focus-visible { border-color: var(--accent); }
.annonce-fichier-nom { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.annonce-fichier-action { font-size: 13px; color: var(--accent-dark, #4A7A3C); font-weight: 600; white-space: nowrap; }
.annonce-fichier-miniature { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #f3f4f1; flex: none; }
.fichier-ext {
    flex: none; min-width: 44px; height: 30px; padding: 0 8px; border-radius: 6px; background: var(--accent-tint); color: var(--accent-dark, #4A7A3C);
    display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 800; font-size: 11px; letter-spacing: 0.04em;
}
.annonce-journal-fichiers { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.annonce-journal-fichiers a { color: var(--accent-dark, #4A7A3C); overflow-wrap: anywhere; }
@media (max-width: 600px) {
    .annonce-vignette { width: calc(50% - 6px); }
}
