/* 1. Polices (hébergées sur le site, spec §7 : aucun traceur) */
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/atkinson-hyperlegible-400.f1f8a8210104.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/atkinson-hyperlegible-700.13a58e05dfd2.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/fraunces-700.d99d78cac1e8.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/fraunces-800.92fad7e13fdd.woff2") format("woff2"); }

/* 2. Variables */
:root {
  color-scheme: light dark;
  --creme: #fbf6ea; --papier: #fffdf7; --encre: #2b2118; --encre-douce: #5e5245;
  --or: #c9971c; --or-clair: #f3dd9b; --or-pale: #faf0d2; --or-texte: #7d5700;
  --rouge: #9b2c1f; --vert: #2e6b3f; --trait: #e6dac0; --bleu: #1f4e8c; --bleu-pale: #e4eef5;
  --or-neutre: #eadfc6; --or-mat: #d9c9a3; --vert-pale: #e3f0e5;
  --brun-jauge: #4a3820;
  /* Lot « lisibilité » §1 : l'or qui sert de repère (contour de focus, courbe) et le bord des champs ont leur
     variable, à 3:1 au moins sur chaque fond ; `--or` reste l'or du décor, `--trait` le filet entre deux lignes. */
  --or-interface: #946f0f; --bord-champ: #948464;
  /* Rôles séparés (spec mode sombre §1.1) : `--encre` reste la couleur du texte, `--or-clair` un remplissage
     d'accent ; les fonds accentués et les panneaux ont leurs propres variables, qui s'inversent en sombre. */
  --bouton-fond: #2b2118; --bouton-texte: #f3dd9b;
  --panneau: #2b2118; --sur-panneau: #f3dd9b;
  --sur-rouge: #fff; --sur-or-mat: #2b2118;
  --jauge-fin: #946f0f; --badge-debut: #fff6d8; --badge-fin: #f1d78c;
  /* Lot B : le coffre est en or (rôle à part : il peut changer de teinte sans toucher la jauge). */
  --coffre-debut: #c9971c; --coffre-fin: #e8bf4a; --sur-coffre: #2b2118;
  --date-fond: #7d5700; --sur-date: #fff6d8;
  /* Teintes des initiales, une par immeuble (design lot A §7). */
  --teinte-1-fond: #e8bf4a; --teinte-1-texte: #2b2118; --teinte-2-fond: #2e6b3f; --teinte-2-texte: #fbf6ea;
  --teinte-3-fond: #1f4e8c; --teinte-3-texte: #fbf6ea; --teinte-4-fond: #a4552a; --teinte-4-texte: #fbf6ea;
  --teinte-5-fond: #5e3a6b; --teinte-5-texte: #fbf6ea; --teinte-6-fond: #1f6b6b; --teinte-6-texte: #fbf6ea;
  /* Réorganisation §4.1 : une teinte par rôle, forte pour l'étiquette, pâle pour le fond de la zone. */
  --role-moderation: #5e3a6b; --role-moderation-pale: #f1e8f4; --role-bureau: #1a5c5c; --role-bureau-pale: #dff0ee;
  --role-technique: #44505c; --role-technique-pale: #e7ebef;
  --titre: "Fraunces", Georgia, serif;
  --texte: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  --rayon: 16px; --rayon-petit: 12px;
  --ombre: 0 1px 2px rgba(43, 33, 24, .06), 0 6px 16px -8px rgba(43, 33, 24, .22);
  --ombre-legere: 0 1px 3px rgba(43, 33, 24, .18);
  --ombre-curseur: 0 1px 3px rgba(43, 33, 24, .3);
  --ombre-publier: 0 4px 12px rgba(0, 0, 0, .25);
  /* Lot B : la barre d'onglets et le coffre doré ont leur propre ombre. */
  --ombre-onglets: 0 -8px 24px -12px rgba(43, 33, 24, .3);
  --ombre-coffre: 0 10px 24px -10px rgba(201, 151, 28, .6);
  /* Lot B : les cartes et le rappel portent déjà --ombre au repos, il faut plus marqué au survol. */
  --ombre-survol: 0 2px 4px rgba(43, 33, 24, .08), 0 12px 24px -10px rgba(43, 33, 24, .3);
  /* Lot D : le voile derrière la feuille de confirmation (::backdrop). */
  --voile-feuille: rgba(43, 33, 24, .45);
  /* Lot E : boutons posés sur une photo, et fond du plein écran (sombre dans les deux modes). */
  --voile-bouton: rgba(43, 33, 24, .55); --sur-plein-ecran: #fbf6ea; --plein-ecran-fond: #14100c;
  /* Lisibilité §6 : le compteur est un texte, il lui faut 4,5:1 même sur une photo blanche. */
  --voile-compteur: rgba(43, 33, 24, .72);
  --hauteur-onglets: 64px;
  --largeur-menu: 248px;
}

/* 2 bis. Mode sombre « Nuit chaude » (spec mode sombre) : suit le réglage de l'appareil, sans bouton. */
@media (prefers-color-scheme: dark) {
  :root {
    --creme: #1c1612; --papier: #272019; --encre: #f3e9d8; --encre-douce: #bfb2a0;
    --or: #d9a92e; --or-clair: #5c4621; --or-pale: #3a2e17; --or-texte: #e8c56b;
    --rouge: #e0796b; --vert: #7cc28e; --trait: #3b3026; --bleu: #8db4e8; --bleu-pale: #1d2a3a;
    --or-neutre: #3a3127; --or-mat: #9a845f; --vert-pale: #1d2e22;
    --brun-jauge: #33291f;
    --or-interface: #d9a92e; --bord-champ: #857359;
    --bouton-fond: #d9a92e; --bouton-texte: #1c1612;
    --panneau: #33291f; --sur-panneau: #f3dd9b;
    --sur-rouge: #1c1612; --sur-or-mat: #1c1612;
    --jauge-fin: #b98d22; --badge-debut: #4a3a1c; --badge-fin: #6b5323;
    --coffre-debut: #d9a92e; --coffre-fin: #b98d22; --sur-coffre: #1c1612;
    --date-fond: #e8c56b; --sur-date: #1c1612;
    --teinte-1-fond: #b98d22; --teinte-1-texte: #1c1612; --teinte-2-fond: #7cc28e; --teinte-2-texte: #1c1612;
    --teinte-3-fond: #8db4e8; --teinte-3-texte: #1c1612; --teinte-4-fond: #e8a35c; --teinte-4-texte: #1c1612;
    --teinte-5-fond: #c9a3d6; --teinte-5-texte: #1c1612; --teinte-6-fond: #7ec8c8; --teinte-6-texte: #1c1612;
    --role-moderation: #d7b6e2; --role-moderation-pale: #33263a; --role-bureau: #8fd0cd; --role-bureau-pale: #18302f;
    --role-technique: #b9c4cf; --role-technique-pale: #262c33;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px -8px rgba(0, 0, 0, .6);
    --ombre-legere: 0 1px 3px rgba(0, 0, 0, .45);
    --ombre-curseur: 0 1px 3px rgba(0, 0, 0, .6);
    --ombre-publier: 0 4px 12px rgba(0, 0, 0, .55);
    --ombre-onglets: 0 -8px 24px -12px rgba(0, 0, 0, .7);
    --ombre-coffre: 0 10px 24px -10px rgba(0, 0, 0, .6);
    --ombre-survol: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 24px -10px rgba(0, 0, 0, .7);
    --voile-feuille: rgba(0, 0, 0, .6);
    --voile-bouton: rgba(0, 0, 0, .6); --sur-plein-ecran: #f3e9d8; --plein-ecran-fond: #0d0a08;
    --voile-compteur: rgba(0, 0, 0, .7);
  }
}

/* 3. Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Lot B : la page s'ouvre sur un voile doré (220 px) qui défile avec elle ; crème uni au-delà. */
body { margin: 0; background-color: var(--creme); background-image: linear-gradient(180deg, color-mix(in srgb, var(--or-pale) 55%, var(--creme)), var(--creme) 220px); background-repeat: no-repeat; color: var(--encre); font: 1.0625rem/1.45 var(--texte); overflow-wrap: break-word; }
a { color: var(--or-texte); }
h1, h2 { font-family: var(--titre); line-height: 1.15; text-wrap: balance; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.aller-au-contenu { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--bouton-fond); color: var(--bouton-texte); font-weight: 700; }
.aller-au-contenu:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--or-interface); outline-offset: 2px; }

/* 4. Cadre : colonne de contenu, en-tête, onglets (mobile), menu latéral (ordinateur) */
.page { max-width: 520px; margin: 0 auto; padding: calc(8px + env(safe-area-inset-top)) 16px calc(var(--hauteur-onglets) + env(safe-area-inset-bottom) + 24px); }
.sans-menu .page { padding-bottom: 40px; }
/* Sous 960px, les onglets fixes en bas peuvent cacher un champ ou une ancre au focus (WCAG 2.4.11) : la classe
   est sur body, donc html:has(body.avec-menu) est la façon la plus simple de la reporter sur l'élément scrollable. */
html:has(body.avec-menu) { scroll-padding-bottom: calc(var(--hauteur-onglets) + env(safe-area-inset-bottom) + 24px); }
@media (min-width: 600px) { .page { max-width: 680px; } }
.entete { display: flex; align-items: center; min-height: 48px; margin: 0 0 12px; }
.sans-menu .entete { justify-content: center; margin: 24px 0; }
.marque { font-family: var(--titre); font-weight: 800; font-size: 1.375rem; color: var(--encre); text-decoration: none; }
/* Lot « lisibilité » §2 : la marque se touche sur 44 px ; l'en-tête en fait 48, rien ne bouge. */
.entete .marque { display: inline-flex; align-items: center; min-height: 44px; }
/* Audit point 15 : l'emblème de l'app sur la page de connexion (le fichier est un carré foncé, d'où l'arrondi). */
.embleme { display: block; width: 72px; height: 72px; margin: 8px auto 16px; border-radius: 18px; }
.retour { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--or-texte); text-decoration: none; }

.onglets { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--papier); box-shadow: var(--ombre-onglets); }
.onglets a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
  min-height: 52px; font-size: min(.8125rem, 4.1vw); font-weight: 700; color: var(--encre-douce); text-decoration: none; }
.onglets .icone { width: 24px; height: 24px; }
/* Onglet actif : une pastille dorée derrière l'icône (comme le menu latéral sur ordinateur), plus lisible qu'un
   simple changement de couleur entre deux bruns de même clarté. */
.onglets a[aria-current="page"] { color: var(--encre); }
.onglets a[aria-current="page"] > .icone { box-sizing: content-box; padding: 3px 16px; border-radius: 999px; background: var(--or-clair); }
.onglets a.publier[aria-current="page"] .rond { outline: 3px solid var(--or-interface); outline-offset: 2px; }
.onglets .rond { display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%;
  background: var(--bouton-fond); color: var(--bouton-texte); box-shadow: var(--ombre-publier); }
.onglets .rond .icone { width: 28px; height: 28px; }
/* Fiche-confiance §3 : quand la page a sa propre action (« Je peux aider » ou « Ça m'intéresse »), le rond Publier ne la recouvre plus :
   il redevient un onglet comme les autres. */
.action-en-page .onglets .rond { width: auto; height: auto; margin-top: 0; border-radius: 0; background: none; color: inherit; box-shadow: none; }
.action-en-page .onglets .rond .icone { width: 24px; height: 24px; }
.onglets .pastille { position: absolute; top: 0; left: calc(50% + 6px); }

.menu-lateral { display: none; }

@media (min-width: 960px) {
  html:has(body.avec-menu) { scroll-padding-bottom: 0; }
  .onglets { display: none; }
  .avec-menu .page { max-width: none; margin: 0 0 0 var(--largeur-menu); padding: 24px 48px 56px; }
  .avec-menu .page > * { max-width: 720px; margin-left: auto; margin-right: auto; }
  /* Lot 2 : une page qui contient un conteneur .large s'élargit à 1000 px, tous ses enfants avec lui (même bord gauche). */
  .avec-menu .page:has(> .large) > * { max-width: 1000px; }
  /* La règle générale centre les enfants de la page ; le titre de section, ajusté à son texte depuis le PRD 4.30, se centrait
     avec eux : il revient au bord gauche de la colonne (720 px). */
  .avec-menu .page > .titre-section { margin-left: max(0px, calc((100% - 720px) / 2)); margin-right: auto; }
  /* Une page à conteneur .large est large (1000 px) : son titre de section se cale sur cette colonne-là. */
  .avec-menu .page:has(> .large) > .titre-section { margin-left: max(0px, calc((100% - 1000px) / 2)); }
  .avec-menu .page > .btn { display: flex; }
  .large { display: grid; gap: 32px; align-items: start; }
  .grille-accueil { grid-template-columns: minmax(0, 1fr) 300px; }
  .grille-accueil .colonne-cote { grid-column: 2; grid-row: 1; }
  .grille-liste { grid-template-columns: 200px minmax(0, 1fr); }
  .large.grille-liste .colonne-principale { margin-top: 0; }
  .grille-liste .puces { flex-direction: row; align-items: flex-start; flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .grille-liste .puce { max-width: 100%; }
  .grille-liste .puces .separateur { width: 100%; height: 1px; margin: 4px 0; }
  .colonne-cote { position: sticky; top: 24px; }
  /* Spec hiérarchie §1.1 : avec les dates et les actualités, la colonne dépasse l'écran ; collée, elle masquerait sa fin. */
  .grille-accueil .colonne-cote { position: static; }
  /* `.rappel` (plus bas dans la feuille) impose display: flex et l'emporte sur `.mobile-seulement` à spécificité égale. */
  .rappel.mobile-seulement { display: none; }
  .grille-detail { grid-template-columns: minmax(0, 1fr) 320px; }
  .large.grille-detail .colonne-cote { margin-top: 0; }
  .large .colonne-principale > .rubrique:first-child, .grille-accueil .colonne-principale > section:first-child > .rubrique:first-child { margin-top: 0; }
  .large .colonne-principale > .titre-section:first-child, .grille-accueil .colonne-principale > section:first-child > .titre-section:first-child { margin-top: 0; }
  .grille-coffre { grid-template-columns: minmax(0, 1fr) 320px; }
  .grille-coffre .colonne-cote { grid-column: 2; grid-row: 1; }
  .grille-membre { grid-template-columns: minmax(0, 1fr) 320px; }
  .large.grille-membre .colonne-cote > .rubrique:first-child { margin-top: 0; }
  .large.grille-membre .colonne-cote > .titre-section:first-child { margin-top: 0; }
  .avec-menu .entete { min-height: 0; }
  .avec-menu .entete .marque, .mobile-seulement { display: none; }
  .menu-lateral { position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; display: flex; flex-direction: column;
    width: var(--largeur-menu); overflow-y: auto; padding: 24px 16px 0; background: var(--papier); border-right: 1px solid var(--trait); }
  .menu-lateral .marque { margin: 0 12px 8px; font-size: 1.1875rem; }
  .menu-lateral .publier { margin: 8px 0 16px; }
  .menu-lateral .publier[aria-current="page"] { outline: 3px solid var(--or-interface); outline-offset: 2px; }
  .menu-lateral ul { list-style: none; margin: 0; padding: 0; }
  .menu-lateral li a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px; border-radius: var(--rayon-petit);
    color: var(--encre); font-weight: 700; text-decoration: none; }
  .menu-lateral li a:hover { background: var(--or-pale); }
  .menu-lateral li a[aria-current="page"] { background: var(--or-pale); color: var(--or-texte); }
  .menu-lateral .icone { width: 20px; height: 20px; flex: none; }
  .menu-lateral .rubrique { margin: 16px 12px 4px; }
  /* Réorganisation §1.6 : les blocs de rôle du menu prennent la teinte du rôle. */
  .menu-lateral .reserve { margin: 16px 0 0; padding: 8px; }
  .menu-lateral .reserve .etiquette-role { margin: 4px; }
  .menu-lateral .reserve li a:hover, .menu-lateral .reserve li a[aria-current="page"] { background: var(--papier); color: var(--role); }
  .menu-lateral .deconnexion { margin-top: auto; position: sticky; bottom: 0; padding: 16px 0; background: var(--papier); border-top: 1px solid var(--trait); }
}

/* 5. Éléments communs */
/* Lot B : les boîtes papier flottent sur le crème (ombre), les filets ne séparent plus que des lignes. */
.carte { background: var(--papier); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); }
.carte + .carte { margin-top: 12px; }
/* Tableau de bord du bureau : six cartes en grille, une colonne sur téléphone. */
.indicateurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
/* La règle `.carte + .carte` (marge entre deux cartes empilées) ne vaut pas dans une grille, qui a son `gap`. */
.indicateurs > .carte { margin: 0; }
.indicateur { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.indicateur > p { margin: 0; }
.indicateur .valeur { font: 800 1.875rem/1.1 var(--titre); color: var(--encre); font-variant-numeric: tabular-nums; }
/* La mention se range en bas : les cartes d'une même rangée ont leurs mentions alignées. */
.indicateur .mention { margin-top: auto; }
.carte > :is(p, ul):first-child { margin-top: 0; }
.carte > :is(p, ul, form):last-child { margin-bottom: 0; }
/* Hiérarchie §2.3 : dans Mes échanges, une carte « À faire » attend une action ; le sur-titre dit laquelle. */
.a-faire > .carte { border-left: 4px solid var(--or-interface); }
.a-faire > .carte + .carte { margin-top: 10px; }
.a-faire .type-annonce { display: block; margin-bottom: 4px; }
/* Hiérarchie §2.4 : sous-titres d'« En cours », sans le filet du titre de section. */
.sous-titre { font: 700 1.0625rem/1.25 var(--titre); color: var(--encre); margin: 20px 0 8px; }
.titre-section + .sous-titre { margin-top: 12px; }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
.champ, input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; border: 2px solid var(--bord-champ);
  border-radius: var(--rayon-petit); background: var(--papier); color: var(--encre);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--or-interface); border-color: var(--or-interface); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; width: 100%;
  border: 0; border-radius: 14px; font: 700 1.0625rem var(--texte); cursor: pointer; text-decoration: none; margin-top: 16px; }
.btn-or { background: var(--bouton-fond); color: var(--bouton-texte); }
.btn-clair { background: var(--papier); color: var(--encre); border: 2px solid var(--encre); }
/* Audit point 15 : un retrait est le geste le moins courant de la page ; il garde la cible de `.btn`, pas son poids. */
.btn-discret { background: none; border: 0; color: var(--encre-douce); font-weight: 400; text-decoration: underline; }
/* Lot « formulaires et photos » §2 : tout champ de fichier montre un bouton de l'app ; le texte du navigateur
   (« Aucun fichier choisi ») reste à côté, seul retour quand le script des photos ne tourne pas. */
input[type=file] { display: block; width: 100%; max-width: 100%; margin: 0; font: inherit; font-size: .875rem; color: var(--encre-douce); }
input[type=file]::file-selector-button { min-height: 48px; margin-right: 12px; padding: 10px 18px; border: 2px solid var(--encre); border-radius: var(--rayon-petit); background: var(--papier); color: var(--encre); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--or-pale); }
input[type=file]:focus-visible { outline: none; }
input[type=file]:focus-visible::file-selector-button { outline: 3px solid var(--or-interface); outline-offset: 2px; }
.erreur, .errorlist { color: var(--rouge); font-weight: 700; padding: 0; list-style: none; }
.message { background: var(--or-pale); border-radius: var(--rayon-petit); padding: 10px 12px; }
/* Lisibilité §3.3 : le résumé des erreurs en tête d'un formulaire ; chaque ligne mène à son champ. */
.resume-erreurs { margin-bottom: 16px; }
.resume-erreurs p, .resume-erreurs ul { margin: 0; padding: 0; list-style: none; }
.resume-erreurs a { display: flex; align-items: center; min-height: 44px; }
.aide { color: var(--encre-douce); font-size: .9375rem; }
.rubrique { font: 700 .8125rem/1.2 var(--texte); letter-spacing: .08em; text-transform: uppercase; color: var(--or-texte); margin: 24px 0 8px; }
/* Audit point 11 : le titre de section se repère en faisant défiler ; le filet doré a la longueur du titre. */
.titre-section { width: fit-content; font: 700 1.25rem/1.2 var(--titre); color: var(--encre); margin: 28px 0 10px; }
.titre-section::after { content: ""; display: block; width: 100%; height: 3px; margin-top: 6px; border-radius: 2px; background: var(--or); }
.pastille { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--rouge); color: var(--sur-rouge); font: 700 .75rem/1 var(--texte); }
.libelle { flex: 1; }
.liste-liens { list-style: none; margin: 0; padding: 0 16px; background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); }
.liste-liens li + li { border-top: 1px solid var(--trait); }
.liste-liens a { display: flex; align-items: center; gap: 8px; min-height: 52px; color: var(--encre); font-weight: 700; text-decoration: none; }
.liste-liens a::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px; border: solid var(--encre-douce); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }

/* Groupes de choix (lot 2) : vrais boutons radio cachés, portés par une bascule ou des puces */
.choix { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
.choix legend { padding: 0; margin: 0 0 6px; font-weight: 700; }
.bascule { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px; background: var(--or-neutre); }
.bascule label { display: grid; place-items: center; min-height: 48px; margin: 0; padding: 6px 8px; border-radius: 11px;
  text-align: center; font-size: 1rem; color: var(--encre-douce); cursor: pointer; }
.bascule label:has(:checked) { background: var(--papier); color: var(--encre); box-shadow: var(--ombre-legere); }
/* Prêts : le même sélecteur, en liens (Coups de main | Objets, Une annonce | Un objet). */
.bascule-liens { margin: 0 0 8px; grid-auto-columns: auto; }
.bascule-liens a { display: grid; place-items: center; min-height: 48px; padding: 6px 8px; border-radius: 11px; text-align: center;
  font-size: 1rem; font-weight: 700; color: var(--encre-douce); text-decoration: none; }
.bascule-liens a[aria-current] { background: var(--papier); color: var(--encre); box-shadow: var(--ombre-legere); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { display: inline-flex; align-items: center; min-height: 48px; margin: 0; padding: 6px 14px; border: 2px solid var(--bord-champ);
  border-radius: 999px; background: var(--papier); color: var(--encre); font-size: .9375rem; font-weight: 700; text-decoration: none; cursor: pointer; }
a.puce[aria-current] { border-color: var(--bouton-fond); background: var(--bouton-fond); color: var(--bouton-texte); }
.puce:has(:checked) { border-color: var(--bouton-fond); background: var(--bouton-fond); color: var(--bouton-texte); }
/* Lot « formulaires et photos » §4 : le domaine d'une annonce en tuiles, icône au-dessus du nom, hauteurs égales. */
.tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.tuile { display: block; margin: 0; cursor: pointer; }
.tuile > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; min-height: 72px; padding: 10px 6px; hyphens: auto; overflow-wrap: anywhere; border: 2px solid var(--bord-champ); border-radius: 14px; background: var(--papier); color: var(--encre); font-size: .875rem; font-weight: 700; line-height: 1.2; text-align: center; }
.tuile .icone { width: 24px; height: 24px; color: var(--or-texte); }
.tuile input:checked + span { border-color: var(--bouton-fond); background: var(--bouton-fond); color: var(--bouton-texte); }
.tuile input:checked + span .icone { color: currentColor; }
.tuile input:focus-visible + span { outline: 3px solid var(--or-interface); outline-offset: 2px; }
@media (max-width: 339px) { .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bascule label:has(:focus-visible), .puce:has(:focus-visible) { outline: 3px solid var(--or-interface); outline-offset: 2px; }
/* Repli sans :has (navigateurs anciens) : le span à l'intérieur du label change, pas le label entier */
.bascule input:checked + span { background: var(--papier); color: var(--encre); box-shadow: var(--ombre-legere); }
.puce input:checked + span { background: var(--bouton-fond); color: var(--bouton-texte); }
/* Avec :has, le label porte déjà la boîte : le repli se retire, sinon le segment coché a une boîte dans la boîte.
   Un navigateur sans :has ignore cette règle et garde le repli. */
.bascule label:has(:checked) span { background: none; box-shadow: none; }
.choix input:focus-visible + span { outline: 3px solid var(--or-interface); outline-offset: 2px; }
/* Avec :has, le libellé (bascule, puce) ou la case elle-même porte déjà le contour : le repli se retire, sinon le
   choix actif a un cadre dans le cadre. Un nouveau type de choix à entrée cachée doit recevoir son propre contour. */
.choix label:has(:focus-visible) span { outline: none; }
/* Lot « formulaires et photos » §4 : la tuile rend son contour (même spécificité que la règle ci-dessus, placée après). */
.choix .tuile:has(:focus-visible) > span { outline: 3px solid var(--or-interface); outline-offset: 2px; }
/* Tarif : caché tant que Bénévole est coché, sauf s'il porte une erreur (sans :has, il reste visible) */
.formulaire-annonce:has(input[name="mode"][value="benevole"]:checked) .champ-tarif:not(:has(.errorlist)) { display: none; }

/* 6. Pages (styles existants, repris sans changement ; lots 2 à 5) */
/* Lot 2 : carte d'annonce, mentions, Accueil */
.carte-icone { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; }
a.carte { display: block; color: var(--encre); text-decoration: none; }
a.carte.carte-icone { display: grid; }
.icone-domaine { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(160deg, var(--or-clair), var(--or-pale)); }
.carte-icone .corps { display: grid; justify-items: start; gap: 2px; }
.titre-annonce { line-height: 1.25; }
.carte-icone .aide { margin: 0 0 4px; font-size: .875rem; }
.type-annonce { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.type-besoin { color: var(--rouge); }
.type-offre { color: var(--vert); }
.mention { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .875rem; font-weight: 700; }
.mention-benevole { background: var(--or-pale); color: var(--or-texte); }
.mention-payant { background: var(--bleu-pale); color: var(--bleu); }
.mention-etat { background: var(--or-neutre); color: var(--encre); }
/* « Cible atteinte » du tableau de bord : le vert du système, pendant de `.mention-etat`. */
.mention-atteinte { background: var(--vert-pale); color: var(--vert); }
.coffre-mini { display: block; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, var(--coffre-debut), var(--coffre-fin));
  color: var(--sur-coffre); text-decoration: none; box-shadow: var(--ombre-coffre); }
.coffre-mini b { display: block; font: 800 1.875rem/1.1 var(--titre); color: var(--sur-coffre); }
.rappel { display: flex; align-items: center; min-height: 48px; margin-top: 10px; padding: 8px 12px; border-radius: 14px;
  background: var(--papier); color: var(--encre); font-weight: 700; text-decoration: none; box-shadow: var(--ombre); }
.rappel::before { content: ""; flex: none; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: var(--rouge); }
/* Spec hiérarchie §1.2 : le raccourci vers les besoins est un repère, pas une action en attente : pastille dorée. */
.rappel-doux::before { background: var(--or); }
.rappel::after, .lien-suite::after { content: "›" / ""; margin-left: .3em; }
.lien-suite { font-weight: 700; }
/* Lot « lisibilité » §2 : un lien seul sur sa ligne se touche sur 44 px au moins. Le remplissage agrandit la cible,
   les marges négatives le compensent : la page ne bouge pas, que le lien tienne sur une ligne ou sur deux. */
.lien-seul, .lien-suite { display: inline-block; padding-block: 13px; margin-block: -13px; }
.coffre-grand { text-align: center; padding: 16px 14px 12px; border-radius: 20px; background: linear-gradient(160deg, var(--coffre-debut), var(--coffre-fin));
  color: var(--sur-coffre); box-shadow: var(--ombre-coffre); }
.coffre-grand p { margin: 4px 0; }
.coffre-grand .val { font-family: var(--titre); font-size: 2.75rem; font-weight: 800; line-height: 1.1; }
.echelle { position: relative; height: 12px; margin: 16px 8px 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--rouge) 0 var(--zero, 0%), var(--brun-jauge) var(--zero, 0%) 100%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--rouge) 70%, var(--brun-jauge)) 0 var(--zero, 0%), var(--brun-jauge) var(--zero, 0%) 100%); }
/* Sur l'or, le curseur est papier cerclé d'encre ; l'anneau extérieur prend la couleur du fond pour le détacher du rail. */
.echelle i { position: absolute; top: -5px; width: 22px; height: 22px; border-radius: 50%; background: var(--papier); border: 3px solid var(--encre); box-shadow: 0 0 0 1px var(--coffre-fin); transform: translateX(-50%); left: var(--pos); }
.echelle .zero { position: absolute; top: -3px; width: 2px; height: 18px; background: var(--coffre-fin); }
.echelle-legende { display: flex; justify-content: space-between; font-size: .8125rem; }
.ligne { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--trait); }
.ligne:last-child { border-bottom: 0; }
.ligne .plus { color: var(--vert); font-weight: 700; }
.ligne .moins { color: var(--rouge); font-weight: 700; }
.ligne .aide { grid-column: 1 / -1; }
/* Lot C §3 : trente jours de solde en une ligne. Le SVG s'étire en largeur, les traits gardent leur épaisseur ;
   le point final est un trait nul à bouts ronds (un cercle deviendrait une ellipse). */
.courbe { display: block; width: 100%; height: 96px; overflow: visible; animation: devoile 900ms cubic-bezier(.2, .7, .2, 1) backwards; }
.courbe path, .courbe line { vector-effect: non-scaling-stroke; }
.courbe .trait { fill: none; stroke: var(--or-interface); stroke-width: 2.5; stroke-linejoin: round; }
.courbe .point { stroke: var(--or-interface); stroke-width: 9; stroke-linecap: round; }
.courbe .zero { stroke: var(--encre-douce); stroke-opacity: .4; stroke-dasharray: 3 4; }
.courbe .haut { stop-color: var(--or-interface); stop-opacity: .35; }
.courbe .bas { stop-color: var(--or-interface); stop-opacity: 0; }
.carte-courbe .echelle-legende { margin: 6px 0 0; color: var(--encre-douce); }
@keyframes devoile { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -6px 0 0); } }
.recap { text-align: center; }
.grand { font-family: var(--titre); font-size: 2.5rem; font-weight: 800; line-height: 1; margin: 8px 0; color: var(--or-texte); }
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
summary.lien { margin-top: 6px; padding: 10px 0; text-align: center; text-decoration: underline; color: var(--encre-douce); }

/* Reconnaissance : poinçon, jauge, badges, Mercis en or (maquette 7) */
.poincon { width: 92px; height: 92px; flex: none; }
.personne { display: flex; gap: 14px; align-items: center; }
.personne h1 { margin: 0; }
.personne p { margin: 2px 0 0; font-size: .875rem; color: var(--encre-douce); }
.jauge { height: 10px; border-radius: 99px; background: var(--or-neutre); overflow: hidden; margin: 8px 0 4px; }
.jauge i { display: block; height: 100%; background: linear-gradient(90deg, var(--or), var(--jauge-fin)); border-radius: 99px; width: var(--rempli); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge { text-align: center; font-size: .8125rem; line-height: 1.2; padding: 10px 4px; border-radius: 14px; background: var(--papier); box-shadow: var(--ombre); }
.badge .b { font-size: 1.75rem; display: block; margin-bottom: 4px; }
.badge.gagne { background: linear-gradient(160deg, var(--badge-debut), var(--badge-fin)); box-shadow: var(--ombre), inset 0 0 0 1px var(--or); font-weight: 700; }
.badge.verrou { opacity: .55; }
.merci { font-style: italic; font-size: .9375rem; line-height: 1.4; margin: 10px 0; }
.merci small { display: block; font-style: normal; color: var(--encre-douce); font-size: .8125rem; margin-top: 2px; }

/* Lot 2 : liste des annonces */
.filtres .rubrique { margin: 12px 0 6px; }
.filtres nav:first-child .rubrique { margin-top: 0; }
.grille-liste .colonne-principale { margin-top: 20px; }
/* Téléphone : les domaines défilent sur une ligne, dans leur propre boîte (la page ne défile jamais de côté). */
.puces-defilantes { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.puces-defilantes .puce { flex: none; }
/* Lot « formulaires et photos » §5 : un trait entre le type et les domaines, dans la même rangée. */
.puces .separateur { flex: none; align-self: stretch; width: 1px; margin: 6px 2px; background: var(--trait); }

/* Lot 2 : détail d'une annonce, bloc personne */
.grille-detail h1 { margin: 4px 0 14px; }
.infos-annonce { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .9375rem; }
.colonne-cote .carte + .carte, .grille-detail .colonne-cote { margin-top: 12px; }
.bloc-personne { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; color: var(--encre); text-decoration: none; }
.bloc-personne .aide { display: block; margin: 0; font-size: .875rem; }
.initiales { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--or-mat);
  font: 800 1.1875rem var(--titre); color: var(--sur-or-mat); }
.colonne-cote .bloc-personne + .aide, .colonne-cote .bloc-personne + .message { margin-top: 12px; }
/* Fiche-confiance §1 : sous l'auteur, ce que l'association garantit, sans compteur. */
.garantie { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--encre-douce); font-size: .9375rem; }
.garantie .icone { flex: none; width: 18px; height: 18px; color: var(--vert); }

/* Lot 2 : Mes annonces */
.carte-mienne .corps { gap: 4px; }
.carte-mienne .titre-annonce { font-weight: 700; color: var(--encre); }
/* Audit point 15 : la carte entière est un lien ; le rappel des demandes la suit, collé dessous. */
.suite-mienne { margin: 8px 0 0; }
.suite-mienne + .carte { margin-top: 12px; }

/* Lot 2 : Mes échanges */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.duo .btn { margin-top: 0; padding: 0 8px; text-align: center; }
.coordonnees { margin: 10px 0 0; padding: 4px 12px; border-radius: 14px; background: var(--vert-pale); }
.coordonnees p { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; margin: 8px 0; }
.carte > .bloc-personne + p { margin-top: 12px; }

/* Lot 3 : durée en puces */
.autre-duree { margin-top: 10px; }
.autre-duree summary { display: inline-flex; align-items: center; min-height: 48px; margin-top: 0; }
.puces-petites { gap: 6px; margin-top: 6px; }
.puces-petites .puce { padding: 4px 10px; font-size: .9375rem; }
.carte-icone + .formulaire-duree { margin-top: 12px; }

/* Lot 3 : page d'un service */
.recap .bloc-personne { justify-content: center; text-align: left; width: max-content; max-width: 100%; margin: 0 auto 8px; }
.titre-service { font-weight: 700; }
.recap .mention { margin-top: 4px; }
.delai { margin: 12px 0 0; text-align: center; color: var(--encre-douce); font-size: .9375rem; }
details.action { margin-top: 12px; }
details.action > summary.btn { margin-top: 0; }
details.action[open] > .carte { margin-top: 12px; }
.lien-alerte { display: block; min-height: 48px; padding: 12px 0; text-align: center; color: var(--rouge); font-weight: 700; text-decoration: underline; }
.carte-merci { margin-top: 16px; }
.carte-merci .rubrique { margin-top: 0; }
blockquote.merci { margin: 8px 0 0; }

/* Lot 3 : coffre */
.grille-coffre .colonne-cote .message { margin-top: 12px; }

/* Lot 3 : page d'un membre */
.progression { margin-top: 16px; }
blockquote.carte.merci { margin: 0; padding: 12px 16px; }
blockquote.carte.merci + blockquote.carte.merci { margin-top: 10px; }

/* Lot 4 : le compte */
.centre { text-align: center; }
.charte h2 { font-size: 1.25rem; margin: 24px 0 8px; }
.charte > h2:first-child { margin-top: 0; }
.carte > .rubrique:first-child { margin-top: 0; }
.coordonnees-compte { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--trait); }
.coordonnees-compte p { margin: 0 0 4px; overflow-wrap: anywhere; }
.coordonnees-compte p:last-child { margin: 8px 0 0; }
.interrupteurs { list-style: none; margin: 0; padding: 0; }
.interrupteurs li + li { border-top: 1px solid var(--trait); }
.interrupteur { display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 0; cursor: pointer; }
.interrupteur span { flex: 1; }
.interrupteur input { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 52px; height: 32px; margin: 0;
  border-radius: 999px; background: var(--bord-champ); cursor: pointer; transition: background .15s; }
.interrupteur input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--papier); box-shadow: var(--ombre-curseur); transition: transform .15s; }
.interrupteur input:checked { background: var(--bouton-fond); }
.interrupteur input:checked::after { transform: translateX(20px); background: var(--bouton-texte); }
.interrupteurs + .aide { margin-top: 12px; }
ol.etapes { list-style: none; counter-reset: etape; margin: 0; padding: 0; }
ol.etapes li { counter-increment: etape; position: relative; min-height: 28px; padding-left: 40px; }
ol.etapes li + li { margin-top: 10px; }
ol.etapes li::before { content: counter(etape); position: absolute; left: 0; top: -2px; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--or-pale); color: var(--or-texte); font-weight: 700; font-size: .9375rem; }
.aide-champ { margin: 4px 0 0; font-size: .875rem; }
.carte > input[type=hidden]:first-child + .message { margin-top: 0; }
.interrupteur input:focus-visible, .case input:focus-visible { outline: 3px solid var(--or-interface); outline-offset: 2px; }
/* Lot « icônes » §5.1 : la grille du modérateur. Cases de 48 px (cible tactile), cochée comme une puce choisie. */
.grille-icones { margin: 14px 0 16px; padding: 0; border: 0; }
.grille-icones legend { margin-bottom: 8px; font-weight: 700; }
.cases-icones { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.cases-icones label { display: block; margin: 0; cursor: pointer; }
.cases-icones label > span { display: grid; place-items: center; height: 48px; border: 2px solid var(--bord-champ); border-radius: 12px; background: var(--papier); color: var(--or-texte); }
.cases-icones .icone { width: 24px; height: 24px; }
.cases-icones input:checked + span { border-color: var(--bouton-fond); background: var(--bouton-fond); color: var(--bouton-texte); }
.cases-icones input:focus-visible + span { outline: 3px solid var(--or-interface); outline-offset: 2px; }
.effacement ul { margin: 0 0 8px; padding-left: 20px; }
.effacement li + li { margin-top: 4px; }
.case { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 400; }
.case input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--bouton-fond); }
.btn-rouge { background: var(--rouge); color: var(--sur-rouge); }
.formulaire-code label { text-align: center; }
input.code { display: block; width: 7.4em; max-width: 100%; margin: 0 auto; padding: 12px 0 12px .3em;
  font: 800 2rem/1 var(--titre); letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.separe { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--trait); text-align: center; }
.separe p { margin: 0; }
.separe .btn { margin-top: 10px; }
.groupe { min-width: 0; margin: 0; padding: 0; border: 0; }
.groupe + .groupe { margin-top: 24px; }
.case-charte { margin-top: 24px; }
.groupe legend.rubrique { margin: 0; padding: 0; }
.confirmation { text-align: center; }
.confirmation h1 { margin-top: 0; }
.coche { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 12px; border-radius: 50%;
  background: var(--or-pale); color: var(--or-texte); }
.invitant { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; }
.invitant p { margin: 0; }
.carte > .erreur:only-child { margin: 0; }

/* Lot 5 : la modération */
.large.pile-decisions { gap: 0; }
.entete-carte { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; }
.mention-alerte { background: color-mix(in srgb, var(--rouge) 12%, var(--papier)); color: var(--rouge); }
.ligne-personne { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; margin: 12px 0; }
.ligne-personne .initiales { width: 44px; height: 44px; font-size: 1.0625rem; }
.ligne-personne p { margin: 0; overflow-wrap: anywhere; }
.ligne-personne .aide { font-size: .875rem; }
.ligne-personne form { grid-column: 2; }
blockquote.citation { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--or); border-radius: 0 12px 12px 0;
  background: var(--or-pale); font-style: italic; overflow-wrap: anywhere; }
.carte-decision > .faits > :first-child { margin-top: 0; }
.carte-decision > .decision { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--trait); }
.carte-decision > .decision > :first-child { margin-top: 0; }
.carte-decision > .decision > input[type=hidden]:first-child + * { margin-top: 0; }
.carte-decision > .decision > input[type=hidden]:first-child + input[type=hidden] + * { margin-top: 0; }
.carte-decision > .decision > form:first-child > input[type=hidden]:first-child + * { margin-top: 0; }
.carte-decision > .decision > form:first-child > input[type=hidden]:first-child + input[type=hidden] + * { margin-top: 0; }
@media (min-width: 960px) {
  .carte-decision { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  .carte-decision > .decision { margin-top: 0; padding: 0 0 0 24px; border-top: 0; border-left: 1px solid var(--trait); }
}
.etat { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .875rem; font-weight: 700;
  background: var(--or-neutre); color: var(--encre-douce); }
.etat[data-statut="valide"] { background: var(--vert-pale); color: var(--vert); }
.etat[data-statut="en_attente"] { background: var(--or-pale); color: var(--or-texte); }
.etat[data-statut="suspendu"] { background: color-mix(in srgb, var(--rouge) 12%, var(--papier)); color: var(--rouge); }
.decision > form + form { margin-top: 20px; }
details.annulation { margin-top: 12px; }
details.annulation summary { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 0; }
.recherche-ligne .btn { margin-top: 12px; }
.recherche-ligne label { margin-top: 0; }
form.carte > .puces { margin-top: 14px; }
nav.puces .puce b { font-weight: 400; }
form.carte + .large { margin-top: 16px; }
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden;
  background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); }
.tableau th { padding: 12px 16px; text-align: left; font: 700 .8125rem/1.2 var(--texte); letter-spacing: .08em;
  text-transform: uppercase; color: var(--encre-douce); border-bottom: 1px solid var(--trait); }
.tableau td { padding: 12px 16px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau td a { font-weight: 700; }
/* Sur ordinateur une ligne de tableau fait 49 px : un cran de moins, pour que deux cibles voisines ne se recouvrent pas. */
.tableau .lien-seul { padding-block: 12px; margin-block: -12px; }
.tableau .nombre { text-align: right; font-variant-numeric: tabular-nums; }
.tableau .plus { color: var(--vert); font-weight: 700; }
.tableau .moins { color: var(--rouge); font-weight: 700; }
@media (max-width: 959px) {
  .tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; }
  .tableau tr { padding: 10px 16px; border-bottom: 1px solid var(--trait); }
  .tableau tr:last-child { border-bottom: 0; }
  .tableau td { padding: 2px 0; border: 0; }
  .tableau td.nombre { text-align: left; }
  .tableau td[data-libelle]::before { content: attr(data-libelle) " : "; color: var(--encre-douce); font-weight: 400; }
}
@media (min-width: 960px) {
  .recherche-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 12px; align-items: end; }
  .recherche-ligne .btn { margin-top: 0; }
}
.fiche-decisions { margin-top: 24px; }
.fiche-decisions > :first-child { margin-top: 0; }
.fiche-decisions .rubrique:first-of-type { margin-top: 16px; }
.fiche-decisions .titre-section:first-of-type { margin-top: 16px; }
.carte > .ligne-personne:first-child { margin-top: 0; }
.carte > .ligne-personne:last-child { margin-bottom: 0; }
.carte > .ligne-personne + .ligne-personne { padding-top: 12px; border-top: 1px solid var(--trait); }
.jour { font: 700 1.1875rem/1.2 var(--titre); margin: 24px 0 8px; }
h1 + .aide + .jour { margin-top: 16px; }
ol.journal { list-style: none; margin: 0; padding: 0 16px; background: var(--papier); border-radius: var(--rayon); box-shadow: var(--ombre); }
ol.journal li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
ol.journal li + li { border-top: 1px solid var(--trait); }
ol.journal time { color: var(--encre-douce); font-variant-numeric: tabular-nums; }
ol.journal p { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 960px) {
  .large.grille-fiche { grid-template-columns: minmax(0, 1fr) 360px; }
  .fiche-decisions { margin-top: 0; }
}
.liste-liens .etat { flex: none; }
.liste-liens .libelle .aide { font-weight: 400; font-size: .875rem; }
.liste-liens + .btn { margin-top: 12px; }

/* Brocante : vignettes, galerie, prix masqué pour un don (sans JS, :has). */
.carte-article .vignette { width: 44px; height: 44px; object-fit: cover; border-radius: var(--rayon-petit); }
.galerie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.galerie img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--rayon-petit); }
.galerie a:first-child { grid-column: 1 / -1; }
.galerie img.principale { aspect-ratio: 4 / 3; }
.photo-grande { margin: 0 0 16px; text-align: center; }
.photo-grande img { display: block; max-width: 100%; max-height: 55vh; margin: 0 auto; border-radius: var(--rayon-petit); }
.photo-grande figcaption { margin-top: 8px; color: var(--encre-douce); }
.photo-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Lot E §1 : la page photo de l'album est un carrousel. Sans script, une seule vue est affichée et les flèches
   sont des liens ; le script pose data-actif, et la bande défile alors au doigt, une photo par geste.
   L'image reste nue (ni lien, ni couche dessus) : l'appui long et le clic droit gardent leur menu. */
.cadre-carrousel { width: 100%; aspect-ratio: 4 / 3; max-height: 55vh; margin: 0 0 12px; }
.carrousel { position: relative; height: 100%; }
.carrousel [hidden] { display: none; }
.bande { display: flex; height: 100%; overflow: hidden; border-radius: var(--rayon-petit); background: var(--or-neutre); }
.vue { flex: 0 0 100%; margin: 0; }
.vue img { display: block; width: 100%; height: 100%; object-fit: contain; }
.carrousel[data-actif] .bande { overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.carrousel[data-actif] .bande::-webkit-scrollbar { display: none; }
.carrousel[data-actif] .vue { scroll-snap-align: center; scroll-snap-stop: always; }
.carrousel[data-actif] .vue img { cursor: zoom-in; }
.fleche, .agrandir, .fermer { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--voile-bouton); color: var(--sur-plein-ecran); font: 700 1.5rem/1 var(--texte); text-decoration: none; cursor: pointer; }
.fleche { top: 50%; margin-top: -22px; }
.fleche-precedente { left: 8px; }
.fleche-suivante { right: 8px; }
.agrandir { top: 8px; right: 8px; }
.compteur { position: absolute; left: 8px; bottom: 8px; margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--voile-compteur); color: var(--sur-plein-ecran); font-size: .875rem; }
#fiche-photo[aria-busy="true"] { visibility: hidden; }

/* Lot E §3 : le plein écran est une couche qui couvre la fenêtre (pas d'API Fullscreen pour une image sur iPhone).
   Le script y déplace le carrousel ; la bande y prend toute la place. À la fermeture, le voile s'efface en fondu
   là où le navigateur sait animer `display` (sinon, il se ferme d'un coup). */
.plein-ecran { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  overflow: hidden; background: var(--plein-ecran-fond); color: var(--sur-plein-ecran); opacity: 0;
  transition: opacity 180ms, display 180ms allow-discrete, overlay 180ms allow-discrete; }
.plein-ecran[open] { opacity: 1; animation: agrandit 220ms cubic-bezier(.2, .7, .2, 1); }
@keyframes agrandit { from { opacity: 0; transform: scale(.96); } }
.plein-ecran .bande { border-radius: 0; background: none; }
.plein-ecran .carrousel[data-actif] .vue img { cursor: zoom-out; }
.plein-ecran .agrandir { display: none; }
.fermer { top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); z-index: 1; }
.plein-ecran .compteur { bottom: calc(8px + env(safe-area-inset-bottom)); }
html:has(.plein-ecran[open]) { overflow: hidden; }

.vignettes { display: flex; flex-wrap: wrap; gap: 8px; }
.vignettes img { object-fit: cover; border-radius: var(--rayon-petit); }
/* Lot « formulaires et photos » §3 : les photos choisies, avant l'envoi. La croix vise 44 px, débordant de la vignette. */
.champ-photos .choisir-photos { margin-top: 4px; }
.champ-photos [hidden] { display: none; }
.vignettes-choisies { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 0; padding: 0; list-style: none; }
.vignettes-choisies li { position: relative; }
.vignettes-choisies img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: var(--rayon-petit); }
.retirer-photo { position: absolute; top: -14px; right: -14px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.retirer-photo .icone { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--bouton-fond); color: var(--bouton-texte); }
.retirer-photo:focus-visible { outline: none; }
.retirer-photo:focus-visible .icone { outline: 3px solid var(--or-interface); outline-offset: 2px; }
.etat-photos:empty { margin: 0; }
.formulaire-article:has(input[name="type"][value="don"]:checked) .champ-prix { display: none; }

/* Vie de l'association (3a) : maquette docs/maquettes/association/telephone.html. */
.date-evenement { display: grid; place-items: center; width: 44px; height: 48px; border-radius: 10px; background: var(--date-fond); color: var(--sur-date);
  font-size: .75rem; font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.date-evenement b { font: 800 1.25rem/1 var(--titre); }
.carte-evenement + .carte, .carte-actu + .carte, .carte + .carte-evenement { margin-top: 10px; }
a.carte-actu { display: grid; gap: 2px; color: var(--encre); text-decoration: none; }
.carte-actu .aide { font-size: .875rem; }
.extrait { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.annule .titre-annonce { text-decoration: line-through; color: var(--encre-douce); }
/* Lot « vignette photo » : l'image d'un résumé n'est jamais recadrée (dimensions calculées par
   `association.vignettes`). Vignette à droite du texte ; panorama en bandeau sur toute la largeur. */
.photo-resume { display: block; border-radius: var(--rayon-petit); }
.photo-resume.inconnue { object-fit: contain; background: var(--or-neutre); }
.bandeau-resume { display: block; grid-column: 1 / -1; width: 100%; height: auto; border-radius: var(--rayon-petit); }
a.carte-actu .corps { display: grid; gap: 2px; min-width: 0; }
a.carte-actu.avec-vignette { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; }
a.carte-actu .bandeau-resume { margin-bottom: 10px; }
.carte-evenement.avec-vignette { grid-template-columns: 44px minmax(0, 1fr) auto; }
/* Spec titres de section et accueil §3 : la première section suit le coffre et les rappels de près ; « Tout voir » ferme la section. */
.colonne-principale > .section-accueil:first-child > .titre-section { margin-top: 12px; }
.section-accueil > .tout-voir { margin: 8px 0 0; }
/* Lot C §2 : le mois en un coup d'œil ; un jour doré mène à l'événement. */
.calendrier { scroll-margin-top: 16px; }
/* Même respiration pour l'ancre des actualités (lien « Tout voir » de l'accueil). */
#actualites { scroll-margin-top: 16px; }
.calendrier-tete { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; }
.calendrier-tete b { font: 700 1.125rem/1.2 var(--titre); }
.calendrier-tete a, .calendrier-tete span span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 1.375rem; color: var(--encre); text-decoration: none; }
.calendrier-tete span span { color: var(--trait); }
.cal { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; text-align: center; }
.cal th { padding-bottom: 4px; color: var(--encre-douce); font-size: .75rem; }
.cal td { height: 44px; padding: 0; border-radius: 8px; }
.cal td a { display: grid; place-items: center; height: 100%; border-radius: 8px; color: inherit; text-decoration: none; }
.cal .ev-jour { position: relative; background: var(--or-pale); color: var(--or-texte); font-weight: 700; }
.cal .ev-jour::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--or); }
.cal .auj { outline: 2px solid var(--encre); outline-offset: -2px; }
.cal .hors { color: var(--trait); }
.affiche { display: block; width: 100%; border-radius: var(--rayon); margin: 0 0 12px; }
.infos-evenement { line-height: 1.5; }
.liste-inscrits { list-style: none; margin: 0; padding: 4px 16px; }
.liste-inscrits li { display: flex; justify-content: space-between; padding: 10px 0; }
.liste-inscrits li + li { border-top: 1px solid var(--trait); }
.duo-champs { margin-top: 0; }
.passes { margin-top: 16px; }
.formulaire-annonce .case { margin-top: 16px; }

/* Documents de l'association (3b). */
.lien-docs { margin-top: 16px; }
.liste-docs { list-style: none; margin: 0; padding: 0 16px; }
.liste-docs > li + li { border-top: 1px solid var(--trait); }
.ligne-doc { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; min-height: 56px; padding: 8px 0;
  color: var(--encre); text-decoration: none; }
.ligne-doc .corps { display: grid; gap: 2px; }
.ligne-doc .aide { font-size: .875rem; }
.icone-doc { width: 24px; height: 24px; color: var(--or-texte); }
.actions-doc { margin: -4px 0 10px 38px; font-size: .875rem; }
.actions-doc a { color: var(--encre-douce); font-weight: 700; }
.actions-doc a.lien-rouge { color: var(--rouge); }
.versions details { padding: 0 0 8px 38px; }
.versions .liste-docs { padding: 0; }
.lien-petit { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 700;
  color: var(--encre-douce); text-decoration: underline; }
.annee + .annee { margin-top: 10px; }
.annee > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; overflow: hidden; font: 800 1.25rem/1 var(--titre); }
.annee > summary::after { content: "›" / ""; font-size: 1.375rem; color: var(--encre-douce); transform: rotate(90deg); }
.annee:not([open]) > summary::after { transform: none; }
.supprimer { margin-top: 16px; }

/* Le mur (3c). */
.ecrire .rubrique { display: block; margin-top: 0; }
.ecrire textarea { width: 100%; min-height: 96px; resize: vertical; }
.ecrire .pied { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.ecrire .pied .aide { font-size: .875rem; }
.ecrire .btn { width: auto; padding: 0 22px; min-height: 48px; margin-top: 0; }
.lecture-seule { margin: 0; }
/* Fil dépliable (spec du 2026-10-03) : la feuille « Retirer » d'un fil est sa sœur, hors du <details> ; la grille tient l'écart. */
.fils { display: grid; gap: 10px; margin-top: 16px; }
.fils > .fil + .fil { margin-top: 0; }
details.fil > summary { display: grid; gap: 6px; }
.fil .vignettes img { display: block; width: 96px; height: 96px; }
.fil .nb-reponses { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--or-texte); }
.fil .nb-reponses::after { content: "›"; content: "›" / ""; font-size: 1.25rem; line-height: 1; transition: transform 150ms; }
details.fil[open] > summary .nb-reponses::after { transform: rotate(90deg); }
.deplie { display: grid; gap: 12px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--trait); }
.deplie .reponses { margin-top: 0; }
.deplie > .ecrire { padding-top: 12px; border-top: 1px solid var(--trait); }
.fil { display: grid; gap: 6px; }
.fil + .fil { margin-top: 10px; }
.fil .tete { display: flex; justify-content: space-between; gap: 8px; font-size: .875rem; color: var(--encre-douce); }
.fil .tete a { color: var(--encre); font-weight: 700; text-decoration: none; }
.fil .texte { display: block; margin: 0; }
.fil .bas { display: flex; justify-content: space-between; align-items: center; font-size: .875rem; }
.fil .bas a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--or-texte); }
.fil .bas .discret { color: var(--encre-douce); font-weight: 400; text-decoration: underline; }
.reponses { margin: 12px 0 0 16px; padding-left: 12px; border-left: 3px solid var(--or-pale); display: grid; gap: 14px; }
.reponses .fil + .fil { margin-top: 0; }
.mur-mini { display: grid; gap: 2px; color: var(--encre); text-decoration: none; }
.mur-mini + .mur-mini { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--trait); }
.mur-mini .aide { font-size: .875rem; }
/* Spec hiérarchie §1.3 : sur téléphone, deux messages d'une ligne donnent le ton ; la page du mur montre le reste. */
@media (max-width: 959px) {
  .bloc-mur .mur-mini:nth-child(n+3) { display: none; }
  .bloc-mur .mur-mini .extrait { -webkit-line-clamp: 1; }
}
.carte.ecrire + .fils, .lecture-seule + .fils { margin-top: 16px; }
.liste-liens .pastille { margin-left: auto; }

/* Album photo (3d) : maquette docs/maquettes/album/telephone.html, les aplats remplacés par les images. */
a.carte.carte-album { display: flex; gap: 12px; align-items: center; color: var(--encre); text-decoration: none; }
.carte-album .couverture { display: block; flex: none; width: 72px; height: 72px; object-fit: cover;
  border-radius: var(--rayon-petit); background: var(--or-neutre); }
.carte-album .corps { display: grid; gap: 2px; }
.grille-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.grille-photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--rayon-petit); }
.actions-album { display: grid; gap: 8px; }
.actions-album .btn, .actions-album .duo { margin-top: 0; }
.liens-photo { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 12px 0 0; font-size: .9375rem; }
.liens-photo a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--encre); }
.liens-photo .discret { color: var(--encre-douce); font-weight: 400; }
.vignette-retrait img { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: var(--rayon-petit); margin-bottom: 12px; }
.legende-photo { margin: 0; }
.auteur-photo { margin: 2px 0 12px; }
.photo-nav + .carte { margin-top: 16px; }

/* Votes du bureau (spec exclusion §3) */
.vote-ligne { display: grid; gap: 4px; color: var(--encre); text-decoration: none; }
.vote-ligne + .vote-ligne { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--trait); }
.decompte { display: flex; gap: 6px; flex-wrap: wrap; }
.votes-donnes { list-style: none; margin: 0; padding: 0; }
.votes-donnes li { display: flex; justify-content: space-between; gap: 8px; min-height: 40px; align-items: center; }
.votes-donnes li + li { border-top: 1px solid var(--trait); }
.voter { display: grid; gap: 10px; margin-top: 12px; }
.voter details summary { display: flex; align-items: center; justify-content: center; min-height: 48px; }
.voter details .carte { margin-top: 8px; }
/* Heures calmes réglables (Mes notifications) */
.heures-calmes .plage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.heures-calmes .plage select { width: auto; }

/* Cotisations : bandeau de la page association */
.cotisation { margin: 0 0 16px; }
.cotisation p { margin: 0; }
.cotisation p + p { margin-top: 6px; }
.cotisation-info { background: var(--or-pale); }
.cotisation-alerte { background: color-mix(in srgb, var(--rouge) 8%, var(--papier)); border-left: 4px solid var(--rouge); }
.cotisation-ok { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; }

/* Installation facile §1 : bandeau « Installer l'app » de la connexion et de l'Accueil ; pwa.js retire `hidden`. */
.bandeau-installer { position: relative; margin: 12px 0 20px; padding: 14px 44px 14px 16px; border-radius: 14px;
  background: var(--papier); border: 1px solid var(--trait); }
.bandeau-installer-titre { font-weight: 700; margin: 0 0 6px; }
.bandeau-installer p { margin: 0 0 6px; }
.bandeau-installer-fermer { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; color: inherit; cursor: pointer; }
.bandeau-installer-fermer .icone { width: 18px; height: 18px; }

/* Lot « finitions visibles » (spec du 2026-10-03) */
/* Une icône au trait a une taille par défaut ; les onglets et le menu, plus précis, gardent la leur. */
.icone { width: 20px; height: 20px; flex: none; }
.icone-domaine .icone { width: 22px; height: 22px; color: var(--or-texte); }
.icone-ligne .icone { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; color: var(--or-texte); }
.puce .icone { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.btn .icone { margin-right: 8px; }
.coordonnees .icone { margin-top: 2px; color: var(--vert); }
.infos-annonce li:has(> .icone) { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.infos-annonce .icone { width: 18px; height: 18px; margin-top: 2px; color: var(--or-texte); }
.cotisation-ok .icone { width: 18px; height: 18px; color: var(--vert); }
.agrandir .icone, .fermer .icone { width: 24px; height: 24px; }
.delai .icone { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }

/* Écran vide : la liste principale d'une page n'a rien à montrer. Cadre plat, pour ne pas passer pour du contenu. */
.vide { display: grid; justify-items: center; gap: 6px; margin-top: 16px; padding: 28px 20px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--papier); text-align: center; }
.vide p { margin: 0; }
.vide-rond { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%; background: linear-gradient(160deg, var(--or-clair), var(--or-pale)); color: var(--or-texte); }
.vide-rond .icone { width: 26px; height: 26px; }
.vide-phrase { font-weight: 700; }
.vide .aide { max-width: 30ch; text-wrap: balance; }
.vide .btn { width: auto; margin-top: 12px; padding-inline: 24px; }
.vide-ok .vide-rond { background: var(--vert-pale); color: var(--vert); }

/* Profil : une icône en tête, un titre et une sous-ligne. */
.liste-reperes a { gap: 12px; min-height: 64px; padding-block: 10px; }
.picto { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--or-pale); color: var(--or-texte); }
.liste-reperes .libelle { display: grid; gap: 1px; line-height: 1.25; }

/* Heures calmes : le premier libellé prend sa ligne, « 22 h à 8 h » tient sur la suivante. */
.heures-calmes .plage label:first-child { flex-basis: 100%; margin: 0; }

/* Petits téléphones : les quatre rayons des annonces tiennent dans la page (ils débordaient de 7 px à 320 px). */
@media (max-width: 359px) { .bascule-liens a { padding-inline: 4px; font-size: .9375rem; } }
/* Texte agrandi (lisibilité §4.2) : une largeur en `em` se compte dans la taille de police réglée dans le navigateur.
   Quand l'écran fait moins de vingt fois cette taille, les segments d'une bascule passent à la ligne et deux boutons
   côte à côte s'empilent, au lieu de déborder. À 320 px et au réglage normal (20 em), rien ne change. */
@media (max-width: 19.9em) {
  .bascule-liens { display: flex; flex-wrap: wrap; }
  .bascule-liens a { flex: 1 1 auto; }
  .duo { grid-template-columns: 1fr; }
}

/* Réorganisation (spec du 2026-10-03) */
/* Repère de rôle : un fond à la teinte du rôle et une étiquette qui le nomme ; la couleur n'est jamais le seul indice. */
.role-moderation { --role: var(--role-moderation); --role-pale: var(--role-moderation-pale); }
.role-bureau { --role: var(--role-bureau); --role-pale: var(--role-bureau-pale); }
.role-technique { --role: var(--role-technique); --role-pale: var(--role-technique-pale); }
.reserve { margin-top: 16px; padding: 10px 12px 12px; border: 1px solid color-mix(in srgb, var(--role) 45%, var(--role-pale)); border-radius: var(--rayon); background: var(--role-pale); }
.etiquette-role { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 700 .8125rem/1.2 var(--texte); letter-spacing: .08em; text-transform: uppercase; color: var(--role); }
.etiquette-role .icone { width: 16px; height: 16px; }
.reserve > .btn, .reserve > .duo, .reserve > form > .btn { margin-top: 0; }
.reserve > .btn + .btn, .reserve > .duo + .btn, .reserve > .btn + .duo { margin-top: 10px; }
.reserve .liste-liens { padding: 0; background: none; box-shadow: none; }
.reserve .liste-liens li + li { border-top-color: color-mix(in srgb, var(--role) 25%, var(--role-pale)); }
.reserve .picto { background: var(--papier); color: var(--role); }
.reserve > p.aide { margin: 0 0 8px; color: var(--encre); }
/* Profil : le coffre garde son or dans la liste « Mon foyer ». */
.liste-reperes .picto-coffre { background: linear-gradient(135deg, var(--coffre-debut), var(--coffre-fin)); color: var(--sur-coffre); }
.reserve .temoins-profil { margin-bottom: 0; }
/* Accueil : l'agenda compact remplace les cartes qui défilaient. */
.agenda { padding-block: 4px; }
.ligne-agenda { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 64px; padding-block: 8px; color: var(--encre); text-decoration: none; }
.ligne-agenda + .ligne-agenda { border-top: 1px solid var(--trait); }
.ligne-agenda .corps { display: grid; justify-items: start; gap: 2px; }
.ligne-agenda .aide { font-size: .875rem; }
/* Vignette photo, option b : la petite vignette d'une ligne d'agenda (`association.vignettes.disposition_agenda`). */
.ligne-agenda.avec-vignette { grid-template-columns: 44px minmax(0, 1fr) auto; }

/* Étiquette de page (§4.5) : un écran entièrement réservé n'est pas teinté ; son rôle se dit au-dessus du titre.
   L'enveloppe est un bloc : sur ordinateur elle se range dans la colonne, comme le titre. */
.etiquette-page { margin: 0 0 4px; }
.etiquette-page .etiquette-role { display: inline-flex; margin: 0; padding: 4px 10px; border-radius: 999px; background: var(--role-pale); }
.etiquette-page + h1 { margin-top: 4px; }

/* Zones dans les pages (plan B) : un bloc enveloppé tel quel commence par sa rubrique, qui suit l'étiquette sans
   trou ; une carte ne colle pas à la zone qui la précède. */
.reserve > .etiquette-role + .rubrique { margin-top: 0; }
.reserve > .etiquette-role + .titre-section { margin-top: 0; }
.reserve + .carte { margin-top: 16px; }

/* Variante en ligne (§4.2) : un geste réservé logé dans une ligne de liste. */
.reserve-ligne { display: inline-flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 999px; background: var(--role-pale); color: var(--role); }
.reserve-ligne .icone { width: 16px; height: 16px; }
.reserve-ligne a { display: inline-flex; align-items: center; min-height: 44px; }

/* 7. Mouvement (design lot A) : 400 ms au plus par mouvement (les séquences de la coche et des chiffres vont
   jusqu'à 900 ms), une fois par chargement, jamais indispensable ; aucun JavaScript. */
/* 7.1 Fondu entre pages (transition de vue entre documents, Safari 18.2+ et Chrome ; ailleurs rien ne casse)
   et cascade des blocs à l'arrivée. L'en-tête ne bouge pas ; le bandeau (7.5) a sa propre animation. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
.onglets { view-transition-name: onglets; }
.menu-lateral { view-transition-name: menu; }
.page > :not(.entete, .bandeau) { animation: arrive 350ms cubic-bezier(.2, .7, .2, 1) backwards; }
.page > :nth-child(3):not(.bandeau) { animation-delay: 40ms; }
.page > :nth-child(4):not(.bandeau) { animation-delay: 80ms; }
.page > :nth-child(5):not(.bandeau) { animation-delay: 120ms; }
.page > :nth-child(6):not(.bandeau) { animation-delay: 160ms; }
.page > :nth-child(7):not(.bandeau) { animation-delay: 200ms; }
.page > :nth-child(8):not(.bandeau) { animation-delay: 240ms; }
.page > :nth-child(n + 9):not(.bandeau) { animation: none; }
@keyframes arrive { from { opacity: 0; transform: translateY(12px); } }

/* 7.2 Le tap répond. Le survol n'existe que sur ordinateur : sur téléphone, un :hover collant resterait affiché. */
.btn, .puce, a.carte, .liste-liens a, .bascule label, .bascule-liens a, .rappel, .coffre-mini,
.onglets a > .icone, .onglets a > .rond, .menu-lateral li a {
  transition: transform 120ms, background-color 150ms, border-color 150ms, box-shadow 150ms, filter 120ms; }
.btn:active, a.carte:active, .rappel:active, .coffre-mini:active { transform: scale(.97); }
.puce:active, .onglets a:active > .icone, .onglets a:active > .rond { transform: scale(.94); }
.btn-or:active, .btn-rouge:active { filter: brightness(.9); }
.btn-clair:active, .liste-liens a:active, .bascule label:active, .bascule-liens a:active, .menu-lateral li a:active { background: var(--or-pale); }
/* Les blocs de rôle du menu sont teintés : --or-pale y détonnerait ; la ligne pressée passe au papier. */
.menu-lateral .reserve li a:active { background: var(--papier); }
/* Même raison dans le Profil : les lignes d'une zone de rôle reposent sur son fond teinté. */
.reserve .liste-liens a:active { background: var(--papier); }
@media (hover: hover) {
  .puce:hover { border-color: var(--or-interface); }
  /* Lot B : a.carte et .rappel portent déjà --ombre au repos, il faut --ombre-survol pour que ça se voie ;
     .coffre-mini porte --ombre-coffre, une ombre neutre l'effacerait, il s'éclaircit à la place. */
  a.carte:hover, .rappel:hover { box-shadow: var(--ombre-survol); }
  .coffre-mini:hover { filter: brightness(1.04); }
}

/* 7.3 Le coffre compte (page Coffre) et la jauge des badges se remplit. `@property` rend les variables
   interpolables ; sans lui, la valeur finale s'affiche directement (var() substituée telle quelle). */
@property --n { syntax: "<integer>"; initial-value: 0; inherits: false; }
@property --pos { syntax: "<percentage>"; initial-value: 0%; inherits: false; }
@property --rempli { syntax: "<percentage>"; initial-value: 0%; inherits: false; }
.compte { counter-reset: n var(--n); font-variant-numeric: tabular-nums; animation: compter 900ms cubic-bezier(.2, .7, .2, 1) backwards; }
.compte::before { content: counter(n); }
@keyframes compter { from { --n: 0; } }
.val .suite { animation: apparait 300ms 700ms backwards; }
@keyframes apparait { from { opacity: 0; } }
.echelle i { animation: glisse 900ms cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes glisse { from { --pos: var(--zero, 0%); } }
.jauge i { animation: remplit 900ms cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes remplit { from { --rempli: 0%; } }

/* 7.4 La coche des confirmations se dessine (le tracé fait ~20 unités dans le viewBox de 24). */
.coche { animation: pop 450ms cubic-bezier(.2, .7, .2, 1.4) backwards; }
.coche path { stroke-dasharray: 24; animation: trace 400ms 250ms ease-out backwards; }
@keyframes pop { from { opacity: 0; transform: scale(.5); } }
@keyframes trace { from { stroke-dashoffset: 24; } }
/* `trop_de_demandes.html` est une `.confirmation` sans coche : son texte ne doit pas attendre un rebond qui ne vient pas. */
.coche ~ * { animation: arrive 350ms 450ms cubic-bezier(.2, .7, .2, 1) backwards; }

/* 7.5 Bandeau « C'est fait » (messages de niveau succès) : monte du bas, au-dessus des onglets, reste 8 s ou 80 ms par
   caractère (`--lecture` posé par base.html), puis laisse passer les taps ; le survol le fige. En position fixe : il ne
   pousse pas le contenu et reste hors de la cascade de 7.1. */
.bandeau { position: fixed; bottom: calc(var(--hauteur-onglets) + env(safe-area-inset-bottom) + 28px); left: 16px; right: 16px; z-index: 25; margin: 0 auto; max-width: 488px;
  padding: 12px 16px; border-radius: 14px; background: var(--panneau); color: var(--sur-panneau); font-weight: 700; box-shadow: var(--ombre-publier);
  animation: monte 350ms cubic-bezier(.2, .7, .2, 1) both, disparait 400ms calc(max(8s, var(--lecture, 0) * 80ms)) forwards; }
.sans-menu .bandeau { bottom: 24px; }
@media (hover: hover) {
  /* Un tap sur Android laisse un :hover collant : sans ce garde, il figerait le bandeau. */
  .bandeau:hover { animation-play-state: running, paused; }
}
@keyframes monte { from { opacity: 0; transform: translateY(24px); } }
@keyframes disparait { to { opacity: 0; pointer-events: none; } }
/* Sur ordinateur, pas d'onglets : 24 px du bas, et mêmes marges que la colonne (`.avec-menu .page` : 48 px de chaque côté). */
@media (min-width: 960px) { .avec-menu .bandeau { bottom: 24px; left: calc(var(--largeur-menu) + 48px); right: 48px; max-width: 720px; } }
/* Tablette : `.page` fait 680 px (16 px de marge de chaque côté), le bandeau s'aligne comme à 390 px (488 = 520 − 32). */
@media (min-width: 600px) and (max-width: 959px) { .bandeau { max-width: 648px; } }

/* Le segment actif d'une bascule glisse d'une page à l'autre (avec 7.1) ; un nom par bascule. */
.bascule-liens[data-nom="rayon"] a[aria-current] { view-transition-name: rayon-actif; }
.bascule-liens[data-nom="residence"] a[aria-current] { view-transition-name: residence-actif; }
@media (min-width: 960px) {
  /* `.mobile-seulement` (bloc des 960 px, plus haut) perd contre `.bascule` (même poids, plus loin) : cette
     règle, placée après, masque les bascules sur ordinateur, où le menu latéral donne déjà les mêmes liens (audit point 15). */
  .bascule.mobile-seulement { display: none; }
}

/* Lot D §2 : pendant un envoi de fichiers, le bouton le dit et une barre file dessous (classe posée par interface.js). */
.en-cours .btn:not([type=button]) { position: relative; overflow: hidden; opacity: .85; cursor: wait; }
.en-cours .btn:not([type=button])::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40%; height: 4px; border-radius: 99px;
  background: currentColor; animation: file 1.1s ease-in-out infinite; }
.en-cours .champ-photos button { pointer-events: none; }
@keyframes file { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Lot D §3 : la feuille de confirmation monte du bas (dialog natif ouvert par interface.js) ; sur ordinateur elle se centre.
   `monte` est l'animation du bandeau. ::backdrop ne lit --voile-feuille que depuis Chrome 122 / Safari 17.4 : avant, pas de voile. */
dialog:not([open]) { display: none; }
.feuille { position: fixed; inset: auto 0 0; width: 100%; max-width: 520px; margin: 0 auto; padding: 0;
  border: 0; border-radius: 22px 22px 0 0; background: var(--papier); color: var(--encre); box-shadow: var(--ombre-publier); }
.feuille > form { padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
.feuille > form::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 99px; background: var(--trait); }
.feuille::backdrop { background: var(--voile-feuille); }
.feuille h2 { font: 700 1.25rem/1.2 var(--titre); margin: 0 0 4px; }
.feuille .btn { margin-top: 12px; }
.feuille .btn + .btn { margin-top: 8px; }
.feuille[open] { animation: monte 300ms cubic-bezier(.2, .7, .2, 1); }
.feuille[open]::backdrop { animation: apparait 250ms; }
@keyframes apparait { from { opacity: 0; } }
@media (min-width: 960px) {
  .feuille { inset: 0; margin: auto; max-width: 440px; border-radius: var(--rayon); }
  .feuille > form { padding: 24px; }
  .feuille > form::before { display: none; }
}

/* 7.6 Mouvement réduit : tout s'arrête, le bandeau redevient un message qui reste. Un seul bloc dans la feuille. */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  /* Mêmes sélecteurs que 7.1 et 7.4 : un `.page > *` moins spécifique perdrait contre eux. */
  .page > :not(.entete, .bandeau), .compte, .val .suite, .echelle i, .jauge i, .coche, .coche path,
  .coche ~ * { animation: none; }
  .btn, .puce, a.carte, .liste-liens a, .bascule label, .bascule-liens a, .rappel, .coffre-mini,
  .onglets a > .icone, .onglets a > .rond, .menu-lateral li a { transition: none; }
  .btn:active, a.carte:active, .puce:active, .rappel:active, .coffre-mini:active, .onglets a:active > .icone, .onglets a:active > .rond { transform: none; }
  .interrupteur input, .interrupteur input::after { transition: none; }
  .fil .nb-reponses::after { transition: none; }
  .bandeau { position: static; max-width: none; margin: 0 0 12px; animation: none; box-shadow: none; }
  .en-cours .btn:not([type=button])::after { animation: none; width: 100%; }
  .feuille[open], .feuille[open]::backdrop { animation: none; }
  .courbe { animation: none; }
  .plein-ecran[open] { animation: none; }
  .plein-ecran { transition: none; }
}

/* 7.7 Initiales colorées par immeuble (sans teinte : --or-mat, comme avant). */
.initiales.teinte-1 { background: var(--teinte-1-fond); color: var(--teinte-1-texte); }
.initiales.teinte-2 { background: var(--teinte-2-fond); color: var(--teinte-2-texte); }
.initiales.teinte-3 { background: var(--teinte-3-fond); color: var(--teinte-3-texte); }
.initiales.teinte-4 { background: var(--teinte-4-fond); color: var(--teinte-4-texte); }
.initiales.teinte-5 { background: var(--teinte-5-fond); color: var(--teinte-5-texte); }
.initiales.teinte-6 { background: var(--teinte-6-fond); color: var(--teinte-6-texte); }

/* Comptes témoins (spec du 2026-10-03, §3) : outil de recette, vu des seuls administrateurs.
   Le bandeau est hors de .page : la cascade d'arrivée (lot A) compte les enfants de .page. */
.temoin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: var(--role-technique-pale); color: var(--encre); font-size: .9375rem; }
.temoin span { flex: 1 1 100%; }
.temoin .etiquette-role { flex: 1 1 100%; margin: 0; }
.temoin form { margin: 0; }
.temoin button { min-height: 44px; padding: 4px 14px; border: 1px solid var(--role-technique); border-radius: 999px; background: none;
  color: var(--encre); font: 700 .9375rem/1.2 var(--texte); cursor: pointer; }
.temoin button:active { background: var(--papier); }
.temoins-profil { display: grid; gap: 8px; margin: 0 0 16px; }
@media (min-width: 960px) { .avec-menu .temoin { margin-left: var(--largeur-menu); padding-left: 48px; padding-right: 48px; } }
