/* ============================================================================
   Portail des inscriptions — CSS propre au projet. Se charge APRÈS charte.css
   (copie de la charte ATEA « Modernist v2 » ; source : ~/Developer/chartes/atea/).
   Ici ne vivent que la disposition particulière du portail et ses composants
   (catalogue, fiche atelier, semaine type, tiroir des demandes, relances…).
   Les couleurs passent par les tokens de la charte : jamais d'hexa de thème.
   ========================================================================= */

/* ---- Barre latérale : son complément commun au calendrier est dans menu-commun.css ---- */
.disposition > main { max-width: 80rem; }

/* Bandeau de la vue en cours (appel, annuaire, Mon espace) pour la double casquette. */
.vue-bandeau { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; justify-content: space-between;
  border-radius: .6rem; padding: .5rem .85rem; margin: 0 0 1rem; font-size: .9rem; }
.vue-bandeau.animateur { background: var(--neutre-fond); color: var(--neutre); border: 1px solid var(--bord-champ); }   /* ex-cyan figé, hors charte (20 nov. 2026) */
.vue-bandeau.equipe { background: var(--survol); color: var(--encre); border: 1px solid var(--trait); }
.vue-bandeau a { font-weight: 600; white-space: nowrap; }

/* Le carré rouge de la scène quand il n'y a pas de logo. */
header.publique .carre { color: var(--rouge); font-size: 2rem; line-height: 1; }

/* Accès aux espaces (famille, équipe) en haut de la scène : pilules fantômes en coin
   haut-droit, en rangée centrée au-dessus du logo sur téléphone. La scène reste noire
   dans les deux thèmes : le blanc ici est celui de la marque, pas un hexa de thème. */
header.publique { position: relative; }
header.publique .acces { position: absolute; top: 1.1rem; right: 1.2rem; display: flex; gap: .5rem; }
header.publique .acces a { font-size: .8rem; font-weight: 600; padding: .34rem .95rem;
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; color: #fff; }
header.publique .acces a:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
@media (max-width: 640px) {
  header.publique .acces { position: static; justify-content: center; margin: 0 0 1.2rem; }
}

/* ---- Tableaux : compléments du portail ---- */
table.liste form { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
table.liste input[type=email], .courriel-renvoi input[type=text] { font-size: .82rem; padding: .25rem .5rem;
  border: 1px solid var(--bord-champ); border-radius: 6px; min-width: 16rem; }
table.liste input[type=text] { font-size: .82rem; padding: .25rem .5rem; border: 1px solid var(--bord-champ);
  border-radius: .5rem; }
.courriel-detail summary { cursor: pointer; }
.courriel-detail[open] summary { font-weight: 600; margin-bottom: .4rem; }
.courriel-corps { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--survol); border: 1px solid var(--trait);
  border-radius: 6px; padding: .6rem .8rem; margin: .4rem 0 .6rem; font-size: .88rem; max-height: 28rem; overflow-y: auto; }
.courriel-renvoi label { font-weight: 400; font-size: .82rem; display: flex; gap: .3rem; align-items: center; margin: 0; }
.courriel-message { border-left: 3px solid var(--trait); padding: .2rem 0 .2rem .6rem; margin: .3rem 0; }
.courriel-message summary { cursor: pointer; font-size: .9rem; }

/* Formulaires en carte (form.bloc), groupes, sous-titres, tuiles en édition : dans la feuille commune (menu-commun.css, lot 4 du 8 nov. 2026). */

/* « Vouliez-vous dire … ? » sous un champ d'adresse (adresses.php) : un clic corrige. */
.suggestion-courriel { margin: .25rem 0 .7rem; font-size: .92rem; }
.suggestion-courriel button { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 700;
  color: inherit; text-decoration: underline; cursor: pointer; }
/* Formulaire long découpé en tuiles : le <form> perd sa carte, chaque section en devient une.
   Les pastilles sont numérotées par compteur CSS : une tuile masquée (hidden) ne compte pas. */
form.tuiles { background: none; border: 0; box-shadow: none; padding: 0; counter-reset: tuile; }
@media (min-width: 900px) {
  /* Côte à côte sur grand écran : grille en rangées alignées (1 | 2 puis 3 | 4),
     chaque tuile garde sa hauteur. */
  form.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.1rem; align-items: start; }
}

/* ---- Barre d'outils d'une liste : création, filtre, actions groupées ---- */
.barre-outils { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; margin: 1rem 0; }
.barre-outils select { padding: .35rem .6rem; font-size: .9rem; }
.barre-groupe { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.barre-groupe select:disabled, .barre-groupe button:disabled { opacity: .5; cursor: not-allowed; }
table.liste th.coche, table.liste td.coche { width: 2.2rem; padding-right: 0; }
table.liste td.coche input, table.liste th.coche input { width: 1rem; height: 1rem; margin: .15rem 0 0; cursor: pointer; }
/* Liste large : défilement horizontal, case et première colonne figées. */
.defilement-table table.liste { min-width: 60rem; overflow: visible; }   /* overflow:hidden empêche les colonnes figées de coller */
table.liste.figee th.coche, table.liste.figee td.coche { position: sticky; left: 0; z-index: 2; background: var(--carte);
  min-width: 2.2rem; max-width: 2.2rem; }
table.liste.figee th.figee, table.liste.figee td.figee { position: sticky; left: 2.2rem; z-index: 2; background: var(--carte);
  box-shadow: 4px 0 6px -4px rgb(15 23 42 / .18); }
table.liste.figee th.coche, table.liste.figee th.figee { background: var(--survol); z-index: 3; }
table.liste.figee tr:hover td.coche, table.liste.figee tr:hover td.figee { background: var(--survol); }
/* Écran Demandes : deux colonnes figées après la case (Reçue le, Personne). */
table.liste.figee th.figee-recue, table.liste.figee td.figee-recue { width: 6.4rem; min-width: 6.4rem; max-width: 6.4rem; }
table.liste.figee th.figee-personne, table.liste.figee td.figee-personne { left: 8.6rem; width: 17rem; min-width: 17rem; max-width: 17rem; }
table#table-demandes { min-width: 100rem; }
table#table-demandes td.edition { min-width: 13rem; }
table#table-demandes textarea.edition-ligne { width: 100%; min-width: 12rem; max-width: none; font: inherit; font-size: .85rem; }
.filtre-liste { margin: .6rem 0 .4rem; }
.filtre-liste input { width: 100%; max-width: 26rem; padding: .45rem .7rem; font: inherit;
  border: 1px solid var(--bord-champ); border-radius: .5rem; background: var(--carte); }

/* Sommaire d'un écran long (Paramètres) : des ancres en pilules sobres vers chaque section. */
.sommaire { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin: .8rem 0; }
.sommaire a { font-size: .85rem; font-weight: 600; padding: .3rem .85rem; border: 1px solid var(--trait);
  border-radius: 999px; background: var(--carte); text-decoration: none; color: inherit; }
.sommaire a:hover { border-color: var(--rouge); color: var(--rouge-sombre); }
.sommaire ~ form h2[id] { scroll-margin-top: .8rem; }

/* Liste + formulaire d'édition (Saisons, Utilisateurs) : « modifier » mène à l'ancre #formulaire,
   la ligne en cours d'édition reste repérable dans la liste. */
#formulaire { scroll-margin-top: .8rem; }
table.liste tr.edition-en-cours td { background: var(--survol); }

/* Labels de case du portail : le gabarit label.case de menu-commun.css les met à margin 0 ;
   un peu d'air entre cases empilées (écran « Écrire aux familles », Paramètres). Ne pas employer
   .choix ici : portail.css le détourne pour le sélecteur segmenté de l'appel (cases masquées). */
form.bloc label.case { margin: .2rem 0; }

/* Bilans des ateliers (bilans.php) : une carte par atelier, un bloc par séance sous un trait fin ;
   une séance sans cahier ni photo s'estompe. Cahiers et album reprennent les gabarits de la séance. */
.bilan-atelier { margin: 1rem 0; }
.bilan-seance { margin: .9rem 0 0; padding-top: .7rem; border-top: 1px solid var(--trait); }
.bilan-seance h3 { margin: 0 0 .15rem; font-size: .95rem; }
.bilan-seance-vide { opacity: .55; }

/* ---- Statistiques : barres en CSS pur, tuiles de chiffres (base dans la charte) ---- */
.barres { display: flex; align-items: flex-end; gap: 3px; height: 9rem; padding: 0 .2rem; margin: .5rem 0 0;
  border-bottom: 1px solid var(--trait); }
.barres div { flex: 1 1 0; background: var(--rouge); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.barres div:hover::after { content: attr(data-libelle); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); background: var(--encre); color: var(--canevas); font-size: .72rem; padding: .1rem .4rem;
  border-radius: .3rem; white-space: nowrap; margin-bottom: .2rem; z-index: 2; }
.barres-legende { display: flex; justify-content: space-between; font-size: .72rem; color: var(--doux); margin: .2rem .2rem 0; }
.chiffres b small { font-size: .95rem; font-weight: 600; color: var(--doux); }
.chiffres span a { color: inherit; text-decoration: none; }
.chiffres span a:hover { color: var(--rouge-sombre); text-decoration: underline; }
/* Tableau de bord : barre empilée par atelier (validées, à traiter, en attente) et repère de jauge. */
table.bilan th.nombre, table.bilan td.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.bilan td.nombre a { color: inherit; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
table.bilan td.nombre a:hover { color: var(--rouge-sombre); }
table.bilan tr.total td { font-weight: 700; border-top: 2px solid var(--trait); }
table.bilan tr.estompe td { opacity: .55; }
table.bilan td.alerte a, table.bilan td.alerte { color: var(--rouge-sombre); }
.empilee { display: flex; position: relative; height: .8rem; min-width: 11rem; border-radius: 999px;
  background: var(--canevas); overflow: hidden; margin: .25rem 0 .2rem; }
.empilee i, .legende-empilee i { display: block; height: 100%; }
.empilee .validee, .legende-empilee .validee { background: var(--rouge); }
.empilee .demande, .legende-empilee .demande { background: var(--rouge-bord); }
.empilee .attente, .legende-empilee .attente { background: var(--bord-champ); }
.empilee .repere, .legende-empilee .repere { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--encre); }
.legende-empilee { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font-size: .82rem; }
.legende-empilee i { width: 1.1rem; height: .6rem; border-radius: 999px; }
.legende-empilee .repere { position: static; height: .8rem; }
.empilee .retard, .legende-empilee .retard { background: var(--encre); }

/* ---- Étiquettes des statuts d'atelier (class="etiquette <statut>") : réservées à ces statuts.
   Pour dire un état (payée, en retard, dossier en attente…), employer les classes sémantiques de
   la charte : ok, manque, probleme, archive, alerte (8 nov. 2026 — mêmes couleurs, autre nom). ---- */
.etiquette.en_vente { background: var(--ok-fond); border-color: var(--ok-bord); color: var(--ok); }
.etiquette.complet, .etiquette.annule { background: var(--rouge-doux);
  border-color: var(--rouge-bord); color: var(--rouge-sombre); }

/* ---- Tiroir d'une demande : fiche de détail, actions, demandes des familles ---- */
#tiroir-demande { max-width: 36rem; }
.panneau-glissant .panneau-corps { padding: .2rem 1.1rem 1.2rem; }
.detail h3 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--doux); margin: 1.2rem 0 .4rem; padding-bottom: .25rem; border-bottom: 1px solid var(--trait); }
.detail dl { display: grid; grid-template-columns: minmax(7rem, 9rem) 1fr; gap: .3rem .8rem; margin: 0; }
.detail dt { color: var(--doux); font-size: .85rem; padding-top: .1rem; }
.detail dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.detail .lien-dossier a { word-break: break-all; }
.detail .copier { font-size: .8rem; padding: .15rem .6rem; margin-left: .3rem; vertical-align: baseline; }
.detail .citation { white-space: pre-wrap; background: var(--canevas); border-radius: .5rem; padding: .5rem .7rem; }
.detail .photo { width: 5rem; height: 5rem; object-fit: cover; border-radius: .5rem; float: right; margin: 0 0 .5rem .8rem; }
.detail-entete { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .9rem 0 .5rem; }
.detail-actions form { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.detail-actions button, .detail-actions .bouton { font-size: .82rem; padding: .3rem .75rem; font-weight: 500; }
.detail-actions input[type=text] { font-size: .82rem; padding: .25rem .5rem; border: 1px solid var(--bord-champ); border-radius: .4rem; }
/* Demandes de modification venues de l'espace famille (famille.php) : champs avant / proposé, actions. */
table.famille-champs { margin: .5rem 0; font-size: .9rem; }
.famille-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; }
.famille-actions input[type=text] { flex: 1 1 18rem; font-size: .88rem; padding: .35rem .6rem;
  border: 1px solid var(--bord-champ); border-radius: 6px; }
.famille-demande.statut-en_attente { border-left: 4px solid var(--rouge); }
.detail-correction { margin: .8rem 0 0; border: 1px solid var(--trait); border-radius: .6rem; background: var(--canevas); }
.detail-correction summary { cursor: pointer; padding: .55rem .8rem; font-weight: 600; font-size: .9rem; }
.detail-correction[open] summary { border-bottom: 1px solid var(--trait); }
.panneau-glissant .detail-correction form.bloc { margin: 0; padding: .2rem .8rem .8rem; }
.detail .commentaire { border-left: 3px solid var(--rouge-bord); padding: .1rem 0 .1rem .7rem; margin: .5rem 0; }
.detail .commentaire .signature { color: var(--doux); font-size: .82rem; margin-bottom: .15rem; }
.detail .commentaire .texte { white-space: pre-wrap; }
.detail form.commentaire-ajout { margin: .6rem 0 0; }
.detail form.commentaire-ajout textarea { display: block; width: 100%; box-sizing: border-box; min-height: 4.5rem;
  padding: .55rem .7rem; font: inherit; color: var(--encre); background: var(--carte);
  border: 1px solid var(--bord-champ); border-radius: .5rem; resize: vertical; }
.detail form.commentaire-ajout button { margin-top: .5rem; }
.detail table.liste { margin: .3rem 0; font-size: .88rem; }
.detail table.liste th, .detail table.liste td { padding: .35rem .5rem; }

/* Sections repliables d'un écran long (Relances) : le titre sert de bouton. */
.section-pliable { border-top: 1px solid var(--trait); margin: 0; }
.section-pliable > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .2rem .7rem; padding: .85rem 0; }
.section-pliable > summary::-webkit-details-marker { display: none; }
.section-pliable > summary::before { content: '▸'; color: var(--doux); display: inline-block; width: .8rem;
  transition: transform .15s; }
.section-pliable[open] > summary::before { transform: rotate(90deg); }
.section-pliable > summary h2 { margin: 0; }
.section-pliable > summary:hover h2 { color: var(--rouge-sombre); }
.section-pliable[open] { padding-bottom: .8rem; }
.section-pliable > summary + * { margin-top: 0; }
.pages { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; margin: .2rem 0 .6rem; }

/* La photo du participant : case « carte d'identité » en haut à droite de la tuile. */
.fiche { display: flex; gap: 1.1rem; align-items: flex-start; }
.fiche > .fiche-champs { flex: 1 1 0; min-width: 0; }
form.bloc label.photo-carte { flex: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .4rem; position: relative;
  width: 8.5rem; aspect-ratio: 3 / 4; margin: .7rem 0 0; padding: .6rem;
  border: 1.5px dashed var(--bord-champ); border-radius: .5rem; background: var(--canevas);
  text-align: center; cursor: pointer; font-weight: normal; font-size: .85rem;
  color: var(--doux); overflow: hidden; }
form.bloc label.photo-carte:hover { border-color: var(--rouge); }
form.bloc label.photo-carte:focus-within { outline: 2px solid var(--rouge-bord); border-color: var(--rouge); }
form.bloc label.photo-carte.pleine { padding: 0; border-style: solid; }
.photo-carte img { width: 100%; height: 100%; object-fit: cover; }
.photo-carte input { position: absolute; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 560px) {
  .fiche { flex-direction: column-reverse; }  /* la photo passe au-dessus des champs */
}

/* ---- Tuiles éditoriales (fiche atelier ; leur édition, dans la fiche d'inscription : menu-commun.css) ---- */
.tuile { background: var(--carte); border: 1px solid var(--trait); border-radius: .75rem;
  box-shadow: var(--ombre); padding: 1.1rem 1.3rem; margin: 0 0 1.1rem; }
/* Le titre a la hauteur de ligne du cercle numéroté, centré sur sa première ligne. */
.tuile > h2 { margin: 0 0 .2rem; line-height: 1.6rem; }
.tuile > h2::before { counter-increment: tuile; content: counter(tuile);
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 1.6rem; height: 1.6rem; border-radius: 999px; margin-right: .55rem;
  background: var(--rouge-doux); border: 1px solid var(--rouge-bord);
  color: var(--rouge-sombre); font-size: .88rem; font-weight: 700; line-height: 1;
  vertical-align: top; }

/* Autocomplétion (champ établissement) : liste flottante sous le champ. */
.autocompletion { position: relative; }
.autocompletion ul { position: absolute; z-index: 10; left: 0; right: 0; max-width: 28rem;
  margin: .15rem 0 0; padding: .25rem; list-style: none; background: var(--carte);
  border: 1px solid var(--trait); border-radius: .5rem; box-shadow: var(--ombre);
  max-height: 14rem; overflow-y: auto; }
.autocompletion li { padding: .35rem .55rem; border-radius: .4rem; cursor: pointer; font-size: .92rem; }
.autocompletion li.actif, .autocompletion li:hover { background: var(--canevas); }

/* ---- Catalogue public : cartes, code graphique, filtres, semaine type ---- */
.carte[style*="--c"] { border-left: 4px solid var(--c-trait); }
.carte[style*="--c"] h2 a { color: var(--c-texte); }
.carte .lieu-badge { margin-right: .3rem; }
.carte h2 { margin: 0 0 .4rem; font-size: 1.1rem; }
.carte .tarif, .tarif { font-weight: 700; }
img.photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: .5rem;
  margin-bottom: .6rem; display: block; }
.lieu-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--t);
  height: var(--t); border-radius: 50%; background: var(--carte) center / 72% no-repeat; border: 1px solid var(--bord-champ);
  color: var(--encre); font-size: calc(var(--t) * .42); font-weight: 700; line-height: 1; vertical-align: middle;
  box-sizing: border-box; }
/* Barre de filtres du catalogue (niveau, lieu), qui sert aussi de légende du code graphique. */
.filtres { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; font-size: .84rem; color: var(--doux); margin: .3rem 0 1rem; }
.filtres .groupe { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.filtres .titre { font-weight: 700; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; margin-right: .2rem; }
.filtres span, .filtres button { display: inline-flex; align-items: center; gap: .4rem; }
.filtres button { font: inherit; color: var(--encre); background: var(--carte); border: 1px solid var(--trait); border-radius: 999px;
  padding: .22rem .7rem; cursor: pointer; transition: background 120ms, border-color 120ms; }
.filtres button:hover { background: var(--canevas); }
.filtres button:focus-visible { outline: 2px solid var(--rouge-bord); outline-offset: 1px; }
.filtres button.actif { background: var(--encre); border-color: var(--encre); color: var(--canevas); }
.filtres i { width: .85rem; height: .85rem; border-radius: 3px; display: inline-block; }
.filtres-vide { color: var(--doux); font-style: italic; }
.masque { display: none !important; }
.defilement { overflow-x: auto; margin: .8rem 0 1.2rem; }
.legende-ateliers { display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; font-size: .8rem;
  color: var(--doux); margin: .2rem 0 .8rem; }
.legende-ateliers span { display: inline-flex; align-items: center; gap: .35rem; }
.legende-ateliers i { width: .75rem; height: .75rem; border-radius: 3px; }
.semaine-type { display: grid; grid-template-columns: 3.2rem repeat(var(--jours), minmax(0, 1fr)); min-width: 36rem;
  background: var(--carte); border: 1px solid var(--trait); border-radius: .75rem; overflow: hidden; box-shadow: var(--ombre); }
.semaine-type .tete { font-weight: 700; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--doux); text-align: center; padding: .55rem .3rem; border-bottom: 1px solid var(--trait);
  border-left: 1px solid var(--trait); }
.semaine-type .tete:first-child { border-left: 0; }
.semaine-type .heures, .semaine-type .jour { position: relative; height: var(--hauteur); }
.semaine-type .jour { border-left: 1px solid var(--trait); }
.semaine-type .trait { position: absolute; left: 0; right: 0; border-top: 1px solid var(--trait); }
.semaine-type .heures span { position: absolute; right: .4rem; font-size: .72rem; color: var(--doux);
  transform: translateY(-50%); }
.semaine-type .bloc { position: absolute; display: block; box-sizing: border-box; border-radius: 6px;
  border-left: 4px solid var(--c-trait); background: var(--c-fond); color: var(--encre);   /* couleur de l'atelier : menu-commun.css */
  padding: 3px 5px 3px 7px; overflow: hidden; font-size: .76rem; line-height: 1.28; text-decoration: none;
  transition: box-shadow 120ms; }
.semaine-type .bloc:hover, .semaine-type .bloc:focus-visible { box-shadow: 0 3px 10px rgb(15 23 42 / .22); z-index: 3; }
.semaine-type .bloc .h, .semaine-type .bloc .n { font-weight: 700; color: var(--c-texte); }
.semaine-type .bloc .l { color: var(--doux); }
.semaine-type .bloc .lieu-badge { float: right; margin: 0 0 2px 4px; }
.semaine-type .bloc.a-venir { opacity: .55; filter: saturate(.5); }
/* Atelier complet : liseré pointillé et mention « liste d'attente » (le bloc reste cliquable). */
.semaine-type .bloc.complet { border-left-style: dashed; padding-bottom: 1.35rem; }
/* La mention est ancrée en bas du bloc : sur un bloc court ou étroit, c'est elle qui reste visible. */
.semaine-type .bloc .c { position: absolute; left: 7px; bottom: 3px; max-width: calc(100% - 12px); box-sizing: border-box;
  padding: 0 .4rem; border-radius: 999px; font-size: .66rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: var(--rouge-sombre); background: var(--rouge-doux);
  border: 1px solid var(--rouge-bord); }
@media (max-width: 560px) { .semaine-type .bloc .c { font-size: .58rem; padding: 0 .3rem; } }
/* Bascule entre les deux vues du catalogue : cartes ou semaine type. */
.vues { display: flex; justify-content: center; gap: 0; margin: -.2rem 0 1.2rem; }
.vues a { padding: .4rem 1.1rem; border: 1px solid var(--trait); background: var(--carte); color: var(--encre);
  text-decoration: none; font-size: .9rem; font-weight: 600; }
.vues a:first-child { border-radius: 999px 0 0 999px; }
.vues a:last-child { border-radius: 0 999px 999px 0; border-left: 0; }
.vues a.actif { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.vues a:not(.actif):hover { background: var(--canevas); }
.vues a:not(:first-child):not(:last-child) { border-left: 0; }

/* ---- Page des lieux : la carte, puis une carte par lieu ---- */
.carte-lieux { height: min(28rem, 60vh); border-radius: .75rem; border: 1px solid var(--trait); box-shadow: var(--ombre);
  margin: 0 0 1.2rem; background: #e9eef3; z-index: 0; }
.repere-lieu span { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; background: #fff center / 72% no-repeat; border: 2px solid var(--rouge); color: #0f172a;
  font-weight: 800; font-size: 15px; box-shadow: 0 2px 6px rgb(15 23 42 / .3); }
.lieux-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.1rem; }
.lieu-carte { background: var(--carte); border: 1px solid var(--trait); border-radius: .9rem; box-shadow: var(--ombre);
  padding: 1rem 1.2rem; scroll-margin-top: 1rem; }
.lieu-carte h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem; font-size: 1.15rem; }
.lieu-carte p { margin: 0 0 .5rem; }
.lieu-carte .itineraires a { font-weight: 600; font-size: .9rem; }
.ateliers-du-lieu { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.ateliers-du-lieu li { padding-left: .7rem; border-left: 4px solid var(--c-trait); font-size: .92rem; }
.ateliers-du-lieu a { color: var(--c-texte); font-weight: 600; }
.lieu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); background: var(--carte);
  border: 1px solid var(--trait); border-radius: .9rem; box-shadow: var(--ombre); overflow: hidden; }
.lieu .infos { padding: 1rem 1.2rem; }
.lieu .infos p { margin: 0 0 .5rem; }
.lieu .itineraires a { font-weight: 600; font-size: .9rem; }
.plan { position: relative; min-height: 15rem; background: #e9eef3; }
.plan iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.plan-agrandir { position: absolute; right: .5rem; bottom: .5rem; font-size: .76rem; font-weight: 600;
  background: rgb(255 255 255 / .92); color: #0f172a; padding: .15rem .55rem; border-radius: .4rem;
  text-decoration: none; }
/* Transports façon plan RATP : pastilles colorées par ligne (couleurs officielles, hors thème). */
ul.transports { list-style: none; margin: .4rem 0 .6rem; padding: 0; display: grid; gap: .35rem; }
ul.transports li { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; font-size: .9rem; }
ul.transports .mode { font-size: .7rem; font-weight: 800; letter-spacing: .02em; margin-right: .1rem;
  color: var(--canevas); background: var(--encre); border-radius: .25rem; padding: .05rem .3rem; }
ul.transports .mode-m, ul.transports .mode-t { border-radius: 50%; width: 1.25rem; height: 1.25rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; }
ul.transports .ligne { display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
  font-size: .78rem; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; line-height: 1; }
ul.transports .ligne.rond { border-radius: 50%; width: 1.4rem; padding: 0; }
ul.transports .ligne.carre { border-radius: .3rem; width: 1.4rem; padding: 0; }
ul.transports .ligne.rect { border-radius: .3rem; }
ul.transports .ligne.autre { background: var(--canevas); border: 1px solid var(--trait); color: var(--encre); }
ul.transports .arret { margin-left: .25rem; color: var(--doux); }

/* ---- Fiche atelier : contenu à gauche, bloc d'inscription collant à droite ---- */
.fiche-atelier .fil { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap;
  font-size: .92rem; margin: 0 0 .8rem; }
.fiche-atelier .fil a { text-decoration: none; font-weight: 500; }
.fiche-atelier .niveau { display: inline-flex; align-items: center; gap: .4rem; padding: .18rem .75rem; border-radius: 999px;
  background: var(--carte); border: 1px solid var(--trait); font-size: .82rem; font-weight: 600; }
.fiche-atelier .niveau::before { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: var(--rouge); }
.fiche-atelier h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.12; margin: 0 0 .3rem; }
.fiche-atelier .promesse { font-size: clamp(1.06rem, 2vw, 1.28rem); font-weight: 500; margin: 0 0 1.2rem; max-width: 40rem; }
.fiche-atelier .promesse::before { content: ''; display: block; width: 3.2rem; height: 3px; background: var(--rouge);
  border-radius: 2px; margin: .55rem 0 .7rem; }
.fiche-atelier .promesse strong { font-weight: 800; }
.fiche-atelier .grille { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.5rem; align-items: start; }
.fiche-atelier figure { margin: 0 0 1.2rem; }
.fiche-atelier figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: .9rem; display: block;
  box-shadow: var(--ombre); margin: 0; }
.fiche-atelier figcaption { font-size: .82rem; color: var(--doux); margin: .45rem .2rem 0; }
.fiche-atelier section { margin: 0 0 1.5rem; }
.fiche-atelier section h2 { margin: 0 0 .6rem; font-size: 1.2rem; font-weight: 800; }
.fiche-atelier .texte p, .fiche-atelier .texte ul { max-width: 62ch; margin: 0 0 .8rem; }
.fiche-atelier .texte ul { padding-left: 1.2rem; }
.faits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.faits li { background: var(--carte); border: 1px solid var(--trait); border-radius: .75rem; padding: .85rem 1rem;
  box-shadow: var(--ombre); }
.faits b { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums;
  margin-bottom: .2rem; }
.faits span { color: var(--doux); font-size: .88rem; }
.faits.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.faits.une { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) { .faits, .faits.deux { grid-template-columns: 1fr; } }
.fiche-atelier .rythme { background: var(--carte); border: 1px solid var(--trait); border-radius: .9rem; box-shadow: var(--ombre);
  padding: 1rem 1.2rem; }
.fiche-atelier .rythme li { margin: .2rem 0; }
/* Dans l'encadré, le texte prend toute la largeur. */
.fiche-atelier .rythme p, .fiche-atelier .rythme ul { max-width: none; }
.fiche-atelier details { background: var(--carte); border: 1px solid var(--trait); border-radius: .75rem; padding: .7rem 1rem;
  margin-bottom: .5rem; }
.fiche-atelier details summary { cursor: pointer; font-weight: 600; }
.fiche-atelier details p { margin: .5rem 0 0; color: var(--doux); font-size: .95rem; }
aside.achat { position: sticky; top: 1rem; background: var(--carte); border: 1px solid var(--trait); border-radius: .9rem;
  box-shadow: 0 12px 30px -12px rgb(15 23 42 / .25), 0 2px 6px rgb(15 23 42 / .08); padding: 1.15rem 1.25rem 1.25rem; }
.etat { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 600; padding: .15rem .65rem;
  border-radius: 999px; background: var(--rouge-doux); border: 1px solid var(--rouge-bord); color: var(--rouge-sombre);
  margin-bottom: .7rem; }
.etat.ouvert { background: var(--ok-fond); border-color: var(--ok-bord); color: var(--ok); }
.prix { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.prix b { font-size: 2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.prix span { color: var(--doux); }
.prix-detail { color: var(--doux); font-size: .86rem; margin: .3rem 0 .9rem; }
dl.resume { display: grid; grid-template-columns: auto 1fr; gap: .4rem .8rem; margin: 0 0 1rem; font-size: .92rem;
  border-top: 1px solid var(--trait); padding-top: .9rem; }
dl.resume dt { color: var(--doux); }
dl.resume dd { margin: 0; font-weight: 500; }
.jauge { height: .4rem; border-radius: 999px; background: var(--trait); overflow: hidden; margin: .25rem 0 .1rem; }
.jauge i { display: block; height: 100%; background: var(--rouge); border-radius: 999px; }
aside.achat .bouton, .barre-mobile .bouton { display: block; width: 100%; text-align: center; font-size: 1rem;
  padding: .75rem 1.2rem; }
.bouton.attente { background: var(--trait); color: var(--doux); cursor: not-allowed; pointer-events: none; }
.compte { text-align: center; font-size: .86rem; color: var(--doux); margin: .55rem 0 0; }
.compte b { color: var(--encre); font-variant-numeric: tabular-nums; }
.rassure { list-style: none; margin: 1rem 0 0; padding: .9rem 0 0; border-top: 1px solid var(--trait);
  font-size: .86rem; color: var(--doux); display: grid; gap: .4rem; }
.rassure li { display: flex; gap: .5rem; align-items: flex-start; }
.rassure svg { flex: none; width: 1rem; height: 1rem; margin-top: .2rem; color: var(--ok); }
.autres { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .9rem; }
.autres a { display: block; text-decoration: none; color: inherit; background: var(--carte); border: 1px solid var(--trait);
  border-radius: .75rem; box-shadow: var(--ombre); padding: .9rem 1rem; }
.autres a:hover { border-color: var(--rouge-bord); }
.autres b { display: block; font-weight: 700; margin-bottom: .2rem; }
.autres small { display: block; color: var(--doux); font-size: .86rem; }
.autres .prix-ligne { margin-top: .5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.autres .prix-ligne span { color: var(--doux); font-weight: 400; font-size: .86rem; }
.autres .etat { margin: .45rem 0 0; }
.barre-mobile { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--carte);
  border-top: 1px solid var(--trait); box-shadow: 0 -8px 24px -12px rgb(15 23 42 / .3);
  padding: .6rem 1rem; align-items: center; gap: .8rem; }
.barre-mobile .prix b { font-size: 1.3rem; }
.barre-mobile .bouton { width: auto; flex: 1; padding: .6rem .9rem; font-size: .92rem; }
@media (max-width: 860px) {
  .fiche-atelier .grille { grid-template-columns: 1fr; }
  aside.achat { position: static; }
  .barre-mobile { display: flex; }
  .fiche-atelier { padding-bottom: 4rem; }   /* la barre fixe ne doit pas couvrir le pied de page */
}
@media (max-width: 640px) { .lieu { grid-template-columns: 1fr; } }

/* ---- Pied de page ---- */
footer.pied { padding: 1.4rem 0 .6rem; color: var(--doux); font-size: .82rem; }
footer.pied a { color: var(--doux); }
main.publique > footer.pied { text-align: center; }

/* ---- Tableau large sur petit écran (pattern repris du calendrier) ---- */
@media (max-width: 900px) {
  .defilement { margin: 0 -1rem; padding: 0 1rem; }
  .defilement > table { min-width: 44rem; }
}

/* ---- Déclaration de présence des intervenants (declarations-ecran.php, 31 oct. 2026) ----
   Le bloc « Ma présence » de l'écran d'appel et « À déclarer (N) » de Mon espace. Jetons de la charte uniquement ; sans JavaScript ;
   cibles tactiles de 44 px au moins (les animateurs sont sur téléphone) ; un état n'est jamais dit par la couleur seule (coche, mot). */
.presence { margin: 1rem 0; }
.presence h2 { margin: 0 0 .15rem; }
.presence-quand { margin: 0 0 .8rem; }
.presence .message, .presence .erreur, .presence .avertissement { margin: .6rem 0 .8rem; box-shadow: none; }
.presence .avertissement ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.presence-etat { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: .5rem 0 .2rem; }
.presence-resume { margin: .2rem 0; font-weight: 600; }
.presence-form fieldset { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
.presence-form legend { font-size: .95rem; margin: 0 0 .5rem; }
.presence-boutons { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; }
.presence-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.presence-bouton { flex: 1 1 8rem; display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .55rem 1rem;
  border: 2px solid var(--bord-champ); border-radius: .75rem; background: var(--carte); color: var(--encre); font-weight: 600; cursor: pointer; text-align: center; }
.presence-bouton:hover { background: var(--survol); }
.presence-radio:checked + .presence-bouton { border-color: var(--rouge); background: var(--rouge-doux); color: var(--rouge-nuit); }
.presence-radio:checked + .presence-bouton::before { content: '✓'; margin-right: .4rem; font-weight: 800; }
.presence-radio:focus-visible + .presence-bouton { outline: 2.5px solid var(--rouge); outline-offset: 2px; }
.presence-temps, .presence-note, .presence-remplace { margin-top: .9rem; }
.presence-form:has(input[value=absent]:checked) .presence-temps { display: none; }   /* l'absent ne porte aucun temps */
.presence-certif { margin: 0 0 .6rem; }
.presence-heures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .9rem; max-width: 22rem; }
.presence-heures label, .presence-note label, .presence-remplace label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .25rem; }
.presence-heures input, .presence-note input, .presence-remplace select { width: 100%; min-height: 2.75rem; font-size: 1rem; }   /* 16 px : pas de zoom sur iPhone */
.presence-note input, .presence-remplace select { max-width: 28rem; }
.presence-prevu { margin: .45rem 0 0; }
.presence-actions { margin: 1rem 0 0; }
.presence-envoyer { min-height: 3rem; padding: .7rem 1.5rem; font-size: 1rem; }
.presence-modifier { margin-top: .8rem; }
.presence-modifier > summary { list-style: none; display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1.1rem;
  border: 1px solid var(--bord-champ); border-radius: .5rem; background: var(--carte); color: var(--encre); font-weight: 600; cursor: pointer; }
.presence-modifier > summary::-webkit-details-marker, .presence-item > summary::-webkit-details-marker { display: none; }
.presence-modifier > summary:hover { background: var(--survol); }
.presence-modifier[open] > summary { margin-bottom: .9rem; }
.presence-equipe-titre { margin: 1.1rem 0 0; font-weight: 700; font-size: .9rem; }
.presence-equipe { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem .5rem; }
.presence-equipe li { padding: .2rem .7rem; border: 1px solid var(--trait); border-radius: 999px; background: var(--survol); font-size: .88rem; }
/* Mon espace › À déclarer (N) : par mois (le courant ouvert), une case cochée d'office par séance (« Présent, horaires prévus ») avec ses champs Arrivée, Départ
   et Note (voir plus bas), un seul bouton « Je certifie ces N présences ». Les cases et les champs se rattachent au formulaire du lot par l'attribut form. */
.presence-liste { margin: 0 0 1rem; }
.presence-liste h2 { margin: 0 0 .3rem; }
.presence-lot { margin: 0; }
.presence-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.presence-mois { margin-top: .8rem; border: 1px solid var(--trait); border-radius: .6rem; background: var(--carte); }
.presence-mois > summary { list-style: none; cursor: pointer; min-height: 2.75rem; padding: .6rem .9rem; display: flex; align-items: baseline; gap: .3rem .6rem;
  border-radius: .6rem; }
.presence-mois > summary::-webkit-details-marker { display: none; }
.presence-mois > summary::before { content: '›'; font-weight: 800; color: var(--rouge-sombre); }
.presence-mois[open] > summary::before { content: '˅'; }
.presence-mois > summary:hover { background: var(--survol); }
.presence-mois[open] > summary { background: var(--survol); border-bottom: 1px solid var(--trait); border-radius: .6rem .6rem 0 0; }
.presence-lignes { list-style: none; margin: 0; padding: 0; }
.presence-ligne { padding: .6rem .9rem; border-top: 1px solid var(--trait); }
.presence-ligne:first-child { border-top: 0; }
.presence-ligne-tete { display: flex; align-items: flex-start; gap: .7rem; }
.presence-coche { flex: none; width: 1.5rem; height: 1.5rem; margin: .1rem 0 0; cursor: pointer; }
.presence-ligne-libelle { flex: 1 1 auto; min-width: 0; display: block; }
label.presence-ligne-libelle { cursor: pointer; }
.presence-item-titre { display: block; min-width: 0; }
.presence-item-quoi { display: block; color: var(--doux); }
.presence-ligne-dit { display: block; margin-top: .1rem; color: var(--doux); font-size: .88rem; }
.presence-modifier-ligne { margin: .2rem 0 0 2.2rem; }
.presence-modifier-ligne > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .2rem;
  color: var(--rouge-sombre); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.presence-modifier-ligne > summary::-webkit-details-marker { display: none; }
.presence-modifier-ligne[open] > summary { margin-bottom: .5rem; }
.presence-ligne-seule .presence-modifier-ligne { margin-left: 0; }   /* pas de case : le lien s'aligne sur le texte */
.presence-item-corps { padding: 0 0 .4rem; }
.presence-item-plein { margin-top: .8rem; }
.presence-lot-actions { margin-top: 1rem; }
.presence-lot-actions .note { margin: .5rem 0 0; }
.presence-refus { margin: .4rem 0 0; padding-left: 1.2rem; }
.presence-refus li { margin: .2rem 0; }
/* Le bandeau de connexion (accueil de l'appel, Mes séances) : non bloquant, un bouton large. */
.presence-bandeau { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.presence-bandeau p { margin: 0; }
.presence-bandeau .bouton { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1.3rem; }
/* « J'ai remplacé quelqu'un » : replié ; le jour se choisit par un formulaire GET. */
.presence-remplacement { margin: 0 0 1rem; }
.presence-remplacement > summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; }
.presence-remplacement[open] > summary { margin-bottom: .4rem; }
.presence-date { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; margin: .6rem 0; }
.presence-date label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .25rem; }
.presence-date input { min-height: 2.75rem; font-size: 1rem; }
.presence-remplacement .presence-lignes { margin-top: .6rem; border: 1px solid var(--trait); border-radius: .6rem; }
@media (max-width: 640px) { .presence-envoyer, .presence-bandeau .bouton { width: 100%; justify-content: center; } }

/* ---- Mon espace › À déclarer : les champs de chaque ligne (declarations-ecran.php, 1er nov. 2026) ----
   Arrivée, Départ et Note sont TOUJOURS visibles : grisés (disabled) tant que la case de la ligne est cochée, éditables dès qu'on la décoche. Le choix
   Présent / Absent et le texte d'aide n'apparaissent que décochée (:has, sans JavaScript ; sans :has ils restent visibles, sans gêne). Jetons de la charte
   uniquement : le grisé et le mode sombre suivent. Fonte de 16 px dans les champs (pas de zoom sur iPhone), cibles de 44 px. */
.presence-ligne-champs { margin: .5rem 0 0 2.2rem; }
.presence-ligne-champs fieldset { background: none; border: 0; box-shadow: none; padding: 0; margin: 0 0 .8rem; min-width: 0; }
.presence-ligne-champs legend { font-size: .9rem; font-weight: 600; margin: 0 0 .4rem; padding: 0; }
.presence-ligne-champs .presence-heures { max-width: 24rem; }
.presence-ligne-champs .presence-bouton { flex-basis: 6rem; }   /* Présent / Absent côte à côte, même à 375 px */
.presence-ligne-champs .presence-note { margin-top: .8rem; }
.presence-note textarea { display: block; width: 100%; min-height: 5.5rem; box-sizing: border-box; font-size: 1rem; line-height: 1.4; }
.presence-compteur { margin: .25rem 0 0; text-align: right; font-variant-numeric: tabular-nums; }
.presence-aide { margin: .7rem 0 0; }
.presence-ligne-champs input:disabled, .presence-ligne-champs textarea:disabled { background: var(--canevas); color: var(--doux); border-color: var(--trait);
  -webkit-text-fill-color: var(--doux); opacity: 1; cursor: not-allowed; resize: none; }
.presence-ligne-champs .presence-heures > div:has(:disabled) > label, .presence-ligne-champs .presence-note:has(:disabled) > label { color: var(--doux); }
.presence-ligne:has(.presence-coche:checked) .presence-statut, .presence-ligne:has(.presence-coche:checked) .presence-aide { display: none; }
.presence-ligne:has(.presence-coche:not(:checked)) { background: var(--survol); }
.presence-ligne:has(.presence-coche:not(:checked)) .presence-ligne-dit { display: none; }   /* « Présent, horaires prévus » ne vaut que cochée */
@media (max-width: 640px) { .presence-ligne-champs { margin-left: 0; } .presence-ligne-champs .presence-heures { max-width: none; } }
/* Sur ordinateur (demande de Brice, 1er nov. 2026 : « il faut faire beaucoup mieux, ça prend beaucoup de place, les boutons sont énormes ») : une séance tient sur UNE
   ligne — le texte à gauche (date, atelier), Arrivée, Départ et Note à droite, la note ne s'ouvrant en grand que dans le champ actif. Décochée, le choix Présent / Absent
   devient un petit sélecteur à deux segments sur sa propre ligne, au-dessus des champs (qui restent alignés sur ceux des autres lignes), l'aide dessous en petit.
   Tout se replie de lui-même (flex-wrap) quand la place manque ; le téléphone garde sa mise en page, aux cibles de 44 px. */
@media (min-width: 761px) {
  .presence-ligne-lot { display: grid; grid-template-columns: minmax(11rem, 17rem) minmax(0, 1fr); column-gap: 1.2rem; align-items: center; padding: .55rem .9rem; }
  .presence-ligne-lot .presence-ligne-champs { margin: 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: .4rem .7rem; }
  .presence-ligne-champs .presence-statut { flex: 0 0 100%; margin: 0; }
  .presence-ligne-champs .presence-statut legend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .presence-ligne-champs .presence-boutons { display: inline-flex; flex-wrap: nowrap; gap: 0; }
  .presence-ligne-champs .presence-bouton { flex: none; min-width: 6rem; min-height: 2.1rem; padding: .25rem .9rem; border-width: 1px; border-radius: 0; font-size: .9rem; }
  .presence-ligne-champs .presence-radio:first-child + .presence-bouton { border-radius: .5rem 0 0 .5rem; }
  .presence-ligne-champs .presence-bouton:last-of-type { border-radius: 0 .5rem .5rem 0; margin-left: -1px; }
  .presence-ligne-champs .presence-radio:checked + .presence-bouton { position: relative; z-index: 1; }
  .presence-ligne-champs .presence-heures { flex: none; grid-template-columns: repeat(2, 5.8rem); gap: .5rem; max-width: none; }
  .presence-ligne-champs .presence-note { flex: 1 1 9rem; min-width: 0; margin: 0; }
  .presence-ligne-champs .presence-heures label, .presence-ligne-champs .presence-note label { font-size: .76rem; margin: 0 0 .15rem; }
  .presence-ligne-champs .presence-heures input { min-height: 2.3rem; padding: .25rem .5rem; font-size: .95rem; }
  .presence-ligne-champs .presence-note textarea { min-height: 0; height: 2.3rem; padding: .35rem .6rem; font-size: .95rem; line-height: 1.3; }
  .presence-ligne-champs .presence-note textarea:enabled { resize: vertical; }
  .presence-ligne-champs .presence-note textarea:focus { height: 4.4rem; }
  .presence-ligne-champs .presence-compteur { display: none; margin: .1rem 0 0; font-size: .74rem; }
  .presence-ligne-champs .presence-note:focus-within .presence-compteur { display: block; }
  .presence-ligne-champs .presence-aide { flex: 0 0 100%; margin: 0; font-size: .8rem; }
}
/* Écran large mais tactile (tablette en paysage) : mêmes dispositions, cibles de 44 px. */
@media (min-width: 761px) and (pointer: coarse) {
  .presence-ligne-champs .presence-bouton, .presence-ligne-champs .presence-heures input { min-height: 2.75rem; }
  .presence-ligne-champs .presence-note textarea { height: 2.75rem; }
}

/* « J'ai remplacé quelqu'un » et le « Déclarer » d'un remplaçant désigné, sur ordinateur (demande de Brice, 1er nov. 2026, même esprit que « À déclarer ») : chaque
   séance sur une ligne — le texte à gauche ; à droite la personne remplacée, Arrivée, Départ, Note et le bouton ; la phrase de certification et l'horaire prévu
   dessous, en petit (jamais retirés : l'intervenant certifie). .presence-champs enveloppe les champs du formulaire (declaration_ecran_formulaire_html()) ;
   .presence-temps passe en display: contents pour que ses enfants se rangent dans la même ligne. Téléphone inchangé. */
@media (min-width: 761px) {
  .presence-remplacement > .note { margin: .2rem 0 .5rem; }
  .presence-remplacement .presence-date { margin: .4rem 0 .7rem; }
  .presence-remplacement .presence-date input, .presence-remplacement .presence-date button { min-height: 2.3rem; padding: .25rem .7rem; font-size: .92rem; }
  .presence-remplacement .presence-lignes { margin-top: .4rem; }
  .presence-remplacement .presence-ligne { display: grid; grid-template-columns: minmax(11rem, 17rem) minmax(0, 1fr); column-gap: 1.2rem; align-items: center; padding: .55rem .9rem; }
  .presence-remplacement .presence-item-plein { margin: 0; padding: 0; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-champs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .4rem .7rem; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-form legend { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-remplace { flex: 0 1 12rem; margin: 0; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-temps { display: contents; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-heures { flex: none; grid-template-columns: repeat(2, 5.8rem); gap: .5rem; max-width: none; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-note { flex: 1 1 8rem; min-width: 0; margin: 0; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-note input { max-width: none; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-actions { flex: none; margin: 0; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-certif, :is(.presence-remplacement, .presence-ligne-seule) .presence-prevu { flex: 0 1 auto; margin: 0; font-size: .8rem; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-certif { order: 8; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-prevu { order: 9; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-champs label { font-size: .76rem; margin: 0 0 .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-champs :is(input, select) { min-height: 2.3rem; padding: .25rem .5rem; font-size: .95rem; }
  :is(.presence-remplacement, .presence-ligne-seule) .presence-envoyer { min-height: 2.3rem; padding: .3rem 1.1rem; font-size: .9rem; }
}
/* Fenêtre plus étroite (barre latérale comprise) : le texte passe au-dessus du formulaire, qui garde alors toute la largeur. */
@media (min-width: 761px) and (max-width: 1180px) {
  .presence-remplacement .presence-ligne { display: block; }
  .presence-remplacement .presence-ligne-tete { margin-bottom: .45rem; }
}
@media (min-width: 761px) and (pointer: coarse) {
  .presence-remplacement .presence-date input, .presence-remplacement .presence-date button,
  :is(.presence-remplacement, .presence-ligne-seule) .presence-champs :is(input, select), :is(.presence-remplacement, .presence-ligne-seule) .presence-envoyer { min-height: 2.75rem; }
}

/* ---- Clôture de séance (declarations-ecran.php, clotures.php, 1er nov. 2026) ----
   La ligne d'avancement en tête de la page d'une séance, les compléments du cahier de textes, « Séances à clôturer », la seconde ligne du bandeau d'arrivée.
   Jetons de la charte uniquement ; sans JavaScript ; cibles tactiles de 44 px au moins ; un état n'est jamais dit par la couleur seule (coche, mot). */
.cloture-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Le bandeau des étapes de la page d'une séance (7 nov. 2026, revu le soir même : « trop chargé ») : une seule carte, trois colonnes séparées d'un trait,
   un numéro cerclé discret qui devient une coche quand l'étape est faite. Numérotation par compteur CSS, comme les titres des cartes qu'il ouvre. */
.cloture-avancement { margin: 0 0 1rem; padding: .85rem 1.1rem; background: var(--carte); border: 1px solid var(--trait); border-radius: .75rem; box-shadow: var(--ombre); }
.cloture-avancement-titre { margin: 0 0 .45rem; font-size: .85rem; font-weight: 600; color: var(--doux); }
.cloture-etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); counter-reset: cloture; }
.cloture-groupe { counter-increment: cloture; display: flex; flex-direction: column; gap: .1rem; min-width: 0; padding: 0 1rem; border-left: 1px solid var(--trait); }
.cloture-groupe:first-child { padding-left: 0; border-left: 0; }
.cloture-lien { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.5rem; color: var(--encre); text-decoration: none; font-weight: 600; }
.cloture-lien:hover .cloture-groupe-titre { text-decoration: underline; text-underline-offset: 3px; }
.cloture-lien:focus-visible { outline: 2.5px solid var(--rouge); outline-offset: 3px; border-radius: .4rem; }
.cloture-num::before { content: counter(cloture); display: inline-flex; align-items: center; justify-content: center; width: 1.55rem; height: 1.55rem; box-sizing: border-box;
  border-radius: 50%; border: 1.5px solid var(--bord-champ); color: var(--doux); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cloture-groupe-fait .cloture-num::before { content: '✓'; border-color: var(--ok-fond); background: var(--ok-fond); color: var(--ok); }
.cloture-groupe-neutre .cloture-lien { color: var(--doux); }
.cloture-sous { list-style: none; margin: 0; padding: 0 0 0 2.1rem; display: flex; flex-direction: column; gap: .05rem; }
.cloture-etape { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35rem; font-size: .85rem; }
.cloture-sous > .cloture-etape:only-child .cloture-nom { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* le titre de la colonne le dit déjà */
.cloture-nom { font-weight: 600; }
.cloture-coche { color: var(--ok); font-weight: 700; }
.cloture-reste { color: var(--doux); }
.cloture-detail { color: var(--doux); }
@media (max-width: 640px) {
  .cloture-avancement { padding: .7rem .6rem; }
  .cloture-groupe { align-items: center; padding: 0 .35rem; text-align: center; }
  .cloture-lien { flex-direction: column; gap: .3rem; min-height: 0; font-size: .82rem; line-height: 1.15; }
  .cloture-sous { padding: 0; align-items: center; }
  .cloture-etape { justify-content: center; font-size: .74rem; }
  .cloture-detail { display: none; }
  .cloture-groupe-fait .cloture-sous { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Cahier de textes : le résumé d'un collègue en lecture seule, les compléments, le champ « Compléter ». */
.cloture-resume { margin: 0 0 1rem; }
.cloture-resume-titre { margin: 0 0 .4rem; }
.cloture-texte { margin: 0; padding: .6rem .85rem; background: var(--canevas); border: 1px solid var(--trait); border-left: 3px solid var(--bord-champ); border-radius: .5rem;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.cloture-complements { margin: 1.1rem 0 0; }
.cloture-complements h3 { margin: 0 0 .5rem; font-size: .95rem; }
.cloture-liste-complements { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.cloture-liste-complements .note { margin: .25rem 0 0; }
.cloture-completer { margin: 1.1rem 0 0; }
.cloture-completer label { display: block; margin: 0 0 .15rem; }
.cloture-completer .note { margin: 0 0 .45rem; }
.cloture-completer textarea { display: block; width: 100%; box-sizing: border-box; min-height: 7rem; font-size: 1rem; }   /* 16 px : pas de zoom sur iPhone */
.cloture-actions { margin: .8rem 0 0; }
.cloture-actions button { min-height: 2.75rem; padding: .6rem 1.4rem; }
.cloture-cahier, .cloture-photos { margin: 1.6rem 0 1rem; }
.cloture-cahier h2, .cloture-photos h2 { margin-top: 0; }
@media (max-width: 640px) { .cloture-actions button { width: 100%; } }
/* « Séances à clôturer » : l'équipe (accueil de l'appel, sous « Appels en retard ») et l'intervenant (liste de ses séances). */
.cloture-a-cloturer { margin: 1rem 0; }
.cloture-a-cloturer h2 { margin: 0 0 .3rem; }
.cloture-a-cloturer > .note { margin: 0 0 .6rem; }
.cloture-liste { list-style: none; margin: 0; padding: 0; }
.cloture-ligne { padding: .7rem 0; border-top: 1px solid var(--trait); }
.cloture-ligne:first-child { border-top: 0; padding-top: .2rem; }
.cloture-seance { display: flex; flex-direction: column; gap: .1rem; min-height: 2.75rem; justify-content: center; text-decoration: none; color: var(--encre); }
.cloture-seance strong { text-decoration: underline; text-underline-offset: 2px; color: var(--rouge-sombre); }
.cloture-quand { color: var(--doux); }
.cloture-manque, .cloture-qui { margin: .25rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.cloture-qui { gap: .2rem .4rem; }
.cloture-personne { white-space: nowrap; }
.cloture-personne a { display: inline-block; min-height: 2.75rem; line-height: 2.75rem; }   /* le numéro se touche au pouce */
/* Le bandeau d'arrivée a deux lignes quand il y a aussi des séances à clôturer : chacune garde son bouton à droite, et passe à la ligne quand la place manque. */
.presence-bandeau { flex-direction: column; align-items: stretch; }
.presence-bandeau-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.presence-bandeau-ligne p { margin: 0; }
.presence-bandeau-ligne .note { color: inherit; }
/* Le lien-bouton secondaire du bandeau est blanc bordé (charte), même sur l'écran d'appel dont la feuille en ligne le grise. */
.presence-bandeau .bouton.secondaire { background: var(--carte); color: var(--encre); border: 1px solid var(--bord-champ); }
.presence-bandeau .bouton.secondaire:hover { background: var(--survol); color: var(--encre); }
@media (max-width: 640px) { .presence-bandeau-ligne .bouton { width: 100%; justify-content: center; } }

/* ---- Photos de séance (declarations-ecran.php, photos-seance.php, 1er nov. 2026) ----
   La section « Photos » de la page d'une séance : le rappel des refus du droit à l'image, le formulaire d'envoi, l'album en miniatures.
   Jetons de la charte uniquement ; sans JavaScript ; cibles tactiles de 44 px au moins ; l'audience d'une photo se dit en mots (« visible des familles », « interne »),
   jamais par la couleur seule. */
.cloture-photos .note { margin: .4rem 0; }
.photos-retour { margin: .8rem 0; box-shadow: none; }
.photos-retour-liste { margin: 0; padding-left: 1.2rem; }
.photos-retour-liste li { margin: .2rem 0; overflow-wrap: anywhere; }
.photos-rappel { margin: .8rem 0 1rem; box-shadow: none; }
.photos-rappel p { margin: 0 0 .4rem; }
.photos-rappel .note { margin: .4rem 0 0; color: inherit; }
.photos-refus { margin: .2rem 0 .4rem; padding-left: 1.3rem; font-weight: 600; }
.photos-refus li { margin: .15rem 0; }
.photos-envoi { margin: 1rem 0 1.4rem; }
.photos-envoi label { display: block; }
.photos-envoi input[type=file] { display: block; width: 100%; box-sizing: border-box; min-height: 2.75rem; padding: .5rem; font-size: 1rem;   /* 16 px : pas de zoom sur iPhone */
  color: var(--encre); background: var(--carte); border: 1px solid var(--bord-champ); border-radius: .5rem; }
.photos-plein { margin: 1rem 0; }
.photos-album-titre { margin: 1.2rem 0 .6rem; font-size: 1rem; }
.photos-album { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .9rem; }
.photos-photo { display: flex; flex-direction: column; gap: .35rem; min-width: 0; padding: .55rem; background: var(--carte); border: 1px solid var(--trait); border-radius: .75rem;
  box-shadow: var(--ombre); }
.photos-lien { display: block; overflow: hidden; background: var(--canevas); border-radius: .5rem; }
.photos-lien:focus-visible { outline: 2.5px solid var(--rouge); outline-offset: 2px; }
.photos-miniature { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photos-legende { margin: 0; font-size: .88rem; overflow-wrap: anywhere; }
.photos-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .3rem; }
.photos-action { margin: 0; }
.photos-action button { min-height: 2.75rem; }
@media (max-width: 640px) {
  .photos-album { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .photos-actions, .photos-action, .photos-action button { width: 100%; }
}

/* Connexion et mise en sécurité du compte (auth.php, securiser.php, socle 2.2) */
.auth { max-width: 32rem; margin: 0 auto; }
.auth h1 { text-align: center; }
form.bloc input[type=password] {
  width: 100%; max-width: 28rem; padding: .45rem .6rem; font: inherit; color: var(--encre);
  border: 1px solid var(--bord-champ); border-radius: .5rem; background: var(--carte); }
.auth form.bloc input[type=email], .auth form.bloc input[type=password], .auth form.bloc input[type=text] { max-width: none; }
.mdp-champ { display: flex; gap: .4rem; align-items: stretch; }
.mdp-champ input { flex: 1; min-width: 0; }
.mdp-champ .mdp-afficher { padding: .35rem .8rem; font-size: .85rem; }
.auth form.bloc label.case { font-weight: 400; margin-top: .9rem; }
.auth form.bloc button[type=submit] { margin-top: .4rem; }
input.code-otp { max-width: 12rem !important; font-size: 1.25rem; letter-spacing: .25em; text-align: center; }
.encart-famille { border-left: 4px solid var(--rouge); }
.etapes-securiser { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: etape;
  font-size: .85rem; color: var(--doux, #64748b); flex-wrap: wrap; justify-content: center; }
.etapes-securiser li { counter-increment: etape; }
.etapes-securiser li::before { content: counter(etape) ". "; }
.etapes-securiser li + li::before { content: "› " counter(etape) ". "; }
.etapes-securiser li[aria-current] { color: var(--encre); font-weight: 700; }
.etapes-securiser li.faite { text-decoration: line-through; }
.consignes { padding-left: 1.2rem; }
.qr-enrolement { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin: .5rem 0 .8rem; }
.qr-enrolement .qr { background: #fff; padding: .5rem; border-radius: .5rem; line-height: 0; }
.qr-enrolement .note { flex: 1; min-width: 12rem; }
.secret-manuel { word-break: break-all; letter-spacing: .08em; }
.codes-secours { columns: 2; list-style: none; padding: 0; margin: .8rem 0; }
.codes-secours code { font-size: 1.05rem; letter-spacing: .1em; }
.bandeau-2fa { margin-bottom: 1rem; }

/* ---- Page d'une séance (appel.php, 7 nov. 2026, revue le soir même) ----
   Trois étapes : la présence de l'intervenant, l'appel, le bilan (cahier et photos). Chacune une carte, au titre précédé d'un numéro cerclé
   (compteur CSS, partagé avec le bandeau : la direction, qui ne déclare pas de présence, voit 1 L'appel, 2 Bilan). Sobriété : le blanc des cartes,
   un seul accent (le rouge des boutons), les états en texte coloré sur fond pâle (jetons de statut de la charte), jamais d'aplat vif. */
.page-seance { counter-reset: etape; }
.page-seance :is(#presence, #appel, #bilan, #cahier, #photos, #absences) { scroll-margin-top: 1rem; }
.page-seance > .etape, .page-seance > .presence { margin: 1rem 0; padding: 1.25rem 1.35rem 1.35rem; }
.page-seance :is(.presence > h2, .etape-titre) { display: flex; align-items: center; gap: .6rem; margin: 0 0 .3rem; font-size: 1.15rem; line-height: 1.25; }
.page-seance :is(.presence > h2, .etape-titre)::before { counter-increment: etape; content: counter(etape); flex: none; display: inline-flex; align-items: center;
  justify-content: center; width: 1.65rem; height: 1.65rem; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--bord-champ); color: var(--doux);
  font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.etape-sous { margin: 0 0 .4rem; }
.etape-aide { margin: .1rem 0 1.1rem; max-width: 46rem; color: var(--doux); font-size: .9rem; }
.appel-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.page-seance-pied { margin: 1.4rem 0 0; }
.seance-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .8rem; margin: .2rem 0 1.1rem;
  padding: .45rem .6rem; background: var(--carte); border: 1px solid var(--trait); border-radius: .75rem; box-shadow: var(--ombre); }
.seance-nav-lien { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; min-width: 0; max-width: 100%; padding: .2rem .5rem; border-radius: .5rem;
  color: var(--encre); text-decoration: none; }
.seance-nav-lien:hover { background: var(--survol); }
.seance-nav-lien:focus-visible { outline: 2.5px solid var(--rouge); outline-offset: 2px; }
.seance-nav-lien[rel=next] { justify-self: end; text-align: right; }
.seance-nav-lien .fleche { flex: none; font-size: 1.2rem; color: var(--doux); }
.seance-nav-texte { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.seance-nav-texte strong, .seance-nav-texte small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seance-nav-texte strong { font-size: .98rem; }
.seance-nav-texte small { color: var(--doux); font-size: .8rem; }
.seance-nav-lien.inactif .fleche { color: var(--trait); }
.seance-nav-menu { margin: 0; }
.seance-nav-menu select { min-width: 17rem; max-width: 24rem; font-size: 16px; font-weight: 600; }
@media (max-width: 760px) {
  .seance-nav { grid-template-columns: auto minmax(0, 1fr) auto; gap: .4rem; padding: .35rem; }
  .seance-nav-texte { display: none; }   /* sur téléphone : les flèches, et la date dans le menu au milieu */
  .seance-nav-lien { justify-content: center; min-width: 2.75rem; padding: 0; }
  .seance-nav-menu select { width: 100%; min-width: 0; max-width: none; }
}

/* L'appel en trombinoscope : la photo est le geste (chaque toucher passe à l'état suivant). L'état se lit dans une pastille écrite et un fin
   liseré ; un absent ou un excusé a la photo grisée. Les boutons radio portent la valeur envoyée : cachés quand le script tourne, visibles sans lui. */
.eleves { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.4rem, 1fr)); gap: 1.2rem .9rem; }
.eleve { --st: var(--neutre); --st-fond: var(--neutre-fond); position: relative; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.eleve:has(input[value=present]:checked) { --st: var(--present); --st-fond: var(--present-fond); }
.eleve:has(input[value=retard]:checked)  { --st: var(--retard);  --st-fond: var(--retard-fond); }
.eleve:has(input[value=absent]:checked)  { --st: var(--absent);  --st-fond: var(--absent-fond); }
.eleve:has(input[value=excuse]:checked)  { --st: var(--excuse);  --st-fond: var(--excuse-fond); }
.eleve-cadre { position: relative; }
.eleve-portrait { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: .75rem; overflow: hidden; cursor: pointer;
  background: var(--neutre-fond); color: var(--neutre); box-shadow: 0 0 0 1px var(--trait); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  user-select: none; transition: box-shadow 150ms ease, transform 120ms ease-out; }
.eleve-portrait:hover, .eleve-portrait:focus { background: var(--neutre-fond); color: var(--neutre); }   /* pas le rouge des boutons du portail */
.eleve-portrait:focus-visible { outline: 2.5px solid var(--rouge); outline-offset: 3px; }
.eleve-portrait:not(:disabled):active { transform: scale(.97); }
.eleve-portrait:disabled { cursor: default; opacity: 1; }
.eleve:has(input[type=radio]:checked) .eleve-portrait { box-shadow: 0 0 0 2px var(--st); }
.eleve-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter 150ms ease, opacity 150ms ease; }
.eleve:has(:is(input[value=absent], input[value=excuse]):checked) .eleve-portrait :is(img, .eleve-initiales) { filter: grayscale(1); opacity: .5; }
.eleve-initiales { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 1.6rem; font-weight: 700; }
.eleve-pastille { display: none; position: absolute; left: 50%; bottom: .45rem; transform: translateX(-50%); padding: .14rem .6rem; border-radius: 999px;
  background: var(--st-fond); color: var(--st); font-size: .76rem; font-weight: 600; white-space: nowrap; box-shadow: var(--ombre); }
.eleve:has(input[value=present]:checked) .eleve-pastille.present, .eleve:has(input[value=retard]:checked) .eleve-pastille.retard,
.eleve:has(input[value=absent]:checked) .eleve-pastille.absent, .eleve:has(input[value=excuse]:checked) .eleve-pastille.excuse { display: block; }
.eleve-ligne { display: flex; align-items: flex-start; gap: .25rem; }
.eleve-identite { flex: 1; min-width: 0; margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.eleve-prenom { display: block; font-weight: 600; font-size: .92rem; }
.eleve-nom { display: block; color: var(--doux); font-size: .78rem; }
.eleve-etiquettes { margin: 0; } .eleve-etiquettes .etiq { margin: 0 .25rem .15rem 0; }
.motif[hidden] { display: none; }
.motif input { width: 100%; box-sizing: border-box; padding: .35rem .55rem; font-size: 16px; }   /* 16 px : pas de zoom sur iPhone */
/* Les volets : santé (coin haut droit de la photo) et contacts (à côté du nom) ; un panneau qui couvre la carte, refermé par un toucher ailleurs. */
.eleve-volet > summary { list-style: none; display: flex; align-items: center; justify-content: center; width: 1.85rem; height: 1.85rem; border-radius: 50%; cursor: pointer;
  color: var(--doux); -webkit-tap-highlight-color: transparent; }
.eleve-volet > summary::-webkit-details-marker { display: none; }
.eleve-volet > summary:hover { background: var(--survol); }
.eleve-volet > summary:focus-visible { outline: 2.5px solid var(--rouge); outline-offset: 2px; }
.eleve-contacts { position: static; flex: none; margin: -.15rem -.3rem 0 0; }
.eleve-contacts.a-remarque > summary { position: relative; }
.eleve-contacts.a-remarque > summary::after { content: ''; position: absolute; top: .3rem; right: .3rem; width: .42rem; height: .42rem; border-radius: 50%; background: var(--rouge); }
.eleve-sante > summary { position: absolute; top: .4rem; right: .4rem; z-index: 2; background: var(--carte); color: var(--rouge); box-shadow: var(--ombre); }
.eleve-sante > summary:hover { background: var(--carte); color: var(--rouge-sombre); }
.eleve-panneau { position: absolute; z-index: 6; top: 0; left: -.3rem; right: -.3rem; padding: .75rem .85rem .85rem; background: var(--carte); border: 1px solid var(--trait);
  border-radius: .75rem; box-shadow: var(--ombre-forte); font-size: .85rem; overflow-wrap: anywhere; }
.eleve-panneau p { margin: 0 0 .35rem; }
.eleve-panneau-titre { font-weight: 700; }
.eleve-panneau label { display: block; margin: .55rem 0 .2rem; font-weight: 600; }
.eleve-panneau textarea { width: 100%; box-sizing: border-box; font-size: 16px; }
.eleve-sante-texte { white-space: pre-line; }
#form-appel:not(.sans-js) .choix { display: none; }
.choix { display: grid; grid-template-columns: repeat(2, 1fr); gap: .2rem; }
.choix input { position: absolute; opacity: 0; pointer-events: none; }
.choix label { display: flex; align-items: center; justify-content: center; min-height: 2rem; border: 1px solid var(--bord-champ); border-radius: .45rem; background: var(--carte);
  font-size: .76rem; cursor: pointer; }
.choix input:checked + label { background: var(--st-fond); border-color: var(--st); color: var(--st); font-weight: 700; }
.choix input:focus-visible + label { outline: 2px solid var(--encre); outline-offset: 1px; }
.note-seance { margin: 1.3rem 0 0; }
.note-seance > summary, .cahier details.mots > summary { cursor: pointer; font-weight: 600; }
.note-seance textarea { display: block; width: 100%; box-sizing: border-box; margin-top: .45rem; }
/* La barre collée en bas pendant l'appel : une seule ligne, compteur à gauche, bouton à droite. Elle déborde des marges de la carte pour la
   recouvrir d'un bord à l'autre, et garde sous elle la zone basse de l'iPhone (indicateur d'accueil, barre de Safari). */
.barre-appel { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  margin: 1rem -1.35rem 0; padding: .6rem 1.35rem calc(.6rem + env(safe-area-inset-bottom, 0px)); background: var(--carte); border-top: 1px solid var(--trait);
  box-shadow: 0 -10px 18px -14px rgb(15 23 42 / .28); }
.barre-appel button { flex: none; min-height: 2.75rem; padding: .6rem 1.3rem; }
.appel-outils { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin: -.4rem 0 1rem; }
.absences-auto { margin: 1.2rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--trait); font-size: .9rem; }
.absences-auto-titre { margin: 0 0 .35rem; }
.absences-auto ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
/* Le bilan : un formulaire, un bouton. Le cahier et les photos y sont des parties, séparées d'un trait. */
.etape-bilan :is(.cahier, .cloture-cahier) { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.bilan-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: .8rem; }
.bilan-form label { display: block; margin: 0 0 .3rem; }
.bilan-form textarea, .bilan-form input[type=text] { width: 100%; box-sizing: border-box; }
.cahier details.mots { margin: .9rem 0 0; }
.cahier .mots-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem 1.6rem; margin-top: .5rem; }
.cahier .mot { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: .5rem; align-items: center; margin: .3rem 0; }
.cahier .mot .qui { font-size: .9rem; } .cahier .mot .qui small { display: block; color: var(--doux); }
.bilan-attente { margin: 0; padding: .7rem .9rem; border-radius: .6rem; background: var(--survol); color: var(--doux); font-size: .9rem; }
.bilan-photos { padding-top: 1.1rem; border-top: 1px solid var(--trait); }
.photos-rappel-ligne { margin: 0 0 .7rem; font-size: .9rem; }
.photos-rappel-ligne strong { color: var(--rouge-sombre); }
.bilan-actions { margin: 0; }
.bilan-actions button { min-height: 2.75rem; padding: .6rem 1.4rem; }
.bilan-album { margin: 1.6rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--trait); }
@media (max-width: 900px) { .cahier .mots-liste { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .page-seance > .etape, .page-seance > .presence { padding: 1rem .9rem 1.1rem; }
  .eleves { grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: 1rem .6rem; }
  .eleve-prenom { font-size: .86rem; }
  .barre-appel { margin: 1rem -.9rem 0; padding-left: .9rem; padding-right: .9rem; }
  .cahier .mot { grid-template-columns: 1fr; gap: .15rem; }
  .bilan-actions button { width: 100%; }
}

/* Vignettes des intervenants : dans la feuille commune au portail et au calendrier (menu-commun.css). */

/* Mon espace › Mes séances (7 nov. 2026) : deux gestes en tête, puis une ligne par séance — pastille du lieu,
   collègues, suivi en texte coloré (rien d'aplati), « Je serai absent·e » replié. La couleur de l'atelier : une pastille devant son nom. */
.moi-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem; margin: 0 0 1rem; }
/* « J'ai remplacé quelqu'un » (declarations-ecran.php) : fermé, un bouton secondaire à côté de l'autre ; ouvert, une carte sur toute la largeur. */
.moi-actions > .presence-remplacement { margin: 0; }
.moi-actions > .presence-remplacement:not([open]) { background: none; border: 0; box-shadow: none; padding: 0; }
.moi-actions > .presence-remplacement:not([open]) > summary { min-height: 0; padding: .48rem 1.05rem; background: var(--carte); color: var(--encre);
  border: 1px solid var(--bord-champ); border-radius: .5rem; font-size: .92rem; list-style: none; }
.moi-actions > .presence-remplacement:not([open]) > summary::-webkit-details-marker { display: none; }
.moi-actions > .presence-remplacement:not([open]) > summary:hover { background: var(--survol); }
.moi-actions > .presence-remplacement[open] { flex-basis: 100%; }
/* Mes heures, Mon agenda, Sur place : trois cartes au-dessus de la liste. */
.moi-resume { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; align-items: stretch; margin: 0; }
/* Les trois pavés gardent un cadre léger dans leur section, et la même hauteur (la rangée s'étire sur le plus haut). */
.section-numerotee .moi-resume .carte-moi { border: 1px solid var(--trait); border-radius: .75rem; padding: .9rem 1rem; background: var(--carte); }
.moi-resume .carte-moi p { margin: .4rem 0 0; }
.moi-resume .chiffres-moi + .note { margin-top: .6rem; }
.seances-moi-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 .8rem; }
.seances-moi-barre h2 { margin: 0; }
#mes-seances .moi-actions { margin: 0 0 .9rem; }
.seances-moi-barre .onglets .nb { color: var(--doux); font-weight: 400; margin-left: .15rem; }
.seances-moi-aide { margin: 0 0 .5rem; }
.seances-moi-titre { margin: 1.1rem 0 .4rem; font-size: .95rem; }
.seances-moi-titre:first-of-type { margin-top: 0; }
.seances-moi-titre .note { font-weight: 400; }
.seances-moi-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.seance-moi { padding: .6rem .8rem; border: 1px solid var(--trait); border-radius: .6rem; background: var(--carte);
  scroll-margin-top: 1rem; }
.seance-moi.aujourdhui { background: var(--rouge-doux); border-color: var(--rouge-bord); }
.seance-moi.annulee .quand { text-decoration: line-through; color: var(--doux); }
.seance-moi:target { box-shadow: 0 0 0 2px var(--rouge-bord); }
.seance-moi-tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .2rem .8rem; }
.seance-moi-lieu { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--doux); }
.seance-moi-atelier { margin-top: .1rem; }
.seance-moi-atelier .nom-atelier { font-weight: 600; }
.seance-moi-atelier .nom-atelier::before { content: ''; display: inline-block; width: .6rem; height: .6rem; margin-right: .4rem; border-radius: 50%;
  background: var(--c, var(--neutre)); vertical-align: .05em; }   /* la couleur de l'atelier : une pastille, pas un liseré */
.seance-moi-equipe { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin-top: .35rem; font-size: .88rem; }
.seance-moi-pied { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: .4rem 1rem; margin-top: .45rem; padding-top: .45rem;
  border-top: 1px solid var(--trait); font-size: .88rem; }
/* Séance passée : trois accès directs (appel, bilan, photos) — texte coloré sur fond pâle, jamais d'aplat vif. */
.seance-moi-acces { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.seance-moi-acces .acces { display: inline-flex; align-items: center; min-height: 2rem; padding: .15rem .65rem; border-radius: .45rem; font-size: .86rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; }
.seance-moi-acces .acces.ok { background: var(--ok-fond); color: var(--ok); border-color: var(--ok-bord); }
.seance-moi-acces .acces.manque { background: var(--avert-fond); color: var(--avert); border-color: var(--avert-bord); }
.seance-moi-acces .acces:hover { text-decoration: underline; text-underline-offset: 3px; }
.seances-moi-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; margin: 0 0 .9rem; font-size: .9rem; }
.seances-moi-filtres label { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-weight: 600; color: var(--doux); }
.seances-moi-filtres select { width: auto; max-width: 22rem; margin: 0; font-size: 1rem; font-weight: 400; }   /* 16 px : pas de zoom sur iPhone */
/* Détail d'une séance passée, visible sans clic : bilan | absents et retards | photos, côte à côte sur un grand écran. */
.seance-moi-detail { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .8rem 1.4rem; margin-top: .7rem; }
.seance-moi-detail h4 { margin: 0 0 .25rem; font-size: .8rem; font-weight: 600; color: var(--doux); }
.seance-moi-bilan { flex: 3 1 20rem; min-width: 0; font-size: .9rem; }
.seance-moi-bilan p { margin: 0 0 .2rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.seance-moi-bilan a { font-size: .85rem; font-weight: 600; }
.seance-moi-absents { flex: 1 1 12rem; min-width: 0; font-size: .88rem; }
.seance-moi-absents ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.seance-moi-absents .statut { font-size: .8rem; font-weight: 600; }
.seance-moi-absents .statut.absent { color: var(--absent); } .seance-moi-absents .statut.retard { color: var(--retard); }
.seance-moi-absents .statut.excuse { color: var(--excuse); }
.seance-moi-photos { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.seance-moi-photos a { display: block; line-height: 0; border-radius: .45rem; text-decoration: none; }
.seance-moi-photos a:focus-visible { outline: 2.5px solid var(--rouge); outline-offset: 2px; }
.seance-moi-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: .45rem; border: 1px solid var(--trait); background: var(--canevas); }
.seance-moi-photos .plus { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: .45rem;
  background: var(--canevas); color: var(--doux); font-weight: 700; line-height: 1; }
.seance-moi-ouvrir { font-weight: 600; white-space: nowrap; }
.seance-moi-indispo summary { cursor: pointer; color: var(--doux); }
.seance-moi-indispo[open] { flex-basis: 100%; }
.seance-moi-indispo form { margin: .4rem 0 0; display: grid; gap: .3rem; max-width: 26rem; }
.seance-moi-indispo input[type=text] { font-size: 1rem; }   /* 16 px : pas de zoom sur iPhone */
.seance-moi-indispo button { justify-self: start; }

/* Sections numérotées annoncées par un sommaire (7 nov. 2026) — un seul modèle pour « Mes disponibilités » (1. à l'année, 2. absences ponctuelles)
   et « Ma fiche et mon dossier » (1. ma fiche, 2. mon dossier). */
.sections-sommaire { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .6rem; margin: 0 0 1.2rem; }
.sections-sommaire a { display: flex; align-items: flex-start; gap: .7rem; padding: .75rem .9rem; background: var(--carte); border: 1px solid var(--trait); border-radius: .75rem;
  box-shadow: var(--ombre); color: var(--encre); text-decoration: none; }
.sections-sommaire a:hover { border-color: var(--bord-champ); }
.sections-sommaire a > span:last-child { display: grid; gap: .1rem; }
.section-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 1.5px solid var(--rouge); color: var(--rouge-sombre); font-size: .85rem; font-weight: 700; }   /* accent lisible des deux thèmes */
.section-numerotee { margin: 0 0 1.4rem; padding: 1rem 1.1rem 1.1rem; background: var(--carte); border: 1px solid var(--trait); border-radius: .9rem; box-shadow: var(--ombre);
  scroll-margin-top: 1rem; }
.section-numerotee-titre { display: flex; align-items: center; gap: .6rem; margin: 0 0 .25rem; font-size: 1.2rem; }
.section-numerotee-aide { margin: 0 0 .9rem; }
.section-numerotee h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; }
.sections-sommaire .etat-ok { color: var(--ok); } .sections-sommaire .etat-manque { color: var(--avert); }
/* Dans une section numérotée, les cartes de « Mon espace » perdent leur cadre : la section le porte. */
.section-numerotee .carte-moi { border: 0; box-shadow: none; padding: 0; background: none; }

/* Visionneuse de photos (visionneuse.js, 7 nov. 2026) : la photo en grand sur fond sombre, « ‹ » « › » pour passer de l'une à l'autre,
   légende et compteur dessous. Un seul modèle pour Mes séances et l'album d'une séance. */
.visionneuse { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff;
  box-sizing: border-box; }
.visionneuse[open] { display: flex; align-items: center; justify-content: center; }
.visionneuse::backdrop { background: rgb(15 23 42 / .88); }
.visionneuse-cadre { margin: 0; max-width: calc(100vw - 7.5rem); display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.visionneuse-cadre img { display: block; max-width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; border-radius: .4rem; background: rgb(255 255 255 / .06); }
.visionneuse-cadre figcaption { display: flex; gap: 1rem; font-size: .9rem; color: rgb(255 255 255 / .85); }
.visionneuse button { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border-radius: 50%; background: rgb(255 255 255 / .12); color: #fff; font-size: 1.6rem; line-height: 1; }
.visionneuse button:hover { background: rgb(255 255 255 / .24); color: #fff; }
.visionneuse button:focus-visible { outline: 2.5px solid #fff; outline-offset: 2px; }
.visionneuse .visionneuse-fermer { top: calc(.8rem + env(safe-area-inset-top, 0px)); right: .8rem; font-size: 1.1rem; }
.visionneuse-prec { left: .8rem; top: 50%; transform: translateY(-50%); }
.visionneuse-suiv { right: .8rem; top: 50%; transform: translateY(-50%); }
.visionneuse.seule .visionneuse-prec, .visionneuse.seule .visionneuse-suiv { display: none; }
@media (max-width: 600px) {
  .visionneuse-cadre { max-width: 100vw; }
  .visionneuse-prec, .visionneuse-suiv { top: auto; bottom: calc(.8rem + env(safe-area-inset-bottom, 0px)); transform: none; }
}

/* Barre « onglets + outils » (7 nov. 2026) : les onglets segmentés de la charte à gauche, les boutons (export PDF, Excel…) à droite.
   Un seul modèle pour la liste des élèves d'un atelier (eleves_onglets_html()) et l'annuaire des intervenants. */
.barre-onglets { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 1rem; }
.barre-outils { display: inline-flex; flex-wrap: wrap; gap: .4rem; }

/* « Mon compte » → Apparence (20 nov. 2026) : trois boutons radio, l'un sous l'autre (pas .choix, que l'appel détourne). */
.apparence-choix { display: grid; gap: .45rem; margin: .6rem 0; }
