/* L'habillage de Lekipo : « Galet », choisi par Alexandre le 24 novembre 2026 sur la maquette (maquette-pc/), qui en est le
   modèle. Des pastels, des formes très rondes, un mouvement à ressort ; la couleur vient des postes et de l'établissement
   (bleu d'office, le bleu du L du logo). Sur un ordinateur, le menu est une barre en haut ; sur un téléphone, une gélule en bas.
   La tenue des gestes : une cible fait au moins 44 px ; l'appui se voit en moins de 150 ms ; seules les propriétés
   qui changent sont animées ; rien ne bouge pour qui a demandé moins d'animations.
   Les mélanges de couleur sont écrits tout faits : un vieil iPhone ne connaît pas color-mix(). */

/* La lettre des titres et des chiffres, rangée dans l'appli : rien ne part vers un autre site, et elle marche hors ligne. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  /* La page, ce qui se détache un peu (boutons, onglets), les panneaux, les fenêtres. */
  --papier: #f3f6fe; --surface: #e2ebfc; --panneau: #ffffff; --flottant: #ffffff;
  --encre: #1a1e26; --encre-douce: #535b6a; --trait: #1a1e2614; --contour: #778091; --voile: #1a1e260a;
  --alerte: #b3261e; --focus: #2f6fed; --principal: #2f6fed; --principal-texte: #ffffff; --logo-encre: #1a1e26; --logo-violet: #3a2d7d;
  /* Les cinq bulles de l'accueil, et une absence (hachures grises). */
  --matin-f: #cfe0ff; --matin-t: #0f2e73; --journee-f: #ffe7a3; --journee-t: #4d3800; --aprem-f: #ffd3c4; --aprem-t: #6b1f0c;
  --nuit-f: #26387a; --nuit-t: #eef2ff; --libre-f: #cdeedd; --libre-t: #0f4a33; --absence-t: #4f5868; --hachure: #0c111d14;
  --ombre: 0 18px 50px -20px rgb(12 17 29 / 0.28); --papier-20: #f3f6fe33; --gare-f: #e4572e2e;
  --chiffres: "Bricolage Grotesque", system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --elan: cubic-bezier(0.34, 1.56, 0.64, 1); /* le ressort des formes qui changent */
  --bord: clamp(16px, 4vw, 36px); /* la marge des bords grandit avec l'écran */
}
/* Le sombre : celui du téléphone, sauf choix fait d'un toucher (le bouton au soleil ou à la lune, commun.js), qui l'emporte. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    --papier: #1a1b22; --surface: #323744; --panneau: #252730; --flottant: #31313d;
    --encre: #e6ebf5; --encre-douce: #aab1bf; --trait: #e6ebf51a; --contour: #8992a3; --voile: #e6ebf50d;
    --alerte: #ff8a80; --focus: #b3ceff; --principal: #b3ceff; --principal-texte: #1a1e26; --logo-encre: #e6ebf5; --logo-violet: #7b4fd6;
    --matin-f: #1f55b5; --matin-t: #e6eeff; --journee-f: #7d5c00; --journee-t: #fff1c2; --aprem-f: #9a3a1e; --aprem-t: #ffe6dd;
    --nuit-f: #1d2c5e; --nuit-t: #e3eaff; --libre-f: #1c6b4b; --libre-t: #dff7ea; --absence-t: #b8bfca; --hachure: #f3f5f81a;
    --ombre: 0 18px 50px -20px rgb(0 0 0 / 0.8); --papier-20: #1a1b2233; --gare-f: #f0714c2e; --lueur: #2c3039;
  }
  /* Un poste prend ses tons du sombre (voir L.tonsGalet) : un fond soutenu, un texte presque blanc. */
  :root:not([data-theme="clair"]) [style*="--gcs"] { --c: var(--gcs) !important; --t: var(--gts) !important; }
}
:root[data-theme="clair"] { color-scheme: light; }
:root[data-theme="sombre"] {
  color-scheme: dark;
  --papier: #1a1b22; --surface: #323744; --panneau: #252730; --flottant: #31313d;
  --encre: #e6ebf5; --encre-douce: #aab1bf; --trait: #e6ebf51a; --contour: #8992a3; --voile: #e6ebf50d;
  --alerte: #ff8a80; --focus: #b3ceff; --principal: #b3ceff; --principal-texte: #1a1e26; --logo-encre: #e6ebf5; --logo-violet: #7b4fd6;
  --matin-f: #1f55b5; --matin-t: #e6eeff; --journee-f: #7d5c00; --journee-t: #fff1c2; --aprem-f: #9a3a1e; --aprem-t: #ffe6dd;
  --nuit-f: #1d2c5e; --nuit-t: #e3eaff; --libre-f: #1c6b4b; --libre-t: #dff7ea; --absence-t: #b8bfca; --hachure: #f3f5f81a;
  --ombre: 0 18px 50px -20px rgb(0 0 0 / 0.8); --papier-20: #1a1b2233; --gare-f: #f0714c2e; --lueur: #2c3039;
}
/* La couleur de l'établissement, choisie par le responsable parmi quatre teintes essayées d'avance (bleu d'office, plus haut : le bleu du L du logo ; plus de violet, décision d'Alexandre du 29 nov. 2026) : elle
   teinte les boutons, l'onglet ouvert et, très légèrement, le fond. Écrit par un script, tons mélangés d'avance. */
:root[data-teinte="vert"] { --papier: #f1f7f4; --surface: #dfebe6; --focus: #17734f; --principal: #17734f; --papier-20: #f1f7f433; }
:root[data-teinte="corail"] { --papier: #fbf4f2; --surface: #f6e5e2; --focus: #c2452d; --principal: #c2452d; --papier-20: #fbf4f233; }
:root[data-teinte="ardoise"] { --papier: #f3f4f5; --surface: #e4e5e7; --focus: #3b4657; --principal: #3b4657; --papier-20: #f3f4f533; }
@media (prefers-color-scheme: dark) {
  :root[data-teinte="vert"]:not([data-theme="clair"]) { --papier: #191c1e; --surface: #2f3a3a; --panneau: #24282b; --flottant: #2e3436; --focus: #9be3c0; --principal: #9be3c0; --papier-20: #191c1e33; }
  :root[data-teinte="corail"]:not([data-theme="clair"]) { --papier: #1e1a1e; --surface: #3f3537; --panneau: #2b262a; --flottant: #383035; --focus: #ffc0b0; --principal: #ffc0b0; --papier-20: #1e1a1e33; }
  :root[data-teinte="ardoise"]:not([data-theme="clair"]) { --papier: #1b1b20; --surface: #37383f; --panneau: #27272d; --flottant: #33323a; --focus: #c9d3e0; --principal: #c9d3e0; --papier-20: #1b1b2033; }
}
:root[data-teinte="vert"][data-theme="sombre"] { --papier: #191c1e; --surface: #2f3a3a; --panneau: #24282b; --flottant: #2e3436; --focus: #9be3c0; --principal: #9be3c0; --papier-20: #191c1e33; }
:root[data-teinte="corail"][data-theme="sombre"] { --papier: #1e1a1e; --surface: #3f3537; --panneau: #2b262a; --flottant: #383035; --focus: #ffc0b0; --principal: #ffc0b0; --papier-20: #1e1a1e33; }
:root[data-teinte="ardoise"][data-theme="sombre"] { --papier: #1b1b20; --surface: #37383f; --panneau: #27272d; --flottant: #33323a; --focus: #c9d3e0; --principal: #c9d3e0; --papier-20: #1b1b2033; }
/* Une couleur libre (ajout 17) : ses tons, calculés pour rester lisibles (L.styleDeTeinte), posés sur la page par commun.js (teinter)
   ou par le script de tête : --cX en clair, --sX en sombre. */
:root[data-teinte="libre"] { --papier: var(--cp); --surface: var(--cs); --focus: var(--cb); --principal: var(--cb); --papier-20: var(--cq); }
@media (prefers-color-scheme: dark) {
  :root[data-teinte="libre"]:not([data-theme="clair"]) { --papier: var(--sp); --surface: var(--ss); --panneau: var(--sn); --flottant: var(--sf); --focus: var(--sb); --principal: var(--sb); --papier-20: var(--sq); }
}
:root[data-teinte="libre"][data-theme="sombre"] { --papier: var(--sp); --surface: var(--ss); --panneau: var(--sn); --flottant: var(--sf); --focus: var(--sb); --principal: var(--sb); --papier-20: var(--sq); }
/* Les tons d'un poste : posés par l'écran à côté de sa couleur (L.stylePoste) ; ici, ils prennent sa place. « !important » :
   la couleur est écrite sur l'élément lui-même, et seule une règle importante passe devant. */
[style*="--gc"] { --c: var(--gc) !important; --t: var(--gt) !important; }
:root[data-theme="sombre"] [style*="--gcs"] { --c: var(--gcs) !important; --t: var(--gts) !important; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 400 1rem/1.45 var(--texte); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Pensé pour le doigt : pas de zoom au double appui, pas de texte sélectionné en touchant un bouton. */
button { cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

/* La barre : le logo à gauche, les onglets en galets au centre, le jour / nuit et le compte à droite. */
header.barre { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(22px + env(safe-area-inset-top)) 56px 0; }
body[data-etat="dehors"] .barre { display: none; }
.barre .logo svg { display: block; height: 34px; width: auto; color: var(--logo-encre); }
.cote { justify-self: end; display: flex; align-items: center; gap: 12px; }
#moi { border-radius: 50%; }
/* Hors connexion : une ligne discrète sous le menu ; l'écran reste lisible. */
.hors-ligne { display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 32px); margin: 12px auto 0; padding: 6px 16px; border-radius: 12px; background: var(--surface); color: var(--encre-douce); font-size: 0.85rem; font-weight: 600; }
.hors-ligne::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--encre-douce); }
body[data-etat="dehors"] .hors-ligne { display: none; }
/* Le titre d'un écran où l'on est entré (le mois d'une personne) : devant lui, le rond qui ramène d'où l'on vient. */
.avec-retour { display: flex; align-items: center; gap: 14px; }
/* Une personne : sa photo si elle en a mis une, ses initiales sinon, dans un rond. */
.avatar, .initiales { --t: 40px; position: relative; flex: none; display: grid; place-items: center; width: var(--t); height: var(--t); border-radius: 50%; background: var(--surface); font: 650 calc(var(--t) * 0.36) var(--chiffres); overflow: hidden; }
.avatar > .photo, .initiales > .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.identite > .photo { border-radius: 50%; } /* son rond, qui se touche pour mettre ou changer sa photo */

#vue { padding: 36px 56px calc(110px + env(safe-area-inset-bottom)); }
body[data-etat="dehors"] #vue { max-width: 30rem; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) var(--bord) calc(100px + env(safe-area-inset-bottom)); }
h1 { font: 750 2.3rem/1.05 var(--chiffres); font-stretch: 85%; letter-spacing: -0.02em; text-wrap: balance; }
h1::first-letter, #feuille-titre::first-letter { text-transform: uppercase; }
#feuille-titre:focus { outline: none; } /* le titre reçoit le focus quand la fiche change de contenu : il n'est pas un bouton */
/* Une bulle se touche (effacer, lu par, signaler) : c'est un bouton, mais son texte se sélectionne et se copie toujours. */
#bulles button.bulle { -webkit-user-select: text; user-select: text; }
h2 { font: 650 1.3rem/1.2 var(--chiffres); text-wrap: balance; }
/* L'en-tête d'un écran : son titre à gauche, ses boutons à droite. Grand sur l'accueil, plus sage ailleurs. */
.tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.tete > div:first-child { min-width: 0; }
.tete h1 { font-weight: 800; font-stretch: 100%; font-size: clamp(1.9rem, 2.6vw, 2.75rem); line-height: 1; letter-spacing: -0.03em; }
#vue[data-vue="accueil"] .tete { align-items: flex-end; margin-bottom: 36px; }
#vue[data-vue="accueil"] .tete h1 { font-size: clamp(2.6rem, 4.4vw, 4.2rem); }
.tete h1 button:not(.rond) { min-height: 56px; font: inherit; letter-spacing: inherit; text-align: left; border-radius: 8px; }
.tete small { font: 500 1.1rem var(--chiffres); color: var(--encre-douce); margin-left: 0.3em; letter-spacing: 0; }
.sous { margin-top: 10px; color: var(--encre-douce); font-size: 1.1rem; }
.sous::first-letter { text-transform: uppercase; }
.tete .actions { flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.tete .actions > * { flex: none; }
/* Texte agrandi sur un petit écran : un bouton du haut (« Demander un congé », 2 déc. 2026) passe à la ligne plutôt que de sortir de l'écran. */
.tete .actions { max-width: 100%; }
.tete .actions .bouton { max-width: 100%; white-space: normal; text-align: center; }
.panneau { padding: 28px; border-radius: 44px; background: var(--panneau); }
.titre-section { margin: 28px 0 10px; }
.aide, .vide { color: var(--encre-douce); text-wrap: pretty; }
.aide a.lien { display: inline-block; padding: 11px 0; color: var(--encre); font-weight: 600; text-underline-offset: 3px; } /* lot 5 : « Mes préférences », sous la phrase de la disponibilité ; 44 pixels à toucher ; l'encre, pas le bleu, qui sur le papier n'atteint pas 4,5 de contraste */
.vide { padding: 28px 0; }
.maj { margin-bottom: 10px; font-size: 0.9rem; } /* la mise à jour annoncée par Lekipo, en tête de l'écran */
.erreur { color: var(--alerte); font-weight: 600; min-height: 1.45em; margin-top: 10px; }

/* ----- Les boutons : des galets en aplats, pas de contour. Chacun répond au doigt tout de suite. ----- */
button, .rangee { transition: transform 0.13s ease-out, background-color 0.13s ease-out, color 0.13s ease-out; }
button:active { transform: scale(0.96); }
.rangee:active, .grille .jour:active { transform: scale(0.985); }
/* « plein » : le geste principal d'un écran ou d'une fenêtre, à la couleur de l'établissement ; « second » : les autres. Chacun
   sur sa ligne, à sa largeur, à gauche ; avant d'entrer (se connecter, créer son compte), sur toute la largeur. */
.plein, .second { display: flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; min-height: 54px; margin-top: 12px; padding: 0 26px; border-radius: 14px; font-weight: 600; }
.plein { min-height: 58px; padding: 0 30px; background: var(--principal); color: var(--principal-texte); font-size: 1.05rem; }
.second { background: var(--surface); }
.entree :is(.plein, .second) { width: 100%; }
.discret { min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--surface); font-weight: 600; white-space: nowrap; }
/* Le bouton de la maquette : un galet à côté d'un titre ou dans une fenêtre ; « principal » prend la couleur de l'établissement ;
   « discret » n'a pas de fond. */
.bouton { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 14px; background: var(--surface); font-weight: 600; white-space: nowrap; }
.bouton.principal { min-height: 58px; padding: 0 30px; background: var(--principal); color: var(--principal-texte); font-size: 1.05rem; }
.bouton.discret { background: none; color: var(--encre-douce); }
.bouton:disabled { opacity: 0.45; }
.bouton .compte { min-width: 26px; height: 26px; padding: 0 8px; background: var(--principal-texte); color: var(--principal); font: 700 0.85rem/26px var(--chiffres); }
.rond { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); }
.rond.petit { width: 38px; height: 38px; }
/* Sous la souris, un bouton grossit un peu, avec un rebond : pour qui a une souris et n'a pas demandé moins d'animations. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :is(.plein, .second, .discret, .bouton, .puce, .rond) { transition: transform 0.3s var(--elan), background-color 0.13s ease-out, color 0.13s ease-out, opacity 0.2s; }
  :is(.plein, .second, .discret, .bouton, .puce):hover:not(:disabled) { transform: scale(1.04); }
  .rond:hover { transform: scale(1.06); }
  :is(.plein, .second, .discret, .bouton, .puce, .rond):active { transform: scale(0.96); }
}
.danger { color: var(--alerte); }
/* Deuxième geste attendu : le bouton change franchement d'allure. */
.arme { background: var(--alerte); color: var(--papier); }
button:disabled { opacity: 0.4; cursor: default; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.actions > * { width: auto; margin: 0; flex: none; }
.entree .actions > * { flex: 1 1 auto; }

/* Derrière le rond du compte : la couleur de l'établissement (cinq ronds ; celui qui est choisi resserre ses coins, cerclé de sa
   couleur), et une bascule (« Désactiver les animations »). */
.teintes { display: flex; flex-wrap: wrap; gap: 14px; padding: 6px; }
.teinte { width: 48px; height: 48px; border-radius: 50%; background: var(--c); transition: border-radius 0.4s var(--elan), transform 0.3s var(--elan); }
.teinte[aria-checked="true"] { border-radius: 16px; box-shadow: 0 0 0 3px var(--flottant), 0 0 0 6px var(--c); }
@media (hover: hover) { .teinte:hover { transform: scale(1.1); } }
.bascule { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 52px; border-radius: 16px; font-weight: 600; text-align: left; }
.bascule i { flex: none; position: relative; width: 54px; height: 32px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--trait); transition: background-color 0.25s; }
.bascule i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--encre-douce); transition: transform 0.3s var(--elan), background-color 0.25s; }
.bascule[aria-checked="true"] i { background: var(--principal); }
.bascule[aria-checked="true"] i::after { transform: translateX(22px); background: var(--principal-texte); }
/* Une ligne qui ouvre un réglage : son nom, et une flèche au bout. */
.reglages .rangee { display: flex; min-height: 0; }
.reglages .rangee .nom { flex: 1; }
.reglages .rangee .ico { flex: none; color: var(--encre-douce); }
#feuille-corps > h2:not(.titre-section) { margin: 22px 0 12px; }
#feuille-corps > h2:first-child { margin-top: 0; }
#feuille-corps > .bascule { margin-top: 22px; }
.bascule:disabled { color: var(--encre-douce); cursor: default; }
.bascule:disabled i { opacity: 0.5; }
.bascules > .aide { margin: 4px 0 0; }
.bascules > .modes { margin: 14px 0 6px; }

/* ----- Les champs : un galet plein, sans contour, comme la maquette ; le contour vient avec le clavier. ----- */
.champ { display: block; margin-top: 14px; font-weight: 600; font-size: 0.95rem; }
.champ input, .champ select, .champ textarea, .recherche, .saisie textarea {
  display: block; width: 100%; min-height: 54px; margin-top: 6px; padding: 12px 20px;
  border: 0; border-radius: 18px; background: var(--surface); font-weight: 400; font-size: 1rem;
}
.champ textarea { min-height: 9rem; resize: vertical; }
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible, .recherche:focus-visible, .saisie textarea:focus-visible { outline-offset: 0; }
:is(.champ, .saisie) ::placeholder, .recherche::placeholder { color: var(--encre-douce); opacity: 1; }
/* Le calendrier « Galets » (ajout 18 ; commun.js, champDeJour), comme la maquette (pistes/calendrier-couleurs, piste 1) : le champ dit le
   jour en toutes lettres et s'ouvre, dessous, sur un mois où chaque jour est un galet rond de 44 px au moins. Aujourd'hui est cerclé, le
   jour choisi est plein, à la couleur de l'établissement ; un jour impossible est grisé. */
.choix-jour > label { display: block; }
.choix-jour .ligne { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.choix-jour .valeur { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px; background: var(--surface); font-size: 1rem; font-weight: 600; text-align: left; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.2s, transform 0.13s ease-out; }
.choix-jour .valeur[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--principal); }
.choix-jour .valeur .vide { color: var(--encre-douce); font-weight: 450; }
.choix-jour .valeur .ico { flex: none; }
.mois-galets { margin-top: 8px; padding: 14px 10px; border-radius: 28px; background: var(--voile); font-size: 1rem; }
.mois-galets .entete { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 8px; }
.mois-galets h3 { margin: 0; font: 650 1.1rem var(--chiffres); }
.mois-galets .rond { width: 44px; height: 44px; }
.mois-galets .jours, .mois-galets .sem { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); }
.mois-galets .jours { padding-bottom: 4px; color: var(--encre-douce); font: 600 0.8rem var(--chiffres); text-align: center; }
.mois-galets .c { display: grid; place-items: center; height: 44px; }
.mois-galets .j { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 50%; font: 600 1rem var(--chiffres); transition: transform 0.25s var(--elan), background-color 0.15s; }
@media (hover: hover) { .mois-galets .j:hover:not(:disabled):not(.sel) { background: var(--voile); } }
.mois-galets .j:active:not(:disabled) { transform: scale(0.88); }
.mois-galets .j.auj { box-shadow: inset 0 0 0 2px var(--principal); }
.mois-galets .j.sel { background: var(--principal); color: var(--principal-texte); transform: scale(1.04); }
.mois-galets .j:disabled { opacity: 0.28; }
.mois-galets .pied { display: flex; justify-content: center; padding-top: 8px; }
.mois-galets .pilule { min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--surface); font-size: 0.95rem; font-weight: 650; white-space: nowrap; }
.recherche { margin: 0 0 12px; padding: 0 24px; border-radius: 14px; }
.aide + .recherche { margin-top: 12px; } /* la liste des membres, sous sa phrase d'aide */

/* ----- Les onglets : un galet chacun ; celui de l'écran ouvert prend la couleur de l'établissement et des coins moins ronds.
   Sur un téléphone (plus bas), une seule gélule qui flotte en bas, sous le pouce. ----- */
#onglets { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
#onglets button { position: relative; min-height: 50px; padding: 0 26px; border-radius: 14px; background: var(--surface); color: var(--encre-douce); font-weight: 600; font-size: 0.95rem; white-space: nowrap; transition: border-radius 0.4s var(--elan), background-color 0.25s, color 0.25s; }
#onglets button:hover { color: var(--encre); }
#onglets button[aria-current="page"] { background: var(--principal); color: var(--principal-texte); border-radius: 10px; }
#onglets .compte { position: absolute; top: -5px; right: 0; box-shadow: 0 0 0 2px var(--papier); }
body[data-etat="dehors"] #onglets { display: none; }
/* Le nombre de messages pas encore lus. */
.compte { display: inline-block; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; background: var(--principal); color: var(--principal-texte); font: 650 0.8rem/22px var(--chiffres); text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  header.barre { grid-template-columns: 1fr auto; padding: calc(14px + env(safe-area-inset-top)) 16px 0; }
  .barre .logo svg { height: 28px; }
  #onglets { position: fixed; z-index: 6; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); flex-wrap: nowrap; gap: 2px; padding: 6px; border-radius: 22px; background: var(--panneau); box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.4); }
  #onglets button { flex: 1; min-width: 0; padding: 0 2px; background: none; font-size: 0.74rem; }
  #onglets .compte { box-shadow: 0 0 0 2px var(--panneau); }
  #vue { padding: 18px 16px calc(110px + env(safe-area-inset-bottom)); }
  .tete .bouton { min-height: 46px; padding: 0 16px; font-size: 0.95rem; }
  .tete .actions { gap: 8px; }
  .panneau { padding: 18px; }
}

/* ----- Le galet d'un poste, aux tons de sa couleur (--c, --t) : son icône, son nom, ses heures. ----- */
.galet { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px 8px 20px; border-radius: 14px; background: var(--c); color: var(--t); text-align: left; overflow: hidden; }
.galet .ico { flex: none; }
.galet .mots { min-width: 0; }
.galet b, .galet small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.galet b { font: 650 0.9rem/1.25 var(--texte); }
.galet small { font: 400 0.82rem/1.45 var(--texte); }
.galet small.coupe span { display: block; overflow: hidden; text-overflow: ellipsis; } /* un poste coupé : une plage par ligne (heuresDuGalet) */
/* Un congé ou une absence : des hachures grises, sans couleur de poste. Un poste à pourvoir : un pointillé de sa couleur. */
.galet.absent { background: repeating-linear-gradient(135deg, var(--hachure) 0 6px, transparent 6px 12px); color: var(--absence-t); }
.galet.pourvoir { background: none; color: var(--encre); border: 2px dashed var(--v); }
/* Une demi-journée de congé sur un jour qui garde son poste : une petite marque hachurée au bout du galet, à gauche le matin, à droite
   l'après-midi (le motif des absences, dans le ton du poste). */
.galet[data-demi]::before { content: ""; position: absolute; inset-block: 0; width: 14px; background: repeating-linear-gradient(135deg, currentColor 0 2px, transparent 2px 5px); opacity: 0.5; pointer-events: none; }
.galet[data-demi="matin"]::before { left: 0; }
.galet[data-demi="aprem"]::before { right: 0; }
.grille .jour .galet[data-demi]::before { width: 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="clair"]) [style*="--vs"] { --v: var(--vs) !important; } }
:root[data-theme="sombre"] [style*="--vs"] { --v: var(--vs) !important; }

/* ----- Le calendrier d'un mois : un galet par jour posé, jamais un ruban qui joint les jours. Son icône dit le poste ; au
   tableau de bord, sur un grand écran, le galet dit aussi son nom et ses heures (tableau.css). On change de mois en le
   faisant glisser. ----- */
#vue[data-vue="planning"] > * { flex: none; }
.mois-defile { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mois-defile::-webkit-scrollbar { display: none; }
.mois-defile > .grille { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
/* Pas de `content-visibility: auto` sur les mois : dans le moteur de Safari, le toucher d'un jour se perdait (le jour pressé rapetisse,
   et le relâché tombait sur la grille, pas sur le jour ; essai « disponibilité », 24 nov. 2026). */
.grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; align-content: start; text-align: center; }
.ent { padding-bottom: 4px; color: var(--encre-douce); font-size: 0.78rem; }
.grille .jour {
  position: relative; display: grid; align-content: start; justify-items: center; gap: 3px; min-height: 62px; padding: 6px 0;
  border-radius: 16px; color: var(--encre); font: 600 0.95rem var(--chiffres); font-variant-numeric: tabular-nums;
}
.grille .jour .galet { display: grid; place-items: center; width: 36px; height: 26px; min-height: 0; padding: 0; border-radius: 8px; }
.grille .jour .galet .mots { display: none; }
.grille .jour .galet.absent { background: repeating-linear-gradient(135deg, var(--hachure) 0 4px, transparent 4px 8px); }
.grille .jour .galet.libere { box-shadow: inset 0 0 0 2px var(--contour); }
.grille .jour .court { font: 500 0.74rem/1 var(--chiffres); color: var(--encre-douce); white-space: nowrap; }
/* Les jours du mois voisin : éclaircis. */
.grille .jour.hors { color: var(--encre-douce); }
.grille .jour.hors .galet { opacity: 0.45; }
/* Un jour qui porte un mot (« Livraison à 7 h ») : un point dans son coin ; le mot se lit sous le mois. */
.grille .jour[data-mot]::before { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* Aujourd'hui : sa case sur un fond doux, cerclée de la couleur de l'établissement. */
.grille .jour.auj { background: var(--surface); box-shadow: inset 0 0 0 2px var(--principal); }
.grille .jour:focus-visible { z-index: 1; outline-offset: -3px; }
/* Un jour passé sans rien, chez le salarié (lot 4 du 2 décembre 2026) : il ne s'ouvre plus, mais garde son allure. */
.grille .jour:disabled { opacity: 1; cursor: default; }
/* Un jour dont le poste a changé depuis le dernier regard (app.js) : un anneau d'encre. Il clignote un instant si les animations
   sont permises ; sinon il reste, sans bouger. */
.grille .jour.change { z-index: 1; outline: 3px solid var(--encre); outline-offset: -3px; }
@media (prefers-reduced-motion: no-preference) {
  .grille .jour.change { animation: clignoter 0.45s ease-in-out 8 alternate; }
  @keyframes clignoter { to { outline-color: transparent; } }
}

/* L'appli du salarié, comme la maquette du téléphone : son planning à lui et « Moi », en panneaux empilés, au milieu sur un grand écran. */
body:not(.tableau) #vue:is([data-vue="planning"], [data-vue="moi"]) { max-width: calc(34rem + 2 * 56px); margin-inline: auto; }
.pile-s { display: grid; gap: 12px; }
.pile-s > * { min-width: 0; margin-top: 0; }
.pile-s > h2 { margin: 14px 0 -2px; }
/* Aujourd'hui et demain, d'un coup d'œil, au-dessus du calendrier : le galet de chaque poste. */
.du-jour { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 16px; margin: 0; }
.du-jour dt { color: var(--encre-douce); }
.du-jour dd { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.du-jour .galet { width: fit-content; max-width: 100%; min-height: 46px; padding: 6px 18px 6px 14px; border-radius: 12px; }
/* Dans ce galet, rien ne se coupe en « … » : un nom trop long va à la ligne, et la plage d'heures ne se coupe qu'au tiret. */
.du-jour .galet :is(b, small) { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
/* Aux grandes tailles de texte, l'étiquette passe au-dessus de ce qu'elle dit, et le galet laisse sa place au texte (plus d'icône,
   moins de marge) : rien ne sort de l'écran (juge du coffre, F3). */
/* Le cadre ne tient que ce panneau : mesurer toute la pile faisait recalculer le calendrier entier (douze mois) à chaque dessin. */
.cadre-jour { container-type: inline-size; }
@container (max-width: 21em) {
  .du-jour { grid-template-columns: 1fr; }
  .du-jour dd + dt { margin-top: 6px; }
  .du-jour .galet { padding: 8px 12px; }
  .du-jour .galet .ico { display: none; }
}
/* Texte doublé sur un petit téléphone : le galet ne garde presque plus de marge, la plage d'heures y tient entière. */
@container (max-width: 10em) { .du-jour .galet { padding-inline: 2px; border-radius: 12px; } }
/* Une ligne dans son propre panneau (les postes à pourvoir) ; une liste dans un panneau (mes demandes, mes échanges, mes réglages). */
.pile-s > .rangee.panneau { width: 100%; margin: 0; padding: 18px 28px; border-radius: 28px; }
.identite { display: grid; justify-items: start; gap: 18px; }
.identite .fiche { margin: 0; }
.pastille { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--voile); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; color: var(--encre-douce); font-size: 0.92rem; overflow-wrap: anywhere; }
.legende .ico { margin-right: 6px; vertical-align: -3px; } /* un nom de poste trop long n'élargit pas la page */
/* Un mot du jour sans espace va à la ligne, et des accents empilés ne débordent pas sur les lignes voisines (le juge, 17 nov.). */
.legende.mots { overflow-wrap: anywhere; overflow: hidden; }
.legende.mots > span { min-width: 0; overflow: hidden; }
/* La fiche d'un jour : le poste, en grand galet, aux tons de sa couleur ; un congé ou une absence, hachuré. */
.poste-du-jour { position: relative; padding: 20px 26px 20px 62px; border-radius: 16px; background: var(--c); color: var(--t); }
.poste-du-jour .ico { position: absolute; left: 26px; top: 26px; }
.poste-du-jour.absent { padding-left: 26px; background: repeating-linear-gradient(135deg, var(--hachure) 0 6px, transparent 6px 12px); color: var(--encre); }
.poste-du-jour + .poste-du-jour { margin-top: 12px; } /* le poste d'un jour, puis sa demi-journée */
/* Sur un téléphone, l'icône passe au-dessus du nom : le texte garde toute la largeur (les grandes tailles de texte y tiennent). */
@media (max-width: 480px) { .poste-du-jour { padding: 18px 20px; border-radius: 16px; } .poste-du-jour .ico { position: static; display: block; margin-bottom: 6px; } }
/* Aux grandes tailles de texte sur un petit écran, le grand titre se borne à la largeur, et un nom trop long va à la ligne plutôt que de
   sortir de l'écran ; les heures, elles, ne se coupent jamais (app.js, dUnBloc). */
.poste-du-jour strong { display: block; font: 700 min(1.7rem, 11vw)/1.1 var(--chiffres); overflow-wrap: anywhere; }
.poste-du-jour span { display: block; margin-top: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ----- Les listes ----- */
/* Une ligne : le rond d'une personne, son nom, un détail dessous ; sans fond, elle se dit sous la souris. */
.rangee {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 14px; row-gap: 2px;
  width: calc(100% + 20px); min-height: 64px; margin: 0 -10px; padding: 12px 10px; border-radius: 16px; text-align: left;
}
@media (hover: hover) { button.rangee:hover, label.rangee:hover { background: var(--voile); } }
.rangee .nom { grid-column: 2; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rangee .detail { grid-column: 2; color: var(--encre-douce); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rangee > :first-child, .rangee > .compte, .rangee > .marque { grid-row: 1 / span 2; }
.rangee > .compte, .rangee > .marque { grid-column: 3; }
/* Les membres d'un groupe (tableau de bord, et le créateur d'un groupe dans son appli) : une case à cocher à la place des initiales. */
label.rangee { cursor: pointer; align-content: center; }
.rangee input[type="checkbox"] { grid-row: 1; width: 24px; height: 24px; margin: 0 10px; accent-color: var(--principal); } /* sur la ligne du nom */
.marque { padding: 5px 13px; border-radius: 8px; background: var(--surface); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.marque.alerte { color: var(--alerte); }
/* Le remplacement urgent : la marque « Urgent » prend la couleur de l'établissement, comme tout ce qui attend un geste (la maquette). */
.marque.urgent { background: var(--principal); color: var(--principal-texte); }
/* Une demande de congé ou d'absence : son genre et ses jours, son état à droite ; « Retirer » dessous, tant qu'elle attend. */
.demande { grid-template-columns: minmax(0, 1fr) auto; }
.demande > :first-child { grid-row: auto; }
.demande .nom, .demande .detail { grid-column: 1; }
.demande > .marque { grid-column: 2; }
.retirer { display: block; margin: -2px 0 10px auto; }
/* Un échange de poste : avec qui, les deux jours l'un sous l'autre, son état dessous. Les jours vont à la ligne plutôt
   que d'être coupés ; « Accepter » et « Refuser » dessous, côte à côte. */
.rangee.echange, .rangee.appel { grid-template-columns: minmax(0, 1fr); }
.rangee.echange > *, .rangee.appel > * { grid-row: auto; grid-column: 1; }
.echange .detail, .appel .detail { white-space: normal; overflow-wrap: anywhere; }
.echange .marque, .appel .marque { justify-self: start; margin-top: 4px; white-space: normal; }
.echange + .actions { margin: 0 0 14px; }
/* Un poste à pourvoir : le jour, le poste, le message du responsable, l'état ; le bouton dessous. */
.appel + button { margin: -2px 0 14px; }
/* Sur le planning du salarié, les lignes des postes à pourvoir et des échanges (lot 4 du 2 décembre 2026), leur nombre à droite ; un peu
   d'air avant le calendrier. */
.pile-s > .rangee.panneau + .mois { margin-top: 16px; }
.a-pourvoir > .compte, .echanges > .compte { grid-column: 2; grid-row: 1; }
/* Un volontaire : son rond, son nom entier (sur deux lignes au besoin : on lit qui l'on confirme) et dessous ses heures face à son
   contrat, « Choisir » au bout ; l'avertissement prend toute la largeur dessous, avec un triangle, pas seulement une couleur. */
.rangee.volontaire { display: flex; flex-wrap: wrap; row-gap: 6px; }
.rangee.volontaire .qui-est { flex: 1; min-width: 0; }
.rangee.volontaire .nom { display: block; white-space: normal; }
.rangee.volontaire > :is(.bouton, .marque) { flex: none; }
.rangee.volontaire small { display: block; color: var(--encre-douce); font-size: 0.85rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.rangee.volontaire small.gare { display: flex; gap: 7px; flex-basis: 100%; padding: 6px 12px; border-radius: 14px; background: var(--gare-f); color: var(--aprem-t); font-weight: 600; }
.rangee .gare .ico { flex: none; margin: 2px 0 0; }
/* Des puces à cocher : une seule choisie (le genre d'une demande, qui écrit dans un groupe). */
.puce { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 12px; background: var(--surface); font-weight: 600; transition: border-radius 0.4s var(--elan), background-color 0.25s, color 0.25s; }
.modes { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 0; padding: 0; border: 0; }
.modes legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; }
/* Une rangée de pastilles (les catégories), et celle qui est allumée : la couleur de l'établissement, des coins moins ronds. */
.pinceaux { display: flex; flex-wrap: wrap; gap: 8px; }
.puce[aria-checked="true"], .puce[aria-pressed="true"] { background: var(--principal); color: var(--principal-texte); }
.aide + .pinceaux { margin-top: 10px; }
.pinceaux + .recherche { margin-top: 12px; }
.modes .puce { position: relative; cursor: pointer; }
.modes .puce:has(:checked) { background: var(--principal); color: var(--principal-texte); }
.modes input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.modes .puce:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.modes.rappels { gap: 8px; } /* les quatre choix du rappel tiennent sur une ligne, sur un téléphone */
.modes.rappels .puce { padding: 0 14px; white-space: nowrap; }
/* Équipe, comme la maquette : une tuile ronde par personne ; son rond, son nom, son adresse (au tableau seulement), ses pastilles. Sous la souris, elle se
   soulève et ses coins se resserrent. Un compte qui attend la validation prend les tons d'un jaune de poste. */
.tete .recherche { width: 20rem; max-width: 100%; min-height: 54px; margin: 0; }
.personnes { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.75rem, 1fr)); gap: 18px; }
.personne { display: grid; justify-items: center; align-content: start; gap: 4px; min-width: 0; padding: 30px 18px 24px; border-radius: 28px; background: var(--panneau); text-align: center; transition: transform 0.3s var(--elan); }
.personne .avatar { margin-bottom: 12px; transition: transform 0.4s var(--elan); }
.personne b { max-width: 100%; font: 650 1.15rem var(--chiffres); overflow-wrap: anywhere; }
.courriel { max-width: 100%; color: var(--encre-douce); font-size: 0.9rem; overflow-wrap: anywhere; }
.personne.attente { background: var(--journee-f); color: var(--journee-t); }
.personne.attente .courriel { color: inherit; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; }
.personne .etiquettes { justify-content: center; min-height: 30px; margin-top: 12px; }
.etiquettes i { padding: 5px 13px; border-radius: 8px; background: var(--surface); font-style: normal; font-size: 0.82rem; font-weight: 600; }
.etiquettes i.alerte { color: var(--alerte); }
.personne.attente .etiquettes i { background: #0000001f; }
.personnes > .vide { grid-column: 1 / -1; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .personne:hover { transform: translateY(-4px); }
  .personne:hover .avatar { transform: scale(1.08); }
}
@media (max-width: 760px) {
  .tete .actions:has(.recherche), .tete .recherche { width: 100%; }
  .personnes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .personne { padding: 20px 8px 16px; border-radius: 32px; }
  .personne .avatar { --t: 64px !important; }
  .courriel { font-size: 0.72rem; }
}
.filtre { margin: -8px 0 28px; }
/* « Mes préférences », dans « Moi » (lot 1) : une phrase, puis deux rangées de puces qui s'allument d'un toucher. */
.preferences { display: grid; gap: 10px; }
.preferences > .aide { margin: 0; }
.preferences h3 { margin: 8px 0 0; font: 650 1rem var(--chiffres); }
.preferences .puce { gap: 8px; padding: 0 18px; }
.fiche { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 12px 24px; margin: 4px 0 8px; }
.fiche dt { color: var(--encre-douce); }
.fiche dd { font-weight: 600; overflow-wrap: anywhere; }
/* Appeler, écrire : un lien qui se voit et se touche (44 px de haut). */
.fiche a { display: inline-block; padding: 11px 0; color: var(--focus); font-weight: 600; text-underline-offset: 3px; }
/* « Moi » (lot 4 du 2 décembre 2026) : l'adresse et le téléphone se touchent pour les changer ; soulignés, à l'encre, sur toute la ligne. */
.fiche .changer { display: block; width: 100%; min-height: 44px; text-align: left; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; border-radius: 8px; }

/* Les notes, comme la maquette : une tuile par note ; une note épinglée prend les tons d'un jaune de poste, une punaise devant son
   titre. Au tableau de bord, la pastille « Lu par 8 sur 12 » se remplit à mesure qu'on la lit, et ouvre les noms. */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(27rem, 100%), 1fr)); gap: 18px; align-items: start; }
.note { display: grid; gap: 14px; min-width: 0; padding: 32px; border-radius: 44px; background: var(--panneau); }
.note.epinglee { background: var(--journee-f); color: var(--journee-t); }
.note h2 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; overflow-wrap: anywhere; }
.note h2 > * { flex: none; }
.epingle { display: grid; }
.note > p { font-size: 1.05rem; white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--encre-douce); font-size: 0.9rem; }
.meta span { padding: 4px 12px; border-radius: 8px; background: var(--surface); color: var(--encre); font-weight: 600; }
.note.epinglee :is(.meta, .bouton.discret) { color: inherit; }
.note.epinglee .meta span { background: #0000001f; color: inherit; }
.note .bouton { justify-self: start; }
/* « J'ai lu » touché : une ligne discrète, « Lu », avec les deux coches. */
.note .lu { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 600; }
.note .lus { justify-self: start; min-height: 46px; padding: 0 22px; border-radius: 12px; font-weight: 600; background: linear-gradient(to right, var(--f) calc(var(--part) * 100%), var(--surface) 0); }
.note.epinglee .lus { background: linear-gradient(to right, #00000029 calc(var(--part) * 100%), #00000012 0); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .note .lus { transition: transform 0.25s var(--elan); } .note .lus:hover { transform: scale(1.04); } }
.note .actions { margin: 0 -14px -12px; gap: 0; }
.note .actions .bouton { min-height: 44px; padding: 0 14px; }
.noms .rangee { min-height: 0; }
@media (max-width: 760px) { .note { padding: 24px; } }
/* Lot 2 (1er décembre 2026) : sous une question, un bouton par réponse, celui choisi à la couleur de l'entreprise ; puis qui voit la réponse.
   Les documents utiles : une liste de titres, puis le texte dans la fenêtre, ses numéros à toucher. */
.note .lus { white-space: normal; text-align: left; } /* « Oui : 5, Non : 2, Pas encore : 3 » passe à la ligne plutôt que de déborder */
.note .reponses { display: flex; flex-wrap: wrap; gap: 10px; }
.note .reponses .bouton { min-width: 7rem; justify-content: center; white-space: normal; }
.note .reponses .bouton[aria-pressed="true"] { background: var(--principal); color: var(--principal-texte); }
.note .vu-par { margin-top: -4px; color: var(--encre-douce); font-size: 0.9rem; }
.documents .rangee { display: flex; font-size: 1.05rem; }
.documents .rangee .nom { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.documents .rangee .ico { flex: none; color: var(--encre-douce); }
.doc { font-size: 1.05rem; line-height: 1.6; overflow-wrap: anywhere; }
.doc p { min-height: 1.6em; white-space: pre-wrap; }
.doc a { display: inline-block; margin: 3px 0; padding: 0 12px; border-radius: 10px; background: var(--surface); color: inherit; font-weight: 700; text-decoration: none; line-height: 2.2; }
.doc + :is(.second, .bouton) { margin-top: 18px; }
.reponses-a-donner { display: grid; gap: 8px; min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
.reponses-a-donner legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; }
.choix-reponses { display: grid; gap: 8px; }
.choix-reponses input { width: 100%; min-height: 52px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--surface); font-size: 1rem; }
.reponses-a-donner > .bouton { justify-self: start; }

/* ----- La fenêtre : une feuille qui monte du bas de l'écran. Sa poignée dit qu'elle se tire vers le bas. ----- */
/* Sur un ordinateur : une fiche qui glisse depuis la droite, sur toute la hauteur. Sur un téléphone (plus bas) : du bas. */
dialog {
  position: fixed; inset: 16px 16px 16px auto; width: min(27.5rem, calc(100vw - 32px)); max-width: none; height: auto; max-height: none; margin: 0; padding: 0;
  border: 0; border-radius: 48px; background: var(--flottant); color: var(--encre); box-shadow: var(--ombre); overflow: hidden;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgb(6 12 20 / 0.35); }
/* En tête : le rond de la personne s'il y en a un, le titre et sa ligne dessous, le rond qui ferme. */
.feuille-tete { position: relative; flex: none; display: flex; align-items: center; gap: 16px; padding: 30px 30px 0; }
.feuille-tete > div { flex: 1; min-width: 0; }
.feuille-tete p { color: var(--encre-douce); }
.feuille-tete p::first-letter { text-transform: uppercase; }
.feuille-tete :is(span, p):empty { display: none; }
.feuille-tete h2:focus { outline: none; } /* le titre reçoit le focus à l'ouverture, à la place de la croix */
/* « 1 1 auto », pas « 1 » : sur les iPhone d'avant 2024, une base de zéro écrase le contenu et la fenêtre s'ouvre vide. */
#feuille-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 30px 30px; }
#feuille-pied { flex: none; padding: 10px 30px calc(24px + env(safe-area-inset-bottom)); }
#feuille-pied > :first-child { margin-top: 0; }
#feuille-pied .erreur:empty { display: none; } /* « Valider » au pied (nouveauGroupe) : son refus ne prend de place que s’il y en a un */
#feuille-pied .erreur:empty + * { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  /* Elle arrive avec un ressort ; pas de fondu, elle reste lisible si l'animation est mise en pause. */
  dialog[open] { animation: venir-de-droite 0.4s var(--elan); }
  @keyframes venir-de-droite { from { transform: translateX(calc(100% + 32px)); } }
  @keyframes monter-du-bas { from { transform: translateY(45%); } }
}
@media (max-width: 760px) {
  dialog { inset: auto 0 0 0; width: auto; max-height: min(88dvh, calc(100dvh - env(safe-area-inset-top) - 20px)); border-radius: 40px 40px 0 0; }
  /* Sa poignée dit qu'elle se tire vers le bas. */
  .feuille-tete { padding: 26px 16px 0 24px; touch-action: none; cursor: grab; }
  .feuille-tete::before { content: ""; position: absolute; top: 10px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--contour); }
  #feuille-corps { padding: 16px 24px 24px; }
  #feuille-pied { padding: 10px 20px calc(14px + env(safe-area-inset-bottom)); }
  /* Une conversation prend toute la hauteur : on lit le fil, on écrit en bas. */
  dialog.conversation { height: calc(100dvh - env(safe-area-inset-top) - 20px); max-height: none; }
}
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) { dialog[open] { animation: monter-du-bas 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); } }

/* ----- Les messages, comme la maquette. Sur un ordinateur : les conversations, celle qu'on lit, et les membres quand c'est un
   groupe. Sur un téléphone : la liste ; la conversation s'ouvre dans une fenêtre. ----- */
.messagerie { display: flex; flex-wrap: wrap; gap: 18px; }
.messagerie > * { min-height: 0; margin: 0; height: max(520px, calc(100vh - 300px)); overflow: auto; }
.messagerie .fils { flex: 1 1 20rem; }
.messagerie .fil { flex: 3 1 26rem; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.messagerie .membres { flex: 1 1 15rem; height: auto; align-self: flex-start; }
.messagerie.vide > :not(.fil) { display: none; }
.messagerie.vide .fil { height: auto; min-height: 320px; }
/* Une conversation de la liste : son rond, son nom, son dernier message dessous, et ce qui n'est pas lu. Celle qu'on lit se détache. */
.fils .rangee { min-height: 0; }
.fils .rangee .initiales { --t: 48px; }
.fils .rangee .nom { font-weight: 700; }
.fils .rangee .detail { font-size: 0.9rem; }
.fils .rangee[aria-current] { background: var(--surface); }
.avatar.groupe, .initiales.groupe { background: var(--nuit-f); color: var(--nuit-t); }
.fil > header { flex: none; display: flex; align-items: center; gap: 14px; }
.fil > header > div { min-width: 0; }
.fil > header p { color: var(--encre-douce); }
.fil-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px; }
.fil-pied { flex: none; }
.fil-pied:empty { display: none; }
.membres .rangee { min-height: 0; }
.membres .a-cote { display: flex; flex-wrap: wrap; margin: 10px 0 0 -14px; }
.membres .a-cote .bouton { min-height: 44px; padding: 0 14px; }
.bulles { display: flex; flex-direction: column; gap: 10px; }
/* Le message d'un autre : son rond, puis la bulle ; le mien : à droite, à la couleur de l'établissement. */
.msg { display: flex; align-items: flex-end; gap: 10px; max-width: 64%; }
.bulle { min-width: 0; padding: 13px 22px; border-radius: 26px 26px 26px 8px; background: var(--surface); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
/* Ses propres messages sont des boutons : les toucher propose de les effacer. */
.bulle.moi { position: relative; align-self: flex-end; max-width: 64%; margin-right: 22px; border-radius: 26px 26px 8px 26px; background: var(--principal); color: var(--principal-texte); }
/* Le signe à côté de mes messages, dans la marge (en clair comme en sombre) : un rond gris à l'envoi, plein de la couleur de
   l'établissement quand tous ceux qui peuvent le lire l'ont lu. */
.signe { position: absolute; right: -22px; bottom: 3px; width: 17px; height: 17px; color: var(--encre-douce); }
.signe svg { display: block; width: 100%; height: 100%; }
.signe circle { fill: none; stroke: currentColor; stroke-width: 2; }
.signe.lu { color: var(--principal); }
.signe.lu circle { fill: currentColor; }
.signe.lu path { stroke: var(--principal-texte); }
/* Qui a lu mon message, à plusieurs : une petite case en bas de l'écran, au-dessus de la saisie. Quatre noms à la vue ; la
   suite défile au doigt dans la case, jamais la page. */
.lecteurs { position: relative; margin-bottom: 10px; padding: 10px 16px 6px; border-radius: 20px; background: var(--surface); }
.lecteurs p { color: var(--encre-douce); font-size: 0.85rem; font-weight: 600; }
.lecteurs ul { max-height: 10rem; overflow-y: auto; overscroll-behavior: contain; }
.lecteurs li { height: 2.5rem; line-height: 2.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lecteurs li + li { border-top: 1px solid var(--trait); }
.lecteurs .barre { position: absolute; right: 6px; width: 4px; border-radius: 2px; background: var(--contour); }
/* À la place d'un message effacé par son auteur : une bulle vide, qui le dit. */
.bulle.effacee, .bulle.moi.effacee { background: none; box-shadow: inset 0 0 0 1.5px var(--trait); color: var(--encre-douce); font-style: italic; }
.bulles .effacer { align-self: flex-end; margin: 0 0 6px; }
/* Sous le message d'un autre (ajout 15) : de quoi le signaler, à l'aplomb de sa bulle (après son rond). */
.bulles .signaler { align-self: flex-start; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: min(28rem, 84%); margin: 0 0 6px 46px; }
.bulles .signaler .aide { font-size: 0.9rem; }
.bulle.signalee { margin-bottom: 12px; } /* le texte signalé, dans sa fiche, au-dessus de qui l'a écrit et de qui l'a signalé */
.moment { align-self: center; margin: 8px 0 0; color: var(--encre-douce); font-size: 0.8rem; }
.moment.absents { margin-top: 0; text-align: center; } /* les messages qu'un appareil ne peut pas ouvrir, à leur place */
/* Les messages d'avant arrivent (remonter, commun.js) : un petit signe qui reste en haut de ce qui défile, le temps de la demande. */
.moment.charge { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 10px; background: var(--surface); box-shadow: 0 1px 4px rgb(0 0 0 / 0.12); }
.moment.charge::before { content: ''; width: 14px; height: 14px; border: 2px solid var(--trait); border-top-color: var(--principal); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .moment.charge::before { animation: tourner 0.8s linear infinite; } @keyframes tourner { to { transform: rotate(360deg); } } }
/* Dans un groupe : le nom de qui écrit, au-dessus de ses messages (à l'aplomb de la bulle, après son rond) ; en tête du fil, qui le lit. */
.auteur { margin: 0 0 -6px 64px; color: var(--encre-douce); font-size: 0.8rem; }
.groupe-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.groupe-tete .aide { flex: 1 1 14rem; font-size: 0.9rem; }
.saisie { display: flex; align-items: flex-end; gap: 10px; }
.saisie textarea { flex: 1; min-width: 0; min-height: 58px; max-height: 8.5rem; margin: 0; padding: 17px 26px; border-radius: 14px; resize: none; }
.saisie .rond { width: 58px; height: 58px; background: var(--principal); color: var(--principal-texte); }
/* ----- Les fichiers de la messagerie (3 décembre 2026) ----- */
/* Dans la saisie : le trombone, discret, devant le champ ; la barre de l'envoi, sur toute la largeur, au-dessus. */
.saisie { flex-wrap: wrap; }
.saisie progress { flex: 0 0 100%; }
.saisie .rond.joindre { background: var(--surface); color: var(--encre); }
progress { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--trait); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--trait); }
progress::-webkit-progress-value { background: var(--principal); }
progress::-moz-progress-bar { background: var(--principal); }
/* La carte d'un fichier, dans sa bulle : sa feuille, son nom, puis son type et sa taille. */
.carte-fichier { display: flex; align-items: center; gap: 12px; white-space: normal; }
.carte-fichier .ico { flex: none; }
.carte-fichier > span { display: grid; min-width: 0; }
.carte-fichier strong { font-weight: 600; }
.carte-fichier small { font-size: 0.85rem; }
/* Le fichier choisi, posé au-dessus du champ : il attend « Envoyer » ; sa croix le retire. Une seule ligne, pour ne pas pousser le champ. */
.saisie .a-joindre { flex: 0 0 100%; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--surface); }
.a-joindre .carte-fichier { flex: 1; min-width: 0; }
.a-joindre .carte-fichier > span { grid-template-columns: minmax(0, 1fr); }
.a-joindre :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-joindre img { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.saisie .a-joindre .rond { width: 44px; height: 44px; background: none; color: var(--encre); }
/* Sur un très petit téléphone (320 points), entre le trombone et « Envoyer » : « Votre message » tient sur sa ligne. */
@media (max-width: 359px) { .saisie textarea { padding-inline: 14px; } }
/* La fenêtre d'un fichier, par-dessus la conversation : son nom, ce qu'il est, puis l'image, ou de quoi l'ouvrir et l'enregistrer. */
.piece-tete { flex: none; display: flex; align-items: center; gap: 16px; padding: 30px 30px 0; }
.piece-tete > div { flex: 1; min-width: 0; }
.piece-tete h2 { overflow-wrap: anywhere; }
.piece-tete h2:focus { outline: none; } /* le titre reçoit le focus à l'ouverture, à la place de la croix */
.piece-tete p { color: var(--encre-douce); }
.piece-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 30px; }
.piece-corps img { display: block; max-width: 100%; max-height: 70dvh; margin: 0 auto; border-radius: 14px; object-fit: contain; }
.piece-corps .plein { margin-top: 0; }
.piece-pied { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0 30px calc(24px + env(safe-area-inset-bottom)); }
.piece-pied > * { margin-top: 0; }
.piece-pied:empty { display: none; }
.piece a { text-decoration: none; }
.piece a.second { color: var(--encre); }
@media (min-width: 761px) {
  /* Sur un ordinateur : au milieu de l'écran, large comme une photo, haute comme son contenu. */
  dialog.piece { inset: 0; margin: auto; width: min(46rem, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 32px); }
}
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) { dialog.piece[open] { animation: monter-du-bas 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); } }
@media (max-width: 760px) {
  .piece-tete { padding: 26px 16px 0 24px; }
  .piece-corps { padding: 16px 24px; }
  .piece-pied { padding: 0 20px calc(14px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .messagerie { display: block; }
  .messagerie > * { height: auto; }
  .messagerie .fil, .messagerie .membres { display: none; }
  .messagerie.vide .fil { display: flex; }
  .msg, .bulle.moi { max-width: 84%; }
}

/* La proposition d'activer les notifications (lot 5 du 2 décembre 2026) : une ligne en haut du premier écran, la question puis « Activer » et
   « Non merci » côte à côte ; à l'étroit (texte agrandi), les boutons passent dessous. */
.invite { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; padding: 8px 8px 8px 18px; border-radius: 18px; background: var(--panneau); }
.invite p { flex: 1 1 auto; font-weight: 600; }
.invite button { padding: 0 14px; }
.invite button:first-of-type { background: var(--principal); color: var(--principal-texte); }

/* ----- Le retour d'une action : un galet qui l'annonce, en haut au milieu, là où il n'y a rien à cacher (sur un téléphone,
   au-dessus des onglets). Quand on peut revenir en arrière, « Annuler » y reste cinq secondes, le temps d'un filet qui file. ----- */
#annonce {
  position: fixed; z-index: 45; left: 50%; top: 92px; display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; max-width: calc(100% - 24px);
  min-height: 56px; padding: 6px 26px; border-radius: 16px; background: var(--encre); color: var(--papier); font-weight: 600; text-align: center;
  box-shadow: 0 16px 40px -16px rgb(0 0 0 / 0.5); overflow: hidden;
  transform: translate(-50%, -12px); opacity: 0; visibility: hidden; transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s;
  pointer-events: none; /* il se lit, il ne se touche pas : un toucher passe à ce qu'il recouvre ; seul « Annuler » se touche */
}
#annonce.visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
#annonce.defaire { padding-right: 8px; }
#annonce button { flex: none; min-height: 44px; margin-left: 10px; padding: 0 18px; border-radius: 12px; background: var(--papier-20, #f3f6fe33); font-weight: 700; pointer-events: auto; }
#annonce.defaire::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--papier); opacity: 0.5; transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  #annonce.defaire.visible::after { animation: filer 5s linear forwards; }
  @keyframes filer { to { transform: scaleX(0); } }
}
@media (max-width: 760px) { #annonce { top: auto; bottom: calc(82px + env(safe-area-inset-bottom)); } }
dialog #annonce, dialog #annonce.visible { position: static; align-self: center; margin: 0 16px 8px; transform: none; }
dialog #annonce:not(.visible) { display: none; }

/* ----- « Bonjour » : la première connexion. L’équipe du logo, la pyramide de l’icône, se lève rang par rang (3 décembre 2026). ----- */
.bonjour { position: fixed; inset: 0; z-index: 20; display: grid; align-items: center; padding: 0 8vw; background: var(--papier); overflow: hidden; }
/* Deux pleins écrans ne se peignent pas à la fois. Pendant que « Bonjour » arrive (`.arrive`, une seconde et demie, voir bonjour dans
   commun.js), l'appli dessous attend. Ensuite elle se peint derrière, pendant qu'on lit : la sortie ne fait attendre aucune image.
   (Cachée jusqu'au toucher de « Passer », elle se peignait d'un coup : plus de 100 ms, mesuré le 24 nov. 2026.) Les boutons, eux,
   se touchent dès qu'ils paraissent (`.pret`) : touché pendant l'arrivée, le bouton reste enfoncé (`.pris`) et « Bonjour » part
   dès qu'elle est finie. */
body:has(> #bonjour.arrive) :is(header.barre, #vue) { visibility: hidden; }
.bonjour:not(.pret) .boutons { pointer-events: none; } /* pas encore parus : on ne touche pas ce qu'on ne voit pas */
.bonjour .pris { transform: scale(0.96); opacity: 0.7; }
.bonjour .logo { position: absolute; top: 40px; left: 56px; }
.bonjour .logo svg { display: block; height: 38px; width: auto; color: var(--logo-encre); }
.mot { position: relative; max-width: 48vw; }
.bonjour h1 { font: 750 clamp(3.6rem, 6.6vw, 7.5rem)/0.95 var(--chiffres); font-stretch: 85%; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.bonjour h1 span { display: block; }
.bonjour p { margin: 28px 0 44px; color: var(--encre-douce); font-size: 1.5rem; }
.bonjour .boutons { display: flex; align-items: center; gap: 14px; }
.bonjour .principal { min-height: 64px; padding: 0 38px; font-size: 1.2rem; }
/* Six couches de la taille de la pyramide ; rien ne paraît sous sa base (le sol), d'où ils se lèvent. */
.equipe { position: absolute; right: 6vw; bottom: 11vh; width: min(36vw, 70vh); aspect-ratio: 570 / 586; overflow: hidden; }
.equipe i { position: absolute; inset: 0; }
.equipe svg { display: block; width: 100%; height: 100%; }
/* La visite guidée : un halo sur la fonction, une petite flèche, une phrase. */
.visite { position: fixed; inset: 0; z-index: 30; }
.halo { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax rgb(4 9 16 / 0.64); }
.visite-bulle { position: fixed; width: min(23.75rem, calc(100vw - 32px)); padding: 26px 28px 22px; border-radius: 36px; background: var(--flottant); box-shadow: var(--ombre); }
.fleche { position: absolute; top: -54px; left: 50%; width: 24px; height: 40px; margin-left: -12px; color: #fff; }
.fleche svg { display: block; width: 24px; height: 40px; stroke-width: 3; }
.visite-bulle[data-cote="bas"] .fleche { top: auto; bottom: -54px; rotate: 180deg; }
.visite-bulle h2 { font-size: 1.6rem; }
.visite-bulle p { margin: 8px 0 20px; color: var(--encre-douce); font-size: 1.05rem; }
.pas { display: flex; gap: 6px; margin-bottom: 20px; }
.pas i { flex: 1; height: 6px; border-radius: 6px; background: var(--surface); }
.pas i.fait { background: var(--encre); }
.visite-bulle .boutons { display: flex; align-items: center; justify-content: space-between; }
.visite-bulle .discret { padding: 0 6px; }
/* « Me montrer » (guide « Aide », 2 décembre 2026) : la page reste touchable sous le halo ; seule la bulle prend les touchers. */
.visite.montre { pointer-events: none; }
.visite.montre[popover] { inset: 0; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; }
.visite.montre .visite-bulle { pointer-events: auto; }
.visite-bulle .boutons.montre { justify-content: flex-end; }
.faq .bouton.montrer { margin: 0 0 16px 16px; min-height: 44px; padding: 0 18px; }
@media (prefers-reduced-motion: no-preference) {
  /* Sans ressort : un rang qui dépasse en haut montrerait les jambes du rang de derrière. Le dernier est fini à 1,4 s. */
  .bonjour .equipe i { animation: lever 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: calc(var(--i) * 90ms + 150ms); }
  .bonjour h1 span, .bonjour p, .bonjour .boutons { animation: monter 0.7s var(--elan) backwards; animation-delay: calc(var(--i) * 120ms + 350ms); }
  .visite { animation: monter 0.4s backwards; }
  .fleche { animation: pointer 0.7s ease-in-out infinite alternate; }
  @keyframes lever { from { transform: translateY(100%); } }
  @keyframes monter { from { opacity: 0; transform: translateY(14px); } }
  @keyframes pointer { to { transform: translateY(-6px); } }
}
@media (max-width: 760px) {
  .bonjour { align-items: start; padding: 20vh 24px 0; }
  .bonjour .logo { top: 18px; left: 16px; }
  .bonjour .logo svg { height: 28px; }
  .mot { max-width: none; }
  .bonjour h1 { font-size: 3rem; }
  .bonjour p { margin: 16px 0 26px; font-size: 1.15rem; }
  .bonjour .boutons { flex-wrap: wrap; }
  .equipe { right: auto; left: 50%; bottom: 3vh; width: auto; height: 30vh; transform: translateX(-50%); }
}

/* ----- Avant d'entrer : se connecter, créer son compte, attendre la validation ----- */
.entree { display: flex; flex-direction: column; justify-content: center; min-height: calc(100dvh - 140px); }
.entree h1 { font-size: clamp(3rem, 16vw, 4.4rem); }
/* Le logo de la page d'accueil : son premier fût s'aligne sur le texte du dessous (le dessin garde une marge à gauche). */
.entree h1 svg { display: block; width: min(100%, 4.1em); height: auto; margin-left: -0.14em; color: var(--logo-encre); }
.entree > .rond.theme { align-self: center; margin-top: 12px; } /* le bouton jour / nuit, seul en bas : loin du logo */
.entree .aide { margin-top: 10px; }
.entree form { margin-top: 12px; }
.entree .plein { margin-top: 22px; }
/* « Rester connecté » : une case assez grande pour le doigt, sa phrase juste dessous. */
.case { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 14px; font-weight: 600; cursor: pointer; }
.case input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--principal); }
.entree .case + .aide { margin-top: 0; }
/* Le total d'heures du mois, sous le calendrier. */
.total { margin-top: 10px; }
/* « Mot de passe oublié ? » : un lien discret sous les boutons, pas un troisième bouton. */
.oubli { align-self: center; margin-top: 12px; background: none; color: var(--encre-douce); }
/* « Quitter cette entreprise » : discret, centré, à part sous les autres boutons (« Moi » et la page d'attente). */
.quitter { display: block; margin: 24px auto 0; }
/* La page « Vos données » : des phrases qui respirent, et un premier titre qui ne laisse pas de vide sous celui de la fenêtre. */
.donnee { margin-top: 8px; text-wrap: pretty; overflow-wrap: anywhere; } /* un lien très long (l'e-mail du poste d'essai) va à la ligne */
#feuille-corps > .titre-section:first-child { margin-top: 8px; }
.puces { list-style: disc; padding-left: 1.3em; } /* une liste des règles d'utilisation, à la première connexion */
.puces li { margin-top: 8px; text-wrap: pretty; }
.essai { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--trait); }
.essai .actions { margin-top: 10px; }
/* ----- Sur un ordinateur, avant d'entrer (29 novembre 2026) : la colonne de toujours à gauche, telle quelle ; à droite, la semaine d'une
   équipe d'exemple, dessinée (commun.js, vitrine), jusqu'aux bords de l'écran (Alexandre, 6 décembre 2026, « OUI »). Sous 960 pixels,
   la vitrine n'est pas là : sur un téléphone, rien ne change. ----- */
.vitrine { display: none; }
@media (min-width: 960px) {
  body[data-etat="dehors"] #vue { display: grid; grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); align-items: start; column-gap: clamp(40px, 5vw, 96px); max-width: none; padding: 0 0 0 clamp(32px, 4vw, 64px); }
  body[data-etat="dehors"] #vue > .entree { min-height: 100dvh; padding-block: 24px; }
  /* Sur un très grand écran, la semaine reste au milieu du panneau : 44rem au plus entre les marges. */
  .vitrine { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; gap: 28px; min-height: 100dvh; padding: clamp(32px, 4vw, 64px) max(clamp(32px, 4vw, 64px), calc((100% - 44rem) / 2)); background: var(--surface); container-type: inline-size; }
}
.v-titre { max-width: 22ch; font: 700 clamp(1.8rem, 2.6vw, 2.6rem)/1.1 var(--chiffres); letter-spacing: -0.02em; text-wrap: balance; }
.vitrine > .aide { max-width: 42ch; font-size: 1.05rem; }
.vitrine > .aide strong { color: var(--encre); }
.v-semaine { max-width: 44rem; padding: 24px; border-radius: 28px; background: var(--panneau); box-shadow: var(--ombre); }
.v-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; font: 650 1.15rem var(--chiffres); }
.v-grille { display: grid; grid-template-columns: auto repeat(7, minmax(0, 1fr)); align-items: center; gap: 8px 6px; }
.v-jour { color: var(--encre-douce); font: 600 0.8rem var(--chiffres); text-align: center; }
.v-qui { display: flex; align-items: center; gap: 10px; padding-right: 10px; font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.v-qui .avatar { --t: 32px; }
.v-poste { display: grid; place-items: center; height: 34px; border-radius: 10px; }
.v-poste.matin { background: var(--matin-f); color: var(--matin-t); }
.v-poste.journee { background: var(--journee-f); color: var(--journee-t); }
.v-poste.aprem { background: var(--aprem-f); color: var(--aprem-t); }
.v-poste.nuit { background: var(--nuit-f); color: var(--nuit-t); }
.v-poste.conge { background: repeating-linear-gradient(135deg, var(--hachure) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1px var(--trait); }
.v-legende { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; color: var(--encre-douce); font-size: 0.85rem; }
.v-legende li { display: flex; align-items: center; gap: 8px; }
.v-legende .v-poste { width: 22px; height: 22px; border-radius: 7px; }
@container (max-width: 34rem) { .v-qui > :last-child { display: none; } } /* un écran étroit : les initiales seules */
/* CGU, Mentions légales, RGPD : en bas de la page de connexion, comme sur le site ; chaque lien est assez haut pour un doigt. */
.documents { align-self: center; margin-top: 28px; color: var(--encre-douce); font-size: 0.875rem; text-align: center; }
.documents a { display: inline-block; padding: 6px 2px; color: inherit; text-underline-offset: 3px; }
.provisoire { margin: 16px 0 8px; padding: 18px; border-radius: 18px; background: var(--papier); font: 700 1.7rem/1.2 var(--chiffres); text-align: center; letter-spacing: 0.04em; -webkit-user-select: all; user-select: all; }

/* ----- Le chargement : des galets gris qui scintillent, jamais un rond qui tourne ; le titre et le menu sont déjà là. ----- */
.fantome { display: grid; gap: 14px; }
.fantome i { display: block; background: var(--surface); }
.fantome .panneau { display: grid; gap: 14px; }
.f-ligne { display: grid; grid-template-columns: 2.5rem 13rem repeat(7, minmax(0, 1fr)); gap: 0 12px; align-items: center; min-height: 4.75rem; }
@media (max-width: 760px) { .f-ligne { grid-template-columns: 2.5rem 1fr 7rem; } .f-ligne > :nth-child(n + 4) { display: none; } }
/* ----- L'ouverture : les lettres du logo roulent comme des galets, moins d'une seconde ; un toucher passe au travers. ----- */
.ouverture { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--papier); pointer-events: none; animation: partir 0.22s 0.75s forwards; }
.ouverture svg { width: min(420px, 60vw); height: auto; overflow: visible; color: var(--logo-encre); }
.ouverture .lettre { transform-box: fill-box; transform-origin: center; animation: rouler 0.55s var(--elan) backwards; animation-delay: calc(var(--i) * 40ms); }
@keyframes partir { to { opacity: 0; visibility: hidden; } }
@keyframes rouler { from { opacity: 0; transform: translateX(-160px) rotate(-200deg); } }
/* ----- L'arrivée sur un écran (commun.js, arriver) : ce qui s'y trouve se pose, l'un après l'autre, une fois. Court, et seulement
   pour qui n'a pas demandé moins d'animations. ----- */
@keyframes scintiller { to { background-position: -200% 0; } }
@keyframes poser { from { opacity: 0; transform: scale(0.88); } }
@keyframes glisser-vers { from { opacity: 0; transform: translateX(-12px); } }
@keyframes derouler { from { clip-path: inset(0 100% 0 0 round 14px); } to { clip-path: inset(0 0 0 0 round 14px); } }
@media (prefers-reduced-motion: no-preference) {
  .fantome i { background: linear-gradient(100deg, var(--surface) 35%, var(--lueur, var(--papier)) 50%, var(--surface) 65%) 0 0 / 200% 100%; animation: scintiller 1.3s linear infinite; }
  #vue.entre { animation: monter 0.45s var(--elan) backwards; }
  #vue.entre :is(.semaine, .frise, .jour-liste, .du-jour) .galet { animation: derouler 0.55s var(--elan) backwards; animation-delay: calc(var(--i, 0) * 35ms + 100ms); }
  #vue.entre :is(.qui, .liste .rangee) { animation: glisser-vers 0.5s var(--elan) backwards; animation-delay: calc(var(--i, 0) * 35ms + 60ms); }
  #vue.entre .chiffre { animation: poser 0.5s var(--elan) backwards; animation-delay: calc(var(--i, 0) * 70ms + 40ms); }
  #vue.entre :is(.personne, .note) { animation: poser 0.5s var(--elan) backwards; animation-delay: calc(var(--i, 0) * 40ms + 60ms); }
  #vue.entre :is(.msg, .bulle.moi) { animation: monter 0.4s var(--elan) backwards; animation-delay: 80ms; }
  /* L'un après l'autre : le rang de chacun parmi ses voisins. */
  #vue.entre :is(.chiffre, .personne, .note, li, tr):nth-child(2) { --i: 1; } #vue.entre :is(.chiffre, .personne, .note, li, tr):nth-child(3) { --i: 2; }
  #vue.entre :is(.chiffre, .personne, .note, li, tr):nth-child(4) { --i: 3; } #vue.entre :is(.chiffre, .personne, .note, li, tr):nth-child(5) { --i: 4; }
  #vue.entre :is(.personne, .note, li, tr):nth-child(6) { --i: 5; } #vue.entre :is(.personne, .note, li, tr):nth-child(7) { --i: 6; }
  #vue.entre :is(.personne, .note, li, tr):nth-child(8) { --i: 7; } #vue.entre :is(.personne, .note, li, tr):nth-child(9) { --i: 8; }
  #vue.entre :is(.personne, .note, li, tr):nth-child(10) { --i: 9; } #vue.entre :is(.personne, .note, li, tr):nth-child(11) { --i: 10; }
  #vue.entre :is(.personne, .note, li, tr):nth-child(n + 12) { --i: 11; }
}
/* « Désactiver les animations » (commun.js, reglerAnimations) : rien ne bouge. */
.fixe *, .fixe *::before, .fixe *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  button, .rangee, #annonce { transition: none; }
  button:active, .rangee:active, .grille .jour:active { transform: none; }
  .mois-defile { scroll-behavior: auto; }
}

/* Lot 3 « Planning » (1er décembre 2026) : le secteur d'un jour, l'agenda (réunions et formations), la feuille du jour chez le salarié.
   Des rectangles arrondis ; la couleur de l'établissement (le bleu du L d'office) pour l'agenda ; aucune icône de couleur. */
.galet small.secteur { font-weight: 650; }
.poste-du-jour .secteur { display: block; margin-top: 4px; font-weight: 650; }
.grille .jour .rdv { padding: 0 4px; border-radius: 4px; background: var(--principal); color: var(--principal-texte); font: 650 0.68rem/1.45 var(--texte); white-space: nowrap; }
.legende.agenda { flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.rdv-bloc { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 18px; box-shadow: inset 0 0 0 2px var(--principal); }
.rdv-bloc .ico { flex: none; margin-top: 2px; color: var(--principal); }
.rdv-bloc b { display: block; font-size: 1.05rem; }
.rdv-bloc span { color: var(--encre-douce); }
.rdv-bloc p { margin: 6px 0 0; }
.rdv-bloc + .rdv-bloc { margin-top: 10px; }
.feuille-du-jour .ico { grid-column: 3; color: var(--encre-douce); }
.feuille-nav { display: flex; justify-content: space-between; gap: 10px; }
/* La feuille d'un jour, lue à l'écran par le salarié (si le responsable la montre) : la même que celle du mur, aux couleurs de l'appli. */
/* Le jour est déjà sous le titre de la fenêtre : le titre de la feuille papier n'y est pas redit (relecteur du lot 3). */
.feuille-lue .impression h1 { display: none; }
.feuille-lue .moitie + .moitie { margin-top: 18px; }
.feuille-lue .moitie h2 { margin: 0 0 6px; font: 750 0.95rem var(--chiffres); text-transform: uppercase; letter-spacing: 0.05em; }
.feuille-lue table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.feuille-lue :is(th, td) { padding: 8px 6px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.feuille-lue thead th { color: var(--encre-douce); font-weight: 600; font-size: 0.82rem; }
.feuille-lue tbody th { font-weight: 650; }
.feuille-lue td:last-child { white-space: nowrap; }

/* Lot 4 (1er déc. 2026) : la double authentification. Le QR code noir sur blanc, en clair comme en sombre (il doit se lire) ; la clé et les
   codes de secours en gros caractères réguliers, à recopier sans se tromper ; le champ du code en grands chiffres espacés. Imprimer les codes :
   eux seuls sur la feuille. La maquette : maquette-pc/index.html, « Lot 4 ». */
.qr-bloc { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 20px; align-items: center; margin-bottom: 14px; }
.qr-image .qr { display: block; width: 172px; height: 172px; border-radius: 18px; box-shadow: 0 0 0 1px var(--trait); }
.qr-gestes { display: grid; gap: 8px; justify-items: start; }
.qr-gestes .aide, .plus-de-codes .aide { margin: 0; }
.qr-gestes .second { margin-top: 0; }
.cle-double { margin: 6px 0 8px; padding: 12px 16px; border-radius: 14px; background: var(--surface); font: 650 1.05rem/1.5 var(--chiffres); letter-spacing: 0.06em; word-spacing: 0.25em; overflow-wrap: anywhere; user-select: all; }
.codes-secours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.codes-secours li { padding: 10px 8px; border-radius: 14px; background: var(--surface); font: 650 0.98rem var(--chiffres); letter-spacing: 0.03em; text-align: center; }
.champ input.chiffres-code { max-width: 15rem; font: 650 1.6rem var(--chiffres); letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.plus-de-codes { margin-top: 18px; padding: 18px 20px; border-radius: 22px; background: var(--panneau); }
.plus-de-codes .titre-section { margin: 0 0 8px; }
@media (max-width: 760px) {
  .qr-bloc { grid-template-columns: minmax(0, 1fr); }
  .qr-gestes { order: -1; }
  .qr-image .qr { width: 150px; height: 150px; }
}
/* Sur un ordinateur (souris), « Ouvrir mon appli » ne mène à rien d'utile : le QR code et la clé suffisent (relecteur du lot 4). */
@media (hover: hover) and (pointer: fine) {
  .qr-gestes > .second, .qr-gestes > .second + .aide { display: none; }
}
.titre-codes { display: none; }
@media print {
  body.codes-seuls > #feuille { display: block !important; }
  body.codes-seuls * { visibility: hidden !important; }
  body.codes-seuls .codes-a-imprimer, body.codes-seuls .codes-a-imprimer * { visibility: visible !important; color: #000 !important; }
  body.codes-seuls .codes-a-imprimer { position: fixed; inset: 0 auto auto 0; width: 100%; }
  body.codes-seuls .titre-codes { display: block; margin: 0 0 12px; font-weight: 650; }
}
