/* Sereina — disposition de la référence de l'utilisateur (fenêtre pleine, sans cadre autour depuis le 27/10/2026, dock en bas,
   pilules, grille de cartes), palette de l'utilisateur : pétrole #0E3B40, framboise #C64A60, bleu-gris #7FA2AB,
   ardoise #3A4A56, mauve #9A5A7B, prune #7A4659. */

@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/schibsted-grotesk-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/schibsted-grotesk-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --petrole: #0e3b40; --framboise: #c64a60; --bleu-gris: #7fa2ab; --ardoise: #3a4a56; --mauve: #9a5a7b; --prune: #7a4659;
  --fond: #f2f5f6;
  --fenetre: rgba(244, 247, 248, 0.86);
  --fenetre-bord: rgba(255, 255, 255, 0.85);
  --carte: rgba(255, 255, 255, 0.82);
  --carte-bord: rgba(255, 255, 255, 0.95);
  --carte-ombre: 0 1px 2px rgba(14, 59, 64, 0.04), 0 10px 30px rgba(14, 59, 64, 0.05);
  --interne-bord: #e4eaeb;
  --ligne: #eaeff0;
  --piste: #e8edee;
  --champ: #f2f5f6;
  --survol: rgba(14, 59, 64, 0.045);
  --encre: #11201f;
  --encre-2: rgba(17, 32, 31, 0.64);
  --encre-3: rgba(17, 32, 31, 0.46);
  --sombre: #0e3b40;
  --sur-sombre: #ffffff;
  --accent: #2c6772;
  --rouge: #b03a51;
  --mauve-texte: #874868;
  --pastel-1: #f8e2e6; --pastel-2: #e3eef0; --pastel-3: #efe2ea; --pastel-4: #e6eaee; --pastel-5: #eee1e6;
  --interrupteur: #dfe5e7;
  --option: #ffffff;
  --dock: #10201f;
  --dock-icone: rgba(238, 244, 245, 0.86);
  --dock-actif: #f08da0;
  --halo: rgba(255, 255, 255, 0.62);
  --verre-popup: rgba(255, 255, 255, 0.52);
  --verre-popup-bord: rgba(255, 255, 255, 0.78);
  --verre-popup-champ: rgba(255, 255, 255, 0.55);
  --verre-popup-reflet: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --rayon: 22px;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.75 6 6.25l4.5-4.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --calendrier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='4' y='5.5' width='16' height='14.5' rx='2.5'/%3E%3Cpath d='M4 10h16M8.5 3.5v4M15.5 3.5v4'/%3E%3C/g%3E%3C/svg%3E");
  --horloge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.25'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="sombre"] {
  color-scheme: dark;
  --fond: #0f2225;
  --fenetre: rgba(12, 28, 31, 0.86);
  --fenetre-bord: rgba(255, 255, 255, 0.08);
  --carte: rgba(255, 255, 255, 0.055);
  --carte-bord: rgba(255, 255, 255, 0.07);
  --carte-ombre: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.18);
  --interne-bord: rgba(255, 255, 255, 0.09);
  --ligne: rgba(255, 255, 255, 0.07);
  --piste: rgba(255, 255, 255, 0.08);
  --champ: rgba(255, 255, 255, 0.06);
  --survol: rgba(255, 255, 255, 0.05);
  --encre: #eef4f5;
  --encre-2: rgba(226, 236, 239, 0.70);
  --encre-3: rgba(226, 236, 239, 0.46);
  --sombre: #8db0b8;
  --sur-sombre: #0e3b40;
  --accent: #9dbcc3;
  --rouge: #ec8a9b;
  --mauve-texte: #d19ab5;
  --pastel-1: rgba(198, 74, 96, 0.16); --pastel-2: rgba(127, 162, 171, 0.16); --pastel-3: rgba(154, 90, 123, 0.18); --pastel-4: rgba(58, 74, 86, 0.40); --pastel-5: rgba(122, 70, 89, 0.22);
  --interrupteur: rgba(255, 255, 255, 0.16);
  --option: #16303a;
  --dock: #0a1719;
  --halo: rgba(157, 188, 195, 0.40);
  --verre-popup: rgba(20, 42, 46, 0.55);
  --verre-popup-bord: rgba(255, 255, 255, 0.12);
  --verre-popup-champ: rgba(255, 255, 255, 0.07);
  --verre-popup-reflet: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* ---------- base */
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
html { background: var(--fond); accent-color: var(--sombre); scrollbar-color: var(--encre-3) transparent; }
body {
  margin: 0; overflow: hidden; color: var(--encre);
  font: 14.5px/1.5 "Schibsted Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; caret-color: var(--accent);
}
::selection { background: rgba(127, 162, 171, 0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
input, select { font: inherit; color: var(--encre); }
select option { background: var(--option); color: var(--encre); }

/* ---------- fenêtre : l'app occupe toute la fenêtre Windows, sans cadre autour */
.cadre { position: fixed; inset: 0; }
.fenetre {
  position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  background: var(--fond); overflow: hidden;
}

/* ---------- en-tête */
.haut { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 12px 22px 6px; }
.marque { display: inline-flex; align-items: baseline; gap: 2px; color: var(--encre); text-decoration: none; justify-self: start; }
.marque:hover { text-decoration: none; }
.marque-signe { width: 9px; height: 9px; border-radius: 50%; background: var(--framboise); margin-right: 5px; transform: translateY(-1px); }
.marque-nom { font-size: 22px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.marque-sous { font-size: 10px; font-weight: 600; letter-spacing: .02em; color: var(--encre-2); margin-left: 3px; }
.mois-pilules { display: flex; align-items: center; gap: 6px; }
.mois-liste { display: flex; gap: 6px; }
.pilule {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--interne-bord); background: var(--carte);
  font-size: 13px; font-weight: 500; color: var(--encre); cursor: pointer; white-space: nowrap;
  transition: background-color .2s ease-out, color .2s ease-out, border-color .2s ease-out, transform .12s ease-out;
}
.pilule:hover { border-color: var(--encre-3); }
.pilule:active { transform: scale(.97); }
.pilule.actif { background: var(--sombre); border-color: var(--sombre); color: var(--sur-sombre); }
.pas { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--interne-bord); background: var(--carte); color: var(--encre-2); display: grid; place-items: center; cursor: pointer; transition: transform .12s ease-out; }
.pas svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pas:active { transform: scale(.94); }
.pas:disabled { opacity: .35; cursor: default; transform: none; }
.haut-droite { display: flex; align-items: center; gap: 10px; justify-self: end; min-width: 0; }
.rond, .rond-petit {
  position: relative; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--interne-bord);
  background: var(--carte); color: var(--encre); cursor: pointer; flex: none; transition: transform .12s ease-out, background-color .15s ease-out;
}
.rond { width: 36px; height: 36px; }
.rond-petit { width: 30px; height: 30px; }
.rond svg, .rond-petit svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rond-petit svg { width: 14px; height: 14px; }
.rond:hover, .rond-petit:hover { background: var(--survol); }
.rond:active, .rond-petit:active { transform: scale(.94); }
.rond.tourne svg { animation: tourner 1s linear infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }
.point { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--framboise); box-shadow: 0 0 0 2px var(--carte); }
.profil { position: relative; display: flex; align-items: center; gap: 10px; padding-left: 4px; cursor: pointer; min-width: 0; }
.profil select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.monogramme { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--sur-sombre); background: linear-gradient(135deg, var(--framboise), var(--mauve)); }
.monogramme.image { background: #fff; border: 1px solid var(--interne-bord); overflow: hidden; }
.monogramme.image img { width: 64%; height: 64%; object-fit: contain; }
.profil-texte { display: grid; line-height: 1.25; min-width: 0; }
.profil-texte strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.profil-texte small { font-size: 12px; color: var(--encre-2); white-space: nowrap; }
.enregistrer-barre, .titre-compact { display: none; }

/* ---------- barre de menu (photo de l'utilisateur) : barre sombre, onglet actif soulevé dans une bulle,
   encoche creusée autour d'elle. Rien ne se redessine pendant le mouvement : la piste (qui porte l'encoche)
   glisse sous un cadre arrondi fixe et la bulle glisse au-dessus, en transform seulement. */
.rail {
  position: absolute; left: 50%; bottom: 14px; z-index: 8; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; height: 54px; padding: 0 12px;
}
.dock-fond { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 16px 28px -8px rgba(8, 24, 26, 0.34); }
.dock-piste {
  position: absolute; top: 0; bottom: 0; left: 0; width: 200%; background: var(--dock);
  -webkit-mask: radial-gradient(circle at 50% 0, transparent 29px, #000 30px);
  mask: radial-gradient(circle at 50% 0, transparent 29px, #000 30px);
}
.bulle-dock {
  position: absolute; top: -24px; left: 0; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--dock); color: var(--dock-actif);
  box-shadow: 0 0 0 5px var(--halo), 0 0 22px 8px var(--halo);
}
.dock-piste, .bulle-dock { will-change: transform; transition: transform .42s cubic-bezier(.22, 1, .36, 1); }
.rail.fige .dock-piste, .rail.fige .bulle-dock { transition: none; }
.bulle-icone { display: grid; place-items: center; }
.bulle-icone svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bulle-dock.pop .bulle-icone { animation: pop-icone .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop-icone { from { opacity: 0; transform: scale(.6); } }
.rail button { position: relative; width: 50px; height: 54px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--dock-icone); }
.rail .icone { display: grid; place-items: center; transition: opacity .18s ease-out, transform .18s ease-out; }
.rail svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail .libelle { display: none; }
.rail button:hover .icone { transform: translateY(-2px); color: #fff; }
.rail button:focus-visible { outline: 2px solid var(--dock-actif); outline-offset: -6px; border-radius: 14px; }
.rail button.actif .icone { opacity: 0; transform: translateY(6px); }

/* ---------- contenu (défile dans la fenêtre) */
main { grid-column: 1; grid-row: 2; overflow-y: auto; overflow-x: hidden; padding: 2px 22px 84px; }
.onglet { display: none; }
.onglet.actif { display: block; }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 12px; }
.entete > div:first-child { display: flex; flex-direction: column-reverse; gap: 4px; }
h1 { margin: 0; font-size: clamp(25px, 2.3vw, 32px); line-height: 1.1; font-weight: 500; letter-spacing: -0.03em; }
.sous-titre { margin: 0; font-size: 13.5px; color: var(--encre-2); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions.fin { justify-content: flex-end; }
.titre-groupe { margin: 22px 4px 10px; font-size: 16px; font-weight: 500; letter-spacing: -0.015em; display: flex; align-items: baseline; gap: 8px; }
.compte { color: var(--mauve-texte); font-weight: 600; }
.pied { margin: 10px 18px 0; font-size: 12.5px; color: var(--encre-2); max-width: 75ch; }
.bienvenue { max-width: 560px; margin: 14vh auto 0; text-align: center; }
.bienvenue h1 { font-size: 48px; }
.bienvenue .sous-titre { margin: 14px auto 28px; }
body.sans-societe .avec-societe { display: none; }
body.sans-societe main { grid-column: 1 / -1; }

/* recherche (pilule comme la référence) */
.recherche { display: flex; align-items: center; gap: 9px; height: 38px; min-width: 260px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--interne-bord); background: var(--carte); color: var(--encre-3); }
.recherche svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; flex: none; }
.recherche input { border: 0; background: none; outline: none; width: 100%; font-size: 13.5px; color: var(--encre); }
.recherche:focus-within { border-color: var(--accent); }

/* ---------- cartes */
.carte, .surface, .groupe, .liste { background: var(--carte); border: 1px solid var(--carte-bord); border-radius: var(--rayon); box-shadow: var(--carte-ombre); }
.carte { padding: 14px 16px 16px; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.carte > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex: none; }
.carte h2 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.carte-actions { display: flex; gap: 8px; }
.liste { overflow: hidden; }
.defile { overflow-x: auto; }
.groupe.interieur { padding: 16px 18px; }

/* ---------- grille du tableau de bord (comme la référence) */
#tableau.actif { display: flex; flex-direction: column; height: 100%; }  /* tient dans l'écran : la grille partage la hauteur restante */
.bento { flex: 1; min-height: 0; display: grid; gap: 14px; grid-template-columns: minmax(232px, 1fr) minmax(0, 1.06fr) minmax(0, 1.02fr) minmax(232px, 1fr); grid-template-rows: minmax(190px, 1.12fr) minmax(165px, 1fr); grid-template-areas: "verif meilleur masse exc" "verif barres barres direct"; }
.bento > .carte { overflow: hidden; }
#tableau [data-reste] { flex: 1 1 0; min-height: 0; overflow: hidden; contain: size; align-content: start; }  /* ce qui dépasse devient « +N » */
.carte > header .reste { margin-left: auto; height: 24px; padding: 0 9px; border: 0; border-radius: 999px; background: var(--champ); font-size: 12px; font-weight: 600; color: var(--encre-2); cursor: pointer; font-variant-numeric: tabular-nums; }
.carte > header .reste:hover { color: var(--encre); }
.b-verif { grid-area: verif; }
.b-meilleur { grid-area: meilleur; }
.b-masse { grid-area: masse; }
.b-barres { grid-area: barres; }
.b-exc { grid-area: exc; }
.b-direct { grid-area: direct; }
.pilules-mini { display: flex; gap: 6px; margin-bottom: 10px; flex: none; }
.pilules-mini .pilule { height: 28px; padding: 0 12px; font-size: 12.5px; }
.pilules-mini .nb { margin-left: 4px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .7; }
.pilules-mini .pilule.actif .nb { opacity: .85; }
.b-verif { min-height: 0; }
.cartes-pastel { display: grid; gap: 6px; }
.pastel { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-areas: "av nom" "av desc"; column-gap: 9px; row-gap: 1px; align-items: center; padding: 7px 10px 7px 8px; border-radius: 12px; background: var(--pastel-1); cursor: pointer; text-align: left; border: 0; width: 100%; transition: transform .15s ease-out; }
.pastel:hover { transform: translateX(2px); }
.pastel:nth-child(5n+2) { background: var(--pastel-2); }
.pastel:nth-child(5n+3) { background: var(--pastel-3); }
.pastel:nth-child(5n+4) { background: var(--pastel-4); }
.pastel:nth-child(5n+5) { background: var(--pastel-5); }
.pastel .initiales { grid-area: av; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.pastel strong { grid-area: nom; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pastel .desc { grid-area: desc; font-size: 11.5px; color: var(--encre-2); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pastel .desc b { font-weight: 600; color: var(--encre); font-variant-numeric: tabular-nums; }
.pastel .desc b.action-txt { color: var(--rouge); }

/* meilleure assiduité */
.meilleur { display: grid; align-content: start; gap: 9px; flex: 1; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); }
.meilleur-une { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px 9px 10px; border-radius: 14px; background: var(--pastel-2); }
.meilleur-une .initiales { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
.meilleur-nom { display: grid; min-width: 0; }
.meilleur-nom strong { font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meilleur-nom small { font-size: 11.5px; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.medaille { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sombre); color: var(--sur-sombre); font-size: 12px; font-weight: 700; }
.meilleur-suite { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 6px; overflow: hidden; }
.meilleur-suite li { display: grid; grid-template-columns: 16px 26px minmax(0, 1fr); grid-template-areas: "rang av nom" "rang av sous"; column-gap: 8px; row-gap: 1px; align-items: center; padding: 6px 10px 6px 8px; border-radius: 12px; border: 1px solid var(--interne-bord); }
.meilleur-suite .rang { grid-area: rang; font-size: 12px; font-weight: 700; color: var(--encre-3); text-align: center; font-variant-numeric: tabular-nums; }
.meilleur-suite .initiales { grid-area: av; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.meilleur-suite strong { grid-area: nom; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meilleur-suite small { grid-area: sous; font-size: 11.5px; color: var(--encre-2); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* masse salariale : net, cotisations, IR, charges patronales, coût employeur */
.masse { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 7px; flex: 1; min-height: 0; }
.masse-tete { display: grid; gap: 1px; }
.masse-tete span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--encre-2); }
.masse-tete b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.masse-tete b small, .masse-total small { font-size: 12px; font-weight: 500; color: var(--encre-2); }
.masse-barre { display: flex; gap: 2px; height: 9px; border-radius: 999px; overflow: hidden; }
.masse-barre i { min-width: 3px; transform-origin: left; }
.dessin .masse-barre i { animation: pousser .6s cubic-bezier(.2, .8, .2, 1) both; }
.masse i { display: inline-block; }
.masse-lignes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; margin: 0; }
.masse-lignes div { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; }
.masse-lignes dt { flex: 1 1 auto; min-width: 0; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.masse-lignes dd { flex: none; margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.masse-lignes dt i, .masse-tete span i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.masse-lignes dt i { margin-right: 7px; vertical-align: 1px; }
.masse-lignes .masse-total { padding-top: 5px; border-top: 1px solid var(--interne-bord); font-size: 13.5px; }
.masse-total dt { color: var(--encre); font-weight: 600; }
.masse-total dd { font-weight: 600; }
.m-net { background: var(--sombre); }
.m-avance { background: var(--prune); }
.m-cotis { background: var(--bleu-gris); }
.m-ir { background: var(--mauve); }
.m-patronal { background: var(--framboise); }

/* barres rayées */
.barres { display: grid; gap: 11px; }
.barre-ligne { display: grid; gap: 5px; }
.barre-ligne header { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.barre-ligne header span:last-child { color: var(--encre-2); white-space: nowrap; }
.barre-ligne header b { color: var(--rouge); font-weight: 600; }
.piste { height: 13px; border-radius: 999px; background: var(--piste); overflow: hidden; }
.remplissage { height: 100%; border-radius: 999px; transform-origin: left; background-image: repeating-linear-gradient(-55deg, rgba(255, 255, 255, .22) 0 3px, transparent 3px 8px); }
.dessin .remplissage { animation: pousser .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pousser { from { transform: scaleX(0); } }

/* barres du tableau de bord : une ligne par salarié (nom, barre, détail, montant) */
.barre-mini { display: grid; grid-template-columns: minmax(84px, 9.5em) minmax(48px, 1fr) auto minmax(72px, auto); align-items: center; gap: 12px; font-size: 12.5px; }
.barres:has(.barre-mini) { gap: 9px; }
.barre-mini .piste { height: 10px; }
.barre-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-info { font-size: 11.5px; color: var(--encre-2); white-space: nowrap; }
.barre-mini > b { text-align: right; color: var(--rouge); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barre-mini > b.neutre { color: var(--encre); }

/* lignes compactes du tableau de bord (exceptions récentes, absences) */
.listes-mini { display: grid; gap: 6px; }
.ligne-mini { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas: "marque nom nom" "marque sous fin"; column-gap: 9px; row-gap: 1px; align-items: center; width: 100%; padding: 7px 10px 7px 8px; border-radius: 12px; border: 1px solid var(--interne-bord); background: var(--carte); text-align: left; cursor: pointer; transition: border-color .15s ease-out; }
.ligne-mini:hover { border-color: var(--encre-3); }
.ligne-mini > .initiales { grid-area: marque; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.ligne-mini > .point { grid-area: marque; justify-self: center; width: 9px; height: 9px; border-radius: 50%; }
.ligne-mini strong { grid-area: nom; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-mini .fin { grid-area: fin; font-size: 11.5px; color: var(--encre-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ligne-mini .mini-bouton { grid-area: fin; height: 20px; padding: 0 8px; font-size: 11px; }
.ligne-mini .sous { grid-area: sous; display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 11.5px; color: var(--encre-2); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-mini .clip { display: inline-grid; color: var(--encre-2); }
.ligne-mini .clip svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; transform: rotate(-45deg); }
.ligne-mini:disabled, .pastel:disabled { cursor: default; }

/* en direct sur le tableau de bord */
.b-direct .titre-direct { display: inline-flex; align-items: center; gap: 9px; }
.b-direct[data-etat="connecte"] .point-direct { background: var(--framboise); }
.b-direct[data-etat="connecte"] .point-direct::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--framboise); animation: pouls 2.2s ease-out infinite; }
.b-direct[data-etat="connexion"] .point-direct { background: var(--bleu-gris); }
.b-direct[data-etat="erreur"] .point-direct { background: var(--mauve); }
.tb-direct-etat { display: grid; gap: 7px; margin-bottom: 8px; flex: none; }
.tb-statut { font-size: 12px; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-direct[data-etat="erreur"] .tb-statut { color: var(--rouge); }
.tb-compteurs { display: flex; flex-wrap: wrap; gap: 5px; }
.tb-compteurs span { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--champ); font-size: 11.5px; color: var(--encre-2); white-space: nowrap; }
.tb-compteurs b { color: var(--encre); font-weight: 600; font-variant-numeric: tabular-nums; }
.fil-mini-liste { display: grid; gap: 6px; }
.fil-mini { display: grid; grid-template-columns: 40px 26px minmax(0, 1fr); grid-template-areas: "heure av nom" "heure av sous"; column-gap: 8px; row-gap: 1px; align-items: center; padding: 6px 10px 6px 9px; border-radius: 12px; border: 1px solid var(--interne-bord); }
.fil-mini time { grid-area: heure; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fil-mini .initiales { grid-area: av; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.fil-mini strong { grid-area: nom; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fil-mini small { grid-area: sous; font-size: 11.5px; color: var(--encre-2); line-height: 1.35; }
.fil-mini.nouveau { animation: fil-nouveau 2.4s ease-out; }
@keyframes fil-nouveau { from { background: var(--pastel-2); } }

/* cartes internes (exceptions récentes, absences) */
.internes { display: grid; gap: 8px; }
.interne .entete-interne { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--encre-2); }
.interne .corps-interne { grid-column: 1 / -1; min-width: 0; }
.interne { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--interne-bord); background: var(--carte); text-align: left; cursor: pointer; width: 100%; transition: border-color .15s ease-out; }
.interne:hover { border-color: var(--encre-3); }
.interne .petit { font-size: 11.5px; color: var(--encre-2); }
.interne strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.interne .quand { display: grid; gap: 2px; }
.interne .quand b { font-size: 13px; font-weight: 600; }
.interne .type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--encre-2); }
.interne .type i { width: 8px; height: 8px; border-radius: 50%; }
.interne svg.fleche-coin { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; color: var(--encre-2); }
.interne .initiales { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }
.interne .texte { font-size: 12px; color: var(--encre-2); line-height: 1.4; }
.mini-bouton { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--champ); font-size: 12px; font-weight: 600; color: var(--encre); }
.lien-fleche { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; flex: none; border: 0; background: none; padding: 0; font-size: 13.5px; font-weight: 500; color: var(--encre); cursor: pointer; align-self: flex-start; }
.lien-fleche:hover { color: var(--accent); }

/* ---------- boutons */
.bouton, .bouton-teinte, .bouton-texte { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border: 0; cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap; border-radius: 999px; transition: transform .12s ease-out, background-color .15s ease-out, opacity .15s; }
.bouton { background: var(--sombre); color: var(--sur-sombre); padding: 0 20px; }
.bouton:hover { filter: brightness(1.12); }
.bouton-teinte { background: var(--carte); color: var(--encre); padding: 0 18px; border: 1px solid var(--interne-bord); }
.bouton-teinte:hover { border-color: var(--encre-3); }
.bouton-texte { background: none; color: var(--accent); padding: 0 12px; }
.bouton-texte:hover { background: var(--survol); }
.bouton-texte.danger { color: var(--rouge); }
.bouton:active, .bouton-teinte:active, .bouton-texte:active { transform: scale(.97); }
.bouton:disabled, .bouton-teinte:disabled, .bouton-texte:disabled { opacity: .4; cursor: default; transform: none; filter: none; }
.grand { height: 48px; padding: 0 28px; font-size: 15.5px; }
a, .lien-accent { color: var(--accent); font-weight: 500; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lien { border: 0; background: none; padding: 0; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- réglages (lignes libellé → valeur) */
.groupe .champ { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 1.35fr); align-items: center; gap: 14px; min-height: 50px; padding: 7px 18px; position: relative; font-size: 14px; }
.groupe > .champ:not(:first-child), .contenu-groupe > .champ, .groupe > .contenu-groupe:not(:first-child) > .champ:first-child { border-top: 1px solid var(--ligne); }
.champ > input:not([type="checkbox"]), .champ > select, .unite input, .pauses input, .ajout-ferie input, .saisie input, .saisie-montants input, .ajout-colonne input, .ajout-colonne select, .en-ligne input {
  width: 100%; border: 1px solid transparent; border-radius: 12px; background: var(--champ); padding: 9px 12px; font-size: 14.5px; transition: border-color .15s ease-out;
}
.champ > input:focus, .champ > select:focus, .unite input:focus, .saisie input:focus, .saisie-montants input:focus, .pauses input:focus, dialog input:focus, dialog select:focus { outline: none; border-color: var(--accent); }
.champ > select, dialog select, .menu select { appearance: none; -webkit-appearance: none; padding-right: 34px !important; }
.champ:has(> select)::after, .menu::after, dialog label:has(> select)::after { content: ""; position: absolute; width: 10px; height: 7px; pointer-events: none; background: var(--encre-2); -webkit-mask: var(--chevron) center / contain no-repeat; mask: var(--chevron) center / contain no-repeat; }
.champ:has(> select)::after { right: 32px; top: 50%; margin-top: -3px; }
.unite { display: flex; align-items: center; gap: 8px; color: var(--encre-2); }
.champ > input[type="checkbox"], .champ > .segment, .champ > button, .champ > span:last-child:not(.unite) { justify-self: end; }
.resultat-test { color: var(--encre-2); font-size: 13.5px; }
.resultat-test.ok { color: var(--accent); }
.resultat-test.ko { color: var(--rouge); }
.sous-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 6px 0; }
.en-ligne { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--encre-2); }
.en-ligne input { width: 150px; }
input::-webkit-calendar-picker-indicator { width: 16px; height: 16px; cursor: pointer; opacity: 1; background: var(--encre-2); -webkit-mask: var(--calendrier) center / contain no-repeat; mask: var(--calendrier) center / contain no-repeat; }
input[type="time"]::-webkit-calendar-picker-indicator { -webkit-mask-image: var(--horloge); mask-image: var(--horloge); }
input[role="switch"] { appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0; cursor: pointer; width: 48px; height: 28px; border-radius: 999px; background: var(--interrupteur); transition: background-color .2s ease-out; }
input[role="switch"]::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .25s cubic-bezier(.2, .9, .3, 1); }
input[role="switch"]:checked { background: var(--sombre); }
input[role="switch"]:checked::before { transform: translateX(20px); }
.segment { display: inline-flex; gap: 4px; }
.segment button { height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--interne-bord); background: var(--carte); font-size: 13px; font-weight: 500; cursor: pointer; transition: background-color .2s ease-out, color .2s ease-out; }
.segment button.actif { background: var(--sombre); border-color: var(--sombre); color: var(--sur-sombre); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--interne-bord); border-radius: 999px; background: var(--carte); font-size: 13.5px; font-weight: 500; cursor: pointer; user-select: none; transition: background-color .15s ease-out; }
.puce input { position: absolute; opacity: 0; pointer-events: none; }
.puce:has(input:checked) { background: var(--sombre); border-color: var(--sombre); color: var(--sur-sombre); }
.puce:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.puce button { border: 0; background: none; padding: 0; margin-right: -6px; width: 20px; height: 20px; display: grid; place-items: center; color: var(--encre-2); cursor: pointer; border-radius: 50%; }
.puce button svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ajout-ferie { display: flex; gap: 8px; margin-top: 14px; }
.ajout-ferie input { width: auto; }
.pauses { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.pauses label { display: grid; gap: 6px; font-size: 12px; color: var(--encre-2); }
.logos { margin-top: 12px; }
.vignette { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 16px; padding: 12px 20px; }
.vignette + .vignette { border-top: 1px solid var(--ligne); }
.apercu { width: 100px; height: 54px; padding: 4px; border-radius: 12px; background: #fff; border: 1px solid var(--interne-bord); display: grid; place-items: center; overflow: hidden; }
.apercu.carre { width: 54px; }
.apercu img { display: none; max-width: 86%; max-height: 78%; }
.apercu.plein img { display: block; }
.apercu.plein span { display: none; }
.apercu span { font-size: 11px; color: #4a5a5e; }
.vignette-texte { display: grid; gap: 2px; }
.vignette-texte strong { font-weight: 600; }
.vignette-texte span { font-size: 12.5px; color: var(--encre-2); }

/* ---------- tableaux */
table { width: 100%; border-collapse: collapse; }
.donnees { font-size: 13.5px; }
.donnees th, .saisie th, table.jours th { text-align: left; font-size: 12px; font-weight: 500; color: var(--encre-3); white-space: nowrap; border-bottom: 1px solid var(--ligne); }
.donnees th, .saisie th { padding: 16px 12px 10px; }
.donnees td { padding: 10px 12px; border-bottom: 1px solid var(--ligne); white-space: nowrap; vertical-align: middle; }
.donnees tr > :first-child { padding-left: 20px; }
.donnees tr > :last-child { padding-right: 20px; }
.donnees tbody tr:last-child > td { border-bottom: 0; }
.donnees tfoot td { border-top: 1px solid var(--interne-bord); border-bottom: 0; font-weight: 600; }
.num { text-align: right !important; }
.fort { font-weight: 600; }
.long { white-space: normal !important; min-width: 220px; }
.rouge { color: var(--rouge); }
.orange { color: var(--mauve-texte); }
.vert { color: var(--accent); }
.secondaire { color: var(--encre-2); }
.nom { display: grid; gap: 2px; }
.nom strong { font-size: 14.5px; font-weight: 500; }
.nom span { font-size: 12.5px; color: var(--encre-2); }
tr.salarie { cursor: pointer; }
tr.salarie:hover > td { background: var(--survol); }
tr.salarie:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chevron { display: inline-block; width: 7px; height: 7px; margin: 0 10px 2px 0; border: solid var(--encre-3); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .2s ease-out; }
tr.ouvert .chevron { transform: rotate(45deg); }
tr.detail > td { padding: 0 20px 18px 40px; background: var(--champ); white-space: normal; }
table.jours { font-size: 13.5px; }
table.jours th { padding: 12px 8px 8px; }
table.jours td { padding: 8px; border-bottom: 1px solid var(--ligne); }
table.jours tbody tr:last-child td { border-bottom: 0; }
tr.absent > td { background: rgba(198, 74, 96, 0.08); }
tr.repos > td { color: var(--encre-3); }
.detail .pied { margin: 12px 0 0; }
.saisie { font-size: 13.5px; }
.saisie td { padding: 6px 5px; }
.saisie tr > :first-child { padding-left: 14px; }
.saisie input { padding: 8px 10px; font-size: 13.5px; border-radius: 10px; }
.etiquette-info { font-size: 12px; color: var(--encre-2); white-space: nowrap; }
.saisie-montants input { width: 116px; padding: 8px 10px; text-align: right; border-radius: 10px; }
.ajout-colonne { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.ajout-colonne input { width: 280px; background: var(--carte); border-color: var(--interne-bord); }
.menu { position: relative; display: inline-flex; }
.menu::after { right: 14px; top: 50%; margin-top: -3px; }
.menu select { background: var(--carte); border: 1px solid var(--interne-bord); border-radius: 999px; padding: 9px 14px; }

/* liste « À vérifier » de la page Pointage */
.ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 11px 14px 11px 18px; }
.ligne + .ligne { border-top: 1px solid var(--ligne); }
.ligne-texte { display: grid; gap: 3px; min-width: 0; }
.ligne-titre { font-weight: 500; font-size: 14px; }
.ligne-sous { font-size: 13px; color: var(--encre-2); }
.ligne-montant { color: var(--rouge); font-weight: 600; }
.ligne-salarie { cursor: pointer; grid-template-columns: minmax(0, 1fr) auto 20px; transition: background-color .15s ease-out; }
.ligne-salarie:hover { background: var(--survol); }
.ligne-salarie .chevron { margin: 0; justify-self: center; }
.ligne-salarie[aria-expanded="true"] .chevron { transform: rotate(45deg); }
.ligne-salarie[aria-expanded="true"] { background: var(--pastel-3); }
.heures { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--encre); }
.heures .manquant { color: var(--mauve-texte); }
.vide { margin: 0; padding: 18px 20px; color: var(--encre-2); }
.avis { margin: -4px 0 10px; font-size: 12.5px; }
.avis.avert { color: var(--mauve-texte); }
.avis.erreur { color: var(--rouge); }

/* barre d'enregistrement */
.barre-enregistrer { position: sticky; bottom: 4px; z-index: 4; margin-top: 26px; padding: 8px 8px 8px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 999px; border: 1px solid var(--interne-bord); background: var(--carte); box-shadow: 0 16px 40px rgba(14, 59, 64, 0.16); font-size: 13.5px; color: var(--encre-2); animation: apparaitre .22s cubic-bezier(.2, .9, .3, 1); background: var(--option); }
.barre-enregistrer span { margin-right: auto; }

/* feuilles */
dialog.feuille { width: min(500px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--verre-popup-bord); border-radius: 28px; color: var(--encre); background: var(--verre-popup); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: var(--verre-popup-reflet), 0 30px 80px rgba(14, 59, 64, .28); }
dialog.feuille[open] { animation: apparaitre .22s cubic-bezier(.2, .9, .3, 1); }
@keyframes apparaitre { from { opacity: 0; transform: translateY(8px); } }
dialog::backdrop { background: rgba(14, 40, 44, .26); }
dialog form, dialog .feuille-corps { padding: 26px 26px 22px; display: grid; gap: 15px; }
dialog h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.025em; }
dialog label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--encre-2); position: relative; }
dialog input, dialog select { width: 100%; min-width: 0; border: 1px solid var(--verre-popup-bord); border-radius: 12px; background: var(--verre-popup-champ); padding: 11px 13px; font-size: 14.5px; }
dialog label:has(> select)::after { right: 15px; bottom: 18px; }
dialog form > *, dialog .feuille-corps > *, dialog .deux > * { min-width: 0; }
dialog .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.poignee { display: none; }
.aide { margin: -4px 0 0; font-size: 13px; color: var(--encre-2); }
.erreur { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--rouge); }

#toast { position: fixed; left: 50%; bottom: 96px; z-index: 20; max-width: min(560px, calc(100vw - 32px)); padding: 12px 20px; border-radius: 999px; background: var(--sombre); color: var(--sur-sombre); font-size: 13.5px; font-weight: 500; box-shadow: 0 16px 40px rgba(14, 59, 64, .25); opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity .22s ease-out, transform .22s ease-out; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
#toast.erreur { background: var(--framboise); color: #fff; }
.ferme { max-width: 520px; margin: 22vh auto; text-align: center; color: var(--encre-2); font-size: 17px; }

/* ---------- pages : la langue du tableau de bord (chiffres clés, cartes à en-tête, pastilles, puces colorées) */
.initiales { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }
.onglet > .carte, .onglet > .chiffres, .exc-grille, #bulletins-resultat > * { margin-bottom: 14px; }
.compte-gris { margin-left: 2px; color: var(--encre-3); font-size: 13px; font-weight: 500; }
.carte h2 .compte { margin-left: 2px; font-size: 14px; }
a.rond-petit:hover { text-decoration: none; }
.rond-petit.danger { color: var(--rouge); }
.rond-petit.danger:hover { background: var(--pastel-1); }
.bouton-teinte.danger { color: var(--rouge); }
.petit { font-size: 12.5px; }

/* chiffres clés */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.carte.chiffre { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; }
.chiffre-icone { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
:root[data-theme="sombre"] .chiffre-icone { color: color-mix(in srgb, var(--c) 45%, #fff); background: color-mix(in srgb, var(--c) 30%, transparent); }
.chiffre-icone svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chiffre-texte { display: grid; gap: 1px; min-width: 0; }
.chiffre-libelle { font-size: 12.5px; color: var(--encre-2); }
.chiffre b { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; white-space: nowrap; }
.chiffre b small, .bulletin-net b small { font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--encre-2); }
.chiffre-sous { font-size: 12px; color: var(--encre-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* cartes qui portent un tableau : l'en-tête garde sa marge, le tableau va d'un bord à l'autre */
.carte.carte-table { padding: 14px 0 0; overflow: hidden; }
.carte-table > header { padding: 0 18px; flex-wrap: wrap; }
.carte-table .donnees thead th { padding-top: 10px; padding-bottom: 10px; background: var(--champ); border-bottom: 0; }
.carte-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px 14px; border-top: 1px solid var(--ligne); }
.carte-pied .ajout-colonne, .carte-pied .pied { margin: 0; }
.nom-avatar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nom-avatar strong { font-weight: 500; }
.nom-avatar .chevron { flex: none; margin: 0 2px 2px 0; }
.etat-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--champ); color: var(--encre-2); font-size: 12px; font-weight: 600; white-space: nowrap; align-self: flex-start; }
.etat-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.etat-chip.ok { background: var(--pastel-2); color: var(--accent); }
.etat-chip.ko { background: var(--pastel-1); color: var(--rouge); }
.action-requise { height: 20px; padding: 0 8px; font-size: 11px; vertical-align: middle; }
.nom .action-requise { margin-left: 8px; }
.total-pill { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--sombre); color: var(--sur-sombre); font-weight: 600; }
.etat-sync { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--encre-2); }
.etat-sync:empty { display: none; }
.etat-sync::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--encre-3); }
.etat-sync.ok::before { background: var(--bleu-gris); box-shadow: 0 0 0 3px var(--pastel-2); }
.etat-sync.ko::before { background: var(--framboise); box-shadow: 0 0 0 3px var(--pastel-1); }
.heures span { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--interne-bord); background: var(--carte); font-size: 12px; }
.heures .manquant { border-style: dashed; border-color: var(--mauve); }
.heures .ajoute { border-style: dashed; border-color: var(--accent); color: var(--accent); font-weight: 600; }
.heures .ignore { border-style: dashed; color: var(--encre-3); text-decoration: line-through; }

/* À vérifier : cartes pastel comme le tableau de bord ; la carte ouverte prend toute la ligne */
.grille-verif { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.verif-carte { border-radius: 16px; background: var(--pastel-1); }
.verif-carte:nth-child(5n+2) { background: var(--pastel-2); }
.verif-carte:nth-child(5n+3) { background: var(--pastel-3); }
.verif-carte:nth-child(5n+4) { background: var(--pastel-4); }
.verif-carte:nth-child(5n+5) { background: var(--pastel-5); }
.verif-carte.ouvert { grid-column: 1 / -1; }
.verif-tete { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; cursor: pointer; }
.verif-tete:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.verif-nom { display: grid; gap: 1px; min-width: 0; }
.verif-nom strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verif-nom span { font-size: 12px; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chevron-rond { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--encre-3); display: grid; place-items: center; transition: transform .2s ease-out; }
.chevron-rond .chevron { margin: 0 2px 0 0; }
.verif-tete:hover .chevron-rond { transform: translateX(2px); }
.ouvert .chevron-rond { transform: rotate(90deg); }
.ouvert .verif-tete:hover .chevron-rond { transform: rotate(90deg); }
.jours-verif { display: grid; gap: 6px; padding: 0 10px 10px; }
.jour-verif { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 10px 12px 10px 14px; border-radius: 12px; background: var(--carte); }
.jour-texte { display: grid; gap: 2px; min-width: 0; }
.jour-texte b { font-size: 13px; font-weight: 600; }
.jour-texte span { font-size: 12.5px; color: var(--encre-2); }
.jour-verif .bouton-texte { height: 30px; padding: 0 14px; font-size: 13px; background: var(--sombre); color: var(--sur-sombre); }
.jour-verif .bouton-texte:hover { background: var(--sombre); filter: brightness(1.12); }

/* exceptions */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filtres:empty { display: none; }
.filtres .pilule { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px 0 14px; }
.filtres .pilule i { width: 8px; height: 8px; border-radius: 50%; }
.filtres .nb { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--champ); color: var(--encre-2); font-size: 11.5px; font-weight: 600; }
.filtres .pilule.actif .nb { background: rgba(255, 255, 255, 0.2); color: var(--sur-sombre); }
.exc-grille { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.exc-grille > .carte, .exc-cote > .carte { margin: 0; }
.exc-cote { display: grid; gap: 14px; }
.date-bloc { display: inline-grid; justify-items: center; min-width: 46px; padding: 4px 6px; border-radius: 12px; background: var(--champ); line-height: 1.15; }
.date-bloc b { font-size: 16px; font-weight: 600; }
.date-bloc span { font-size: 11px; color: var(--encre-2); }
.type-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 15%, transparent); font-size: 12.5px; font-weight: 500; }
.type-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
:root[data-theme="sombre"] .type-chip { background: color-mix(in srgb, var(--c) 32%, transparent); }
:root[data-theme="sombre"] .type-chip i { background: color-mix(in srgb, var(--c) 55%, #fff); }
.interne.statique { cursor: default; }
.interne.statique:hover { border-color: var(--interne-bord); }
.barre-ligne header b.neutre { color: var(--encre); }

/* primes et avances */
.carte.fixes-carte { flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px 18px; }
.fixes-corps { flex: 1; min-width: 0; }
.fixes-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fixes-carte h2 { margin: 2px 0 0; }
button.puce-info { font: inherit; cursor: pointer; transition: border-color .15s ease-out; }
button.puce-info:hover { border-color: var(--encre-3); }
.puces-info { display: flex; flex-wrap: wrap; gap: 8px; }
.puce-info { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 3px 14px 3px 4px; border-radius: 999px; border: 1px solid var(--interne-bord); background: var(--carte); font-size: 13px; color: var(--encre-2); }
.puce-info b { margin-right: 6px; color: var(--encre); font-weight: 600; }
.puce-info .initiales, .puce-info .chiffre-icone { width: 28px; height: 28px; font-size: 10px; }
.puce-info .chiffre-icone svg { width: 15px; height: 15px; }
.legende-signes { display: flex; gap: 14px; font-size: 12.5px; color: var(--encre-2); }
.legende-signes span { display: inline-flex; align-items: center; gap: 6px; }
.signe { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 700; line-height: 1; }
.signe.plus { background: var(--pastel-2); color: var(--accent); }
.signe.moins { background: var(--pastel-1); color: var(--rouge); }
.col-tete { display: inline-flex; align-items: center; gap: 6px; }
.saisie-dh { position: relative; display: inline-flex; align-items: center; }
.saisie-montants td { padding-left: 6px; padding-right: 6px; }
.saisie-montants .saisie-dh input { width: 100px; padding-right: 32px; border-color: var(--interne-bord); }
.saisie-montants .saisie-dh input:not(:placeholder-shown) { background: var(--carte); border-color: var(--encre-3); font-weight: 600; }
.saisie-montants input::-webkit-inner-spin-button, .saisie-montants input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.saisie-dh span { position: absolute; right: 11px; font-size: 11.5px; color: var(--encre-3); pointer-events: none; }
.total-ligne { font-weight: 600; }
.badge-ae { display: inline-flex; align-items: center; height: 20px; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--pastel-3); color: var(--mauve-texte); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.saisie select { width: 100%; border: 1px solid transparent; border-radius: 10px; background: var(--champ); padding: 8px 10px; font-size: 13.5px; }
.saisie select:focus { outline: none; border-color: var(--accent); }
.en-ligne .unite input { width: 84px; }

/* bulletins */
.etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.carte.etape { gap: 6px; padding: 18px; align-items: flex-start; }
.etape h2 { font-size: 16px; }
.etape p { flex: 1; margin: 0 0 6px; font-size: 13px; color: var(--encre-2); }
.etape-num { width: 36px; height: 36px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center; background: var(--champ); color: var(--encre-2); font-size: 14px; font-weight: 600; }
.etape-num svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.etape.fait .etape-num { background: var(--pastel-2); color: var(--accent); }
.etape.attente .etape-num { background: var(--pastel-1); color: var(--rouge); }
.etape .lien-fleche { margin-top: 0; }
.carte.etape.prochaine { background: var(--sombre); border-color: transparent; color: var(--sur-sombre); }
.etape.prochaine p { color: color-mix(in srgb, var(--sur-sombre) 72%, transparent); }
.etape.prochaine .etape-num { background: rgba(255, 255, 255, 0.16); color: var(--sur-sombre); }
.etape.prochaine .bouton { background: var(--sur-sombre); color: var(--sombre); }
.grille-bulletins { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.carte.bulletin-carte { gap: 12px; }
.bulletin-carte > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; margin: 0; }
.bulletin-net { display: grid; padding: 11px 14px; border-radius: 14px; background: var(--pastel-2); }
.bulletin-carte:nth-child(5n+2) .bulletin-net { background: var(--pastel-1); }
.bulletin-carte:nth-child(5n+3) .bulletin-net { background: var(--pastel-3); }
.bulletin-carte:nth-child(5n+4) .bulletin-net { background: var(--pastel-4); }
.bulletin-carte:nth-child(5n+5) .bulletin-net { background: var(--pastel-5); }
.bulletin-net span { font-size: 12px; color: var(--encre-2); }
.bulletin-net b { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.bulletin-lignes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.bulletin-lignes:has(> :nth-child(4)) { grid-template-columns: repeat(4, auto); justify-content: space-between; column-gap: 10px; }
.carte.bulletin-carte { container-type: inline-size; }
@container (max-width: 255px) { .bulletin-lignes:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; } }  /* carte étroite : 2 × 2 */
.bulletin-lignes div { display: grid; gap: 1px; min-width: 0; }
.bulletin-lignes dt { font-size: 11.5px; color: var(--encre-3); }
.bulletin-lignes dd { margin: 0; font-size: 13px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bulletin-lignes dt { white-space: nowrap; }
.avertissements ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.note-info { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border-radius: 16px; border: 1px dashed var(--encre-3); font-size: 13px; color: var(--encre-2); }
.note-info svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; }

/* société : fiche et sommaire à gauche, formulaire à droite */
.params-grille { display: grid; grid-template-columns: 270px minmax(0, 820px); gap: 22px; align-items: start; }
.params-cote { position: sticky; top: 8px; display: grid; gap: 14px; }
.carte.fiche-societe { align-items: center; gap: 3px; padding: 22px 18px 16px; text-align: center; }
.fiche-symbole { width: 72px; height: 72px; margin-bottom: 10px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--framboise), var(--mauve)); color: #fff; font-size: 22px; font-weight: 700; }
.fiche-symbole.image { background: #fff; border: 1px solid var(--interne-bord); box-shadow: 0 0 0 6px var(--pastel-2); }
.fiche-symbole img { width: 60%; height: 60%; object-fit: contain; }
.fiche-societe strong { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
#fiche-raison { font-size: 12.5px; color: var(--encre-2); }
.fiche-infos { width: 100%; margin-top: 12px; border-top: 1px solid var(--ligne); }
.fiche-infos div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--ligne); font-size: 13px; }
.fiche-infos div:last-child { border-bottom: 0; padding-bottom: 0; }
.fiche-infos span { color: var(--encre-2); }
.fiche-infos b { font-weight: 600; }
.carte.params-nav { gap: 2px; padding: 8px; }
.params-nav button { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--encre-2); font-size: 13.5px; text-align: left; cursor: pointer; }
.params-nav button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--encre-3); }
.params-nav button:hover { background: var(--survol); color: var(--encre); }
.params-corps > .titre-groupe:first-child { margin-top: 4px; }
.titre-groupe { scroll-margin-top: 10px; }

/* réglages : trois cartes */
.reglages-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.carte.reglage { gap: 12px; padding: 18px; }
.carte.reglage > header { margin-bottom: 0; }
.reglage .etat-chip { max-width: 100%; height: auto; min-height: 24px; padding-block: 3px; white-space: normal; }
.reglage-texte { flex: 1; margin: 0; font-size: 13.5px; color: var(--encre-2); }
.reglage-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-choix { display: grid; gap: 8px; padding: 8px 8px 10px; border: 1px solid var(--interne-bord); border-radius: 16px; background: var(--carte); font-size: 13.5px; font-weight: 500; text-align: center; cursor: pointer; transition: border-color .15s ease-out; }
.theme-choix:hover { border-color: var(--encre-3); }
.theme-choix.actif { border-color: var(--sombre); box-shadow: 0 0 0 1px var(--sombre); }
.apercu-theme { display: grid; grid-template-columns: 1fr 1.4fr; grid-template-rows: 8px 1fr; gap: 5px; height: 78px; padding: 8px; border-radius: 10px; }
.apercu-theme i { border-radius: 5px; }
.apercu-theme i:first-child { grid-column: 1 / -1; border-radius: 4px; }
.apercu-theme.clair { background: #f2f5f6; box-shadow: inset 0 0 0 1px #e4eaeb; }
.apercu-theme.clair i { background: #fff; box-shadow: 0 1px 3px rgba(14, 59, 64, 0.08); }
.apercu-theme.sombre { background: #0f2225; }
.apercu-theme.sombre i { background: rgba(255, 255, 255, 0.08); }

@media (max-width: 1400px) {
  .exc-grille { grid-template-columns: minmax(0, 1fr); }
  .exc-cote { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 1100px) {
  .params-grille { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .carte.chiffre { gap: 10px; padding: 12px; }
  .chiffre-icone { width: 36px; height: 36px; }
  .chiffre b { font-size: 18px; }
  .grille-verif, .etapes, .params-grille { grid-template-columns: minmax(0, 1fr); }
  .jour-verif { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; }
  .jour-verif > :nth-child(1) { grid-area: 1 / 1; }
  .jour-verif > :nth-child(2) { grid-area: 2 / 1; }
  .jour-verif > :nth-child(3) { grid-area: 2 / 2; justify-self: end; }
  .jour-verif > :nth-child(4) { grid-area: 1 / 2; }
  .params-cote { position: static; }
  dialog.feuille.confirmation { width: min(360px, calc(100vw - 32px)); margin: auto; border-radius: 24px; padding-bottom: 0; }
  dialog.feuille.confirmation[open] { animation: apparaitre .2s cubic-bezier(.2, .9, .3, 1); }
  .params-nav, .fixes-carte > .chiffre-icone { display: none; }
}

/* justificatifs des exceptions */
.motif { display: grid; gap: 2px; }
.motif span { font-size: 12px; color: var(--encre-3); }
.pieces { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.piece { display: inline-flex; align-items: center; height: 28px; max-width: 200px; border-radius: 999px; border: 1px solid var(--interne-bord); background: var(--carte); font-size: 12px; }
.piece-lien { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 0 2px 0 10px; color: var(--encre); font-weight: 500; }
a.piece-lien:hover { text-decoration: none; color: var(--accent); }
.piece-lien span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piece svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.piece-lien svg { color: var(--accent); }
.piece button { flex: none; width: 22px; height: 22px; margin: 0 3px 0 2px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; color: var(--encre-3); cursor: pointer; }
.piece button:hover { background: var(--pastel-1); color: var(--rouge); }
.piece button svg { width: 10px; height: 10px; stroke-width: 2.4; }
.rond-petit.joindre svg { transform: rotate(-45deg); }
.champ-pieces { display: grid; gap: 6px; min-width: 0; }
.etiquette-pieces { font-size: 12.5px; font-weight: 500; color: var(--encre-2); }
.etiquette-pieces small { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--encre-3); }
dialog label.zone-pieces { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 10px 14px; border: 1.5px dashed var(--encre-3); border-radius: 14px; background: var(--verre-popup-champ); font-size: 13.5px; color: var(--encre-2); cursor: pointer; text-align: center; transition: border-color .15s ease-out, color .15s ease-out; }
dialog label.zone-pieces:hover, dialog label.zone-pieces.survol { border-color: var(--accent); color: var(--accent); }
dialog label.zone-pieces:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.zone-pieces svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(-45deg); }
#exc-pieces-liste:empty { display: none; }
.interne .clip { display: inline-grid; margin-left: 4px; color: var(--encre-2); }
.interne .clip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; transform: rotate(-45deg); }

/* lignes d'exception : une saisie = une ligne, qui s'ouvre */
.ligne-exc { cursor: pointer; }
.ligne-exc:hover > td { background: var(--survol); }
.ligne-exc:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.plage { display: flex; align-items: center; gap: 8px; }
.plage > span { display: grid; font-size: 11.5px; line-height: 1.25; color: var(--encre-2); white-space: nowrap; }
.plage b { font-size: 13px; font-weight: 600; color: var(--encre); }
.motif .hors { justify-self: start; margin-top: 3px; padding: 1px 9px; border-radius: 999px; background: var(--pastel-3); color: var(--mauve-texte); font-size: 11.5px; font-style: normal; font-weight: 500; }
.chevron-ligne { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--interne-bord); }
.chevron-ligne .chevron { margin: 0 2px 0 0; }
.ligne-exc:hover .chevron-ligne { border-color: var(--encre-3); }
#btn-suppr-exc { margin-right: auto; }

/* en direct : qui est là, qui est sorti, derniers pointages */
.carte-direct > header { justify-content: flex-start; flex-wrap: wrap; gap: 8px 14px; }
.titre-direct { display: inline-flex; align-items: center; gap: 9px; }
.point-direct { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--encre-3); }
.carte-direct[data-etat="connecte"] .point-direct { background: var(--framboise); }
.carte-direct[data-etat="connecte"] .point-direct::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--framboise); animation: pouls 2.2s ease-out infinite; }
@keyframes pouls { from { transform: scale(1); opacity: .55; } to { transform: scale(2.8); opacity: 0; } }
.carte-direct[data-etat="connexion"] .point-direct { background: var(--bleu-gris); }
.carte-direct[data-etat="erreur"] .point-direct { background: var(--mauve); }
.direct-etat { flex: 1; min-width: 220px; font-size: 12.5px; color: var(--encre-2); }
.carte-direct[data-etat="erreur"] .direct-etat { color: var(--rouge); }
.direct-etat .lien { color: var(--accent); }
.bascule-direct { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--encre-2); cursor: pointer; }
.direct-resume { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.puce-etat { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--champ); font-size: 13px; color: var(--encre-2); }
.puce-etat b { font-size: 14px; color: var(--encre); }
.puce-etat::before, .voyant { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--encre-3); }
.puce-etat.present::before, .tuile-direct.present .voyant { background: var(--accent); }
.puce-etat.sorti::before, .tuile-direct.sorti .voyant { background: var(--mauve); }
.direct-grille { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.direct-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tuile-direct { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--interne-bord); background: var(--carte); }
.tuile-direct.absent { background: transparent; border-style: dashed; }
.tuile-direct.absent .initiales { filter: grayscale(1); opacity: .55; }
.tuile-direct.excuse { background: var(--pastel-3); border-color: transparent; }
.puce-etat.excuse::before, .tuile-direct.excuse .voyant { background: var(--prune); }
.tuile-texte { display: grid; min-width: 0; padding-right: 12px; }
.tuile-texte strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tuile-texte small { font-size: 12px; color: var(--encre-2); }
.tuile-direct .retard { color: var(--rouge); font-weight: 600; }
.tuile-direct .voyant { position: absolute; top: 10px; right: 10px; }
.direct-fil { padding: 12px 12px 10px; border-radius: 16px; background: var(--champ); }
.direct-fil h3 { margin: 0 4px 8px; font-size: 13px; font-weight: 600; }
.direct-fil ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 268px; overflow-y: auto; }
.direct-fil li { position: relative; isolation: isolate; display: grid; grid-template-columns: 42px auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; }
.direct-fil li.nouveau::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 12px; background: var(--pastel-2); animation: eteindre 2.4s ease-out forwards; }
@keyframes eteindre { from { opacity: 1; } to { opacity: 0; } }
.direct-fil time { font-size: 13px; font-weight: 600; }
.direct-fil .initiales { width: 26px; height: 26px; font-size: 10px; }
.direct-fil li > span { display: grid; min-width: 0; }
.direct-fil li strong { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.direct-fil li small { font-size: 11.5px; color: var(--encre-2); }
@media (max-width: 860px) {
  .direct-grille { grid-template-columns: minmax(0, 1fr); }
  .direct-etat { flex-basis: 100%; min-width: 0; order: 3; }
}

/* menus déroulants : un bouton à la place du select, une liste en verre à la place de la liste de Windows */
.choix-natif { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.champ:has(> select)::after, .menu::after, dialog label:has(> select)::after { display: none; }
.choix { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-width: 0; text-align: left; cursor: pointer; color: var(--encre); font: inherit; border: 1px solid transparent; border-radius: 12px; background: var(--champ); padding: 9px 12px; font-size: 14.5px; white-space: nowrap; transition: border-color .15s ease-out; }
.choix::after { content: ""; flex: none; width: 10px; height: 7px; background: var(--encre-2); -webkit-mask: var(--chevron) center / contain no-repeat; mask: var(--chevron) center / contain no-repeat; transition: transform .15s ease-out; }
.choix[aria-expanded="true"]::after { transform: rotate(180deg); }
.choix:hover { border-color: var(--interne-bord); }
.choix:focus-visible, .choix[aria-expanded="true"] { outline: none; border-color: var(--accent); }
.choix:disabled { opacity: .5; cursor: default; }
dialog .choix { border-color: var(--verre-popup-bord); background: var(--verre-popup-champ); padding: 11px 13px; }
.menu .choix { width: auto; border-color: var(--interne-bord); background: var(--carte); border-radius: 999px; padding: 9px 14px; font-size: 14px; }
.saisie .choix { padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.choix-liste { position: fixed; inset: auto; margin: 0; min-width: 160px; max-width: min(460px, calc(100vw - 16px)); max-height: min(320px, 60vh); overflow-y: auto; padding: 6px; border: 1px solid var(--verre-popup-bord); border-radius: 16px; color: var(--encre); background: var(--verre-popup); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: var(--verre-popup-reflet), 0 18px 50px rgba(14, 59, 64, .24); }
.choix-liste:popover-open { animation: deplier .14s ease-out; }
@keyframes deplier { from { opacity: 0; transform: translateY(-4px); } }
.choix-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 12px; border-radius: 10px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.choix-option.actif { background: var(--survol); }
.choix-option[aria-selected="true"] { font-weight: 600; }
.choix-option[aria-selected="true"]::after { content: ""; width: 12px; height: 9px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg) scale(.8); }
.choix-option[aria-disabled="true"] { opacity: .45; cursor: default; }
.profil { border-radius: 999px; }
.profil:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* confirmation : pop-up en verre au centre */
dialog.feuille.confirmation { width: min(400px, calc(100vw - 32px)); text-align: center; }
.confirmation form { justify-items: center; gap: 10px; padding: 26px 24px 20px; }
.confirmation h2 { font-size: 19px; letter-spacing: -0.015em; }
.confirmation .aide { margin: 0; max-width: 34ch; }
.confirmation-icone { width: 48px; height: 48px; margin-bottom: 2px; border-radius: 50%; display: grid; place-items: center; background: var(--pastel-1); color: var(--rouge); }
.confirmation-icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.confirmation .actions { width: 100%; margin-top: 10px; justify-content: center; }
.confirmation .actions button { flex: 1; }
.bouton.danger { background: var(--framboise); color: #fff; }

/* ---------- menu latéral (ordinateur, d'après la référence de l'utilisateur) ; le dock reste pour le téléphone */
.menu-lateral { display: none; }
@media (min-width: 861px) {
  .fenetre { --lat-l: 264px; grid-template-columns: var(--lat-l) minmax(0, 1fr); }
  body.menu-replie .fenetre { --lat-l: 88px; }
  body.sans-societe .fenetre { grid-template-columns: minmax(0, 1fr); }
  .haut, main { grid-column: 2; }
  body.sans-societe .haut, body.sans-societe main { grid-column: 1; }
  .haut .marque, .haut .profil, .entete .recherche, .rail { display: none; }
  .haut { grid-template-columns: 1fr auto; }
  .mois-pilules { justify-self: start; }
  body.sans-societe .haut .marque { display: inline-flex; }
  main { padding-bottom: 24px; }
  .menu-lateral {
    grid-column: 1; grid-row: 1 / -1; position: relative; z-index: 6; display: flex; flex-direction: column; min-height: 0;
    margin: 12px 0 12px 12px; padding: 14px 12px 12px; border-radius: 24px; border: 1px solid var(--carte-bord); background: var(--carte); box-shadow: var(--carte-ombre);
    overflow-y: auto; scrollbar-width: thin;
  }
  body.menu-replie .menu-lateral { overflow: visible; }
  .lat-replier { display: grid; }
  body.sans-societe :is(.menu-lateral, .lat-replier) { display: none; }
}
.lat-tete { display: flex; align-items: center; height: 38px; padding: 0 10px; margin-bottom: 10px; }
.marque-court { display: none; }
.lat-replier { display: none; position: absolute; top: 34px; left: calc(var(--lat-l) - 13px); z-index: 8; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid var(--interne-bord); background: var(--option); color: var(--encre-2); place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(14, 59, 64, .1); }
.lat-replier:hover { color: var(--encre); border-color: var(--encre-3); }
.lat-replier svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease-out; }
body.menu-replie .lat-replier svg { transform: rotate(180deg); }
.lat-recherche { display: flex; align-items: center; gap: 9px; height: 40px; margin-bottom: 4px; padding: 0 6px 0 12px; border-radius: 12px; border: 1px solid var(--interne-bord); background: var(--carte); color: var(--encre-3); cursor: text; }
.lat-recherche > svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lat-recherche input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13.5px; color: var(--encre); }
.lat-recherche:focus-within { border-color: var(--accent); }
.lat-titre { display: flex; align-items: center; justify-content: space-between; min-height: 22px; margin: 12px 8px 4px 12px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-3); }
.lat-nav { flex: none; display: grid; align-content: start; gap: 2px; }
.lat-groupe { position: relative; }
.lat-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--encre-2); font-size: 14px; text-align: left; cursor: pointer; transition: background-color .15s ease-out, color .15s ease-out; }
.lat-item .icone { display: grid; place-items: center; }
.lat-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lat-item:hover { background: var(--survol); color: var(--encre); }
.lat-item.actif { background: var(--champ); color: var(--encre); font-weight: 600; }
.lat-item.actif svg { stroke-width: 1.9; }
.lat-chevron { margin-left: auto; width: 7px; height: 7px; border: solid var(--encre-3); border-width: 0 1.6px 1.6px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease-out; }
.lat-groupe.ouvert .lat-chevron { transform: translateY(2px) rotate(-135deg); }
.lat-sous { display: none; position: relative; margin: 2px 0 6px 21px; padding-left: 16px; }
.lat-groupe.ouvert .lat-sous { display: grid; gap: 2px; }
.lat-sous::before { content: ""; position: absolute; left: 0; top: -2px; bottom: 17px; border-left: 1.5px solid var(--interne-bord); }
.lat-sous button { position: relative; height: 32px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--encre-2); font-size: 13px; text-align: left; cursor: pointer; }
.lat-sous button::before { content: ""; position: absolute; left: -16px; top: 5px; width: 11px; height: 11px; border: solid var(--interne-bord); border-width: 0 0 1.5px 1.5px; border-bottom-left-radius: 8px; }
.lat-sous button:hover { background: var(--survol); color: var(--encre); }
.lat-sous-titre { display: none; }
.lat-societes { flex: 0 1 auto; display: flex; flex-direction: column; min-height: 92px; margin-top: 8px; padding-top: 2px; border-top: 1px solid var(--ligne); }  /* c'est la liste des sociétés qui défile, pas le menu */
.lat-ajout { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--encre-3); display: grid; place-items: center; cursor: pointer; }
.lat-ajout:hover { background: var(--survol); color: var(--encre); }
.lat-ajout svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lat-liste-soc { display: grid; align-content: start; gap: 2px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.lat-soc { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--encre-2); font-size: 13.5px; text-align: left; cursor: pointer; }
.lat-soc .libelle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lat-soc:hover { background: var(--survol); color: var(--encre); }
.lat-soc.actif { color: var(--encre); font-weight: 600; }
.lat-soc.actif::after { content: ""; flex: none; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lat-avatar { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: #fff; font-size: 10px; font-weight: 700; }
.lat-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 4px; object-fit: contain; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--interne-bord); }
.lat-profil { flex: none; display: flex; align-items: center; gap: 10px; width: 100%; margin-top: auto; padding: 8px 12px 8px 8px; border-radius: 16px; border: 1px solid var(--interne-bord); background: var(--carte); color: var(--encre); text-align: left; cursor: pointer; transition: border-color .15s ease-out; }
.lat-profil:hover, .lat-profil[aria-expanded="true"] { border-color: var(--encre-3); }
.lat-profil .monogramme { width: 40px; height: 40px; border-radius: 12px; }
.lat-profil .profil-texte strong { max-width: 150px; }
.lat-profil > svg { flex: none; margin-left: auto; width: 15px; height: 15px; fill: none; stroke: var(--encre-3); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.menu-lateral button:focus-visible, .menu-lateral a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* replié : icônes seules, sous-menus et libellés en bulles de verre au survol */
body.menu-replie .menu-lateral { padding-inline: 10px; }
body.menu-replie :is(.lat-item .libelle, .lat-chevron, .lat-recherche input, .marque-nom, .marque-sous, .marque-signe, .lat-titre span, .lat-soc .libelle, .lat-profil .profil-texte, .lat-profil > svg) { display: none; }
body.menu-replie .marque-court { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; color: var(--encre); }
body.menu-replie .marque-court::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 2px; border-radius: 50%; background: var(--framboise); }
body.menu-replie .lat-tete { justify-content: center; padding: 0; }
body.menu-replie .lat-recherche { justify-content: center; width: 44px; margin-inline: auto; padding: 0; cursor: pointer; }
body.menu-replie .lat-titre { justify-content: center; margin: 10px 14px 6px; min-height: 1px; border-top: 1px solid var(--ligne); }
body.menu-replie .lat-titre .lat-ajout { display: none; }
body.menu-replie .lat-societes { border-top: 0; }
body.menu-replie .lat-nav { overflow: visible; }
body.menu-replie :is(.lat-item, .lat-soc) { justify-content: center; padding: 0; }
body.menu-replie .lat-soc.actif::after { display: none; }
body.menu-replie .lat-soc.actif .lat-avatar { box-shadow: 0 0 0 2px var(--carte), 0 0 0 3.5px var(--accent); overflow: visible; }
body.menu-replie .lat-profil { justify-content: center; padding: 4px; border-color: transparent; background: none; }
body.menu-replie .lat-groupe .lat-sous, body.menu-replie .lat-groupe.ouvert .lat-sous { display: none; }
body.menu-replie .lat-groupe:hover::after { content: ""; position: absolute; left: 100%; top: 0; width: 16px; height: 100%; }
body.menu-replie :is(.lat-groupe:hover, .lat-groupe:focus-within) .lat-sous,
body.menu-replie .lat-groupe:not(:has(.lat-sous)):hover .lat-item .libelle {
  display: grid; position: absolute; left: calc(100% + 12px); top: -4px; z-index: 20; min-width: 190px; margin: 0; padding: 8px;
  border-radius: 16px; border: 1px solid var(--verre-popup-bord); background: var(--verre-popup);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); box-shadow: var(--verre-popup-reflet), 0 18px 44px rgba(14, 59, 64, .2);
  font-size: 13px; font-weight: 500; color: var(--encre); white-space: nowrap; animation: deplier .14s ease-out;
}
body.menu-replie .lat-groupe:not(:has(.lat-sous)):hover .lat-item .libelle { top: 4px; min-width: 0; padding: 8px 12px; pointer-events: none; }
body.menu-replie .lat-sous::before, body.menu-replie .lat-sous button::before { display: none; }
body.menu-replie .lat-sous-titre { display: block; padding: 2px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-3); }

/* alertes du jour (direct), avances, congés */
.direct-alertes { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.alerte-direct { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 12px; border-radius: 999px; background: var(--pastel-1); color: var(--rouge); font-size: 12.5px; }
.alerte-direct b { font-weight: 700; }
.alerte-direct.matin { background: var(--pastel-3); color: var(--mauve-texte); }
.reste-chip { display: inline-flex; align-items: center; height: 22px; margin-left: 8px; padding: 0 9px; border-radius: 999px; background: var(--pastel-3); color: var(--mauve-texte); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.avances-detail { display: flex; flex-wrap: wrap; gap: 6px; }
.pointeuse-ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; cursor: pointer; }
.pointeuse-ligne input { width: 18px; height: 18px; accent-color: var(--petrole); }
.sous-titre-groupe { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--encre-2); }
.avance-puce { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 999px; border: 1px solid var(--interne-bord); background: var(--carte); font-size: 12px; color: var(--encre-2); }
.avance-puce b { color: var(--encre); font-weight: 600; }
.avance-puce button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--encre-3); display: grid; place-items: center; cursor: pointer; }
.avance-puce button:hover { background: var(--pastel-1); color: var(--rouge); }
.avance-puce button svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.solde-conge { margin: -6px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--verre-popup-champ); }
.conge-ligne { grid-template-columns: auto minmax(0, 1fr) auto; }
.conge-ligne small { display: block; font-size: 11.5px; color: var(--encre-2); }
.conge-ligne .mini-bouton.negatif { background: var(--pastel-1); color: var(--rouge); }

/* comptes : écran de connexion, droits, montants cachés, page Utilisateurs */
body.ecran-login .cadre { display: none; }
.ecran-connexion { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: var(--fond); overflow-y: auto; }
.carte.connexion { width: min(400px, 100%); gap: 14px; padding: 30px 28px 26px; }
.connexion-marque { margin-bottom: 8px; }
.connexion h1 { font-size: 26px; }
.connexion .sous-titre:empty { display: none; }
.connexion label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--encre-2); }
.connexion input { width: 100%; padding: 11px 13px; border: 1px solid var(--interne-bord); border-radius: 12px; background: var(--champ); font-size: 14.5px; }
.connexion input:focus { outline: none; border-color: var(--accent); }
.connexion .bouton { width: 100%; margin-top: 4px; }
.moi { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border: 1px solid var(--interne-bord); border-radius: 999px; background: var(--carte); color: var(--encre); font-size: 13px; font-weight: 500; cursor: pointer; }
.moi:hover { border-color: var(--encre-3); }
.moi .initiales { width: 28px; height: 28px; font-size: 10px; background: var(--prune); }
.moi-nom { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.peut-exceptions) [data-perm~="exceptions"], body:not(.peut-primes) [data-perm~="primes"],
body:not(.peut-bulletins) [data-perm~="bulletins"], body:not(.peut-pointeuse) [data-perm~="pointeuse"],
body:not(.peut-societe) [data-perm~="societe"], body:not(.peut-utilisateurs) [data-perm~="utilisateurs"],
body.poste-distant .seulement-local { display: none !important; }
body.sans-montants .b-masse { display: none; }
body.sans-montants .bento { grid-template-areas: "verif meilleur barres exc" "verif meilleur barres direct"; }
.puce-mini { display: inline-flex; align-items: center; height: 22px; margin: 2px 4px 2px 0; padding: 0 9px; border-radius: 999px; background: var(--champ); font-size: 11.5px; color: var(--encre-2); white-space: nowrap; }
.champ-coches { display: grid; gap: 8px; }
dialog label.ligne-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13.5px; color: var(--encre); }
dialog input[role="switch"] { flex: none; width: 48px; padding: 0; border: 0; }
dialog .puce input { width: auto; }
dialog .puce:has(input:disabled) { opacity: .45; cursor: default; }
@media (max-width: 1260px) {
  body.sans-montants .bento { grid-template-rows: 300px 300px 280px; grid-template-areas: "verif barres" "meilleur barres" "exc direct"; }
}
@media (max-width: 860px) {
  body.sans-montants .bento { grid-template-rows: 380px 280px auto 300px 300px; grid-template-areas: "verif" "meilleur" "barres" "exc" "direct"; }
  .moi-nom { display: none; }
  .moi { padding-right: 4px; }
}

/* ---------- mouvement : la page qui arrive monte légèrement en fondu (une seule couche, transform/opacity) */
.onglet.actif { animation: page-entre .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes page-entre { from { opacity: 0; transform: translateY(8px); } }

/* ---------- écrans moyens : la grille passe sur deux colonnes */
@media (max-width: 1260px) {
  #tableau.actif { display: block; height: auto; }
  .bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 300px 300px auto 280px; grid-template-areas: "verif meilleur" "verif masse" "barres barres" "exc direct"; }
  .b-barres .barres { contain: none; }
  .profil-texte { display: none; }
}

/* ---------- téléphone : plein écran, rail en barre d'onglets en bas */
@media (max-width: 860px) {
  body { overflow: auto; }
  .cadre { padding: 0; height: auto; min-height: 100%; }
  .fenetre { height: auto; min-height: 100vh; display: block; }
  .haut { grid-template-columns: 1fr auto; padding: 12px 16px 6px; }
  .mois-pilules { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; padding-bottom: 4px; }
  .haut-droite .rond { display: none; }
  .rail { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); transform: none; justify-content: space-around; padding: 0 6px; }
  .rail button { flex: 1; }
  .rail .hors-telephone { display: none; }
  main { overflow: visible; padding: 4px 16px 120px; }
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-rows: 380px 320px 280px auto 300px 300px; grid-template-areas: "verif" "meilleur" "masse" "barres" "exc" "direct"; }
  .barre-mini { grid-template-columns: minmax(84px, 9.5em) minmax(48px, 1fr) minmax(72px, auto); }
  .barre-info { display: none; }
  .cadre { position: static; }
  .recherche { min-width: 0; width: 100%; }
  .groupe .champ { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 12px 16px; }
  .groupe .champ:has(> input[role="switch"]), .groupe .champ:has(> .segment), .groupe .champ:has(> button) { grid-template-columns: minmax(0, 1fr) auto; }
  .champ:has(> select)::after { right: 30px; top: auto; bottom: 27px; margin-top: 0; }
  .pauses { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ligne { grid-template-columns: minmax(0, 1fr) auto; padding-left: 16px; }
  .ligne .ligne-texte { grid-row: 1 / span 2; }
  .ligne .ligne-montant { grid-row: 1; grid-column: 2; justify-self: end; padding-right: 10px; }
  .ligne .bouton-texte { grid-row: 2; grid-column: 2; justify-self: end; }
  .ligne.ligne-salarie { grid-template-columns: minmax(0, 1fr) auto 16px; }
  .ligne-salarie .chevron { grid-row: 1; grid-column: 3; }
  .ligne-salarie .ligne-texte { grid-row: 1; }
  #toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .enregistrer-barre:not([hidden]) { display: inline-flex; height: 38px; padding: 0 16px; }
  .barre-enregistrer { display: none !important; }
  dialog.feuille { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.feuille[open] { animation: monter .28s cubic-bezier(.2, .9, .3, 1); }
  @keyframes monter { from { transform: translateY(100%); } }
  .poignee { display: block; width: 38px; height: 5px; margin: -10px auto 2px; border-radius: 3px; background: var(--encre-3); }
  dialog .deux { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* page Société : actions à droite d'un titre de groupe (import des salariés) */
.titre-avec-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.actions-titre { display: inline-flex; gap: 6px; font-size: 13px; font-weight: 500; }
.actions-titre label { cursor: pointer; }

/* fiche salarié : historique sur plusieurs mois */
dialog.fiche-salarie { width: min(860px, calc(100vw - 32px)); }
.fiche-salarie .tb-compteurs { margin: 4px 0 12px; }
.fiche-salarie table.donnees td, .fiche-salarie table.donnees th { white-space: nowrap; }
.fiche-h3 { margin: 16px 0 8px; font-size: 13px; font-weight: 600; }
.fiche-salarie .ligne-mini { margin-bottom: 6px; cursor: default; }

/* page Société : connecteurs de pointeuse */
.connecteur-ligne { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--interne-bord); font-size: 13px; }
.connecteur-ligne:last-child { border-bottom: 0; }
.connecteur-ligne strong { min-width: 140px; }
.connecteur-ligne .secondaire { margin-left: auto; text-align: right; }

/* connexion : bascule vers l'inscription ; accueil ; code à 6 chiffres */
.bascule-inscription { margin: 10px 0 0; text-align: center; font-size: 13px; }
.etapes-accueil { max-width: 520px; margin: 0 auto 24px; padding-left: 22px; text-align: left; line-height: 1.7; color: var(--encre-2); }
.cle-2fa { display: block; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: var(--champ); font: 600 15px/1.4 ui-monospace, monospace; letter-spacing: .04em; word-break: break-all; }
.ligne-2fa { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ligne-2fa input { width: 140px; }

/* ---------- ventes : devis, factures, clients, articles */
@media (min-width: 861px) { .entete .recherche.recherche-ventes { display: flex; } }
body:is([data-onglet="devis"], [data-onglet="factures"], [data-onglet="tiers"], [data-onglet="articles"]) :is(.mois-pilules, #btn-sync-haut, #btn-alertes) { visibility: hidden; }
body:not(.peut-devis) [data-perm~="devis"], body:not(.peut-factures) [data-perm~="factures"],
body:not(.peut-reglements) [data-perm~="reglements"], body:not(.peut-tiers) [data-perm~="tiers"],
body:not(.peut-articles) [data-perm~="articles"], body:not(.peut-ventes_reglages) [data-perm~="ventes_reglages"] { display: none !important; }
.onglet.ventes > .chiffres { margin-bottom: 14px; }
.onglet.ventes > .note-info, .ventes-essai .note-info { margin: 14px 0; }
.ventes-essai:empty { display: none; }
.carte-table > header .lien-fleche { margin: 0; }
.retard-chip { display: inline-flex; align-items: center; height: 20px; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--pastel-1); color: var(--rouge); font-size: 11px; font-weight: 600; }
.ligne-coche { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--encre-2); cursor: pointer; }
.retard { color: var(--rouge); font-weight: 600; }
.rail button { width: min(50px, calc((100vw - 56px) / var(--n, 7))); }

/* fenêtre d'une pièce : large, lignes éditables */
dialog.feuille.feuille-piece { width: min(1060px, calc(100vw - 32px)); }
dialog.feuille.large { width: min(720px, calc(100vw - 32px)); }
.piece-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.piece-tete h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.piece-tete .sous-titre { margin-top: 4px; }
.piece-outils { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.piece-outils :is(.bouton, .bouton-teinte).petit { height: 32px; padding: 0 14px; font-size: 13px; text-decoration: none; }
.piece-outils a svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
dialog .trois { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
dialog .trois-egaux { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
dialog .trois > *, dialog .trois-egaux > * { min-width: 0; }
.champ-tiers { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.champ-tiers label { flex: 1; min-width: 0; }
.champ-tiers .rond-petit { flex: none; width: 42px; height: 42px; }
dialog textarea { width: 100%; min-width: 0; border: 1px solid var(--verre-popup-bord); border-radius: 12px; background: var(--verre-popup-champ); padding: 11px 13px; font: inherit; font-size: 14px; color: var(--encre); resize: vertical; }
dialog textarea:disabled, dialog input:disabled { opacity: .7; }
.lignes-piece { margin: 0 -6px; border: 1px solid var(--verre-popup-bord); border-radius: 16px; background: var(--verre-popup-champ); }
.saisie-lignes { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.saisie-lignes th { padding: 10px 6px 6px; font-size: 11.5px; font-weight: 500; color: var(--encre-3); text-align: left; white-space: nowrap; }
.saisie-lignes td { padding: 5px 4px; vertical-align: top; border-top: 1px solid var(--verre-popup-bord); }
.saisie-lignes tr > :first-child { padding-left: 12px; }
.saisie-lignes tr > :last-child { padding-right: 10px; width: 38px; }
.saisie-lignes input, .saisie-lignes .choix { padding: 8px 9px; border-radius: 10px; font-size: 13.5px; background: var(--carte); }
.saisie-lignes input[type="number"] { text-align: right; }
.saisie-lignes input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.saisie-lignes .col-des { min-width: 250px; width: 40%; }
.saisie-lignes .col-des input { display: block; }
.saisie-lignes .ligne-desc { margin-top: 4px; padding: 6px 9px; font-size: 12.5px; color: var(--encre-2); }
.saisie-lignes td:nth-child(2) { width: 78px; } .saisie-lignes td:nth-child(3) { width: 84px; }
.saisie-lignes td:nth-child(4) { width: 108px; } .saisie-lignes td:nth-child(5) { width: 76px; }
.saisie-lignes td:nth-child(6) { width: 92px; }
.saisie-lignes .total-ligne { width: 110px; padding-top: 14px; font-weight: 600; white-space: nowrap; }
.saisie-lignes .rond-petit { margin-top: 4px; }
.piece-bas { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.piece-totaux { display: grid; gap: 5px; min-width: min(300px, 100%); margin-left: auto; padding: 12px 16px; border-radius: 16px; background: var(--verre-popup-champ); border: 1px solid var(--verre-popup-bord); }
.tot-ligne { display: flex; justify-content: space-between; gap: 18px; font-size: 13.5px; color: var(--encre-2); }
.tot-ligne b { color: var(--encre); font-weight: 600; white-space: nowrap; }
.tot-ligne.fort { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--verre-popup-bord); font-size: 16px; color: var(--encre); }
.tot-ligne.reste b { color: var(--accent); }
.piece-suivi { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 20px; }
.piece-suivi:empty { display: none; }
.suivi-bloc .fiche-h3 { margin-top: 4px; }
.suivi-liste { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.suivi-liste li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--encre-2); }
.suivi-liste li > span:first-child { flex: 1; min-width: 0; }
.suivi-liste b { color: var(--encre); white-space: nowrap; }
.vide-mini { margin: 0; font-size: 13px; color: var(--encre-3); }
.champ-logo { display: grid; gap: 6px; align-content: end; }
dialog label.bouton-teinte { display: inline-flex; justify-self: start; height: 42px; font-size: 13.5px; color: var(--encre); cursor: pointer; }
@media (max-width: 860px) {
  dialog .trois, dialog .trois-egaux { grid-template-columns: minmax(0, 1fr); }
  .piece-outils { justify-content: flex-start; }
  dialog.feuille.feuille-piece { max-height: 92vh; }
}
.saisie-lignes input[list]::-webkit-calendar-picker-indicator, dialog input[list]::-webkit-calendar-picker-indicator { display: none !important; }
@media (max-width: 1260px) { #factures-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { #factures-chiffres { grid-template-columns: minmax(0, 1fr); } }

/* ---------- écran des applications (comme un bureau : une tuile par app, chacune ouvre sa propre fenêtre) */
body.ecran-apps :is(.mois-pilules, #btn-sync-haut, #btn-alertes, .rail, .lat-replier, .enregistrer-barre) { display: none !important; }
body.ecran-apps .haut { grid-template-columns: 1fr auto; }
@media (min-width: 861px) {
  body.ecran-apps .fenetre { grid-template-columns: minmax(0, 1fr); }
  body.ecran-apps .menu-lateral { display: none; }
  body.ecran-apps .haut, body.ecran-apps main { grid-column: 1; }
  body.ecran-apps .haut .marque, body.ecran-apps .haut .profil { display: inline-flex; }
}
.apps-accueil { max-width: 900px; margin: clamp(18px, 7vh, 72px) auto 40px; padding: 0 4px; }
.apps-tete { display: grid; gap: 4px; margin-bottom: 28px; text-align: center; }
.apps-tete h1 { font-size: clamp(32px, 4vw, 46px); }
#apps-date::first-letter { text-transform: uppercase; }
.apps-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); gap: 18px; }
.app-tuile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 186px; padding: 26px 14px 20px;
  border: 1px solid var(--carte-bord); border-radius: 26px; background: var(--carte); box-shadow: var(--carte-ombre); text-align: center; cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s ease-out, border-color .18s ease-out;
  animation: monter-tuile .38s cubic-bezier(.2, .8, .2, 1) both;
}
.app-tuile:nth-child(2) { animation-delay: 40ms; } .app-tuile:nth-child(3) { animation-delay: 80ms; }
.app-tuile:nth-child(4) { animation-delay: 120ms; } .app-tuile:nth-child(5) { animation-delay: 160ms; }
@keyframes monter-tuile { from { opacity: 0; transform: translateY(10px); } }
.app-tuile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 35%, var(--carte-bord)); box-shadow: var(--carte-ombre), 0 18px 34px -18px color-mix(in srgb, var(--c) 55%, transparent); }
.app-tuile:active { transform: translateY(-1px) scale(.98); }
.app-tuile:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.app-icone { width: 68px; height: 68px; margin-bottom: 8px; border-radius: 22px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 72%, #fff) 0%, var(--c) 62%, color-mix(in srgb, var(--c) 80%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px -10px color-mix(in srgb, var(--c) 80%, transparent); }
.app-icone svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-nom { font-size: 16.5px; font-weight: 600; letter-spacing: -0.015em; }
.app-desc { max-width: 22ch; font-size: 12.5px; line-height: 1.4; color: var(--encre-2); }
.app-puce { position: absolute; top: 12px; right: 12px; height: 22px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--pastel-3); color: var(--mauve-texte); }
.app-puce.rappel { background: var(--pastel-2); color: var(--accent); }
.app-puce.grace { background: var(--pastel-1); color: var(--rouge); }
:root[data-theme="sombre"] .app-icone { color: #fff; }
.lat-tete { justify-content: space-between; gap: 8px; }
.lat-apps { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--encre-2); display: grid; place-items: center; cursor: pointer; transition: background-color .15s ease-out, color .15s ease-out; }
.lat-apps:hover { background: var(--survol); color: var(--encre); }
.lat-apps svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
body.menu-replie .lat-apps { display: none; }
.rail .rail-apps svg { fill: currentColor; stroke: none; }
@media (max-width: 860px) {
  .apps-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .app-tuile { min-height: 170px; padding: 22px 10px 16px; border-radius: 22px; }
  .app-icone { width: 58px; height: 58px; border-radius: 19px; }
  .app-puce { position: static; margin-top: 4px; }
}
.apps-tete .installer { justify-self: center; margin-top: 12px; gap: 8px; }
.apps-tete .installer svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.installer-aide { max-width: 60ch; justify-self: center; margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--encre-3); font-size: 12.5px; color: var(--encre-2); }
