/* Screens of the planning application, in the style of the clickable
   mock-up of 20/09/2026 (docs/reference/maquette-v7/index.html). Phone
   first: every rule is written for 375 px and widened after. Light theme
   only (decision of 27/09/2026). */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.7660bd9909fb.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-500-normal.b1c8a895f5fd.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-latin-600-normal.5a2ce7798732.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #F4F6F9; --surface: #FFFFFF; --surface-2: #F1F3F7; --surface-3: #E7EAF0;
  --border: #E3E7EE; --border-strong: #CBD2DE;
  --texte: #141A22; --muted: #5B6676; --muted-2: #8B95A4;
  --accent: #3355D1; --accent-ink: #2743A6; --accent-soft: #E9EEFC;
  --ok: #0E8A5F; --ok-soft: #E1F4EC;
  --warn: #AC7115; --warn-soft: #FCF1DC;
  --alert: #C93A31; --alert-soft: #FCE8E6;
  --info: #2A6BAE; --info-soft: #E6EFF8;
  /* Absences, as in the mock-up: background, edge, ink. */
  --cfa-bg: #FDEADF; --cfa-ed: #EDA679; --cfa-tx: #783A12;
  --cp-bg: #E3F1F7; --cp-ed: #6BAECB; --cp-tx: #0F4D63;
  --am-bg: #FBE3E1; --am-ed: #DD8880; --am-tx: #8C241C;
  --css-bg: #E8EAEF; --css-ed: #8A93A6; --css-tx: #3A4252;
  --ai-bg: #FBE5EF; --ai-ed: #D07FA8; --ai-tx: #7B2048;
  /* The ink of each shop's hours (decision of 26/09/2026): Euralille in
     black and V2 in red, as on Brahim's single sheet. */
  --encre-noir: #141A22; --encre-rouge: #C62828; --encre-bleu: #1F5FB8;
  --encre-vert: #1E7A46; --encre-violet: #6B3FA0;
  --shadow: 0 1px 2px rgba(20, 26, 34, .05), 0 10px 28px -20px rgba(20, 26, 34, .35);
  --fs: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fm: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --haut-barre: 56px;
  --haut-semaine: 61px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--texte);
  font: 15px/1.45 var(--fs); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.012em; }
h1 { font-size: 1.25rem; } h2 { font-size: 1rem; } h3 { font-size: .95rem; }
a { color: var(--accent-ink); }
.heures { font-family: var(--fm); font-variant-numeric: tabular-nums; }
.page { max-width: 760px; margin: 0 auto; padding: 12px 10px 32px; }
body.avec-onglets .page { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* ---------- top bar ---------- */
.barre-haut { position: sticky; top: 0; z-index: 50; background: var(--surface);
  border-bottom: 1px solid var(--border); }
.barre-haut-in { max-width: 1080px; margin: 0 auto; padding: 0 10px; min-height: var(--haut-barre);
  display: flex; align-items: center; gap: 10px; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none;
  text-decoration: none; }
.choix-boutique { flex: 1 1 auto; min-width: 0; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 0 8px; }
.choix-boutique select { border: 0; background: transparent; font-weight: 600; min-height: 44px;
  padding: 0; width: 100%; }
.titre-barre { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tabs: bottom on a phone, in the top bar on a computer ---------- */
.onglets { display: flex; gap: 3px; }
.onglets a { flex: 1; min-width: 0; min-height: 52px; display: grid; justify-items: center;
  align-content: center; gap: 2px; border-radius: 10px; color: var(--muted); font-size: 11px;
  font-weight: 600; text-decoration: none; padding: 4px 2px; }
.onglets a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.onglets a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.onglets-bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface);
  border-top: 1px solid var(--border); padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px)); }
.onglets-haut { display: none; }
@media (min-width: 761px) {
  .onglets-bas { display: none; }
  body.avec-onglets .page { padding-bottom: 32px; }
  .onglets-haut { display: flex; margin-left: auto; }
  .onglets-haut a { flex: none; grid-auto-flow: column; gap: 6px; font-size: 13px;
    min-height: 44px; padding: 0 12px; }
  .onglets-haut a svg { width: 18px; height: 18px; }
  .choix-boutique { flex: 0 1 280px; }
}

/* ---------- forms and buttons ---------- */
/* Inputs at 16 px: below that, iOS zooms in on focus. Touch targets 44 px. */
input, select, textarea { font: inherit; font-size: 16px; min-height: 44px; width: 100%;
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface); color: var(--texte); }
input[type="time"], input[type="date"] { font-family: var(--fm); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible,
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; margin: 12px 0 5px; }
.formulaire p { margin: 0; }
.helptext { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: var(--alert);
  font-size: 13px; font-weight: 600; }
.bouton, button { font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; min-width: 44px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--texte); display: inline-flex; align-items: center;
  justify-content: center; gap: 7px; text-decoration: none; cursor: pointer; }
.bouton:hover, button:hover { background: var(--surface-2); }
.bouton.principal { background: var(--accent); border-color: var(--accent); color: #fff;
  width: 100%; margin-top: 14px; }
.bouton.principal:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.bouton.large { width: 100%; }
.bouton-lien { border: 0; background: none; color: var(--accent-ink); text-decoration: underline;
  padding: 8px 6px; }
.danger { color: var(--alert); }
.icone-bouton { width: 44px; height: 44px; min-width: 44px; padding: 0; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  display: grid; place-items: center; font-size: 20px; line-height: 1; text-decoration: none;
  cursor: pointer; }

/* ---------- the administrator inside another account ---------- */
.bandeau-visite { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  padding: 8px 16px; background: var(--alert-soft); color: var(--alert); font-size: 14px; font-weight: 600; }

/* ---------- messages, chips, notes ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.message { padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: var(--info);
  font-weight: 600; font-size: 14px; }
.message-success { background: var(--ok-soft); color: var(--ok); }
.message-error { background: var(--alert-soft); color: var(--alert); }
.puce { display: inline-flex; align-items: center; border-radius: 7px; padding: 4px 9px;
  font-size: 12px; font-weight: 700; white-space: nowrap; }
.puce-ok { background: var(--ok-soft); color: var(--ok); }
.puce-accent { background: var(--accent-soft); color: var(--accent-ink); }
.puce-neutre { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.bandeau { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.note { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.note.danger { color: var(--alert); }
.trous-couverture { background: var(--alert-soft); color: var(--alert); border: 1px solid var(--alert);
  border-left-width: 3px; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin: 0 0 12px; }
.trous-couverture p { margin: 0; }
.trous-couverture ul { margin: 6px 0 0; padding-left: 18px; font-weight: 600; }
.vide { color: var(--muted); }

/* ---------- week bar ---------- */
.barre-semaine { position: sticky; top: var(--haut-barre); z-index: 45; background: var(--surface);
  border-bottom: 1px solid var(--border); }
.barre-semaine-in { max-width: 760px; margin: 0 auto; padding: 8px 10px; display: flex;
  align-items: center; gap: 8px; }
.etiquette-semaine { flex: 1; min-width: 0; min-height: 44px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 10px; padding: 0 8px; font-weight: 700;
  font-size: 14px; white-space: nowrap; }
/* Republish strip: stays under the week bar while scrolling, so a manager
   cannot scroll past it and forget to announce the changes. One thin line. */
.annonce-collante { position: sticky; top: calc(var(--haut-barre) + var(--haut-semaine)); z-index: 44;
  margin: -12px -10px 12px; }
.annonce-collante .bandeau-republier { display: flex; align-items: center; gap: 10px; margin: 0;
  border-radius: 0; border-width: 0 0 1px; border-left: 0; padding: 4px 10px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.annonce-collante .bandeau-republier p { flex: 1; min-width: 0; margin: 0; line-height: 1.25; }
.annonce-collante .bandeau-republier .bouton { padding: 0 16px; }
/* The draft week's strip (asked 17/11/2026): amber, not to be taken for "Republier". */
.annonce-collante .bandeau-brouillon { background: var(--warn-soft); color: var(--warn); }
/* A link, not a button in a form: undo the full width of .bouton.principal (seen on 17/11/2026). */
.annonce-collante .bandeau-brouillon .bouton { flex: none; width: auto; margin-top: 0; }
.outils-grille { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ligne-controles { flex: 1; justify-content: flex-start; background: var(--alert-soft);
  border-color: transparent; color: var(--alert); font-size: 13px; }
.ligne-controles u { font-weight: 800; }
.ligne-controles[aria-pressed="true"] { background: var(--alert); color: #fff; }
.menu-actions { position: relative; margin-left: auto; }
.menu-actions summary { list-style: none; }
.menu-actions summary::-webkit-details-marker { display: none; }
.menu-liste { position: absolute; right: 0; top: 50px; z-index: 40; width: min(300px, calc(100vw - 20px));
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: grid; gap: 4px; }
.menu-liste form { margin: 0; }
.menu-liste .bouton, .menu-liste button { width: 100%; justify-content: flex-start; border-color: transparent; }
/* The ⋮ of a card sits between the name and the total and opens just under
   itself. It keeps the 44 px touch target of every button (spec 7). */
.menu-carte { margin-left: 0; flex: none; }

/* ---------- week summary ---------- */
.resume { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px; }
.resume h1 { font-size: 16px; }
.resume h1 span { font-weight: 500; color: var(--muted); font-size: 13px; }
.resume p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
/* The strip of the week's days and their hours (mock-up of 19/10/2026). */
.bandeau-jours { list-style: none; padding: 0; margin: 10px 0 0; display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.jour-bandeau { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); padding: 5px 2px 6px; font: inherit; font-size: 11px;
  text-align: center; color: var(--texte); display: grid; gap: 1px; line-height: 1.25; }
button.jour-bandeau { cursor: pointer; }
.jour-bandeau .nom { font-weight: 700; }
/* The date under the day's name, with its month (spec of 17/11/2026). */
.date-jour { display: block; white-space: nowrap; }
.jour-bandeau .heures { font-family: var(--fm); font-size: 10px; color: var(--muted); }
.jour-bandeau .mention { font-weight: 700; color: var(--warn); font-size: 10px; }
.jour-bandeau.ferie { background: var(--warn-soft); border-color: #E6C27F; }
.jour-bandeau.exceptionnel { background: var(--ok-soft); border-color: #86CBAE; }
.jour-bandeau.exceptionnel .heures { color: var(--ok); font-weight: 600; }
.jour-bandeau.trou { background: var(--alert-soft); border-color: var(--alert); }
.jour-bandeau .mention-trou { color: var(--alert); }
.appel-paie { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px;
  padding: 12px; margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.appel-paie p { margin: 0; flex: 1 1 220px; font-weight: 600; color: var(--accent-ink); }
.appel-paie .bouton { display: inline-flex; align-items: center; gap: 8px; }
.appel-paie svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.avant-paie { background: var(--info-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px; font-size: 13px; }
.avant-paie summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.avant-paie p { margin: 6px 0 0; }
.avant-paie ul { margin: 4px 0 6px; padding-left: 18px; }
.ferie-a-decider { background: var(--warn-soft); color: var(--warn); }
.mention-ferie { color: var(--warn); font-weight: 700; margin: 2px 0 0; }
.aide-ouverture { color: var(--muted); font-size: 13px; }
.champs-heures { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.champs-heures label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.boutiques-cochees { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.boutiques-cochees legend { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.boutiques-cochees label { display: flex; align-items: center; gap: 8px; font-size: 14px;
  text-transform: none; letter-spacing: 0; color: var(--texte); font-weight: 500; }
.boutiques-cochees input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: none; }

/* ---------- one card per employee ---------- */
.carte { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; margin-bottom: 10px; }
.carte-tete { display: flex; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; }
.av-0 { background: #E9EEFC; color: #2743A6; } .av-1 { background: #E1F4EC; color: #0C5138; }
.av-2 { background: #FCF1DC; color: #6A5008; } .av-3 { background: #FBE5EF; color: #7B2048; }
.av-4 { background: #E9E7FA; color: #322876; } .av-5 { background: #E3F1F7; color: #0F4D63; }
.qui { flex: 1; min-width: 0; }
.qui h2 { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; }
/* Wraps instead of cutting (25/10/2026): an avenant line is the longest and
   its end, the avenant itself, is the part that matters. */
.qui p { margin: 2px 0 0; font-size: 12px; line-height: 1.35; color: var(--muted-2); }
.total { text-align: right; flex: none; font-family: var(--fm); font-variant-numeric: tabular-nums; }
.total b { display: block; font-size: 15px; font-weight: 600; }
.total span { display: block; font-size: 12px; font-weight: 500; }
.total .estimation { font-size: 11px; font-weight: 400; color: var(--muted); }
.ecart-nul { color: var(--muted-2); } .ecart-moins { color: var(--info); } .ecart-plus { color: var(--alert); }
.dont-ici, .dont-absences { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
/* The week's extra hours by pay rate (spec of 12/10/2026): yellow for 10 %,
   orange for 25 %, red for 50 %, in the mono figures of the totals. */
.tranches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; }
.tr-titre { color: var(--muted); margin-right: 2px; }
.tr { font-family: var(--fm); font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.tr b { font-weight: 600; }
.tr-10 { background: var(--warn-soft); border-color: #EBCB8E; color: #6A5008; }
.tr-25 { background: var(--cfa-bg); border-color: var(--cfa-ed); color: var(--cfa-tx); }
.tr-50 { background: var(--am-bg); border-color: var(--am-ed); color: var(--am-tx); }

/* ---------- the seven days ---------- */
.jours { list-style: none; padding: 0; margin: 10px 0 0; display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.case { width: 100%; min-width: 0; min-height: 64px; padding: 5px 1px 6px; border-radius: 9px;
  border: 1px solid var(--border); border-left-width: 3px; display: flex; flex-direction: column;
  align-items: center; gap: 2px; font-size: 11px; font-weight: 500; line-height: 1.25;
  background: var(--surface); color: var(--texte); }
.case:hover { background: var(--surface-2); }
.nom-jour { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; opacity: .75; }
.horaire { display: block; text-align: center; font-family: var(--fm); font-size: 10.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.libelle { font-size: 10.5px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.desactive { opacity: .55; text-decoration: line-through; }
.pause { display: block; font-size: 9.5px; text-align: center; opacity: .8; overflow-wrap: anywhere; }
.plus { margin: auto 0; font-size: 16px; color: var(--muted-2); }
.libre .case { background: var(--surface-2); border-left-color: var(--border); color: var(--muted-2); }
.encre-noir .case { border-left-color: var(--encre-noir); }
.encre-rouge .case { border-left-color: var(--encre-rouge); }
.encre-bleu .case { border-left-color: var(--encre-bleu); }
.encre-vert .case { border-left-color: var(--encre-vert); }
.encre-violet .case { border-left-color: var(--encre-violet); }
.couleur-noir { color: var(--encre-noir); } .couleur-rouge { color: var(--encre-rouge); }
.couleur-bleu { color: var(--encre-bleu); } .couleur-vert { color: var(--encre-vert); }
.couleur-violet { color: var(--encre-violet); }
.abs-formation_cfa .case { background: var(--cfa-bg); border-left-color: var(--cfa-ed); color: var(--cfa-tx); }
.abs-conge_paye .case { background: var(--cp-bg); border-left-color: var(--cp-ed); color: var(--cp-tx); }
.abs-arret_travail .case { background: var(--am-bg); border-left-color: var(--am-ed); color: var(--am-tx); }
.abs-conge_sans_solde .case, .abs-absence_autorisee_non_remuneree .case {
  background: var(--css-bg); border-left-color: var(--css-ed); color: var(--css-tx); }
.abs-absence_injustifiee .case { background: var(--ai-bg); border-left-color: var(--ai-ed); color: var(--ai-tx); }
/* An hour in two boxes, "-- : --", typed on the number keyboard. */
.heure-saisie { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 44px;
  padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); }
.heure-saisie:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.heure-saisie input { width: 3em; min-height: 44px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; text-align: center; font-family: var(--fm); font-size: 18px; }
.heure-saisie input:focus-visible { outline: none; background: var(--accent-soft); }
.heure-separateur { font-family: var(--fm); font-size: 18px; font-weight: 600; }
.heure-horloge-zone { position: relative; margin-left: auto; display: flex; }
.heure-horloge { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0;
  border-radius: 8px; background: transparent; color: var(--texte); cursor: pointer; }
.heure-horloge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.heure-horloge:hover { background: var(--surface-2); }
/* The phone's own time field, invisible, laid right over the clock icon:
   a tap on the icon is a tap on it, so the phone opens its own clock with
   no script involved (the script-opened picker failed on phones). */
.heure-picker { position: absolute; inset: 0; z-index: 1; width: 44px; height: 44px; min-height: 0;
  padding: 0; border: 0; opacity: 0; cursor: pointer; }

/* Choices as buttons side by side (absence on part of a day). */
.choix-segmente { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.choix-segmente-option { position: relative; flex: 1 1 0; display: flex; align-items: center;
  justify-content: center; min-height: 46px; padding: 8px 10px; margin: 0; text-align: center;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface);
  font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: normal; cursor: pointer; }
.choix-segmente-option input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
  margin: 0; opacity: 0; pointer-events: none; }
.choix-segmente-option:has(input:checked) { background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-ink); }
.choix-segmente-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.recap-absence { margin: 8px 0 0; padding: 8px 10px; border-radius: 9px; background: var(--surface-2);
  font-size: 14px; }

/* What the absence form shows, by the choices made: CSS only, so that a
   field being typed is never redrawn. */
.absence-champs .si-type-partiel, .absence-champs .si-partie,
.absence-champs .si-depart, .absence-champs .si-arrivee, .absence-champs .si-milieu { display: none; }
.absence-champs:has(option[value="absence_injustifiee"]:checked) .si-type-partiel,
.absence-champs:has(option[value="absence_autorisee_non_remuneree"]:checked) .si-type-partiel,
.absence-champs:has(input[name="absence-etendue"][value="partie"]:checked) .si-partie { display: block; }
.absence-champs:has(option[value="absence_injustifiee"]:checked):has(input[name="absence-etendue"][value="partie"]:checked) .si-journee,
.absence-champs:has(option[value="absence_autorisee_non_remuneree"]:checked):has(input[name="absence-etendue"][value="partie"]:checked) .si-journee { display: none; }
.absence-champs:has(input[name="absence-forme"][value="depart"]:checked) .si-depart,
.absence-champs:has(input[name="absence-forme"][value="arrivee"]:checked) .si-arrivee,
.absence-champs:has(input[name="absence-forme"][value="milieu"]:checked) .si-milieu { display: revert; }

/* The recovery day of a Sunday, asked only once "Récupéré" is chosen
   (spec of 05/11/2026). CSS only, as the absence form. */
.formulaire p:has(> input[name="jour_recuperation"]) { display: none; }
.formulaire:has(select[name="dimanche_recupere"] option[value="oui"]:checked)
  p:has(> input[name="jour_recuperation"]) { display: block; }
.abs-recuperation .case { background: var(--ok-soft); border-left-color: #86CBAE; color: #0C5138; }
.recup { display: block; font-size: 9.5px; font-weight: 700; text-align: center; color: var(--ok);
  overflow-wrap: anywhere; }
.recup.a-fixer { color: var(--warn); }

.retenue-partielle { display: inline-block; font-size: 11px; padding: 0 4px; border-radius: 4px; }
.retenue-partielle.abs-absence_injustifiee { background: var(--ai-bg); color: var(--ai-tx); }
.retenue-partielle.abs-absence_autorisee_non_remuneree { background: var(--css-bg); color: var(--css-tx); }
.repos .case { background: var(--surface); border: 1px dashed var(--border-strong);
  border-left: 3px solid var(--border-strong); color: var(--muted); }
.sans-contrat .case { border-color: var(--alert); }
.ferme .case { background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgb(0 0 0 / .05) 6px 12px); }
.filtre-alertes .carte:not(.avec-alertes) { display: none; }
@media (min-width: 700px) {
  .case { min-height: 80px; font-size: 13px; }
  .horaire { font-size: 12px; }
}

/* ---------- controls, as in the mock-up ---------- */
.alertes { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.alertes li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start;
  font-size: 13px; padding: 8px 10px; border-radius: 9px; }
.alertes li::before { content: "!"; width: 20px; height: 20px; border-radius: 6px; display: grid;
  place-items: center; font-size: 11px; font-weight: 800; }
.alerte-alerte { background: var(--alert-soft); color: var(--am-tx); font-weight: 600; }
.alerte-alerte::before { background: var(--alert); color: #fff; }
.alerte-information { background: var(--info-soft); color: var(--texte); }
.alerte-information::before { content: "i"; background: var(--info); color: #fff; }

/* ---------- folded blocks: hidden employees, legend ---------- */
.masques, .legende { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 0 12px; margin-bottom: 10px; }
.masques summary, .legende summary { min-height: 44px; display: flex; align-items: center;
  font-weight: 600; font-size: 13px; cursor: pointer; }
.masques ul { list-style: none; padding: 0 0 12px; margin: 0; display: grid; gap: 6px; }
.legende-liste { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0 0 12px; font-size: 12px; color: var(--muted); }
.legende-liste span { display: inline-flex; align-items: center; gap: 6px; }
.legende-liste i { width: 17px; height: 12px; border-radius: 4px; border-left: 3px solid; display: inline-block; }

/* ---------- the day sheet, sliding up from the bottom ---------- */
.feuille { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 640px;
  max-height: 92vh; border: 0; border-radius: 16px 16px 0 0; overflow-y: auto; background: var(--surface);
  color: var(--texte); padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.feuille::backdrop { background: rgb(16 19 24 / .52); }
.feuille-tete { position: sticky; top: 0; z-index: 2; background: var(--surface); display: flex;
  justify-content: space-between; align-items: center; gap: 8px; padding: 14px 0 10px;
  border-bottom: 1px solid var(--border); }
.feuille-tete p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.recap { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 11px; margin: 12px 0; }
.chiffres { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-family: var(--fm);
  font-size: 13px; color: var(--muted); }
.ecart { font-weight: 700; color: var(--ok); }
.ecart.negatif { color: var(--info); } .ecart.positif { color: var(--alert); }
.creneaux-du-jour { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.creneau-carte { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  border: 1px solid var(--border); border-left: 3px solid var(--encre-noir); border-radius: 10px; padding: 8px 10px; }
.creneau-carte .heures { flex: 1 1 100%; font-weight: 600; }
/* Who added or changed the shift, one line each (04/11/2026). */
.creneau-carte .auteur { flex: 1 1 100%; order: 1; margin: 0; font-size: 12px; }
.feuille-actions { display: grid; gap: 8px; margin-top: 16px; }
.feuille-actions > button, .feuille-actions > .bouton { width: 100%; }
.feuille-actions details { border: 1px solid var(--border-strong); border-radius: 10px; }
.feuille-actions summary { min-height: 44px; display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; }
.feuille-actions summary::-webkit-details-marker { display: none; }
.feuille-actions details[open] { padding: 0 12px 12px; }

/* ---------- lists: employees, account, alerts ---------- */
.liste-titre { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 700; margin: 16px 2px 6px; }
.liste { list-style: none; margin: 0 0 12px; padding: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ligne-salariee { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ligne-salariee:last-child { border-bottom: 0; }
.ligne-salariee .qui a { color: inherit; }
.heures-semaine { font-family: var(--fm); font-size: 13px; font-weight: 600; flex: none; }
.ligne-salariee [data-copier] { flex: 1 1 100%; }
.filtres { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; }
.filtres a { flex: none; }
.filtres a[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.bloc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.bloc h2 { margin-bottom: 6px; }
.bloc form { margin: 0; }

/* ---------- login ---------- */
.connexion { max-width: 400px; margin: 8vh auto 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 18px; box-shadow: var(--shadow); }
.connexion .logo { width: 44px; height: 44px; font-size: 22px; margin-bottom: 12px; }

/* ---------- the employee's own page ---------- */
.ma-semaine-tete { background: var(--accent); color: #fff; border-radius: 12px 12px 0 0; padding: 15px 16px 13px; }
.ma-semaine-tete h1 { font-size: 17px; }
.ma-semaine-tete p { margin: 2px 0 0; font-size: 13px; opacity: .9; }
.semaines-salariee { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-top: 0; padding: 8px 10px; }
.semaines-salariee .puce { font-size: 13px; padding: 6px 12px; }
.semaines-salariee + .ma-semaine, .semaines-salariee + .bandeau { border-top: 0; }
.semaine-equipe { margin: 24px 0 0; }
.semaine-equipe h2 { font-size: 17px; margin: 0 0 8px; }
.ma-semaine { list-style: none; margin: 0 0 12px; padding: 0; background: var(--surface);
  border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; }
.jour-salariee { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid var(--border); min-height: 56px; }
.jour-salariee:last-child { border-bottom: 0; }
.jour-salariee .date { text-align: center; }
.jour-salariee .date b { display: block; font-size: 15px; line-height: 1; white-space: nowrap; }
.jour-salariee .date span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.jour-salariee p { margin: 0; }
.jour-salariee .heures { font-size: 14px; font-weight: 600; }
/* Days already gone fade, today carries the accent: the rest of the week
   stands out (decision of 30/09/2026). */
.jour-salariee.jour-passe { opacity: .45; background: var(--surface-2); }
.jour-salariee.aujourdhui { box-shadow: inset 3px 0 0 var(--accent); }
.jour-salariee.aujourdhui .date b { color: var(--accent); }
.total-semaine { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 14px; margin: 0 0 12px; font-size: 14px; }
.total-semaine p { margin: 0; }
.total-semaine .heures-en-plus { margin-top: 4px; color: var(--accent-ink); }

/* The shop of a new shift, picked by hand among the group's shops. */
.choix-boutique-option { display: flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 8px 12px; margin: 0 0 8px; border: 1px solid var(--border); border-left: 4px solid currentColor;
  border-radius: 10px; font-weight: 600; background: var(--surface);
  font-size: 15px; text-transform: none; letter-spacing: normal; }
.choix-boutique-option:has(input:checked) { background: var(--accent-soft); border-color: var(--accent);
  border-left-color: currentColor; }
.choix-boutique-option input { width: 20px; height: 20px; margin: 0; }

/* ---------- the gerant's big table ---------- */
/* Wide by nature, it scrolls inside its frame so the page itself never
   scrolls sideways. */
.defilement { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.tableau { min-width: 720px; width: 100%; border-collapse: collapse; font-size: 13px; }
.tableau th, .tableau td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  padding: 7px 8px; vertical-align: top; }
.tableau thead th { background: var(--surface-2); font-size: 12px; text-align: left; }
.tableau td div { font-family: var(--fm); font-size: 12px; }

/* HTMX replaces the grid by inserting the new one above the old before
   removing it. Scroll anchoring would follow the old grid down, and the page
   would land at its bottom once the old grid is gone. app.js puts the edited
   card back in place instead. */
#grille { overflow-anchor: none; }

/* Paie du mois (spec of 10/10/2026): a row per employee on a wide screen,
   a card per employee on a phone. */
.paie-mois { align-items: center; }
.paie-prevus { background: var(--warn-soft); color: var(--warn); padding: .5rem .75rem; border-radius: 8px; }
.paie-entete, .paie-ligne > summary {
  display: grid;
  grid-template-columns: 1.6fr repeat(5, 1fr) 2fr .6fr;
  gap: .5rem;
  align-items: start;
}
.paie-entete { font-size: .8rem; font-weight: 600; color: var(--muted); padding: .5rem .75rem; }
.paie-ligne { background: var(--surface); border-bottom: 1px solid var(--border); }
.paie-ligne > summary { cursor: pointer; list-style: none; padding: .6rem .75rem; }
.paie-ligne > summary::-webkit-details-marker { display: none; }
.paie-nom { font-weight: 600; }
.paie-alerte > summary { border-left: 4px solid var(--warn); }
.paie-message { grid-column: 1 / -1; color: var(--warn); font-size: .85rem; }
.voir-detail { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-weight: 600; font-size: .9rem; min-height: 44px; }
.voir-detail .chevron { width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2.5; transition: transform .15s; }
details[open] .voir-detail .chevron { transform: rotate(180deg); }
details[open] .voir-detail .texte-ferme, details:not([open]) .voir-detail .texte-ouvert { display: none; }
.paie-detail { padding: 0 .75rem 1rem; }
.paie-detail .tranche { display: block; white-space: nowrap; }
.paie-detail table { border-collapse: collapse; }
.paie-detail th, .paie-detail td { padding: .25rem .75rem .25rem 0; text-align: left; }
@media (max-width: 760px) {
  .paie-entete { display: none; }
  .paie-ligne > summary { grid-template-columns: 1fr; }
  .paie-ligne > summary [data-col]:empty { display: none; }
  .paie-ligne > summary [data-col]::before { content: attr(data-col) " : "; color: var(--muted); }
  .paie-detail table { font-size: .85rem; }
  .paie-detail th, .paie-detail td { padding-right: .4rem; }
}

/* ---------- the month calendar of the week label (spec of 17/11/2026) ---------- */
.etiquette-semaine { gap: 6px; font: inherit; font-weight: 700; font-size: 14px; color: var(--accent-ink);
  background: var(--accent-soft); border-color: var(--accent); cursor: pointer; display: flex;
  justify-content: center; }
.icone-calendrier { width: 16px; height: 16px; flex: none; }
.puce-calendrier { gap: 6px; font: inherit; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.puce-calendrier.puce-neutre { border-color: var(--border); }
.feuille-calendrier .feuille-tete { margin-bottom: 10px; }
.cal-mois { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-mois strong { flex: 1; text-align: center; font-size: 16px; }
.cal-entete, .cal-ligne { display: grid; grid-template-columns: 48px repeat(7, minmax(0, 1fr));
  align-items: center; text-align: center; }
.cal-entete { font-size: 11px; color: var(--muted-2); font-weight: 600; padding: 2px 0 4px; }
.cal-entete span:first-child, .cal-numero { text-align: left; padding-left: 8px; }
.cal-semaines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cal-ligne { min-height: 44px; border-radius: 10px; background: var(--surface-2); color: var(--texte);
  text-decoration: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.cal-ligne:hover { background: var(--surface-3); }
.cal-numero { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cal-autre { color: var(--muted-2); }
.cal-ligne.vue { background: var(--accent); color: #fff; }
.cal-ligne.vue .cal-numero, .cal-ligne.vue .cal-autre { color: #DCE4FB; }
.cal-auj { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--texte); font-weight: 700; }
.cal-ligne.vue .cal-auj { border-color: #fff; }
.cal-publiee, .cal-point-legende { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); margin-left: 4px; vertical-align: middle; }
.cal-ligne.vue .cal-publiee { background: #fff; }
.cal-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin: 10px 2px 12px; }
.cal-legende > span { display: inline-flex; align-items: center; gap: 4px; }
.cal-auj-legende { width: 16px; height: 16px; }
.cal-point-legende { margin-left: 0; }
.cal-vue-legende { display: inline-block; width: 16px; height: 10px; border-radius: 3px; background: var(--accent); }
