/* ═══════════════════════════════════════════════════════════
   Pétanque de Bercher — feuille de style
   Principes : gros texte, fort contraste, grandes zones cliquables,
   couleurs du logo (jaune soleil, rouge brique) sur fond sable.
   ═══════════════════════════════════════════════════════════ */

:root {
  --sable: #f4ead8;
  --sable-2: #ece0c9;
  --papier: #fffaf1;
  --encre: #2a2018;
  --encre-2: #5a4a3b;
  --brun: #3a2a1d;
  --brun-2: #4d3826;
  --rouge: #b3261e;
  --rouge-fonce: #8c1c16;
  --rouge-pale: #fbe3df;
  --jaune: #f3e43c;
  --jaune-pale: #fbf5c4;
  --vert: #2d6a37;
  --vert-pale: #e2f1e2;
  --bord: #dccbae;
  --bord-fort: #b9a383;
  --ombre: 0 1px 2px rgb(58 42 29 / .08), 0 6px 18px rgb(58 42 29 / .08);
  --rayon: 14px;
  --focus: 0 0 0 4px var(--jaune), 0 0 0 7px var(--brun);
  --titre: 'Fraunces', Georgia, 'Times New Roman', serif;
  --texte: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 19px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (min-width: 900px) { html { font-size: 20px; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--sable); color: var(--encre);
  font-family: var(--texte); line-height: 1.6;
}
main { flex: 1; outline: none; padding-bottom: 3rem; }
img { max-width: 100%; display: block; }
a { color: var(--rouge-fonce); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--rouge); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { font-family: var(--titre); line-height: 1.2; color: var(--brun); margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.conteneur { width: min(1120px, 100% - 32px); margin-inline: auto; }
.etroit { width: min(760px, 100% - 32px); margin-inline: auto; }
.muet { color: var(--encre-2); }
.petit { font-size: .9rem; }
.centre { text-align: center; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lien-evitement { position: absolute; left: -999px; top: 8px; background: var(--jaune); color: var(--encre); padding: .6rem 1rem; z-index: 100; border-radius: 8px; font-weight: 700; }
.lien-evitement:focus { left: 8px; }

/* ── Bandeau démo ── */
#bandeau-demo { background: var(--jaune); color: var(--encre); font-size: .9rem; padding: .5rem 0; border-bottom: 2px solid var(--brun); }
#bandeau-demo .conteneur { display: flex; gap: .5rem 1rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
#bandeau-demo button { font: inherit; font-weight: 700; background: var(--brun); color: #fff; border: 0; border-radius: 8px; padding: .35rem .8rem; cursor: pointer; min-height: 40px; }

/* ── En-tête ── */
.entete { background: var(--papier); border-bottom: 1px solid var(--bord); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.entete-haut { display: flex; align-items: center; gap: 1rem; padding-block: .6rem; }
.marque { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--brun); margin-right: auto; }
.marque img { width: 46px; height: auto; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.15; }
.marque-nom { font-family: var(--titre); font-weight: 700; font-size: 1.25rem; }
.marque-sous { font-size: .8rem; color: var(--encre-2); letter-spacing: .04em; text-transform: uppercase; }
.entete-actions { display: flex; gap: .5rem; align-items: center; }
.navigation { background: var(--brun); }
.navigation ul { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; }
.navigation a {
  display: flex; align-items: center; gap: .4rem; min-height: 54px; padding: 0 1rem;
  color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; border-bottom: 4px solid transparent;
}
.navigation a:hover { background: var(--brun-2); color: #fff; }
.navigation a[aria-current="page"] { border-bottom-color: var(--jaune); background: var(--brun-2); }
.navigation .nav-membres { opacity: .95; }
.navigation .cadenas { font-size: .75rem; }
.btn-menu { display: none; }

@media (max-width: 899px) {
  .marque img { width: 40px; }
  .marque-nom { font-size: 1.05rem; }
  .marque-sous { display: none; }
  .entete-actions { display: none; }
  .btn-menu {
    display: inline-flex; align-items: center; gap: .55rem; min-height: 52px; padding: 0 1rem;
    font: inherit; font-weight: 700; color: #fff; background: var(--brun); border: 0; border-radius: 12px; cursor: pointer;
  }
  .burger { display: inline-grid; gap: 4px; }
  .burger i { display: block; width: 20px; height: 3px; background: currentColor; border-radius: 2px; }
  .navigation { display: none; position: fixed; inset: 72px 0 0 0; overflow: auto; padding-bottom: 2rem; }
  .navigation.ouvert { display: block; }
  .navigation ul { flex-direction: column; width: 100%; }
  .navigation li { border-bottom: 1px solid rgb(255 255 255 / .12); }
  .navigation a { min-height: 64px; font-size: 1.15rem; padding: 0 1.25rem; border-bottom: 0; border-left: 6px solid transparent; }
  .navigation a[aria-current="page"] { border-left-color: var(--jaune); }
  .navigation .nav-compte { padding: 1rem 1.25rem; display: grid; gap: .6rem; border: 0; }
  .navigation .nav-compte .btn { width: 100%; justify-content: center; }
  body.menu-ouvert { overflow: hidden; }
}
@media (min-width: 900px) { .navigation .nav-compte { display: none; } }

/* ── Boutons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: .6rem 1.25rem; border-radius: 12px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-principal { background: var(--rouge); color: #fff; }
.btn-principal:hover { background: var(--rouge-fonce); color: #fff; }
.btn-secondaire { background: var(--papier); color: var(--brun); border-color: var(--bord-fort); }
.btn-secondaire:hover { border-color: var(--brun); color: var(--brun); background: #fff; }
.btn-sombre { background: var(--brun); color: #fff; }
.btn-sombre:hover { background: var(--brun-2); color: #fff; }
.btn-danger { background: var(--papier); color: var(--rouge-fonce); border-color: var(--rouge); }
.btn-danger:hover { background: var(--rouge); color: #fff; }
.btn-lien { background: none; border: 0; color: var(--rouge-fonce); text-decoration: underline; padding: .4rem .2rem; min-height: 44px; font-weight: 700; }
.btn-grand { min-height: 60px; font-size: 1.1rem; padding-inline: 1.6rem; }
.btn-bloc { width: 100%; }
.btn-petit { min-height: 44px; padding: .4rem .9rem; font-size: .9rem; }
.groupe-boutons { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.rouage { width: 1em; height: 1em; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: tourne .8s linear infinite; vertical-align: -0.15em; }
@keyframes tourne { to { transform: rotate(360deg); } }
.chargement { padding: 4rem 0; font-size: 1.1rem; color: var(--encre-2); display: flex; gap: .75rem; align-items: center; justify-content: center; }

/* ── Mise en page des pages ── */
.page-titre { padding: 2.25rem 0 1.25rem; }
.page-titre h1 { margin-bottom: .25rem; }
.page-titre p { color: var(--encre-2); font-size: 1.05rem; margin: 0; max-width: 60ch; }
.fil { font-size: .95rem; margin-bottom: .75rem; }
.fil a { font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; }
.section { margin-top: 2.5rem; }
.section-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-tete h2 { margin: 0; }
.grille { display: grid; gap: 1.25rem; }
.grille-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.grille-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.carte { background: var(--papier); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.25rem; }
.carte > :last-child { margin-bottom: 0; }
.vide { background: var(--papier); border: 2px dashed var(--bord-fort); border-radius: var(--rayon); padding: 2rem 1.25rem; text-align: center; color: var(--encre-2); }
.vide strong { display: block; color: var(--brun); font-size: 1.1rem; margin-bottom: .3rem; }

.encadre { border-radius: var(--rayon); padding: 1rem 1.25rem; border: 2px solid; margin-bottom: 1.25rem; }
.encadre > :last-child { margin-bottom: 0; }
.encadre-info { background: var(--jaune-pale); border-color: #e2d36a; }
.encadre-ok { background: var(--vert-pale); border-color: #8dbb8f; }
.encadre-alerte { background: var(--rouge-pale); border-color: #e3a49c; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; line-height: 1.4; white-space: nowrap; }
.badge-public { background: var(--vert-pale); color: var(--vert); }
.badge-membres { background: var(--sable-2); color: var(--brun); }
.badge-type { background: var(--jaune-pale); color: var(--brun); }
.badge-complet { background: var(--rouge-pale); color: var(--rouge-fonce); }
.badge-attente { background: var(--jaune); color: var(--encre); }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }

/* ── Accueil ── */
.heros { background: var(--brun); color: #fff; position: relative; overflow: hidden; }
.heros::before {
  content: ''; position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image: radial-gradient(circle at 20% 30%, #fff 1.5px, transparent 2px), radial-gradient(circle at 70% 60%, #fff 1px, transparent 1.5px), radial-gradient(circle at 40% 80%, #fff 1.2px, transparent 1.8px);
  background-size: 34px 31px, 23px 27px, 41px 37px;
}
.heros-grille { position: relative; display: grid; gap: 2rem; align-items: center; padding-block: 3rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .heros-grille { grid-template-columns: 1.35fr 1fr; padding-block: 4rem; } }
.heros h1 { color: #fff; font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); margin-bottom: .3rem; }
.heros .sur-titre { color: var(--jaune); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; margin-bottom: .5rem; }
.heros p.intro { font-size: 1.15rem; color: #f1e6d4; max-width: 40ch; }
.heros .groupe-boutons { margin-top: 1.5rem; }
.heros .btn-secondaire { background: transparent; color: #fff; border-color: rgb(255 255 255 / .6); }
.heros .btn-secondaire:hover { background: rgb(255 255 255 / .1); color: #fff; border-color: #fff; }
.heros-logo { justify-self: center; width: min(240px, 60vw); filter: drop-shadow(0 12px 24px rgb(0 0 0 / .35)); }

.citation {
  position: relative; margin: 0; padding: 2rem 1.5rem 1.5rem 1.5rem; background: var(--papier);
  border-radius: var(--rayon); border: 1px solid var(--bord); box-shadow: var(--ombre); border-left: 8px solid var(--rouge);
}
.citation::before { content: '«'; position: absolute; top: -.35em; left: .4em; font-family: var(--titre); font-size: 4.5rem; color: var(--jaune); text-shadow: 0 2px 0 var(--brun); line-height: 1; }
.citation p { font-family: var(--titre); font-style: italic; font-size: clamp(1.15rem, 1rem + .8vw, 1.45rem); line-height: 1.5; color: var(--brun); margin: 0; font-weight: 600; }
.citation footer { margin-top: .75rem; color: var(--encre-2); font-size: .95rem; }

.presentation { font-size: 1.08rem; }

/* ── Cartes d'événement ── */
.ev-carte { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.ev-carte:hover { border-color: var(--brun); color: inherit; }
.ev-date { width: 82px; text-align: center; background: var(--brun); color: #fff; border-radius: 12px; padding: .5rem .25rem; line-height: 1.1; }
.ev-date .j { display: block; font-family: var(--titre); font-size: 2rem; font-weight: 700; }
.ev-date .m { display: block; text-transform: uppercase; font-weight: 700; font-size: .85rem; letter-spacing: .04em; color: var(--jaune); }
.ev-date .a { display: block; font-size: .8rem; opacity: .85; }
.ev-carte h3 { margin: 0 0 .3rem; font-size: 1.2rem; }
.ev-infos { margin: 0; padding: 0; list-style: none; color: var(--encre-2); font-size: .95rem; }
.ev-infos li { display: flex; gap: .4rem; }
.ev-cta { margin-top: .6rem; font-weight: 700; color: var(--rouge-fonce); }
.ev-passe { opacity: .78; }
.ev-passe .ev-date { background: var(--encre-2); }

/* ── Détail événement ── */
.detail-grille { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .detail-grille { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.faits { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.faits li { display: grid; grid-template-columns: 2rem 1fr; gap: .4rem; align-items: start; }
.faits .ico { font-size: 1.25rem; line-height: 1.4; }
.faits strong { display: block; }

.fichiers { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.fichier {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; min-height: 60px;
  background: #fff; border: 1px solid var(--bord); border-radius: 12px; text-decoration: none; color: var(--encre);
}
a.fichier:hover { border-color: var(--brun); color: var(--encre); }
.fichier .ico { font-size: 1.5rem; }
.fichier .nom { flex: 1; font-weight: 700; word-break: break-word; }
.fichier .act { font-size: .9rem; color: var(--rouge-fonce); font-weight: 700; white-space: nowrap; }

/* ── Équipes inscrites ── */
.equipes { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; counter-reset: eq; }
.equipe { background: #fff; border: 1px solid var(--bord); border-radius: 12px; padding: .7rem .9rem; display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .6rem; align-items: center; }
.equipe::before { counter-increment: eq; content: counter(eq); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--sable-2); font-weight: 700; color: var(--brun); }
.equipe .nom-eq { font-weight: 700; }
.equipe .joueurs { color: var(--encre-2); font-size: .95rem; }
.equipe.moi { border: 2px solid var(--vert); background: var(--vert-pale); }
.invite { font-size: .75rem; background: var(--jaune-pale); color: var(--brun); border-radius: 6px; padding: 0 .35rem; font-weight: 700; }
.jauge { height: 14px; background: var(--sable-2); border-radius: 999px; overflow: hidden; margin: .4rem 0 .2rem; }
.jauge span { display: block; height: 100%; background: var(--vert); border-radius: 999px; }

/* ── Formulaires ── */
.formulaire { display: grid; gap: 1.25rem; }
.champ { display: grid; gap: .35rem; }
.champ > label, .legende { font-weight: 700; color: var(--brun); font-size: 1rem; }
.aide { font-size: .9rem; color: var(--encre-2); margin: 0; }
.obligatoire { color: var(--rouge); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 56px; padding: .7rem .9rem; font: inherit; font-size: 1.05rem; color: var(--encre);
  background: #fff; border: 2px solid var(--bord-fort); border-radius: 12px;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brun); box-shadow: 0 0 0 4px rgb(243 228 60 / .7); }
input[aria-invalid=true] { border-color: var(--rouge); }
.deux-col { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .deux-col { grid-template-columns: 1fr 1fr; } }
.trois-col { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .trois-col { grid-template-columns: repeat(3, 1fr); } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.mdp { position: relative; }
.mdp input { padding-right: 7rem; }
.mdp button { position: absolute; right: 6px; top: 6px; bottom: 6px; border: 0; border-radius: 8px; background: var(--sable-2); font: inherit; font-size: .9rem; font-weight: 700; padding: 0 .8rem; cursor: pointer; color: var(--brun); }

/* Tuiles de choix (gros boutons radio) */
.tuiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tuile { position: relative; }
.tuile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tuile span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; text-align: center;
  min-height: 84px; padding: .75rem; border: 2px solid var(--bord-fort); border-radius: 14px; background: #fff; font-weight: 700; color: var(--brun);
}
.tuile span .ico { font-size: 1.7rem; }
.tuile span small { font-weight: 400; color: var(--encre-2); font-size: .85rem; }
.tuile input:checked + span { border-color: var(--rouge); background: var(--rouge-pale); box-shadow: inset 0 0 0 2px var(--rouge); }
.tuile input:focus-visible + span { box-shadow: var(--focus); }

/* Interrupteur Oui / Non */
.interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; background: #fff; border: 2px solid var(--bord-fort); border-radius: 14px; cursor: pointer; }
.interrupteur .txt strong { display: block; color: var(--brun); }
.interrupteur .txt small { color: var(--encre-2); font-size: .9rem; }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interrupteur .piste { flex: none; position: relative; width: 112px; height: 48px; border-radius: 999px; background: var(--sable-2); border: 2px solid var(--bord-fort); font-weight: 700; font-size: .9rem; }
.interrupteur .piste::before { content: 'NON'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--encre-2); }
.interrupteur .piste::after { content: ''; position: absolute; left: 4px; top: 4px; width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: left .15s; }
.interrupteur input:checked + .piste { background: var(--vert); border-color: var(--vert); }
.interrupteur input:checked + .piste::before { content: 'OUI'; left: 14px; right: auto; color: #fff; }
.interrupteur input:checked + .piste::after { left: 68px; }
.interrupteur:has(input:focus-visible) { box-shadow: var(--focus); }
.interrupteur:has(input:checked) { border-color: var(--vert); }

/* Joueurs d'une équipe */
.joueur { background: #fff; border: 2px solid var(--bord); border-radius: 14px; padding: 1rem; display: grid; gap: .75rem; }
.joueur-tete { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.joueur-tete strong { font-size: 1.05rem; color: var(--brun); }
.choix-type { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.choix-type label { position: relative; }
.choix-type input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choix-type span { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 52px; border: 2px solid var(--bord-fort); border-radius: 12px; font-weight: 700; background: var(--papier); color: var(--brun); text-align: center; padding: .25rem .5rem; }
.choix-type input:checked + span { border-color: var(--brun); background: var(--brun); color: #fff; }
.choix-type input:focus-visible + span { box-shadow: var(--focus); }

/* Dépôt de fichiers */
.depot { display: grid; place-items: center; gap: .4rem; text-align: center; padding: 1.5rem 1rem; border: 3px dashed var(--bord-fort); border-radius: 14px; background: #fff; cursor: pointer; color: var(--encre-2); }
.depot strong { color: var(--brun); font-size: 1.1rem; }
.depot .ico { font-size: 2rem; }
.depot.survol { border-color: var(--rouge); background: var(--rouge-pale); }
.depot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.depot:has(input:focus-visible) { box-shadow: var(--focus); }
.liste-attente { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .4rem; }
.liste-attente li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; background: var(--sable-2); border-radius: 10px; padding: .4rem .4rem .4rem .8rem; font-size: .95rem; }

/* ── Annonces ── */
.annonce h3 { margin-bottom: .25rem; }
.annonce .date { color: var(--encre-2); font-size: .9rem; margin-bottom: .6rem; }
.annonce img { border-radius: 10px; margin-bottom: .8rem; max-height: 420px; object-fit: cover; width: 100%; }
.annonce.epinglee { border: 2px solid var(--rouge); }

/* ── Résultats ── */
.resultat h3 { margin-bottom: .2rem; }
.resultat .resume { white-space: pre-line; }
.annee-titre { font-family: var(--titre); font-size: 1.6rem; color: var(--brun); border-bottom: 3px solid var(--jaune); display: inline-block; margin: 2rem 0 1rem; }

/* ── Comité ── */
.comite { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.membre-comite { text-align: center; padding: 1.5rem 1rem; }
.membre-comite img, .membre-comite .sans-photo { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 6px solid var(--jaune); box-shadow: 0 0 0 3px var(--rouge); background: var(--sable-2); }
.membre-comite .sans-photo { display: grid; place-items: center; font-family: var(--titre); font-size: 3rem; color: var(--brun); }
.membre-comite .role { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: .85rem; color: var(--rouge-fonce); }
.membre-comite .nom { font-family: var(--titre); font-size: 1.35rem; color: var(--brun); font-weight: 700; }

/* ── Galerie ── */
.albums { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.album-carte { padding: 0; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
a.album-carte:hover { border-color: var(--brun); color: inherit; }
.album-carte .couv { aspect-ratio: 4 / 3; background: var(--sable-2); display: grid; place-items: center; overflow: hidden; }
.album-carte .couv img { width: 100%; height: 100%; object-fit: cover; }
.album-carte .couv .sans { width: 70px; opacity: .55; }
.album-carte .txt { padding: .9rem 1rem 1rem; }
.album-carte h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.photos { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); }
.photo-btn { padding: 0; border: 0; background: var(--sable-2); border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; position: relative; }
.photo-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.photo-btn:hover img { transform: scale(1.04); }
.annees-filtre { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.annees-filtre button { min-height: 48px; padding: 0 1rem; border-radius: 999px; border: 2px solid var(--bord-fort); background: var(--papier); font: inherit; font-weight: 700; color: var(--brun); cursor: pointer; }
.annees-filtre button[aria-pressed=true] { background: var(--brun); color: #fff; border-color: var(--brun); }

/* Visionneuse */
.visionneuse { position: fixed; inset: 0; z-index: 60; background: #140e0a; display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.visionneuse .haut { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1rem; gap: 1rem; }
.visionneuse .scene { display: grid; place-items: center; min-height: 0; padding: 0 .5rem; touch-action: pan-y; }
.visionneuse .scene img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.visionneuse .bas { display: flex; justify-content: center; gap: 1rem; padding: .8rem 1rem 1.2rem; }
.visionneuse .btn { min-width: 140px; }
.visionneuse .legende-photo { text-align: center; padding: 0 1rem; color: #e8dccb; }

/* ── Tableaux ── */
.tableau-conteneur { overflow-x: auto; background: var(--papier); border: 1px solid var(--bord); border-radius: var(--rayon); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { background: var(--sable-2); color: var(--brun); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

/* ── Espace Président ── */
.admin-entete { background: var(--rouge); color: #fff; padding: 2rem 0 1.5rem; }
.admin-entete h1 { color: #fff; margin: 0; }
.admin-entete p { color: #ffe9e5; margin: .25rem 0 0; }
.admin-tuiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 1.75rem; }
.admin-tuile {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem; min-height: 110px; text-decoration: none; color: var(--brun);
  background: var(--papier); border: 2px solid var(--bord-fort); border-radius: 18px; box-shadow: var(--ombre); position: relative;
}
a.admin-tuile:hover { border-color: var(--rouge); color: var(--brun); background: #fff; }
.admin-tuile .ico { font-size: 2.4rem; flex: none; width: 3.2rem; text-align: center; }
.admin-tuile strong { display: block; font-size: 1.15rem; font-family: var(--titre); line-height: 1.25; margin-bottom: .2rem; }
.admin-tuile small { color: var(--encre-2); font-size: .9rem; line-height: 1.35; display: block; }
.admin-tuile .pastille { position: absolute; top: -10px; right: -6px; background: var(--rouge); color: #fff; border-radius: 999px; font-weight: 700; padding: .1rem .6rem; font-size: .9rem; border: 3px solid var(--sable); }
.ligne-admin { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
.ligne-admin .infos { flex: 1 1 260px; }
.ligne-admin h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.liste-admin { display: grid; gap: .75rem; }
.etape { display: flex; align-items: center; gap: .6rem; font-family: var(--titre); font-size: 1.2rem; color: var(--brun); margin: 0 0 .75rem; font-weight: 700; }
.etape .num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brun); color: #fff; font-family: var(--texte); font-size: 1rem; flex: none; }
.barre-actions { position: sticky; bottom: 0; background: linear-gradient(to top, var(--sable) 75%, transparent); padding: 1rem 0 1.25rem; margin-top: 1rem; z-index: 5; }

/* ── Toasts et dialogues ── */
.toasts { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: 1rem; display: grid; gap: .5rem; width: min(560px, calc(100% - 24px)); }
.toast { display: flex; gap: .75rem; align-items: center; padding: 1rem 1.2rem; border-radius: 14px; font-weight: 700; box-shadow: 0 10px 30px rgb(0 0 0 / .25); animation: entre .25s ease-out; font-size: 1.05rem; }
.toast-ok { background: var(--vert); color: #fff; }
.toast-erreur { background: var(--rouge-fonce); color: #fff; }
.toast.sortie { opacity: 0; transform: translateY(8px); transition: .5s; }
@keyframes entre { from { opacity: 0; transform: translateY(10px); } }
.dialogue { border: 0; border-radius: 18px; padding: 1.5rem; width: min(480px, calc(100% - 24px)); background: var(--papier); color: var(--encre); box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.dialogue::backdrop { background: rgb(30 20 12 / .55); }
.dialogue-texte { font-size: 1.15rem; font-weight: 700; color: var(--brun); }
.dialogue-boutons { display: grid; gap: .6rem; }

/* ── Pied de page ── */
.pied { background: var(--brun); color: #eadfcd; padding: 2rem 0; font-size: .95rem; }
.pied a { color: #fff; }
.pied-grille { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.pied-marque { display: flex; gap: .9rem; align-items: center; }
.pied-marque p { margin: 0; }
.pied-liens { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
.pied-liens a { display: inline-flex; min-height: 44px; align-items: center; }

/* ── Impression (liste des inscrits) ── */
@media print {
  .entete, .pied, #bandeau-demo, .groupe-boutons, .fil, .toasts, .no-print, .barre-actions { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .carte, .tableau-conteneur { box-shadow: none; border: 1px solid #999; }
  .admin-entete { background: none; color: #000; padding: 0 0 1rem; }
  .admin-entete h1, .admin-entete p { color: #000; }
  th { background: #eee; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* Ajustements téléphone */
@media (max-width: 599px) {
  .heros-grille { padding-block: 2rem 2.5rem; gap: 1.25rem; }
  .heros-logo { width: 130px; order: -1; justify-self: start; }
  .ev-date { width: 66px; }
  .ev-date .j { font-size: 1.6rem; }
  .ev-carte { gap: .8rem; }
  #bandeau-demo { font-size: .85rem; }
  #bandeau-demo button { min-height: 38px; padding: .3rem .6rem; }
}
