/* journal.css — l'espace Journal, comme dans la Mallette de bureau :
   une BARRE DE VUE sur une seule ligne (aujourd'hui, la date, Jour,
   Semaine, Mois, Année, les réglages de la journée, imprimer), puis la vue
   et, à droite, le CARNET (à faire, à préparer, à imprimer, le bilan) —
   - JOUR : le fil des blocs, chacun une CARTE blanche (l'heure,
     l'intitulé précédé du point de sa discipline, le domaine, le matériel, la durée) ; un bloc
     vide en pointillé. Pauses hachurées, transitions à plat. Ateliers dans un
     même cadre.
   - SEMAINE : un agenda sobre, une colonne par jour, chaque bloc à l'heure.
   - MOIS : le planning, en grille ou en agenda ;
   - ANNÉE : les douze mois, en jours de classe.
   Les quatre parlent la même langue : le résumé d'un jour (puce d'école,
   smiley du bilan, pointillé de ce qui reste à faire). Des feuilles nettes :
   un filet et un bord plein dessous, jamais d'ombre fondue.
   La fiche d'un bloc se déplie à la place de sa carte (fiche-depliee) ; un écran sur téléphone. */

/* ————— la barre de vue (le socle commun : base.css .barre-espace) ————— */
/* la date et son sous-titre à gauche, la puce de la journée à côté ;
   à droite l'échelle, « ‹ Aujourd'hui › », Imprimer, « ⋯ » et l'action —
   d'une échelle à l'autre, rien de ce qui est à droite ne bouge */
/* « ‹ Aujourd'hui › » : une seule puce, les flèches dedans */
.barre-vue .date-nav { display: flex; align-items: center; gap: 0; height: 36px; padding: 0 2px; border-radius: 999px; background: var(--feuille); box-shadow: inset 0 0 0 1px var(--trait-fort); }
.barre-vue .date-nav .rond { width: 30px; height: 30px; }
.barre-vue .bouton-aujourdhui { height: 30px; padding: 0 8px; font-size: 13.5px; background: transparent; }
.barre-vue .bouton-aujourdhui:hover { background: var(--creux); }
/* la date a sa place, large comme la plus longue (« 30 septembre – 4 octobre
   2026 ») : d'un jour, d'une échelle à l'autre, l'échelle qui la suit ne bouge
   pas. À l'étroit, la place se règle sur la largeur de la vue seule (ce que
   l'échelle et le plus large des groupes de droite laissent), jamais sur la
   date : elle se coupe plutôt que de replier l'échelle */
.vue[data-vue='journal'] .be-ligne { --reserve-echelle: 667px; }
.vue[data-vue='journal'] .be-ligne > .titre-vue { flex: none; width: clamp(170px, 100% - var(--reserve-echelle), 340px); }
@container barre (max-width: 940px) { .vue[data-vue='journal'] .be-ligne { --reserve-echelle: 657px; } }
@container barre (max-width: 900px) { .vue[data-vue='journal'] .be-ligne { --reserve-echelle: 574px; } }
@media (min-width: 1100px) {
  /* « + Bloc » et « Préparer… » de la même largeur : l'échelle, Imprimer et « ⋯ » ne bougent pas */
  .vue[data-vue='journal'] .barre-droite .bouton.principal { min-width: 112px; justify-content: center; }
}
/* la tête du Jour, dans la barre : ce qui règle la journée, d'une puce */
.jour-tete { display: flex; align-items: center; gap: 6px 8px; min-width: 0; }
.jour-tete .segments button { height: 28px; font-size: 13px; }
.jour-reglages { min-width: 0; max-width: 100%; }
.jour-reglages > span { min-width: 0; }
/* l'école choisie dans le « ⋯ » (Mois, Année) : rappelée en tête de la vue */
.filtre-actif { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--encre-2); }
.filtre-actif > svg { color: var(--encre-3); }

.journal-zone { flex: 1; padding: 0 var(--gouttiere-vue) 48px; min-width: 0; }
/* le Jour se lit dans une colonne plus étroite que les grilles */
.vue > .journal-zone[data-echelle='jour'] { max-width: calc(1100px + 2 * var(--gouttiere-vue)); }
@media (max-width: 899px) { .journal-zone { padding-inline: 20px; } }
@media (max-width: 599px) { .journal-zone { padding-inline: 16px; } }
/* la Semaine : la feuille comme aux autres échelles (la marge de la vue, son
   cadre) ; les têtes des jours restent en haut quand on défile — la feuille
   ne rogne plus ses bords, ses cases d'angle prennent ses coins arrondis */
@media (min-width: 600px) {
  .journal-zone[data-echelle='semaine'] .semaine { overflow: visible; }
  .journal-zone[data-echelle='semaine'] :is(.sem-coin, .sem-tete) { position: sticky; top: 0; z-index: 4; background: var(--feuille); }
  .semaine > .sem-coin { border-top-left-radius: var(--rayon-l); }
  .semaine > .sem-tete:has(+ .sem-axe) { border-top-right-radius: var(--rayon-l); }
  .semaine > .sem-axe { border-bottom-left-radius: var(--rayon-l); }
  .semaine > .sem-colonne:last-child { border-bottom-right-radius: var(--rayon-l); }
}
.journal-corps { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* le carnet, sous la vue : ses sections EN LIGNE, côte à côte, à plat — ni
   cadre ni fond, un filet au-dessus ; elles passent à la ligne si la place manque */
.journal-carnet {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; gap: 18px 36px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--trait);
}
.journal-carnet:empty { display: none; }

/* ————— le carnet (carnet.js) : à faire, à préparer, à imprimer, le bilan ————— */
.carnet-section { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* le bilan a besoin de place pour écrire : deux colonnes quand il y en a */
.carnet-bilan { grid-column: span 2; }
@media (max-width: 699px) { .carnet-bilan { grid-column: auto; } }
.journal-carnet .section-titre { font-family: var(--police); font-size: 12px; font-weight: 800; color: var(--encre-3); }
.carnet-section-tete { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.carnet-section-tete > .section-titre { flex: 1; min-width: 0; }
.carnet-compte { font-size: 12px; font-weight: 750; color: var(--encre-3); white-space: nowrap; }
.carnet-ligne { display: flex; align-items: center; gap: 8px; width: calc(100% + 8px); min-height: 32px; padding: 2px 4px; margin: 0 -4px; border: none; border-radius: var(--rayon-s); background: none; text-align: left; font-size: 13.5px; font-weight: 650; color: var(--encre); }
button.carnet-ligne:hover { background: var(--creux); }
button.carnet-ligne > svg { flex: none; color: var(--encre-3); }
.carnet-quand { flex: none; min-width: 46px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--encre-3); font-variant-numeric: tabular-nums; }
.carnet-pastille { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--creux-2); }
.carnet-pastille.lavis[data-teinte] { background: var(--t-vive); }
.carnet-detail { flex: none; font-family: var(--police-titre); font-weight: 700; font-size: 13px; color: var(--encre-3); white-space: nowrap; }
.carnet-jauge { display: flex; flex-direction: column; gap: 6px; }
.carnet-piste { display: block; height: 8px; border-radius: 999px; background: var(--creux-2); overflow: hidden; }
.carnet-piste > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
/* le mois en un coup d'œil : faits, prêts, à compléter, encore vides */
.carnet-empile { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--creux-2); }
.carnet-empile > span { display: block; height: 100%; }
.carnet-legende { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 12.5px; font-weight: 650; color: var(--encre-2); }
.carnet-legende span { display: flex; align-items: center; gap: 6px; }
.carnet-legende i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
:is(.carnet-empile > span, .carnet-legende i)[data-part='fait'] { background: var(--pal-gris); }
:is(.carnet-empile > span, .carnet-legende i)[data-part='pret'] { background: var(--accent); }
:is(.carnet-empile > span, .carnet-legende i)[data-part='partiel'] { background: var(--accent-bord); }
:is(.carnet-empile > span, .carnet-legende i)[data-part='vide'] { background: var(--creux-3); }
/* dans le carnet, les bilans côte à côte, sans le filet d'avant (le carnet a le sien) */
.journal-carnet .bilans { border-top: none; padding-top: 0; margin-top: 0; }
:is(.journal-carnet, .inspecteur) .an-bloc { padding: 0; background: none; border: none; box-shadow: none; }
.journal-fiche:empty { display: none; }
.journal-fiche > .fiche-depliee { margin: 0; }

/* les colonnes du fil (Horaire, Séance, Durée ; Matériel sur une feuille
   large), que reprennent ses cartes et ses groupes */
.fil, .journal-fiche {
  --col-heure: 54px; --fil-colonnes: var(--col-heure) minmax(0, 1fr) auto;
  /* sur une feuille large (900 px et plus), la colonne Matériel avant la durée */
  --fil-colonnes-large: var(--col-heure) minmax(0, 1fr) minmax(240px, 0.5fr) auto;
}
.fl-lie { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-weight: 700; }
.fl-ligne .fiche-horaire { color: inherit; font-weight: 700; }
.fl-liste { margin: 0; padding-left: 18px; }

/* ————— à faire : des puces au-dessus du fil ————— */
.taches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tache { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 6px 2px 10px; border-radius: 999px; background: var(--feuille); border: 1px solid var(--trait); font-size: 13px; font-weight: 600; max-width: 100%; cursor: pointer; }
.tache input[type='checkbox'] { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); flex: none; }
.tache.faite span { text-decoration: line-through; color: var(--encre-3); }
.tache.retard { border-color: var(--danger); }
.tache button { border: none; background: none; color: var(--encre-3); padding: 2px; border-radius: 999px; display: flex; }
.tache button:hover { color: var(--danger); background: var(--danger-doux); }
.tache-plus { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px 0 9px; border-radius: 999px; border: 1px dashed var(--trait-fort); background: transparent; color: var(--encre-2); font-size: 13px; font-weight: 600; }
.tache-plus:hover { border-style: solid; border-color: var(--accent-bord); background: var(--accent-doux); color: var(--accent-texte); }
.tache-champ { height: 32px; min-width: 200px; border-radius: 999px; border: 1px solid var(--accent); padding: 0 12px; font-size: 13px; outline: none; background: var(--feuille); }

/* ————— le fil du jour : le CAHIER JOURNAL —————
   Les colonnes Horaire (la durée sous l'heure), Séance, Matériel (sous
   la séance sous 900 px), sans tête, et une CARTE blanche par bloc, posée d'un
   filet. Dans la colonne Séance, de haut en bas : l'intitulé, le domaine,
   le programme visé (à la suite, séparé de virgules), la note — un cran de
   taille, de poids et de gris de l'un à l'autre ; la seule couleur, un
   point devant le domaine, celle de sa discipline. Un bloc encore vide : en
   pointillé. Une pause : une ligne basse, hachurée. Le bloc choisi est cerné de
   bleu ; celui « en cours » cerné d'abricot, son heure en abricot (aucun
   liseré à gauche, nulle part ; aucune barre de progression).
   Étroit (< 560 px) : des colonnes plus serrées, le programme visé sur une
   ligne. */
.fil {
  container-type: inline-size;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.carte, .libre { display: grid; grid-template-columns: var(--fil-colonnes); column-gap: 16px; align-items: start; padding: 0 14px 0 18px; border: var(--bord-feuille) solid transparent; }
/* une carte : un filet et un bord net dessous ; un état colore les deux et lave le fond */
.carte { position: relative; min-width: 0; padding-block: 13px; background: var(--feuille); border-color: var(--trait); border-radius: 14px; box-shadow: var(--ombre-feuille); cursor: pointer; }
.carte:hover { border-color: var(--trait-fort); }
.carte:focus-visible { outline-offset: 2px; }
.carte.a-preparer { background: transparent; border-style: dashed; border-color: var(--trait-fort); box-shadow: none; }
.carte.en-cours { background: var(--maintenant-doux); border-color: var(--maintenant); box-shadow: 0 2px 0 var(--maintenant); }
.carte[aria-current='true'] { background: var(--accent-doux); border-color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
.carte-heure { display: flex; flex-direction: column; gap: 1px; font-family: var(--police-titre); font-weight: 700; font-size: 17px; line-height: 24px; color: var(--encre); font-variant-numeric: tabular-nums; white-space: nowrap; }
.carte-en-cours { font-family: var(--police); font-size: 11px; font-weight: 800; line-height: 1.2; color: var(--maintenant-texte); }
/* un bloc vide : de quoi le remplir d'un geste */
.carte-proposer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.carte-proposer .bouton { height: 32px; padding: 0 10px; gap: 6px; font-size: 13px; }
.carte.en-cours .carte-heure { color: var(--maintenant-texte); font-weight: 800; }
/* le domaine, sous l'intitulé : un cran plus petit et plus gris */
.carte-domaine { min-width: 0; font-size: 13px; font-weight: 700; line-height: 18px; color: var(--encre-2); text-wrap: balance; }
.point-discipline { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--t-vive); }
/* le point de la discipline sur la ligne de l'intitulé, devant lui ; le
   domaine, dessous, reste au bord de la colonne */
.carte-titre-ligne > .point-discipline { align-self: center; margin-right: -1px; }
/* le reste du programme, discret : en petit, en gris, à la suite, deux lignes au plus */
.carte-refs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--encre-3); }
.carte-seance { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carte-titre-ligne { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; min-width: 0; }
.carte-titre { min-width: 0; font-family: var(--police); font-weight: 700; font-size: 15.5px; line-height: 24px; overflow-wrap: break-word; }
.carte.a-preparer .carte-titre { color: var(--encre-3); }
.carte-modalites { font-size: 12.5px; font-weight: 600; font-style: italic; color: var(--encre-3); white-space: nowrap; }
.carte-lie { display: inline-flex; flex: none; align-self: center; color: var(--encre-3); }
.carte[aria-current='true'] .carte-titre { cursor: text; }
.carte[aria-current='true'] .carte-titre:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
.carte-titre-champ { flex: 1; min-width: 0; font: 600 16px/22px var(--police-titre); color: inherit; background: var(--feuille); border: 1px solid var(--accent); border-radius: 6px; padding: 0 6px; margin-left: -7px; outline: none; }
/* la fin de la ligne : le « ⋮ », toujours tout à droite (et la durée d'une pause, ligne basse) */
.carte-fin { display: flex; align-items: center; justify-content: flex-end; gap: 4px; height: 24px; }
.carte-duree { flex: none; font-family: var(--police-titre); font-weight: 600; font-size: 15px; color: var(--encre-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* la durée sous l'heure, dans sa colonne */
.carte-heure > .carte-duree { font-family: var(--police); font-size: 12.5px; font-weight: 600; line-height: 16px; white-space: normal; }
button.carte-duree { border: none; background: var(--creux-2); color: var(--encre); padding: 0 8px; height: 24px; border-radius: 999px; }
button.carte-duree:hover { background: var(--creux-3); }
/* le « ⋮ » reste toujours là, discret, au bord droit */
.carte-gestes { display: flex; align-items: center; gap: 0; }
.carte-gestes button { width: 26px; height: 26px; border: none; border-radius: 999px; background: transparent; color: var(--encre-3); display: flex; align-items: center; justify-content: center; }
.carte-gestes button:hover { background: var(--creux-2); color: var(--encre); }
.carte-fin > .carte-gestes:last-child { margin-right: -6px; }
/* ce que porte le bloc : des lignes de texte gris, titrées d'une petite icône */
.carte-ligne { display: flex; align-items: flex-start; gap: 7px; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--encre-2); }
/* la note, un peu décollée de l'intitulé et du programme au-dessus */
.carte-seance > * + .carte-ligne { margin-top: 6px; }
/* le MATÉRIEL, discret : en gris, sans cadre ni fond. Le matériel à la
   suite, séparé de virgules ; chaque pièce jointe sur sa ligne, titrée de son
   icône, son nom s'arrête net (la craie au survol : on l'ouvre). Leur colonne
   quand la feuille est large, sinon sous la séance. Le « ⋮ » est toujours la
   dernière colonne, même sans matériel. */
.carte > .carte-fin { grid-column: -2; grid-row: 1; }
.carte > .carte-materiel { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--encre-2); }
.carte > .carte-materiel:empty { display: none; }
.carte-liste > span + span::before { content: ', '; }
.carte-detail { font-weight: 500; color: var(--encre-3); white-space: nowrap; }
.carte-piece { display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% + 10px); min-width: 0; min-height: 24px; margin-left: -5px; padding: 0 5px; border: none; border-radius: 6px; background: none; color: inherit; font-weight: 600; text-align: left; }
.carte-piece > svg { flex: none; color: var(--encre-3); }
.carte-piece-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-piece:hover { background: var(--creux-2); color: var(--encre); }
.carte-piece small { flex: none; font-weight: 700; color: var(--accent-texte); }
.carte-piece.jamais .carte-piece-nom { text-decoration: line-through; color: var(--encre-3); }
@container (min-width: 900px) {
  .carte, .libre, .groupe-tete { --fil-colonnes: var(--fil-colonnes-large); }
  .carte > .carte-materiel { grid-column: 3; grid-row: 1; margin-top: 0; padding-top: 1px; }}

/* pause : une ligne basse, hachurée ; transition : à plat, en italique */
.carte.pause, .carte.transition { padding-block: 6px; border-color: transparent; box-shadow: none; border-radius: 12px; }
.carte.pause { background: var(--creux); }
.carte.transition { background: transparent; }
.carte.pause .carte-heure, .carte.transition .carte-heure, .carte.pause .carte-duree, .carte.transition .carte-duree { font-size: 15px; font-weight: 600; color: var(--encre-3); }
.carte.pause .carte-titre, .carte.transition .carte-titre { font-family: var(--police); font-size: 13.5px; font-weight: 700; color: var(--encre-3); }
.carte.transition .carte-titre { font-style: italic; font-weight: 600; }
.carte.pause:hover, .carte.transition:hover { border-color: var(--trait); }
/* mis de côté : estompé, barré */
.carte.masque { opacity: 0.6; }
.carte.masque .carte-titre { text-decoration: line-through; }
.carte.glisse { opacity: 0.4; }
/* le repère de dépôt : un trait arrondi au milieu de l'interstice (sous le
   bord net de la carte du dessus), hors de la carte, rentré de ses coins */
.carte.cible-avant::after, .carte.cible-apres::after { content: ''; position: absolute; left: 8px; right: 8px; height: 4px; border-radius: 999px; background: var(--accent); pointer-events: none; }
.carte.cible-avant::after { top: calc(-5px - var(--bord-feuille)); }
.carte.cible-apres::after { bottom: calc(-7px - var(--bord-feuille)); }

/* ateliers en parallèle : UNE carte, un EN-TÊTE (l'heure, leur nombre, la
   durée du groupe et son « ⋯ »), puis une ligne par atelier, séparée de la
   suivante par un filet qui laisse libre la colonne de l'heure ; au pied,
   « + Atelier ». Les colonnes tombent juste sous celles des autres cartes. */
/* le GROUPE est la feuille (son filet, son bord net dessous) ; ses ateliers
   sont des lignes à plat, séparées d'un filet, sans ombre ni coins à eux */
.groupe { --filet-gauche: calc(18px + var(--col-heure) + 16px); position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--feuille); border: var(--bord-feuille) solid var(--trait); border-radius: 14px; box-shadow: var(--ombre-feuille); }
.groupe:hover { border-color: var(--trait-fort); }
.groupe.en-cours { background: var(--maintenant-doux); border-color: var(--maintenant); box-shadow: 0 2px 0 var(--maintenant); }
/* un atelier choisi : le groupe se cerne de bleu, la ligne se lave de bleu d'un bord à l'autre */
.groupe:has(> .carte[aria-current='true']) { border-color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
.groupe > .carte { border: none; border-radius: 0; background: transparent; box-shadow: none; }
.groupe > .carte:focus-visible { outline-offset: -2px; }
.groupe > .carte.en-cours { background: transparent; box-shadow: none; }
.groupe > .carte[aria-current='true'] { background: var(--accent-doux); box-shadow: none; }
.groupe > .carte[aria-current='true']::before, .groupe > .carte[aria-current='true'] + .carte::before { display: none; }
.groupe > .carte[aria-current='true'] + .groupe-pied { border-top-color: transparent; }
.groupe > .carte.a-preparer { outline: 1px dashed var(--trait-fort); outline-offset: -4px; }
/* glisser-déposer : entre deux ateliers (dans le groupe), ou avant, après le groupe (hors du groupe) */
.groupe > .carte.cible-avant::after, .groupe > .carte.cible-apres::after { left: var(--filet-gauche); right: 12px; }
.groupe > .carte.cible-avant::after { top: -2px; }
.groupe > .carte.cible-apres::after { bottom: -2px; }
.groupe.cible-avant::after, .groupe.cible-apres::after { content: ''; position: absolute; left: 8px; right: 8px; height: 4px; border-radius: 999px; background: var(--accent); pointer-events: none; }
.groupe.cible-avant::after { top: calc(-5px - var(--bord-feuille)); }
.groupe.cible-apres::after { bottom: calc(-7px - var(--bord-feuille)); }
.groupe > :is(.carte, .groupe-tete) + .carte::before { content: ''; position: absolute; top: 0; left: var(--filet-gauche); right: 12px; border-top: 1px solid var(--trait); }
.groupe > .carte:not(.pause):not(.transition) { padding-block: 11px; }
/* l'en-tête : un clic choisit tous les ateliers, on glisse le groupe par lui */
.groupe-tete { position: relative; display: grid; grid-template-columns: var(--fil-colonnes); column-gap: 16px; align-items: start; padding: 11px 14px 9px 18px; border-radius: calc(14px - var(--bord-feuille)) calc(14px - var(--bord-feuille)) 0 0; cursor: pointer; }
.groupe[draggable] > .groupe-tete { cursor: grab; }
.groupe-tete:focus-visible { outline-offset: -2px; }
.groupe-tete[aria-current='true'] { background: var(--accent-doux); }
.groupe-tete > .carte-fin { grid-column: -2; grid-row: 1; }
.groupe-tete-titre { min-width: 0; font-size: 13px; font-weight: 700; line-height: 24px; color: var(--encre-3); }
.groupe.en-cours > .groupe-tete .carte-heure { color: var(--maintenant-texte); font-weight: 800; }
/* le pied du groupe : un filet comme entre les ateliers, ses gestes sous la colonne Séance */
.groupe-pied { display: flex; margin: 0 12px 0 var(--filet-gauche); padding: 6px 0 10px; border-top: 1px solid var(--trait); }
.groupe-pied-gestes { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--encre-3); }
.atelier-plus { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; margin-left: -8px; border: none; border-radius: 999px; background: none; color: var(--encre-2); font-size: 12.5px; font-weight: 700; }
.atelier-plus:hover { background: var(--accent-doux); color: var(--accent-texte); }
.groupe.glisse { opacity: 0.4; }
.libre { padding-block: 2px; font-size: 12.5px; color: var(--encre-3); font-style: italic; }
.libre > .carte-heure { font-size: 13px; font-style: normal; color: var(--encre-3); }
.libre > :last-child { grid-column: 2 / -1; line-height: 24px; }
.libre-ligne { display: flex; align-items: center; gap: 10px; }
.libre-plus { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: none; border-radius: 999px; background: none; color: var(--encre-3); font-size: 12.5px; font-weight: 700; font-style: normal; }
.libre-plus:hover { background: var(--accent-doux); color: var(--accent-texte); }

@container (max-width: 560px) {
  .carte, .libre { grid-template-columns: 42px minmax(0, 1fr) auto; column-gap: 10px; padding: 0 10px 0 12px; }
  .groupe { --filet-gauche: calc(12px + 42px + 10px); }
  .groupe-pied { margin-right: 10px; }
  .groupe-tete { grid-template-columns: 42px minmax(0, 1fr) auto; column-gap: 10px; padding: 8px 10px 6px 12px; }
  .carte { grid-template-areas: 'h s f' 'h m f'; padding-block: 6px; }
  .carte > .carte-heure { grid-area: h; font-size: 13.5px; }
  .carte > .carte-seance { grid-area: s; }
  .carte > .carte-materiel { grid-area: m; }
  .carte > .carte-fin { grid-area: f; }
  .carte.pause, .carte.transition { padding-block: 2px; }
  .carte-titre { font-size: 15.5px; line-height: 22px; }  .carte-duree { font-size: 13.5px; }
  .carte-heure > .carte-duree { font-size: 12px; }
}

.fil-vide { display: flex; flex-direction: column; align-items: center; gap: 14px; border: 1px dashed var(--trait-fort); border-radius: var(--rayon-l); padding: 40px 20px; text-align: center; color: var(--encre-2); font-family: var(--police-titre); font-weight: 700; font-size: 15px; }
.fil-gestes { display: flex; flex-wrap: wrap; gap: 4px 6px; }
/* les deux bilans, côte à côte : le mien (smiley + note) et le retour au titulaire */
.bilans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px 24px; border-top: 1px solid var(--trait); padding-top: 14px; margin-top: 4px; }
.bilan { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bilan-tete { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.bilan-tete .section-titre { font-size: 15px; flex: 1; }
.humeurs { display: flex; gap: 6px; }
.humeurs button { width: 44px; height: 44px; border-radius: 999px; border: none; background: var(--creux); color: var(--encre-2); display: flex; align-items: center; justify-content: center; }
.humeurs button[data-humeur='bonne'] { color: var(--ok); }
.humeurs button[data-humeur='moyenne'] { color: var(--pal-jaune); }
.humeurs button[data-humeur='mauvaise'] { color: var(--danger); }
.humeurs button[aria-pressed='true'][data-humeur='bonne'] { background: var(--ok-doux); }
.humeurs button[aria-pressed='true'][data-humeur='moyenne'] { background: var(--avert-doux); }
.humeurs button[aria-pressed='true'][data-humeur='mauvaise'] { background: var(--danger-doux); }

/* ————— le résumé d'un jour (resume.js) : les mêmes signaux aux trois échelles ————— */
.puce-ecole { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; max-width: 100%; font-size: 13px; font-weight: 700; color: var(--encre); }
.puce-ecole.faible { color: var(--encre-3); font-weight: 600; }
.smiley-bilan { display: inline-flex; flex: none; }
.smiley-bilan[data-humeur='bonne'] { color: var(--ok); }
.smiley-bilan[data-humeur='moyenne'] { color: var(--pal-jaune); }
.smiley-bilan[data-humeur='mauvaise'] { color: var(--danger); }
/* le pointillé dit toujours « encore à faire » */
.puce-tiret { display: inline-flex; align-items: center; flex: none; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px dashed var(--trait-fort); font-size: 11.5px; font-weight: 700; color: var(--encre-2); white-space: nowrap; }
.puce-taches { flex: none; min-height: 20px; padding: 0 8px; font-size: 11.5px; white-space: nowrap; }
.resume-ligne { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; font-size: 13px; font-weight: 700; color: var(--encre-2); }
.resume-heures { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hachure { background: repeating-linear-gradient(135deg, var(--creux) 0 6px, var(--creux-2) 6px 12px); }
.estompe { opacity: 0.3; }

/* ————— la semaine : un agenda sobre, comme dans une application de
   calendrier — UNE feuille quadrillée : les têtes sur une ligne, l'échelle
   des heures à gauche, chaque jour à l'heure, séparé d'un filet ————— */
.semaine {
  display: grid; grid-template-columns: 44px repeat(var(--jours), minmax(0, 1fr)); align-items: stretch;
  background: var(--feuille); border: 1px solid var(--trait); border-radius: var(--rayon-l); box-shadow: var(--ombre-feuille);
  overflow: hidden;
}
.sem-coin { border-bottom: 1px solid var(--trait-fort); }
.sem-tete { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 6px 6px 6px 10px; border-left: 1px solid var(--trait); border-bottom: 1px solid var(--trait-fort); }
.sem-tete-ligne { display: flex; align-items: center; gap: 6px; }
/* le nom abrégé, puis le grand numéro — aujourd'hui dans un rond abricot, comme au Mois */
.sem-jour { border: none; background: none; padding: 0; display: flex; align-items: center; gap: 6px; min-width: 0; text-align: left; color: var(--encre); border-radius: var(--rayon-s); }
.sem-jour small { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--encre-3); }
.sem-jour:hover small, .sem-jour:hover .jour-numero { color: var(--accent-texte); }
.jour-numero { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 999px; font-family: var(--police-titre); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sem-tete.aujourdhui .sem-jour small { color: var(--maintenant-texte); }
.sem-tete.aujourdhui .jour-numero, .sem-tete.aujourdhui .sem-jour:hover .jour-numero { background: var(--maintenant); color: var(--feuille); }
.sem-signaux { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sem-axe { position: relative; }
/* l'heure en tête de sa rangée, comme dans un agenda */
.sem-axe-heure { position: absolute; right: 6px; margin-top: 3px; font-size: 11px; font-weight: 700; line-height: 14px; color: var(--encre-3); font-variant-numeric: tabular-nums; }
.sem-colonne { position: relative; min-width: 0; border-left: 1px solid var(--trait); }
.sem-colonne.aujourdhui { background: color-mix(in srgb, var(--maintenant-doux) 35%, var(--feuille)); }
/* un jour fait (passé, ou aujourd'hui après la sortie) s'estompe, comme dans
   un calendrier : ses blocs et son numéro pâlissent, le smiley du bilan reste net */
.sem-colonne.faite .sem-bloc { opacity: 0.55; }
.sem-tete.faite:not(.aujourdhui) .jour-numero, .sem-tete.faite:not(.aujourdhui) .sem-jour small { color: var(--encre-3); }
.sem-ligne { position: absolute; left: 0; right: 0; border-top: 1px solid var(--trait); }
.sem-bloc {
  position: absolute; left: 2px; right: 3px; display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; overflow: hidden;
  padding: 4px 7px; border: none; border-radius: 6px; background: var(--creux); color: var(--encre); text-align: left;
}
button.sem-bloc:hover { background: var(--creux-2); }
/* le lavis de la discipline : un fond pâle de sa teinte, sans liseré */
.lavis[data-teinte] { background: color-mix(in srgb, var(--t-vive) 14%, var(--feuille)); }
button.lavis[data-teinte]:hover { background: color-mix(in srgb, var(--t-vive) 22%, var(--feuille)); }
/* le point de la discipline et l'intitulé (sur les lignes que la hauteur lui
   laisse) ; dessous, l'horaire en gris — un bloc court : une ligne, l'heure au bout */
.sem-bloc-ligne { display: flex; align-items: flex-start; gap: 7px; min-width: 0; }
.sem-bloc-ligne > .point-discipline { margin-top: 5px; }
.point-discipline.en-creux { background: none; box-shadow: inset 0 0 0 1.5px var(--t-vive); }
.sem-bloc-titre {
  flex: 1; min-width: 0; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 18px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lignes, 1); overflow-wrap: anywhere;
}
.sem-bloc.court .sem-bloc-titre, .sem-atelier .sem-bloc-titre { display: block; white-space: nowrap; text-overflow: ellipsis; }
.sem-bloc-heure { flex: none; font-size: 11.5px; font-weight: 600; line-height: 16px; color: var(--encre-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sem-bloc-ligne > .sem-bloc-heure { line-height: 18px; }
.sem-bloc:not(.court):has(.point-discipline) > .sem-bloc-heure { padding-left: 15px; }
.sem-bloc.court { justify-content: center; padding-top: 0; padding-bottom: 0; }
/* une transition (accueil, déplacement) : en retrait, sans fond */
.sem-bloc.transition { background: none; color: var(--encre-3); }
.sem-bloc.transition .sem-bloc-titre { font-weight: 600; font-style: italic; }
button.sem-bloc.transition:hover { background: var(--creux); }
.sem-bloc.a-preparer, .sem-atelier.a-preparer { outline: 1px dashed var(--trait-fort); outline-offset: -1px; background: var(--feuille); color: var(--encre-3); font-style: italic; }
/* le bloc en cours : cerné d'abricot */
.sem-bloc.en-cours, .sem-bloc.en-cours.lavis { background: var(--maintenant-doux); box-shadow: inset 0 0 0 1.5px var(--maintenant); }
.sem-bloc.en-cours .sem-bloc-heure { color: var(--maintenant-texte); }
/* des ateliers en parallèle : un cadre léger, une ligne au lavis par atelier, son point devant */
.sem-ateliers { gap: 3px; padding: 4px 5px 5px; background: none; box-shadow: inset 0 0 0 1px var(--trait-fort); }
.sem-ateliers-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 5px 1px; font-size: 11.5px; font-weight: 700; color: var(--encre-3); }
button.sem-ateliers-tete { flex: none; min-height: 18px; border: none; border-radius: 6px; background: none; text-align: left; }
button.sem-ateliers-tete:hover, button.sem-ateliers-tete[aria-pressed='true'] { background: var(--creux); color: var(--encre-2); }
.sem-atelier { display: flex; align-items: center; gap: 7px; flex: none; min-width: 0; height: 22px; padding: 0 8px; border: none; border-radius: 6px; background: var(--creux); color: var(--encre); font-size: 12.5px; font-weight: 700; text-align: left; }
.sem-atelier .sem-bloc-titre { font-size: 12.5px; }
.sem-atelier:hover { background: var(--creux-2); }
.sem-pause { position: absolute; left: 2px; right: 3px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; font-size: 11px; font-style: italic; color: var(--encre-3); white-space: nowrap;
  background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--creux-2) 45%, transparent) 6px 12px); }
.sem-maintenant { position: absolute; left: 0; right: 0; height: 2px; background: var(--maintenant); pointer-events: none; z-index: 1; }
.sem-maintenant::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 999px; background: var(--maintenant); }
/* un jour sans bloc : sa colonne, vide, et de quoi la préparer en haut */
.sem-vide { position: absolute; top: 0; left: 0; right: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; color: var(--encre-3); font-size: 12.5px; font-weight: 700; text-align: center; pointer-events: none; }
.sem-vide > * { pointer-events: auto; }
/* la demi-heure, un filet plus léger que l'heure */
.sem-ligne.demi { border-top-color: color-mix(in srgb, var(--trait) 45%, transparent); }

/* ————— le mois : comme dans une application de calendrier, UNE feuille
   quadrillée — la ligne des jours, puis une ligne par semaine (sa marge
   « S11, P2 », ses cases séparées d'un filet), les vacances repliées en une
   bande hachurée ————— */
.mois {
  display: flex; flex-direction: column;
  background: var(--feuille); border: 1px solid var(--trait); border-radius: var(--rayon-l); box-shadow: var(--ombre-feuille);
  overflow: hidden;
}
.mois-tetes, .mois-semaine { display: grid; grid-template-columns: 52px repeat(var(--jours), minmax(0, 1fr)); }
.mois-semaine, .mois-bande { border-top: 1px solid var(--trait); }
.mois-tetes { border-bottom: 1px solid var(--trait-fort); }
.mois-tetes + * { border-top: none; }
.mois-tetes span { padding: 9px 10px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--encre-3); }
.mois-tetes span + span { border-left: 1px solid var(--trait); }
/* la marge : le numéro de la semaine, en haut, comme le numéro des cases */
.mois-marge { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; padding: 10px 2px; border: none; border-radius: 0; background: none; color: var(--encre-2); text-align: center; }
.mois-marge b { font-family: var(--police-titre); font-size: 14px; font-weight: 700; line-height: 22px; }
.mois-marge small { font-size: 11px; font-weight: 800; color: var(--encre-3); }
.mois-marge:hover { background: var(--creux); color: var(--accent-texte); }
.mois-bande { padding: 10px 16px 10px 68px; font-size: 13.5px; font-weight: 700; color: var(--encre-2); }
.case {
  min-height: 112px; padding: 8px 10px 10px; border-left: 1px solid var(--trait); background: var(--feuille);
  display: flex; flex-direction: column; gap: 6px; text-align: left; min-width: 0; cursor: pointer;
}
.case:hover { background: color-mix(in srgb, var(--creux) 70%, var(--feuille)); }
.case:focus-visible { outline-offset: -2px; }
.case.etat-repos { background: repeating-linear-gradient(135deg, var(--creux) 0 6px, var(--creux-2) 6px 12px); }
.case.hors-mois { background: var(--creux); }
.case.hors-mois > * { opacity: 0.5; }
.case.estompe > * { opacity: 0.3; }
.case.etat-fait:not(.aujourdhui) .case-numero { color: var(--encre-3); }
.case.etat-fait .resume-ligne, .case.etat-fait .case-nature, .case.etat-fait .case-heures { opacity: 0.55; }
.case-tete { display: flex; align-items: center; gap: 6px; min-height: 26px; }
.case-heures { font-size: 12px; font-weight: 600; color: var(--encre-3); font-variant-numeric: tabular-nums; }
.case-numero { font-family: var(--police-titre); font-weight: 700; font-size: 15px; min-width: 26px; height: 26px; padding: 0 5px; margin-left: -4px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.case.aujourdhui .case-numero, .agenda-ligne.aujourdhui .case-numero { background: var(--maintenant); color: var(--feuille); }
.case-info { font-size: 12.5px; color: var(--encre-2); font-weight: 700; }
/* un jour passé sans rien : une case vide, comme dans un calendrier */
.case.passe .case-rien { display: none; }
.case-rien { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--encre-3); }
.case-preparer { font-weight: 800; color: var(--accent-texte); }
.case-nature { display: flex; align-items: center; gap: 6px; }
.case-reste { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
/* les gestes visibles d'un jour, au pied de la case : dupliquer au jour
   suivant, copier ; « Coller » quand une autre journée est copiée */
.case-gestes { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; margin-top: auto; }
.case-reste + .case-gestes { margin-top: 0; }
.case-geste { width: 26px; height: 26px; color: var(--encre-3); }
.case-geste:hover { color: var(--encre); }
.case-coller { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px 0 7px; border-radius: 999px; border: 1px dashed var(--accent-bord); background: var(--accent-doux); color: var(--accent-texte); font-size: 12px; font-weight: 800; }
.case-coller:hover { border-style: solid; }
.case-copiee { padding: 0 4px; font-size: 12px; font-weight: 800; color: var(--accent-texte); }
.case.copiee { box-shadow: inset 0 0 0 2px var(--accent-bord); }
/* une journée copiée : le bandeau au-dessus du mois */
.mois-copie { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: var(--rayon-m); background: var(--accent-doux); color: var(--accent-texte); font-size: 13.5px; font-weight: 700; }
.mois-copie > svg { flex: none; }
.agenda-gestes .case-gestes { margin-top: 0; flex-wrap: nowrap; }
/* l'agenda : les jours l'un sous l'autre, semaine par semaine */
.mois-agenda { display: flex; flex-direction: column; gap: 14px; }
.agenda-semaine { overflow: hidden; }
.agenda-tete { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 10px 16px; border: none; background: var(--creux); text-align: left; color: var(--encre); }
.agenda-tete b { font-family: var(--police-titre); font-size: 16px; font-weight: 700; }
.agenda-tete:hover b { color: var(--accent-texte); }
.agenda-ligne { display: grid; grid-template-columns: 76px minmax(0, 1fr) 118px 190px minmax(32px, auto); align-items: center; gap: 6px 14px; min-height: 52px; padding: 6px 12px 6px 16px; border-top: 1px solid var(--trait); cursor: pointer; }
.agenda-ligne:hover { background: var(--creux); }
.agenda-ligne.aujourdhui { background: color-mix(in srgb, var(--maintenant-doux) 60%, var(--feuille)); }
.agenda-ligne.repos { background: repeating-linear-gradient(135deg, var(--creux) 0 6px, var(--creux-2) 6px 12px); }
.agenda-ligne.estompe { opacity: 0.3; }
.agenda-ligne.etat-fait:not(.aujourdhui) .agenda-date { color: var(--encre-3); }
.agenda-ligne.etat-fait .agenda-corps, .agenda-ligne.etat-fait .agenda-heures { opacity: 0.55; }
.agenda-date { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.agenda-corps { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.agenda-corps { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.agenda-corps .resume-ligne { width: auto; font-size: 13.5px; }
.agenda-heures { font-size: 13px; font-weight: 600; color: var(--encre-2); }
.agenda-signaux { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
/* les gestes d'un jour : son « ⋯ », toujours là */
.agenda-gestes { display: flex; align-items: center; justify-content: flex-end; }

/* ————— la fiche du bloc (dans sa fenêtre) ————— */
.fiche { display: flex; flex-direction: column; gap: 0; }
.fiche-entete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 4px; }
.fiche-entete .titre-champ { flex: 1 1 260px; width: auto; }
.fiche-discipline { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: none; background: none; border-radius: 999px; font-weight: 600; color: var(--encre-2); }
.fiche-discipline:hover { background: var(--creux); }
.fiche-discipline .point-discipline { margin-right: 3px; }
.fiche-creneau { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 10px 10px; color: var(--encre-2); }
.fiche-horaire { border: none; background: none; padding: 2px 4px; margin-left: -4px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--encre-2); border-radius: 6px; }
.fiche-horaire:hover { color: var(--accent-texte); background: var(--creux); }
.fiche-section { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px 10px; align-items: start; border-top: 1px solid var(--trait); padding: 12px 0; }
.fiche-section > .section-titre { font-size: 15px; padding-top: 5px; }
.fiche-contenu { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.carte-ref { display: flex; align-items: flex-start; gap: 9px; padding: 7px 4px 7px 11px; background: var(--creux); border-radius: var(--rayon-m); }
.carte-ref > svg.ico { margin-top: 3px; color: var(--encre-2); }
.carte-ref .rond { width: 28px; height: 28px; margin: -2px 0; }
.carte-ref small { display: block; color: var(--encre-3); font-size: 12.5px; }
/* le programme d'un bloc : ses réfs en arbre, une ligne chacune, la lignée en intertitre */
.refs { display: flex; flex-direction: column; }
.ref-ligne { display: flex; align-items: flex-start; gap: 6px; min-height: 30px; padding-left: calc(var(--profondeur, 0) * 18px); }
.ref-ligne > .pousse { padding: 4px 0; }
.ref-ligne > svg.ico { margin-top: 6px; color: var(--encre-2); flex: none; }
.ref-ligne small { color: var(--encre-3); font-size: 12.5px; }
.ref-ligne .rond { width: 28px; height: 28px; margin-top: 1px; color: var(--encre-3); }
.ref-ligne .rond:hover { color: var(--encre); }
.ref-entete { padding: 8px 0 0 calc(var(--profondeur, 0) * 18px); color: var(--encre-3); font-size: 12.5px; }
.ref-entete:first-child { padding-top: 0; }
/* la suite proposée : une puce « à faire », comme « + Objectif » */
.puce-suite { display: inline-flex; max-width: min(100%, 440px); min-height: 30px; border: 1px dashed var(--trait-fort); border-radius: 999px; overflow: hidden; }
.puce-suite > button { display: inline-flex; align-items: center; gap: 5px; min-width: 0; padding: 0 12px 0 9px; border: none; background: transparent; color: var(--encre-2); font-weight: 600; font-size: 13px; }
.puce-suite > button:hover { background: var(--accent-doux); color: var(--accent-texte); }
.puce-suite > .puce-suite-autres { flex: none; padding: 0 9px; border-left: 1px dashed var(--trait-fort); }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce-plus { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 12px 0 9px; border-radius: 999px; border: 1px dashed var(--trait-fort); background: transparent; color: var(--encre-2); font-weight: 600; font-size: 13px; }
.puce-plus:hover { border-style: solid; border-color: var(--accent-bord); background: var(--accent-doux); color: var(--accent-texte); }
.champ-materiel { height: 30px; min-height: 30px; border-radius: 999px; width: 220px; max-width: 100%; padding: 0 12px; font-size: 13px; }

.piece { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 2px 4px 2px 10px; border: 1px solid var(--trait); border-radius: var(--rayon-m); background: var(--feuille); }
/* l'icône ouvre la pièce ; son nom, à côté, se modifie sur place */
.piece-ouvrir { display: flex; align-items: center; flex: none; border: none; background: none; padding: 0; border-radius: var(--rayon-s); }
.piece-ouvrir > svg.ico { color: var(--encre-2); }
.piece-ouvrir:hover .tuile { background: var(--accent-doux); color: var(--accent-texte); }
.piece .ligne-texte > .champ-sur-place { width: 100%; field-sizing: fixed; font-weight: 600; }
.piece:hover .champ-sur-place:not(:focus) { background: none; }
.piece .champ-sur-place:hover:not(:focus) { background: var(--feuille); }
/* un nom modifié SUR PLACE : à plat comme du texte, la craie au survol, la
   feuille cernée de bleu en écrivant ; à la largeur de son texte */
.champ-sur-place { min-width: 2ch; max-width: 100%; height: 24px; padding: 0 4px; margin: 0 -4px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; color: inherit; text-overflow: ellipsis; outline: none; field-sizing: content; }
.champ-sur-place:hover { background: var(--creux-2); }
.champ-sur-place:focus { background: var(--feuille); border-color: var(--accent); }
.puce > .champ-sur-place, .insp-puce > .champ-sur-place { height: 22px; margin: 0 -2px 0 -5px; padding: 0 4px; border-radius: 999px; }
.piece-impr { display: inline-flex; align-items: center; gap: 4px; height: 28px; min-width: 28px; justify-content: center; padding: 0 7px; border-radius: 999px; border: none; background: transparent; font-size: 13px; font-weight: 700; color: var(--encre-2); }
.piece-impr:hover { background: var(--creux); }
.piece-impr[data-etat='imprimer'] { background: var(--accent-doux); color: var(--accent-texte); }
.piece-impr[data-etat='jamais'] { color: var(--encre-3); }
.depot-gestes { display: flex; flex-wrap: wrap; gap: 6px; }

/* ————— feuille « Ajouter un bloc » ————— */
.suite { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border-radius: var(--rayon-m); border: 1px solid var(--trait); background: var(--feuille); text-align: left; width: 100%; }
.suite:hover { border-color: var(--accent-bord); background: var(--accent-doux); }
.suite .plus { flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--accent); color: var(--sur-accent); display: flex; align-items: center; justify-content: center; }
.grille-durees { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.grille-durees button { height: 36px; border-radius: 999px; border: 1px solid var(--trait-fort); background: var(--feuille); font-weight: 700; }
.grille-durees button[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.ajout-section { display: flex; flex-direction: column; gap: 8px; }

/* ————— choisir dans le programme ————— */
.prog-resultat { display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; border-radius: var(--rayon-m); border: 1px solid transparent; background: none; text-align: left; width: 100%; }
.prog-resultat:hover { background: var(--creux); }
.prog-resultat[aria-pressed='true'] { background: var(--accent-doux); border-color: var(--accent-bord); }
.prog-resultat .case-coche { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--trait-fort); display: flex; align-items: center; justify-content: center; color: transparent; background: var(--feuille); }
.prog-resultat[aria-pressed='true'] .case-coche { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.prog-resultat small { display: block; color: var(--encre-3); font-size: 12.5px; }
.prog-domaine { border-top: 1px solid var(--trait); }
/* le champ Programme de la fiche : chercher, la liste propose sous le champ */
.prog-auto { position: relative; display: flex; align-items: center; gap: 6px; }
.prog-auto-champ { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--trait-fort); border-radius: 999px; background: var(--feuille); color: var(--encre-3); }
.prog-auto-champ:focus-within { border-color: var(--accent); }
.prog-auto-champ .champ, .prog-auto-champ .champ:focus { flex: 1; min-width: 0; height: 30px; padding: 0; border: none; background: none; font-size: 14px; outline: none; }
.prog-auto-liste { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 320px; overflow-y: auto; padding: 4px; display: flex; flex-direction: column; gap: 1px; background: var(--feuille); border: 1px solid var(--trait-fort); border-radius: var(--rayon-m); }
.prog-auto-liste .vide { margin: 0; padding: 8px 10px; }
.prog-auto-option { display: flex; align-items: flex-start; gap: 9px; padding: 6px 10px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-size: 14px; }
.prog-auto-option > svg.ico { margin-top: 2px; color: var(--encre-3); }
.prog-auto-option small { display: block; color: var(--encre-3); font-size: 12.5px; }
.prog-auto-option mark { background: none; color: inherit; font-weight: 800; }
.prog-auto-option[aria-selected='true'] { background: var(--accent-doux); border-color: var(--accent-bord); }
.prog-auto-option[aria-disabled='true'] { cursor: default; color: var(--encre-3); }
.prog-domaine > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 4px; font-weight: 700; }
.prog-domaine > summary::-webkit-details-marker { display: none; }
.prog-domaine[open] > summary svg { transform: rotate(90deg); }
.prog-objectifs { margin-left: 28px; display: flex; flex-direction: column; }
.prog-objectifs .prog-resultat { padding: 4px 8px; font-size: 13.5px; }

/* ————— étroit ————— */
@media (max-width: 899px) {
  .semaine { grid-template-columns: 44px repeat(var(--jours), minmax(220px, 72vw)); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 44px; }
  .sem-tete { scroll-snap-align: start; }
  /* l'échelle des heures reste à gauche quand les jours défilent */
  .sem-axe, .sem-coin { position: sticky; left: 0; z-index: 2; background: var(--feuille); }
  .fiche-section { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fiche-section > .section-titre { padding-top: 0; }
  .carte-gestes { display: none !important; }
}
@media (max-width: 599px) {
  .mois-tetes, .mois-semaine { grid-template-columns: 30px repeat(var(--jours), minmax(0, 1fr)); }
  .mois-tetes span { padding-inline: 6px; }
  .mois-marge { padding: 8px 0; }
  .mois-marge small { display: none; }
  .mois-bande { font-size: 13px; padding: 9px 12px 9px 40px; }
  .case { min-height: 84px; padding: 6px; gap: 5px; }
  .case .resume-ligne, .case .case-reste, .case .puce-taches, .case .case-heures, .case-rien, .case-nature .puce { display: none; }
  /* une case étroite : le « ⋯ » garde dupliquer et copier ; « Coller » se réduit à son icône */
  .case .case-geste { display: none; }
  .case .case-coller { width: 26px; padding: 0; justify-content: center; font-size: 0; }
  .agenda-ligne { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 8px 10px; }
  .agenda-heures { grid-column: 2; grid-row: 2; font-size: 12px; }
  .agenda-signaux { grid-column: 3; grid-row: 1; }
  .agenda-gestes { grid-column: 3; grid-row: 2; }
  .carte-titre { font-size: 16px; }
}

/* ————— Année (vue-annee.js) : la frise semaine par semaine, puis les chiffres ————— */
.an-vue { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.an-calendrier { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
/* les douze mois, comme dans une application de calendrier : 6, 4, 3 puis 2 par ligne */
.an-mois-liste { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 24px; }
@media (max-width: 1279px) { .an-mois-liste { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 899px) { .an-mois-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .an-mois-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; } }
.an-mois { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.an-mois-nom { align-self: flex-start; max-width: 100%; border: none; background: none; padding: 0 2px; font-family: var(--police-titre); font-size: 16px; font-weight: 700; color: var(--encre); text-transform: capitalize; white-space: nowrap;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 5px; height: 1.35em; line-height: 1.35; overflow: hidden; }
/* l'année ne s'écrit qu'aux mois où elle change (septembre, janvier), en retrait ;
   faute de place, elle passe sur une seconde ligne, cachée : le nom reste entier */
.an-mois-nom small { font-family: var(--police); font-size: 12px; font-weight: 600; color: var(--encre-3); }
.an-mois-nom:hover { color: var(--accent-texte); }
.an-mois.courant .an-mois-nom { color: var(--maintenant-texte); }
.an-mois.courant .an-mois-nom:hover { color: var(--accent-texte); }
/* une colonne par jour de classe (L M J V par défaut) : des cases carrées,
   qui ne grandissent pas au-delà de 30 px */
.an-mois-grille { --ecart: 3px; display: grid; grid-template-columns: repeat(var(--jours, 7), minmax(0, 30px)); gap: var(--ecart); }
.an-initiale { text-align: center; font-size: 11px; font-weight: 800; color: var(--encre-3); padding-bottom: 2px; }
.an-jour { aspect-ratio: 1; min-width: 0; padding: 0; border: none; border-radius: 6px; background: transparent; display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--encre-3); }
button.an-jour { cursor: pointer; }
button.an-jour:hover { box-shadow: inset 0 0 0 1.5px var(--encre-3); }
.an-jour.hors { color: var(--encre-3); font-weight: 500; opacity: 0.75; }
.an-jour.hachure { color: var(--encre-3); background: repeating-linear-gradient(135deg, var(--creux) 0 3px, var(--creux-2) 3px 6px); }
/* les vacances, hachurées comme un férié mais en BANDE : les cases voisines se
   soudent (la case couvre l'interstice à sa gauche), les hachures se suivent
   (elle s'étire à la hauteur de la ligne plutôt que de garder son carré, élargi par la soudure) */
.an-jour.vacances { background-attachment: fixed; }
.an-jour.vacances.suite-g { aspect-ratio: auto; align-self: stretch; margin-left: calc(-1 * var(--ecart, 2px)); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.an-jour.vacances.suite-d { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.an-jour.auj { box-shadow: 0 0 0 2px var(--maintenant); }
.an-jour.estompe { opacity: 0.25; }
/* la légende tient sur une ligne (elle défile plutôt que de passer à la ligne) ;
   sur un écran étroit, elle passe à la ligne */
.an-legende { display: flex; align-items: center; gap: 6px 11px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-top: 12px; border-top: 1px solid var(--trait); font-size: 12px; color: var(--encre-2); white-space: nowrap; }
.an-legende::-webkit-scrollbar { display: none; }
.an-legende > span { display: inline-flex; flex: none; align-items: center; gap: 5px; }
.an-legende b { font-weight: 800; color: var(--encre); font-variant-numeric: tabular-nums; }
@media (max-width: 899px) { .an-legende { flex-wrap: wrap; } }
.an-legende-filet { width: 1px; height: 14px; background: var(--trait-fort); }
.an-legende i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: var(--feuille); box-shadow: inset 0 0 0 1px var(--trait-fort); }
.an-legende i.hachure { box-shadow: none; background: repeating-linear-gradient(135deg, var(--creux) 0 3px, var(--creux-2) 3px 6px); }
.an-legende i.vacances { width: 24px; }
:is(.an-jour, .an-legende i)[data-c='bonne'] { background: var(--ok); color: var(--sur-accent); box-shadow: none; }
:is(.an-jour, .an-legende i)[data-c='moyenne'] { background: var(--pal-jaune); box-shadow: none; }
:is(.an-jour, .an-legende i)[data-c='mauvaise'] { background: var(--danger); color: var(--sur-accent); box-shadow: none; }
:is(.an-jour, .an-legende i)[data-c='sans'] { background: var(--pal-gris); color: var(--sur-accent); box-shadow: none; }
/* absent : un gris clair (le gris plein, c'est « sans bilan ») ; grève : fond d'encre, chiffre clair */
:is(.an-jour, .an-legende i)[data-c='absent'] { background: color-mix(in srgb, var(--pal-gris) 38%, var(--feuille)); box-shadow: none; }
:is(.an-jour, .an-legende i)[data-c='greve'] { background: var(--encre); box-shadow: none; }
.an-mois-grille .an-jour[data-c='greve'] { color: var(--feuille); }
:is(.an-jour, .an-legende i)[data-c='pret'] { background: var(--accent-bord); box-shadow: none; }
:is(.an-jour, .an-legende i)[data-c='partiel'] { background: var(--feuille); box-shadow: none; outline: 1px dashed var(--accent-bord); outline-offset: -1px; }
.an-jour.auj[data-c] { box-shadow: 0 0 0 2px var(--maintenant); }
/* sur une case pleine, le numéro reste discret : la couleur est la donnée */
.an-mois-grille .an-jour:is([data-c='bonne'], [data-c='mauvaise'], [data-c='sans']) { color: rgb(255 255 255 / 0.8); }
.an-mois-grille .an-jour:is([data-c='moyenne'], [data-c='pret'], [data-c='partiel']) { color: color-mix(in srgb, var(--encre) 55%, transparent); }
.an-mois-grille .an-jour[data-c='absent'] { color: color-mix(in srgb, var(--encre) 70%, transparent); }
.an-blocs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.an-bloc { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; }
/* un bilan : ses gestes au bout de la tête ; en modification, le champ, les humeurs, Terminé */
.carnet-gestes { display: inline-flex; gap: 2px; margin-left: auto; color: var(--encre-3); }
.carnet-entree.en-edition { gap: 8px; }
.carnet-edition-pied { display: flex; align-items: center; gap: 8px; }
.carnet-edition-pied .humeurs button { width: 36px; height: 36px; }
/* mes bilans écrits, toute la largeur : les filtres, puis les mois, leurs bilans côte à côte */
.an-carnet { gap: 4px; }
.journal-carnet .an-carnet { grid-column: 1 / -1; }
.an-filtres { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 4px 0 6px; }
.an-filtre { display: flex; flex-wrap: wrap; gap: 6px; }
.an-filtre-mot { width: 220px; max-width: 100%; min-height: 30px; margin-left: auto; }
@media (max-width: 599px) { .an-filtre-mot { width: 100%; margin-left: 0; } }
.carnet-mois { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 6px; }
.carnet-entrees { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px 32px; align-items: start; }
.carnet-mois + .carnet-mois { border-top: 1px solid var(--trait); }
.carnet-nom { font-family: var(--police-titre); font-size: 15px; font-weight: 700; color: var(--encre-2); text-transform: capitalize; }
.carnet-entree { display: flex; flex-direction: column; gap: 2px; break-inside: avoid; }
.carnet-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.carnet-humeur { display: flex; }
.carnet-humeur[data-humeur='bonne'] { color: var(--ok); }
.carnet-humeur[data-humeur='moyenne'] { color: var(--pal-jaune); }
.carnet-humeur[data-humeur='mauvaise'] { color: var(--danger); }
.carnet-date { border: none; background: none; padding: 0; font-weight: 800; font-size: 14px; color: var(--encre); cursor: pointer; }
.carnet-date:hover { color: var(--accent-texte); text-decoration: underline; }
.carnet-note { white-space: pre-wrap; line-height: 1.5; color: var(--encre); }
@media (max-width: 599px) {
  .an-calendrier { padding: 14px 12px; }
  .an-legende .an-legende-filet { display: none; }
}
@media print {
  #impression.impression-annee, #impression.impression-mois { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  #impression.impression-annee .an-vue { gap: 8pt; }
  #impression.impression-annee .panneau { box-shadow: none; border: 0.5pt solid #bbb; break-inside: avoid; }
  #impression.impression-annee .an-blocs { grid-template-columns: 1fr; }
  #impression.impression-annee :is(.an-filtres, .an-carnet .bilan-tete .humeurs, .carnet-gestes, .an-genre[aria-selected='false']) { display: none; }
  #impression.impression-annee :is(.an-genres, .an-genre) { padding: 0; background: none; box-shadow: none; }
  #impression.impression-annee .an-legende { flex-wrap: wrap; overflow: visible; }
  #impression.impression-annee .an-mois-liste { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10pt 14pt; }
  #impression.impression-annee .an-jour { font-size: 8pt; }
  #impression.impression-annee .an-jour.vacances { background-attachment: scroll; }
  #impression.impression-mois :is(.case-menu, .case-preparer, .case-gestes, .mois-copie) { display: none; }
  #impression.impression-mois .case.copiee { box-shadow: none; }
  #impression.impression-mois .mois { box-shadow: none; border: 0.5pt solid #999; border-radius: 0; }
  #impression.impression-mois .mois-semaine { break-inside: avoid; border-top-color: #999; }
  #impression.impression-mois .case { min-height: 0; padding: 4pt; border-left-color: #999; }
  #impression.imp-semaine .imp-cahier { table-layout: fixed; font-size: 8.5pt; }
  #impression.imp-semaine .imp-cahier th, #impression.imp-semaine .imp-cahier td { width: auto; white-space: normal; border: 0.5pt solid #999; vertical-align: top; }
  #impression.imp-semaine .imp-cahier th small { display: block; font-weight: 400; }
  #impression.imp-semaine .imp-bloc { padding: 2pt 0; border-bottom: 0.5pt dotted #bbb; break-inside: avoid; }
  #impression.imp-semaine .imp-bloc.imp-pause { color: #555; font-style: italic; }
}

/* le « ⋯ » d'un jour (mois, semaine) : discret, toujours là */
.case-tete .case-menu, .sem-tete .rond.petit { width: 26px; height: 26px; margin: -4px -4px -4px 0; color: var(--encre-3); }
.case-tete .case-menu:hover, .sem-tete .rond.petit:hover { color: var(--encre); }
@media (max-width: 599px) { .case-tete .case-menu { width: 22px; height: 22px; } .case-tete .case-menu svg { width: 12px; height: 12px; } }


/* À imprimer, Matériel : des lignes serrées, cochées d'office ; décochée,
   la ligne s'efface (barrée) sans bouger */
.carnet-serre { gap: 0; }
.carnet-cochee { min-height: 26px; gap: 7px; padding-block: 1px; font-size: 13px; cursor: default; }
.carnet-cochee > input[type='checkbox'] { flex: none; width: 14px; height: 14px; margin: 0; accent-color: var(--encre-3); cursor: pointer; }
.carnet-cochee > .pousse { font-weight: 650; }
.carnet-cochee > button.carnet-quand { border: none; background: none; padding: 0; min-width: 40px; text-align: left; cursor: pointer; }
.carnet-cochee > button.carnet-quand:hover { color: var(--encre); }
.carnet-doc { border: none; background: none; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.carnet-doc:hover { text-decoration: underline; text-underline-offset: 2px; }
.carnet-cochee.ecartee > .pousse { text-decoration: line-through; color: var(--encre-3); }
.carnet-cochee .carnet-detail { font-size: 12px; }
.carnet-fois { flex: none; display: inline-flex; align-items: center; gap: 1px; font-family: var(--police-titre); font-size: 12px; font-weight: 700; color: var(--encre-3); }
.carnet-exemplaires { width: 2.6em; height: 22px; padding: 0 4px; border: 1px solid transparent; border-radius: var(--rayon-s); background: none; font: inherit; color: var(--encre-2); text-align: right; -moz-appearance: textfield; appearance: textfield; }
.carnet-exemplaires::-webkit-inner-spin-button, .carnet-exemplaires::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.carnet-cochee:hover .carnet-exemplaires, .carnet-exemplaires:focus { border-color: var(--trait); background: var(--feuille); outline: none; }
.carnet-exemplaires:focus { border-color: var(--trait-fort); }
/* sans nombre réglé : rien à droite, le nom prend toute la ligne ; le champ
   (et la croix) ne paraissent qu'au survol ou au clavier */
.carnet-fois.sans-nombre, .carnet-retirer { display: none; }
.carnet-cochee:is(:hover, :focus-within) .carnet-fois.sans-nombre { display: inline-flex; }
.carnet-cochee:is(:hover, :focus-within) .carnet-retirer { display: inline-flex; }
/* retirer un document : la croix au bout de la ligne */
.carnet-retirer { flex: none; width: 22px; height: 22px; margin-right: -4px; color: var(--encre-3); }
.carnet-retirer:hover { color: var(--danger); }
@media (pointer: coarse) { .carnet-fois.sans-nombre { display: inline-flex; } .carnet-retirer { display: inline-flex; } }

/* ————— le glisser-déposer de la semaine (glisser-semaine.js) : le bloc tenu
   déjà à sa place d'arrivée, filet et bord net bleu stylo ; le jour visé
   lavé de bleu ; l'heure visée en pastille sur l'échelle ; le bord bas d'un
   bloc, une poignée pour sa durée ————— */
.sem-colonne { user-select: none; -webkit-user-select: none; }
.sem-bloc { -webkit-touch-callout: none; }
.sem-ligne { pointer-events: none; }
/* les deux bords d'un bloc : son début, sa fin */
.sem-poignee { position: absolute; left: 0; right: 0; height: 7px; cursor: ns-resize; z-index: 1; }
.sem-poignee[data-bord='haut'] { top: 0; }
.sem-poignee[data-bord='bas'] { bottom: 0; }
.sem-poignee::after { content: ''; position: absolute; left: 50%; width: 20px; height: 3px; margin-left: -10px; border-radius: 2px; background: var(--encre-4); opacity: 0; transition: opacity 120ms; }
.sem-poignee[data-bord='haut']::after { top: 2px; }
.sem-poignee[data-bord='bas']::after { bottom: 2px; }
.sem-bloc:not(.compact):hover > .sem-poignee::after, .sem-bloc[data-tenu]:not(.compact) > .sem-poignee::after { opacity: 1; }
/* un bloc court, à l'échelle : une ligne compacte, l'heure au bout ; ses bords plus fins */
.sem-bloc.compact { padding: 0 6px; border-radius: 4px; }
.sem-bloc.compact .sem-bloc-ligne { align-items: center; gap: 6px; }
.sem-bloc.compact .sem-bloc-titre, .sem-bloc.compact .sem-bloc-heure { font-size: 11.5px; line-height: 14px; }
.sem-bloc.compact .sem-bloc-ligne > .point-discipline { margin-top: 0; width: 6px; height: 6px; }
.sem-bloc.compact > .sem-poignee { height: 4px; }
/* une carte d'ateliers trop courte pour les lister : sans tête, les ateliers
   côte à côte, chacun sa colonne, l'intitulé sur les lignes que la hauteur laisse */
.sem-ateliers.cote { flex-direction: row; gap: 3px; padding: 3px; }
.sem-ateliers.cote .sem-ateliers-tete { display: none; }
.sem-ateliers.cote .sem-atelier { flex: 1 1 0; height: auto; align-items: flex-start; padding: 3px 5px; }
/* côte à côte, le lavis dit la discipline : le point laisse sa place à l'intitulé */
.sem-ateliers.cote .sem-atelier > .point-discipline { display: none; }
.sem-ateliers.cote .sem-atelier .sem-bloc-titre { display: -webkit-box; white-space: normal; overflow-wrap: break-word; -webkit-line-clamp: var(--lignes, 1); font-size: 12px; line-height: 16px; }
/* le créneau fantôme, sous la souris dans un temps libre : un clic l'y pose */
.sem-fantome { position: absolute; left: 2px; right: 3px; z-index: 2; display: flex; align-items: flex-start; gap: 6px; padding: 4px 10px; overflow: hidden; border-radius: 8px; border: 1px dashed var(--accent-bord); background: color-mix(in srgb, var(--accent-doux) 60%, transparent); color: var(--accent-texte); font-size: 12px; font-weight: 800; line-height: 16px; font-variant-numeric: tabular-nums; pointer-events: none; }
.sem-colonne:has(> .sem-fantome) { cursor: pointer; }
.semaine .sem-bloc[data-tenu] { z-index: 3; box-shadow: inset 0 0 0 1px var(--accent), 0 2px 0 var(--accent); }
.sem-bloc[data-tenu] .sem-bloc-heure { color: var(--accent-texte); }
.sem-colonne.cible { background: color-mix(in srgb, var(--accent-doux) 45%, var(--feuille)); }
.sem-tete.cible:not(.aujourdhui) .sem-jour small, .sem-tete.cible:not(.aujourdhui) .jour-numero { color: var(--accent-texte); }
.sem-axe-vise { position: absolute; right: 4px; transform: translateY(-50%); padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--sur-accent); font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; z-index: 3; }
body.sem-glisse, body.sem-glisse * { cursor: grabbing !important; }
body.sem-etire, body.sem-etire * { cursor: ns-resize !important; }
@media (max-width: 599px) { .sem-poignee { height: 14px; } }

/* la liste du matériel, à modifier : un champ par nom, sa corbeille au bout */
.liste-materiel { display: flex; flex-direction: column; gap: 6px; }
.liste-materiel-ligne { display: flex; align-items: center; gap: 6px; }
.liste-materiel-ligne > .champ { flex: 1; min-width: 0; }

/* deux journées le même jour : une ligne d'onglets en tête du jour (vue-jour.js) ;
   un doublon la teinte et l'ouvre d'un « Choisir » */
.journees-du-jour { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 10px; }
.journees-du-jour.doublon { padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--avert-doux); }
.jdj-alerte { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 13px; font-weight: 700; }
.jdj-alerte > svg { color: var(--avert); }
.jdj-onglets { flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.jdj-onglets button { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 260px; height: 30px; padding: 0 12px; font-weight: 700; }
.jdj-onglets button[aria-selected='true'] { background: var(--feuille); color: var(--encre); box-shadow: 0 0 0 1px var(--trait-fort); }
.jdj-plage { flex: none; font-size: 12px; font-weight: 600; color: var(--encre-3); }
.journees-du-jour > .bouton { flex: none; margin-left: auto; }
@media (max-width: 599px) {
  /* à l'étroit : les onglets se partagent la ligne, le nom d'abord (l'horaire est dans l'infobulle) */
  .jdj-onglets { flex: 1 1 auto; }
  .jdj-onglets button { flex: 1 1 0; justify-content: center; max-width: none; height: 32px; padding: 0 10px; }
  .jdj-plage, .jdj-alerte > span { display: none; }
}

/* ————— téléphone : la page tournée d'un glissé (index.js) ————— */
.journal-corps[data-entree='droite'] { animation: entre-droite 240ms cubic-bezier(0.32, 0.72, 0, 1); }
.journal-corps[data-entree='gauche'] { animation: entre-gauche 240ms cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes entre-droite { from { transform: translateX(36px); opacity: 0.3; } }
@keyframes entre-gauche { from { transform: translateX(-36px); opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .journal-corps[data-entree] { animation: none; } }

/* au doigt, l'appui long sur une carte choisit plusieurs blocs (carte.js) :
   ni sélection de texte, ni bulle du système */
@media (pointer: coarse) { .carte { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
