/* Style « Apple » (variante verre retenue par Vincent, 29/10/2026 ; règles dans .claude/rules/design.md).
   Base commune, chargée APRÈS style.css : elle n'en reprend que ce qui change. Fichier à part pendant la transition
   (moins de conflits avec les conversations qui modifient style.css) ; à fondre dans style.css une fois en ligne.
   Police (option 3) : système partout, Bricolage Grotesque pour le seul nom « Humalo » (.brand-name).
   Effet verre (backdrop-filter) : menu, barres, cartes et fenêtres seulement, jamais les cases du planning. */

:root {
  --font-sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --a-text: #1D1D1F;
  --a-muted: #56565B;           /* gris secondaire : ≥ 4,9:1 partout, même posé sur un halo (audit 29/10/2026) */
  --a-sep: rgba(60,60,67,.12);
  --a-sep-light: rgba(60,60,67,.07);
  --a-fill: rgba(118,118,128,.12);
  --a-primary: #1F7A5A;
  --a-primary-dark: #17634A;
  --a-primary-soft: rgba(31,122,90,.12);
  --a-glass: rgba(255,255,255,.72);
  --a-glass-strong: rgba(255,255,255,.88);
  --a-glass-edge: rgba(255,255,255,.8);
  --a-shadow: 0 1px 1px rgba(0,0,0,.03), 0 10px 30px rgba(30,40,35,.08);
  --a-shadow-pill: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04);
  --a-blur: blur(30px) saturate(180%);
  /* Jetons de style.css ajustés : fond, bordures et textes plus doux. */
  --bg: #F5F5F7;
  --border: rgba(60,60,67,.12);
  --text: #1D1D1F;
  --text-muted: #56565B;
  /* Textes des pastilles et alertes foncés pour atteindre 4,5:1 sur leur fond clair (contrôle du 29/10/2026). */
  --success: #1F7A45;
  --warning: #8F5E00;
  --danger: #B23A26;
  --radius: 16px;
}

/* ---------- Fond et police ---------- */
html, body { font-family: var(--font-sys); -webkit-font-smoothing: antialiased; }
body {
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(110,205,160,.55), transparent 60%),
    radial-gradient(700px 520px at 95% 5%, rgba(255,170,130,.50), transparent 60%),
    radial-gradient(800px 620px at 60% 110%, rgba(140,185,255,.45), transparent 60%),
    #F5F5F7;
  background-attachment: fixed;
}
h1, h2, h3, h4,
.tab-btn, .bottom-nav-item, .kpi-value, .repeat-title, .org-empty-title, .perm-table th,
.my-week-summary-value, .my-day-num, .my-shift-card-time, .fin-tile-value, .fin-gauge-value, .fin-adjust-value,
.soon-title, .doc-fields-title {
  font-family: var(--font-sys);
}
h1, h2, h3, h4 { color: var(--a-text); letter-spacing: -.02em; }
.brand-name { font-weight: 800; letter-spacing: -.02em; }

/* ---------- Menu (ordinateur) : panneau de verre flottant ---------- */
.sidebar {
  width: 196px; margin: 10px 0 10px 10px; border-radius: 22px;
  background: rgba(255,255,255,.55); color: var(--a-text);
  border: 1px solid var(--a-glass-edge); box-shadow: var(--a-shadow);
  -webkit-backdrop-filter: var(--a-blur); backdrop-filter: var(--a-blur);
}
.sidebar-brand .brand-name { color: var(--a-text); font-size: 20px; }
.nav-item { color: #3A3A3C; font-weight: 500; font-size: 13.5px; border-radius: 10px; padding: 8px 10px; }
.nav-item:hover { background: var(--a-fill); color: var(--a-text); }
.nav-item.active { background: var(--a-primary); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(31,122,90,.28); }
.nav-icon { width: 19px; height: 19px; flex-shrink: 0; color: var(--a-primary); }
.nav-item.active .nav-icon { color: #fff; }
.sidebar-footer { border-top-color: var(--a-sep); }
.sidebar-footer .btn-ghost { color: var(--a-muted); }
.sidebar-footer .btn-ghost:hover { background: var(--a-fill); color: var(--a-text); }

/* ---------- Menu réduit (ordinateur, toutes les pages ; décision de Vincent, 29/10/2026) ----------
   Une colonne d'icônes toujours visible ; au survol (ou au clavier : focus-within) elle s'ouvre par-dessus la page,
   sans la décaler. But : donner toute la largeur au contenu (semaine entière du planning sans défiler). */
@media (min-width: 861px) {
  .sidebar {
    position: fixed; top: 10px; bottom: 10px; left: 10px; z-index: 60; margin: 0; width: 60px; overflow: hidden;
    padding: 16px 8px; transition: width .18s ease, box-shadow .18s ease, background-color .18s ease;
  }
  .sidebar:hover, .sidebar:focus-within { width: 210px; background: rgba(255,255,255,.9); box-shadow: 0 20px 50px rgba(20,30,25,.18); }
  .main-col { margin-left: 80px; }
  .sidebar-brand { padding: 0 6px 16px; white-space: nowrap; }
  .sidebar-brand .brand-name { font-size: 18px; }
  /* Menu fermé : seule l'initiale « H » d'Humalo reste. */
  .sidebar:not(:hover):not(:focus-within) .brand-name { font-size: 0; }
  .sidebar:not(:hover):not(:focus-within) .brand-name::first-letter { font-size: 22px; }
  .nav-item { white-space: nowrap; padding: 9px 11px; gap: 14px; }
  .nav-item span, .sidebar-footer { transition: opacity .12s; }
  .sidebar:not(:hover):not(:focus-within) .nav-item span,
  .sidebar:not(:hover):not(:focus-within) .sidebar-footer { opacity: 0; }
  .sidebar-footer .btn { white-space: nowrap; }
}

/* ---------- Barre du haut : transparente, grand titre ---------- */
.topbar { background: transparent; border-bottom: 0; height: 72px; padding: 0 28px; }
.topbar h2 { font-size: 28px; font-weight: 700; }
.user-chip { background: var(--a-glass); border: 1px solid var(--a-glass-edge); box-shadow: 0 1px 3px rgba(0,0,0,.06); border-radius: 999px; }
.user-chip:hover, .user-chip[aria-expanded="true"] { background: #fff; }
.org-chip[disabled]:hover { background: var(--a-glass); }
.user-menu-list { background: var(--a-glass-strong); border: 1px solid var(--a-glass-edge); -webkit-backdrop-filter: var(--a-blur); backdrop-filter: var(--a-blur); }
.user-menu-item:hover, .user-menu-item:focus-visible { background: var(--a-fill); color: var(--a-text); }
.notif-btn { color: var(--a-text); }
.avatar { background: linear-gradient(135deg, #34C38F, #1F7A5A); color: #fff; }
.view-content { padding: 8px 28px 28px; }

/* ---------- Onglets : contrôle segmenté ----------
   Chaque .tab-btn porte le fond gris de la piste ; la pilule blanche de l'onglet actif est un ::before
   (isolation : elle passe sous le texte). Le bouton d'action (.tabs-action) reste à droite, hors de la piste. */
.tabs { border-bottom: 0; gap: 0; align-items: center; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  position: relative; isolation: isolate; background: var(--a-fill); border: 0; border-radius: 0;
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px;
  font-size: 13px; font-weight: 600; color: var(--a-muted); white-space: nowrap; flex-shrink: 0;
}
.tab-btn .badge { margin-left: 0; padding: 1px 7px; font-size: 11px; line-height: 1.4; }
.tab-btn:first-child { border-radius: 999px 0 0 999px; padding-left: 18px; }
.tab-btn:not(:has(+ .tab-btn)) { border-radius: 0 999px 999px 0; padding-right: 18px; }
.tab-btn:first-child:not(:has(+ .tab-btn)) { border-radius: 999px; }
/* Onglet actif : texte vert foncé + pilule blanche cernée (contraste ≥ 3:1 avec la piste ; audit 1.1). */
.tab-btn.active { color: var(--a-primary-dark); border: 0; }
.tab-btn.active::before {
  content: ''; position: absolute; inset: 3px; z-index: -1; border-radius: 999px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.22), var(--a-shadow-pill);
}
.tabs-action { padding: 0 0 0 12px; position: sticky; right: 0; }
.view-switch { background: var(--a-fill); border: 0; border-radius: 999px; padding: 3px; gap: 0; }
.switch-btn { border-radius: 999px; color: var(--a-muted); padding: 6px 15px; }
.switch-btn.active { background: #fff; color: var(--a-primary-dark); box-shadow: 0 0 0 1px rgba(0,0,0,.22), var(--a-shadow-pill); }
/* Piste trop longue (téléphone, Paramètres…) : fondu au bord droit pour montrer qu'il y a une suite (audit 1.2). */
.tabs:not(:has(.tabs-action:not(:empty))) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.tabs:not(:has(.tabs-action:not(:empty))) .tab-btn:last-child { margin-right: 28px; }

/* ---------- Boutons : pilules ---------- */
.btn { border-radius: 999px; font-size: 13.5px; padding: 8px 18px; transition: background .15s, box-shadow .15s, transform .1s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-sm { padding: 5px 13px; font-size: 12.5px; }
.btn-primary { background: linear-gradient(180deg, #22845F, #1F7A5A); color: #fff; box-shadow: 0 4px 12px rgba(31,122,90,.28); }
.btn-primary:hover { background: linear-gradient(180deg, #1F7A5A, #17634A); }
.btn-outline { background: var(--a-glass); border-color: rgba(0,0,0,.07); box-shadow: 0 1px 3px rgba(0,0,0,.06); color: var(--a-text); }
.btn-outline:hover { border-color: rgba(0,0,0,.07); color: var(--a-primary); background: #fff; }
.btn-ghost { color: var(--a-primary-dark); }   /* texte vert souvent posé sur le fond : #17634A ≥ 4,8:1 */
.btn-ghost:hover { background: var(--a-primary-soft); color: var(--a-primary-dark); }
.btn-danger { background: var(--a-glass); border-color: rgba(0,0,0,.07); color: var(--danger); box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* ---------- Champs : fond gris, sans bordure ---------- */
.field span { font-weight: 500; color: var(--a-muted); font-size: 12.5px; }
.field input, .field select, .field textarea,
.view-content input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
.view-content select, .view-content textarea,
.modal-card input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
.modal-card select, .modal-card textarea {
  background-color: var(--a-fill); border-color: transparent; border-radius: 10px;
}
:is(.view-content, .modal-card, .field) :is(input, select, textarea):focus { background-color: #fff; border-color: transparent; }
/* Repère du clavier commun à toute l'appli (audit 1.3) : contour vert plein de 2 px, décalé de 2 px ; les champs
   l'ont dès qu'on y entre, le reste seulement au clavier. #1F7A5A : ≥ 4,8:1 sur le fond. */
:is(a, button, [role="button"], [tabindex]:not([tabindex="-1"]), summary):focus-visible,
:is(input, select, textarea):focus { outline: 2px solid var(--a-primary); outline-offset: 2px; }
.tab-btn:focus-visible { outline-offset: -2px; border-radius: 999px; }

/* ---------- Cartes, tableaux, indicateurs : verre ---------- */
/* Cartes et tableaux : blanc presque opaque, sans flou (règle : le verre est réservé au menu, aux barres et aux
   fenêtres — fluidité des longues listes sur téléphone ; audit du 29/10/2026). */
.card, .kpi-card, .data-table, .toolbar-group, .date-nav-box {
  background: rgba(255,255,255,.9); border: 1px solid var(--a-glass-edge); box-shadow: var(--a-shadow);
}
.card, .data-table { border-radius: 18px; }
.kpi-card { border-radius: 16px; padding: 12px 14px; }
.kpi-value { font-weight: 700; letter-spacing: -.02em; color: var(--a-text); }
.toolbar-group, .date-nav-box { border-radius: 999px; }
.data-table { border-collapse: separate; border-spacing: 0; }
.data-table th { background: transparent; text-transform: none; font-weight: 500; color: var(--a-muted); border-bottom-color: var(--a-sep); }
.data-table td { border-bottom-color: var(--a-sep-light); }
.data-table tr.clickable:hover { background: rgba(31,122,90,.05); }
.badge { font-weight: 600; padding: 3px 10px; }
.banner-info { border-radius: 14px; }

/* ---------- Planning : grille façon Calendrier ----------
   Cadre blanc arrondi, sans flou (grande surface qui défile : fluidité). En-têtes et colonne des noms figés :
   fond opaque obligatoire, sinon la grille se voit à travers en défilant. */
.planning-table-scroll, .gantt-wrap {
  background: rgba(255,255,255,.92); border: 1px solid var(--a-glass-edge); border-radius: 18px; box-shadow: var(--a-shadow);
}
.planning-table { background: transparent; }
.planning-table th, .planning-table td { border-color: var(--a-sep-light); }
.planning-table th {
  background: #FAFAFC; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--a-muted); border-bottom-color: var(--a-sep);
}
.planning-table td.emp-col, .planning-table td.total-cell { background: #FBFBFD; }
.planning-table th.today, .planning-table th.today.locked { background: #FAFAFC; color: #D70015; }
.planning-table td.day-cell.today { background: rgba(255,59,48,.035); }
.planning-table td.day-cell:hover { background: rgba(31,122,90,.06); }
.planning-table td.day-cell.locked, .planning-table td.day-cell.locked:hover { background: #F0F0F2; }
.planning-table th.locked { background: #EDEDF0; }
.tot-main.tot-ok { color: var(--a-primary); }
/* Semaine sur toute la largeur (29/10/2026) : noms et totaux de largeur fixe, les 7 jours se partagent le reste.
   En dessous d'une largeur lisible (min-width), la grille défile de côté comme avant. Vue Mois (.compact) inchangée. */
@media (min-width: 861px) {
  .planning-table:not(.compact) { min-width: 1040px; }
  .planning-table:not(.compact) th:not(:first-child):not(:last-child), .planning-table:not(.compact) td.day-cell { width: auto; }
  .planning-table:not(.compact) th:first-child, .planning-table:not(.compact) td.emp-col { width: 170px; }
  .planning-table:not(.compact) th:last-child, .planning-table:not(.compact) td.total-cell { width: 96px; }
}
/* Barre du planning sur une ligne dès qu'elle tient (écran d'ordinateur courant, 1280 px) ; plus étroit : 2 lignes
   plutôt que des outils coupés hors de l'écran. */
@media (min-width: 1240px) { .planning-toolbar { flex-wrap: nowrap; } }
/* Date et flèches en noir : sans couleur posée, iPhone les affichait en bleu (couleur des boutons de Safari). */
.date-nav-box .icon-btn, .date-nav-box .week-label-btn { color: var(--a-text); }
.date-nav-center:hover .week-label-btn, .date-nav-box .icon-btn:hover { color: var(--green-700); }
/* Jour / Semaine / Mois, Équipe / Moi : cases de même largeur (celle du plus long libellé), 31/10/2026. */
.planning-toolbar > .view-switch { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
/* Horaire d'un shift sur une seule ligne en vue Semaine (demande de Vincent) : la coupure <wbr> ne sert qu'à la vue
   Mois. Case trop étroite : la durée « (7.5h) » disparaît plutôt que de couper l'horaire. */
.planning-table:not(.compact) .shift-time-line wbr { display: none; }
.planning-table:not(.compact) .shift-chip { container-type: inline-size; }
@container (max-width: 100px) { .shift-chip .shift-hours { display: none; } }
/* Shift : la couleur du poste (fond posé par data-s-bg, en style direct) ne reste visible que sur la barre de
   gauche ; un voile blanc par-dessus donne la teinte claire, texte foncé. !important : le style direct
   « background » remet à zéro l'image de fond. Deux couches d'image pour que la couleur couvre aussi la bordure. */
.gantt-bar {
  border-left: 4px solid transparent; border-radius: 9px; color: rgba(0,0,0,.8);
  background-image: linear-gradient(rgba(255,255,255,.78), rgba(255,255,255,.78)), linear-gradient(transparent, transparent) !important;
  background-clip: padding-box, border-box !important; background-origin: padding-box !important;
}
/* Shift du planning (retour de Vincent, 03/11/2026 : la couleur du poste débordait en trait le long du haut ou au
   milieu du shift, sur Safari) : plus de bordure + double fond ; la couleur du poste arrive dans --c (data-s-c) et
   sert à la fois à la teinte claire du fond et à la barre de gauche, dessinée par une ombre intérieure qui suit
   l'arrondi sans jamais déborder. */
.shift-chip {
  border-left: 0; border-radius: 9px; color: rgba(0,0,0,.8); padding-left: 9px;
  background: color-mix(in srgb, var(--c, #8E8E93) 22%, #fff) !important;
  box-shadow: inset 4px 0 0 var(--c, #8E8E93);
}
.planning-table.compact .shift-chip { border-radius: 7px; padding-left: 7px; box-shadow: inset 3px 0 0 var(--c, #8E8E93); }
/* Repos, congés, absences : même hauteur qu'un shift en vue Semaine (retour de Vincent, 03/11/2026). */
.planning-table:not(.compact) .shift-chip, .planning-table:not(.compact) .absence-chip { min-height: 44px; }
.shift-chip .shift-hours, .gantt-bar-time { opacity: .7; }
.absence-chip, .gantt-absence-bar { border-radius: 9px; }
.absence-chip.confirmed { background: var(--a-fill); color: #3A3A3C; border-left: 4px solid #8E8E93; }
.gantt-header, .gantt-emp-col-header, .gantt-emp-col, .gantt-total { background: #FAFAFC; }
.gantt-emp-col-header, .gantt-total-header { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--a-muted); }
.gantt-hour { border-left-color: var(--a-sep-light); }
.gantt-row { border-bottom-color: var(--a-sep-light); }

/* ---------- Fenêtres : feuille de verre ---------- */
.modal-root { background: rgba(0,0,0,.22); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-card {
  background: var(--a-glass-strong); border-radius: 24px; box-shadow: 0 30px 60px rgba(20,30,25,.18);
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
}
.toast { background: rgba(29,29,31,.88); border-radius: 14px; -webkit-backdrop-filter: var(--a-blur); backdrop-filter: var(--a-blur); }

/* ---------- Écran de connexion ---------- */
.auth-screen { background: transparent; }
.auth-card { background: var(--a-glass-strong); border: 1px solid var(--a-glass-edge); border-radius: 24px;
  -webkit-backdrop-filter: var(--a-blur); backdrop-filter: var(--a-blur); }

/* ---------- Téléphone ---------- */
@media (max-width: 860px) {
  .topbar { height: auto; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .topbar h2 { font-size: 26px; }
  .view-content { padding: 6px 16px 16px; }
  .tab-btn { padding: 7px 12px; }
  /* Barre du bas : pilule de verre flottante (élément normal de la colonne, pas de position: fixed). */
  .bottom-nav {
    margin: 0 12px calc(10px + env(safe-area-inset-bottom)); padding-bottom: 0; border-radius: 26px;
    border: 1px solid var(--a-glass-edge); background: var(--a-glass); box-shadow: 0 10px 30px rgba(0,0,0,.12);
    -webkit-backdrop-filter: var(--a-blur); backdrop-filter: var(--a-blur);
  }
  /* Mêmes marges pour toutes les cases : seule la couleur change à la sélection, sinon les cases se décalaient
     sur le côté au toucher (retour de Vincent, 31/10/2026). */
  /* iPhone, application installée : quand la page s'arrête au-dessus du bas de l'écran (défaut d'iOS mesuré par
     fitStandaloneShell, main.js), la zone de la barre d'accueil est déjà hors de la page : marge du bas réduite. */
  .ios-short-view .bottom-nav { margin-bottom: 6px; }
  .bottom-nav-item { flex-direction: column; gap: 2px; font-weight: 600; font-size: 11px; border-top: 0; min-height: 46px; margin: 5px 2px;
    border-radius: 20px; color: #3A3A3C; -webkit-tap-highlight-color: transparent; }
  .bottom-nav-item .nav-icon { width: 22px; height: 22px; color: inherit; }
  .bottom-nav-item.active { color: var(--a-primary); background: var(--a-primary-soft); }
}

/* ---------- Préférences d'accessibilité du système (audit 2.1) ---------- */
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .sidebar:hover, .sidebar:focus-within, .user-chip, .user-menu-list, .modal-card, .auth-card, .toast, .bottom-nav, .btn-outline, .btn-danger {
    -webkit-backdrop-filter: none; backdrop-filter: none; background-color: #fff;
  }
  .toast { background-color: #1D1D1F; }
  .modal-root { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(0,0,0,.4); }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active:not(:disabled) { transform: none; }
  .sidebar, .nav-item span, .sidebar-footer, .btn { transition: none; }
}

/* ---------- Zones à toucher ≥ 44 px sur téléphone (audit 1.6, règles d'Apple) ---------- */
@media (max-width: 860px) {
  .tab-btn { height: 44px; }
  .switch-btn { min-height: 44px; }
  .notif-btn { min-width: 44px; min-height: 44px; justify-content: center; }
  .user-chip { min-height: 44px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
}

/* ---------- Planning, téléphone : barre sur 2 lignes + panneau « Outils du planning » (29/10/2026) ----------
   Ligne 1 : semaine + Publier ; ligne 2 : Jour / Semaine / Mois, Équipe / Moi, « … ». Cadenas et outils dans le
   panneau (openToolsSheet, planning.js). Semaine verrouillée : rappel « verrouillée » sous la date. */
.tools-sheet-btn { display: none; }
@media (max-width: 860px) {
  /* Deux lignes à tailles fixes (retours de Vincent, 31/10/2026) : rien ne bouge d'une vue à l'autre.
     Ligne 1 : date · Publier (ou « À jour », même largeur, même hauteur) · « … » ;
     ligne 2 : Jour / Semaine / Mois · Frise / Équipe / Moi (ou Équipe / Moi). Cases de même largeur dans chaque sélecteur. */
  .planning-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 104px 44px; gap: 8px; align-items: center; }
  .planning-toolbar .date-nav-box .icon-btn { padding: 10px 5px; }
  .planning-toolbar .date-nav-box { grid-column: 1; grid-row: 1; width: auto; min-height: 48px; }
  .planning-toolbar #btn-publish, .planning-toolbar > .publish-state { grid-column: 2; grid-row: 1; min-height: 48px; justify-content: center; padding: 0 8px; }
  .planning-toolbar > .tools-sheet-btn { grid-column: 3; grid-row: 1; justify-self: end; }
  .planning-toolbar:not(:has(.tools-sheet-btn)) #btn-publish, .planning-toolbar:not(:has(.tools-sheet-btn)) > .publish-state { grid-column: 2 / 4; }
  .planning-toolbar:not(:has(#btn-publish)):not(:has(.publish-state)) .date-nav-box { grid-column: 1 / 3; }
  .planning-toolbar > .view-switch:not(.scope-switch) { grid-column: 1; grid-row: 2; width: auto; }
  .planning-toolbar:not(:has(.scope-switch)) > .view-switch { grid-column: 1 / 4; }
  .planning-toolbar > .scope-switch { grid-column: 2 / 4; grid-row: 2; }
  .planning-toolbar > .view-switch { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .planning-toolbar > .view-switch .switch-btn { padding: 0 2px; white-space: nowrap; font-size: 13.5px; }
  .planning-toolbar > .toolbar-group, .planning-toolbar > #btn-lock, .planning-toolbar > .toolbar-spacer { display: none; }
  .tools-sheet-btn {
    display: inline-flex; width: 44px; height: 44px; border-radius: 999px; color: var(--a-text);
    background: rgba(255,255,255,.9); border: 1px solid rgba(0,0,0,.07); box-shadow: 0 1px 3px rgba(0,0,0,.06);
  }
  .planning-toolbar:has(#btn-lock.is-locked) .week-num-sub::after { content: ' · verrouillée'; color: var(--warning); }

  /* Panneau qui monte du bas de l'écran. */
  .modal-root:has(.modal-sheet) { align-items: flex-end; padding: 0; }
  .modal-card.modal-sheet {
    max-width: none; width: 100%; max-height: 88dvh; border-radius: 26px 26px 0 0; background: rgba(246,246,248,.96);
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
  }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; font-size: 17px; }
.sheet-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--a-fill); color: var(--a-muted); font-size: 14px; }
.sheet-group-title { margin: 0 0 6px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--a-muted); }
.sheet-group { background: #fff; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.sheet-item {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 14px;
  border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--a-text); text-align: left;
}
.sheet-item + .sheet-item::before { content: ''; position: absolute; top: 0; left: 54px; right: 0; height: 1px; background: var(--a-sep); }
.sheet-item::after { content: ''; margin-left: auto; flex-shrink: 0; width: 8px; height: 8px; border: solid #C7C7CC; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.sheet-item:active:not(:disabled) { background: var(--a-fill); }
.sheet-item-icon { display: inline-flex; width: 26px; justify-content: center; color: var(--a-primary); flex-shrink: 0; }
.sheet-item-label { line-height: 1.25; }
.sheet-item.is-danger, .sheet-item.is-danger .sheet-item-icon { color: var(--danger); }
.sheet-item:disabled { color: #8E8E93; cursor: default; }
.sheet-item:disabled .sheet-item-icon { color: #C7C7CC; }

/* ---------- Fiche salarié (29/10/2026) ---------- */
.back-link { color: var(--a-primary-dark); font-weight: 600; font-size: 15px; }
.fiche-title-row {
  gap: 16px; flex-wrap: wrap; padding: 18px 20px; margin: 4px 0 16px; border-radius: 22px;
  background: rgba(255,255,255,.9); border: 1px solid var(--a-glass-edge); box-shadow: var(--a-shadow);
}
.fiche-avatar { width: 60px; height: 60px; font-size: 21px; box-shadow: 0 6px 16px rgba(31,122,90,.28); }
.fiche-id { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.fiche-id h2 { font-size: 24px; }
.fiche-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fiche-tags .emp-teams { margin: 0; }
/* « Équipes » : lu par les lecteurs d'écran, masqué à l'œil (les étiquettes parlent d'elles-mêmes). */
.fiche-tags .emp-teams-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fiche-tags .emp-teams { position: relative; }
.acc-status { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.acc-status small { color: var(--a-muted); font-size: 12px; }
/* Champs avec contour (audit 2.2) : on voit où écrire, même vide. #8E8E93 : ≥ 3:1 sur blanc. */
.field input, .field select, .field textarea,
.view-content input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
.view-content select, .view-content textarea,
.modal-card input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
.modal-card select, .modal-card textarea { background-color: #fff; border: 1px solid #8E8E93; }
@media (max-width: 860px) {
  .fiche-title-row { padding: 14px; gap: 12px; }
  .fiche-avatar { width: 48px; height: 48px; font-size: 17px; }
  .fiche-id h2 { font-size: 20px; }
  .fiche-actions { width: 100%; }
  .acc-status { flex-direction: row; align-items: center; gap: 8px; }
}

/* ---------- Liste Salariés (29/10/2026) ----------
   Recherche façon iPhone (loupe, champ gris arrondi). Téléphone : le tableau devient une liste (variante A
   validée par Vincent) par la seule mise en page — tri, filtres, sélection et ouverture de la fiche inchangés. */
.emp-list-search { position: relative; }
.emp-list-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--a-muted); pointer-events: none; }
.emp-list-search input { padding-left: 36px; border-radius: 12px; }
.emp-list-head { display: none; }
@media (max-width: 860px) {
  .emp-filter-bar { flex-wrap: wrap; }
  .emp-filter-bar .emp-list-search { flex: 1 1 0; min-width: 0; margin: 0; }
  .emp-filter-bar .emp-filter-break { flex-basis: 100%; height: 0; }
  /* Filtres et tri : une seule ligne qui défile de côté. */
  .emp-filter-bar { row-gap: 8px; }
  .emp-filter-bar .emp-filter-select { flex: 0 0 auto; width: auto; }
  .emp-list-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 8px; font-size: 13px; color: var(--a-muted); }
  .emp-list-head .fin-link { font-size: 15px; font-weight: 600; color: var(--a-primary-dark); min-height: 44px; padding: 0 4px; text-decoration: none; }

  .emp-table, .emp-table tbody { display: block; }
  .emp-table { border-radius: 18px; overflow: hidden; }
  .emp-table thead { display: none; }
  .emp-table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; grid-template-areas: "name role chev" "poste compte chev";
    align-items: center; column-gap: 10px; row-gap: 2px; padding: 10px 14px; position: relative; min-height: 64px;
  }
  /* Mode sélection : case à gauche, pastilles masquées pour laisser la place au nom, ligne cochée surlignée. */
  .emp-table.is-selecting tr { grid-template-columns: 34px minmax(0, 1fr) 14px; grid-template-areas: "check name chev" "check poste chev"; }
  .emp-table.is-selecting td:nth-child(8), .emp-table.is-selecting td:nth-child(9) { display: none; }
  .emp-table.is-selecting tr + tr::before { left: 100px; }
  .emp-table tr.is-selected { background: var(--a-primary-soft); }
  .emp-table tr.is-selected td { background: transparent; }
  .emp-table tr + tr::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--a-sep); }
  .emp-table tr::after { content: ''; grid-area: chev; width: 8px; height: 8px; border: solid #C7C7CC; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
  .emp-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .emp-table td:nth-child(1) { display: none; grid-area: check; }
  .emp-table.is-selecting td:nth-child(1) { display: flex; align-items: center; }
  .emp-table.is-selecting td:nth-child(1) input { width: 22px; height: 22px; }
  .emp-table td:nth-child(2) { grid-area: name; }
  .emp-table td:nth-child(2) .emp-row-name { font-size: 16px; font-weight: 600; gap: 12px; white-space: nowrap; overflow: hidden; }
  .emp-table td:nth-child(2) .avatar { width: 40px; height: 40px; font-size: 14px; flex-shrink: 0; }
  .emp-table td:nth-child(3) { grid-area: poste; padding-left: 52px; margin-top: -14px; font-size: 13.5px; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .emp-table td:nth-child(4), .emp-table td:nth-child(5), .emp-table td:nth-child(6), .emp-table td:nth-child(7) { display: none; }
  .emp-table td:nth-child(8) { grid-area: role; justify-self: end; }
  .emp-table td:nth-child(9) { grid-area: compte; justify-self: end; }
  .emp-table td:nth-child(9) .status-ok { display: none; }   /* compte actif : rien à signaler */
  .emp-table td:nth-child(8) [class*="role-badge-"] { color: var(--a-muted); font-size: 13px; }
  .emp-table .badge { white-space: nowrap; }
}

/* ---------- Pastilles d'état et rôles (29/10/2026) ----------
   Rond vert coché = validé / à jour ; rond orange = en attente ; rouge = à reprendre ; gris = sans objet
   (statusMark, js/main.js). Rôle d'un salarié : texte simple, sans pilule de couleur. */
.status-mark { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.status-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; flex-shrink: 0; }
.status-icon .icon { width: 12px; height: 12px; stroke-width: 3; }
.status-ok .status-icon { background: #34C759; }      .status-ok { color: var(--success); }
.status-wait .status-icon { background: #FF9500; }    .status-wait { color: var(--warning); }
.status-alert .status-icon { background: #FF3B30; }   .status-alert { color: var(--danger); }
.status-off { color: var(--a-muted); font-weight: 500; }
.status-mark.is-quiet .status-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.status-mark.is-quiet { position: relative; }
.emp-table [class*="role-badge-"], .fiche-tags [class*="role-badge-"] {
  background: none; padding: 0; border-radius: 0; font-size: 13.5px; font-weight: 500; color: #3A3A3C;
}
/* Bouton Publier : nombre de salariés à prévenir ; « ✓ À jour » quand tout est envoyé. */
.publish-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px;
  border-radius: 999px; background: rgba(255,255,255,.25); font-size: 12px; font-weight: 700; }
#btn-publish { display: inline-flex; align-items: center; white-space: nowrap; }
.publish-state { display: inline-flex; align-items: center; padding: 0 6px; flex-shrink: 0; }
@media (max-width: 860px) {
  .planning-toolbar > .publish-state { border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.07); }
  .planning-toolbar:not(:has(#btn-publish)):not(:has(.publish-state)):not(:has(.tools-sheet-btn)) .date-nav-box { grid-column: 1 / 4; }
}
/* Pastilles dans le sélecteur à cases (fenêtre « Publier le planning »…) : sur la ligne du nom. */
.staff-picker .sp-row .status-mark { display: inline-flex; margin-left: 8px; vertical-align: -3px; font-size: 12px; }
.staff-picker .sp-row .status-mark span { display: inline-flex; font-size: 12px; font-weight: 600; color: inherit; }
.staff-picker .sp-row .status-mark .status-icon { width: 16px; height: 16px; color: #fff; }
.staff-picker .sp-row .status-mark .status-icon .icon { width: 10px; height: 10px; }

/* ---------- Menu « Plus » du téléphone (30/10/2026) : panneau groupé (classes sheet-* du panneau Outils) ---------- */
a.sheet-item { text-decoration: none; }
.sheet-profile { min-height: 68px; }
.sheet-profile .avatar { width: 44px; height: 44px; font-size: 15px; flex-shrink: 0; }
.sheet-profile .sheet-item-label { display: flex; flex-direction: column; gap: 2px; }
.sheet-profile b { font-size: 16px; }
.sheet-profile small { font-size: 13px; color: var(--a-muted); }
.sheet-logout { justify-content: center; color: var(--danger); font-weight: 600; }
.sheet-logout::after { display: none; }
.sheet-group.more-menu { display: block; margin-top: 0; }
.sheet-item.more-menu-item { text-align: left; border: 0; border-radius: 0; background: transparent; padding: 0 14px; font-weight: 400; }

/* ---------- Documents et Signature (30/10/2026) ---------- */
.doc-vault-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--a-muted); white-space: nowrap; }
.doc-vault-note .icon { width: 15px; height: 15px; }
/* « Rien à faire » : carte avec une coche verte. */
.empty-state.is-done {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 16px; border-radius: 18px;
  background: rgba(255,255,255,.9); border: 1px solid var(--a-glass-edge); box-shadow: var(--a-shadow);
}
.empty-state-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(52,199,89,.15); color: var(--success); }
.empty-state-icon .icon { width: 22px; height: 22px; stroke-width: 2.5; }
/* Téléphone : tableaux de Documents et Signature en liste (une ligne par élément, titre puis détails en gris). */
@media (max-width: 860px) {
  :is(.doc-table, .sign-todo-table, .sign-track-table), :is(.doc-table, .sign-todo-table, .sign-track-table) tbody { display: block; }
  :is(.doc-table, .sign-todo-table, .sign-track-table) thead { display: none; }
  :is(.doc-table, .sign-todo-table, .sign-track-table) tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center;
    padding: 12px 14px; position: relative;
  }
  :is(.doc-table, .sign-todo-table, .sign-track-table) tr + tr::before { content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--a-sep); }
  :is(.doc-table, .sign-todo-table, .sign-track-table) td { display: block; padding: 0; border: 0; min-width: 0; }
  :is(.doc-table, .sign-todo-table, .sign-track-table) td:empty { display: none; }
  :is(.doc-table, .sign-todo-table, .sign-track-table) td:nth-child(1) { font-size: 15px; font-weight: 600; color: var(--a-text); }
  /* Documents : titre / salarié + statut / date + action */
  .doc-table tr { grid-template-areas: "title title" "who status" "date action"; }
  .doc-table td:nth-child(1) { grid-area: title; }
  .doc-table td:nth-child(2) { grid-area: who; font-size: 13.5px; color: var(--a-muted); }
  .doc-table td:nth-child(3) { grid-area: date; font-size: 13px; color: var(--a-muted); }
  .doc-table td:nth-child(4) { grid-area: status; justify-self: end; }
  .doc-table td:nth-child(5) { grid-area: action; justify-self: end; }
  /* Signature, suivi : titre + statut / salarié · type */
  .sign-track-table tr { grid-template-areas: "title status" "who type"; }
  .sign-track-table td:nth-child(1) { grid-area: title; }
  .sign-track-table td:nth-child(2) { grid-area: who; font-size: 13.5px; color: var(--a-muted); }
  .sign-track-table td:nth-child(3) { grid-area: type; justify-self: end; font-size: 13px; color: var(--a-muted); }
  .sign-track-table td:nth-child(4) { grid-area: status; justify-self: end; }
  /* Signature, à signer : titre + action / type · date */
  .sign-todo-table tr { grid-template-areas: "title action" "type date"; }
  .sign-todo-table td:nth-child(1) { grid-area: title; }
  .sign-todo-table td:nth-child(2) { grid-area: type; font-size: 13px; color: var(--a-muted); }
  .sign-todo-table td:nth-child(3) { grid-area: date; justify-self: end; font-size: 13px; color: var(--a-muted); }
  .sign-todo-table td:nth-child(4) { grid-area: action; justify-self: end; }
}

/* ---------- Feuilles d'heures (30/10/2026) ---------- */
/* Lien « Voir › » : texte vert + chevron, à la place d'un bouton encadré (lignes plus légères). */
.link-chevron { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 6px 2px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--a-primary-dark); cursor: pointer; white-space: nowrap; }
.link-chevron::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.ts-week-row td { background: #FAFAFC; font-weight: 700; font-size: 13px; color: var(--a-text); padding: 10px 14px; }
@media (max-width: 860px) {
  .ts-table, .ts-table tbody { display: block; }
  .ts-table thead { display: none; }
  .ts-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who status" "kind action" "date action"; column-gap: 10px; row-gap: 2px; align-items: center; padding: 12px 14px; position: relative; }
  .ts-table tr + tr::before { content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--a-sep); }
  .ts-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .ts-table td:nth-child(1) { grid-area: who; font-size: 15px; font-weight: 600; }
  .ts-table td:nth-child(2) { grid-area: kind; font-size: 13px; color: var(--a-muted); }
  .ts-table td:nth-child(3) { grid-area: status; justify-self: end; }
  .ts-table td:nth-child(4) { grid-area: date; font-size: 13px; color: var(--a-muted); }
  .ts-table td:nth-child(5) { grid-area: action; justify-self: end; }
  .ts-table tr.ts-week-row { display: block; padding: 0; }
  .ts-table tr.ts-week-row td { display: block; }
  .ts-table tr.ts-week-row + tr::before { display: none; }
}

/* ---------- Rapport de paie (30/10/2026) ---------- */
.rapport-table th.rapport-th { white-space: nowrap; }
.rapport-legend { margin: 10px 4px 0; font-size: 12.5px; line-height: 1.6; color: var(--a-muted); }
.rapport-legend b { color: var(--a-text); font-weight: 600; }
/* Contrôles avant export : carte blanche, rond orange, nombres en petites pastilles, liens « Ouvrir › ». */
.rapport-controls, .rapport-controls.has-warn {
  background: rgba(255,255,255,.92); border: 1px solid var(--a-glass-edge); box-shadow: var(--a-shadow); border-radius: 18px; padding: 6px 0;
}
.rapport-controls > summary { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; }
.rapport-controls.has-warn > summary::before {
  content: ''; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: #FF9500 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.rapport-controls .rapport-group, .rapport-controls .rapport-infos { margin-left: 16px; border-top: 1px solid var(--a-sep); background: none; }
.rapport-group > summary { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 0; }
.rapport-group-n { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: rgba(255,149,0,.16); color: var(--warning); font-weight: 700; }
.rapport-group-link { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--a-primary-dark); font-weight: 600; text-decoration: none; white-space: nowrap; }
.rapport-group-link::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); }

/* ---------- Demandes d'absence (30/10/2026) ---------- */
.leave-team-table tr.leave-month-row td { background: #FAFAFC; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; color: var(--a-text); }
@media (max-width: 860px) {
  .abs-req-table, .abs-req-table tbody { display: block; }
  .abs-req-table thead { display: none; }
  .abs-req-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 12px 14px; position: relative;
    grid-template-areas: "type status" "period action"; }
  .abs-req-table.has-emp tr { grid-template-areas: "who status" "type action" "period action"; }
  .abs-req-table tr + tr::before { content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--a-sep); }
  .abs-req-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .abs-req-table td:nth-child(1) { grid-area: type; font-size: 15px; font-weight: 600; }
  .abs-req-table td:nth-child(2) { grid-area: period; font-size: 13px; color: var(--a-muted); }
  .abs-req-table td:nth-child(3) { grid-area: status; justify-self: end; text-align: right; }
  .abs-req-table td:nth-child(4) { grid-area: action; justify-self: end; }
  .abs-req-table.has-emp td:nth-child(1) { grid-area: who; }
  .abs-req-table.has-emp td:nth-child(2) { grid-area: type; font-size: 13.5px; font-weight: 400; color: var(--a-muted); }
  .abs-req-table.has-emp td:nth-child(3) { grid-area: period; justify-self: start; text-align: left; font-size: 13px; color: var(--a-muted); }
  .abs-req-table.has-emp td:nth-child(4) { grid-area: status; }
  .abs-req-table.has-emp td:nth-child(5) { grid-area: action; justify-self: end; }
  /* « À valider par … » sur sa propre ligne, toute la largeur : dans la case du statut, il élargissait la colonne de
     droite et écrasait le nom et les dates (retour de Vincent, 31/10/2026). */
  .abs-req-table tr:has(.abs-approvers) { grid-template-areas: "type status" "period action" "note note"; }
  .abs-req-table.has-emp tr:has(.abs-approvers) { grid-template-areas: "who status" "type action" "period action" "note note"; }
  .abs-req-table td:has(> .abs-approvers) { display: contents; }
  .abs-req-table td:has(> .abs-approvers) > .status-mark { grid-area: status; justify-self: end; }
  .abs-req-table .abs-approvers { grid-area: note; margin-top: 6px; }
}

/* ---------- Paramètres façon Réglages du Mac (30/10/2026) ---------- */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { position: sticky; top: 0; }
.settings-nav-group { margin: 0 0 6px 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--a-muted); }
.settings-nav-list { margin-bottom: 14px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.9); border: 1px solid var(--a-glass-edge); box-shadow: var(--a-shadow); }
.settings-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none;
  font: inherit; font-size: 14px; color: var(--a-text); text-align: left; cursor: pointer; }
.settings-nav-item:hover { background: var(--a-fill); }
.settings-nav-item.active { background: var(--a-primary); color: #fff; font-weight: 600; }
.settings-nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: var(--a-primary-soft); color: var(--a-primary); }
.settings-nav-item.active .settings-nav-icon { background: rgba(255,255,255,.2); color: #fff; }
.settings-nav-icon .icon { width: 15px; height: 15px; }
.settings-back { display: none; }
@media (max-width: 860px) {
  .settings-layout { display: block; }
  .settings-nav { position: static; }
  .settings-nav-item { min-height: 46px; font-size: 16px; }
  .settings-nav-item.active { background: none; color: var(--a-text); font-weight: 400; }
  .settings-nav-item.active .settings-nav-icon { background: var(--a-primary-soft); color: var(--a-primary); }
  .settings-nav-item::after { content: ''; margin-left: auto; width: 8px; height: 8px; border: solid #C7C7CC; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
  .settings-layout:not(.is-open) .settings-main { display: none; }
  .settings-layout.is-open .settings-nav { display: none; }
  .settings-layout.is-open .settings-back { display: inline-flex; margin-bottom: 10px; }
}

/* ---------- Finances (30/10/2026) ---------- */
.fin-link { text-decoration: none; color: var(--a-primary-dark); }
/* Fiches sans taux horaire : carte blanche avec rond orange, noms en pastilles cliquables. */
.fin-warning {
  position: relative; padding: 12px 16px 12px 46px; border: 1px solid var(--a-glass-edge); border-radius: 16px;
  background: rgba(255,255,255,.92); box-shadow: var(--a-shadow); color: var(--a-text); font-size: 13.5px;
}
.fin-warning::before {
  content: ''; position: absolute; left: 16px; top: 13px; width: 20px; height: 20px; border-radius: 50%;
  background: #FF9500 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.fin-warning-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fin-name-chip { padding: 3px 11px; border-radius: 999px; background: var(--a-fill); color: var(--a-text); font-size: 12.5px; font-weight: 500; }
.fin-name-chip:hover { background: var(--a-primary-soft); color: var(--a-primary-dark); }
/* Chiffres clés : les 6 sur une ligne dès qu'il y a la place, 3 par ligne en dessous, 2 sur téléphone. */
.fin-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 1240px) { .fin-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.fin-tile { border-radius: 16px; padding: 12px 14px; background: rgba(255,255,255,.9); border: 1px solid var(--a-glass-edge); box-shadow: var(--a-shadow); border-left: 1px solid var(--a-glass-edge); }
.fin-tile.is-ok { box-shadow: inset 3px 0 0 var(--success), var(--a-shadow); }
.fin-tile.is-over { box-shadow: inset 3px 0 0 var(--danger), var(--a-shadow); }
.fin-tile-value { font-size: 24px; letter-spacing: -.02em; color: var(--a-text); }
@media (max-width: 860px) {
  .fin-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fin-tile { padding: 10px 12px; }
  .fin-tile-value { font-size: 20px; }
}

/* ---------- Organigramme et Équipes (30/10/2026) ---------- */
/* Bouton « modifier » : icône crayon Lucide dans un rond gris (au lieu du caractère ✎). */
.round-edit-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  background: var(--a-fill); color: #3A3A3C; }
.round-edit-btn:hover { background: var(--a-primary-soft); color: var(--a-primary-dark); }
.round-edit-btn .icon { width: 14px; height: 14px; }
.org-alert { background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.06); border-radius: 999px; color: var(--warning); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.org-alert:hover { border-color: rgba(255,149,0,.5); }
.org-alert svg { color: #FF9500; }
.org-viewport { background: rgba(255,255,255,.55); border: 1px solid var(--a-glass-edge); border-radius: 18px; }

/* ---------- Formations (30/10/2026) : mêmes pastilles que le reste de l'appli, par le style seulement ----------
   Faite = rond vert coché, Prévue = rond bleu (horloge), À faire (obligatoire) = rond rouge « ! », À renouveler =
   rond orange ; libellés sans majuscules. Classes du module (fo-st-*) inchangées. */
.fo-st { flex-direction: row; align-items: center; gap: 7px; padding: 2px 0; min-width: 0; border: 0; border-radius: 0; background: none; text-align: left; }
.fo-st-prevue { border: 0; background: none; }
.fo-st b { font-size: 12.5px; font-weight: 600; text-transform: none; letter-spacing: 0; display: block; }
.fo-st span { display: block; font-size: 11px; color: var(--a-muted); }
.fo-st b::before { content: none; }
.fo-st::before {
  content: ''; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: 12px;
}
.fo-st-faite { color: var(--success); }
.fo-st-faite::before { background-color: #34C759; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.fo-st-prevue { color: #0B5CAD; }
.fo-st-prevue::before { background-color: #0A84FF; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4l2 2'/%3E%3C/svg%3E"); }
.fo-st-afaire { color: var(--danger); }
.fo-st-afaire::before { background-color: #FF3B30; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v8M12 18h.01'/%3E%3C/svg%3E"); }
.fo-st-expiree { color: var(--warning); }
.fo-st-expiree::before { background-color: #FF9500; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 1 0-2.3 5.7M20 4v7h-7'/%3E%3C/svg%3E"); }
/* Avancement d'un salarié : texte simple (vert si tout est fait). */
.fo-ratio { padding: 0; border-radius: 0; background: none; font-size: 12px; font-weight: 600; color: var(--danger); }
.fo-ratio.ok, .fo-ratio.ko { background: none; }
.fo-ratio.ok { color: var(--success); }
/* En-têtes de familles sans majuscules ; chiffres clés comme le bandeau de Salariés. */
.fo-grid-fam th { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--a-text); }
.fo-kpi { border-radius: 16px; }
.fo-kpi b { font-size: 24px; letter-spacing: -.02em; }
.fo-legend { gap: 18px; }

/* ---------- Écran de connexion (30/10/2026) : le nom « Humalo » en grand, centré (pas d'icône, décision de Vincent) ;
   titre et phrase d'accueil de chaque étape centrés. ---------- */
.auth-brand { justify-content: center; margin-bottom: 18px; }
.auth-brand .brand-name { font-size: 30px; color: var(--a-text); }
.auth-step > h1, .auth-step > h2, .auth-step > h3, .auth-step > .auth-sub { text-align: center; }

/* =====================================================================================================
   Pages reprises le 31/10/2026 : planning du salarié, « Bientôt disponible », Registre et Anciens,
   assistants d'import, modèles de documents et leur éditeur, coffre-fort (prototype).
   ===================================================================================================== */
/* ---------- Planning du salarié (sa semaine) ---------- */
.my-week-summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 16px; max-width: 720px;
  background: #fff; border-radius: 18px; box-shadow: var(--a-shadow); padding: 14px 16px 16px;
}
.my-week-summary > div { background: none; border: 0; border-radius: 0; padding: 0; }
.my-week-summary > div:nth-child(2) { text-align: right; }
.my-week-summary-value { font-size: 26px; font-weight: 700; color: var(--a-text); letter-spacing: -.02em; }
.my-week-summary-value span { font-size: 15px; color: var(--a-muted); font-weight: 500; }
.my-week-summary-label { font-size: 13px; color: var(--a-muted); }
.my-week-progress { grid-column: 1 / -1; height: 6px; margin-top: 10px; border-radius: 3px; background: var(--a-fill); overflow: hidden; }
.my-week-progress > span { display: block; height: 100%; border-radius: 3px; background: var(--a-primary); }

.my-week-list { gap: 0; background: #fff; border-radius: 18px; box-shadow: var(--a-shadow); overflow: hidden; }
.my-day-card { position: relative; border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 10px 16px; min-height: 66px; gap: 12px; }
.my-day-card:hover { background: rgba(0,0,0,.02); }
.my-day-card.today { border: 0; box-shadow: none; }
.my-day-card + .my-day-card::before { content: ''; position: absolute; top: 0; left: 72px; right: 0; height: 1px; background: var(--a-sep); }
.my-day-date { width: 44px; gap: 2px; }
.my-day-dow { font-size: 11px; font-weight: 600; color: var(--a-muted); letter-spacing: .02em; }
.my-day-num { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 19px; font-weight: 600; color: var(--a-text); }
.my-day-card.today .my-day-dow { color: var(--a-primary-dark); }
.my-day-card.today .my-day-num { background: var(--a-primary); color: #fff; }
.my-day-today { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.my-shift-line { display: grid; grid-template-columns: 4px minmax(0, 1fr); column-gap: 10px; row-gap: 1px; align-items: center; }
.my-shift-dot { grid-row: span 2; width: 4px; height: 36px; border-radius: 2px; }
.my-shift-time { font-size: 15.5px; font-weight: 600; color: var(--a-text); }
.my-shift-poste { flex-basis: auto; padding-left: 0; font-size: 13.5px; color: var(--a-muted); }
/* Remarque d'un shift (vue Semaine du salarié) : dans la colonne du texte, sous le poste. Sans cette règle elle tombait
   dans la colonne du trait de couleur (4 px) et s'affichait une lettre par ligne (retour de Vincent, 04/11/2026). */
.my-shift-line > .shift-note-text { grid-column: 2; display: flex; align-items: flex-start; gap: 6px; white-space: pre-wrap; }
.my-day-off { font-size: 14px; color: var(--a-muted); }
.my-day-hours { font-size: 14px; font-weight: 500; color: var(--a-muted); }
.my-notice { display: flex; align-items: center; gap: 12px; max-width: 720px; margin-bottom: 12px; padding: 12px 14px; background: #fff; border-radius: 18px; box-shadow: var(--a-shadow); }
.my-notice-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: rgba(240,128,70,.16); color: #A3471A; }
.my-notice-icon .icon { width: 18px; height: 18px; }
.my-notice-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; color: var(--a-text); }
.my-notice-text small { display: block; font-size: 13px; color: var(--a-muted); }

/* ---------- Pages « Bientôt disponible » (Messagerie, Annonces, Coffre-fort en ligne) ---------- */
.soon-head { border: 0; border-radius: 22px; box-shadow: var(--a-shadow); }
.soon-icon { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(180deg, #2A8E69, #1F7A5A); color: #fff; box-shadow: 0 6px 16px rgba(31,122,90,.28); }
.soon-icon .icon { width: 30px; height: 30px; }
.soon-badge { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; padding: 4px 12px; background: rgba(240,128,70,.14); color: #A3471A; }
.soon-title { font-size: 30px; font-weight: 700; color: var(--a-text); letter-spacing: -.025em; }
.soon-lead { color: var(--a-muted); font-size: 16px; }
.soon-point { border: 0; border-radius: 18px; box-shadow: var(--a-shadow); }
.soon-point h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.soon-point h3 .icon { width: 18px; height: 18px; color: var(--a-primary); flex-shrink: 0; }
.soon-point p { color: var(--a-muted); }

/* ---------- Salariés > Registre ---------- */
.register-head h3 { margin: 0; }
.register-sub { margin-top: 2px; font-size: 13.5px; color: var(--a-muted); }
.register-note { display: flex; gap: 8px; align-items: flex-start; max-width: 900px; margin: 0 0 18px; font-size: 13px; line-height: 1.45; color: var(--a-muted); }
.register-note .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.register-scroll { background: #fff; border-radius: 18px; box-shadow: var(--a-shadow); }
.register-scroll .data-table { box-shadow: none; border-radius: 0; background: transparent; overflow: visible; }
.register-scroll { overflow-x: auto; }
.register-table td, .register-table th { font-size: 13px; }
.register-table td:nth-child(5), .register-table td:nth-child(9), .register-table td:nth-child(10) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.register-table td:nth-child(1) { color: var(--a-muted); font-variant-numeric: tabular-nums; }
.register-table td:nth-child(2) { font-weight: 600; }
.register-table th:nth-child(-n+2), .register-table td:nth-child(-n+2) { position: sticky; z-index: 1; background: #fff; }
.register-table th:nth-child(1), .register-table td:nth-child(1) { left: 0; width: 44px; min-width: 44px; }
.register-table th:nth-child(2), .register-table td:nth-child(2) { left: 44px; }
.register-table .status-mark + .link-chevron { margin-left: 8px; }
.register-section { margin: 22px 0 8px; font-size: 15px; }

/* ---------- Salariés > Anciens : liste façon iPhone sur téléphone ---------- */
.former-table td:last-child { color: var(--a-muted); }
@media (max-width: 860px) {
  .former-table, .former-table tbody { display: block; }
  .former-table thead { display: none; }
  .former-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; grid-template-areas: "name exit chev" "poste motif chev"; align-items: center; column-gap: 10px; padding: 10px 14px; position: relative; min-height: 64px; }
  .former-table tr + tr::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--a-sep); }
  .former-table tr::after { content: ''; grid-area: chev; width: 8px; height: 8px; border: solid #C7C7CC; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
  .former-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .former-table td:nth-child(1) { grid-area: name; font-size: 16px; }
  .former-table td:nth-child(1) .avatar { width: 40px; height: 40px; }
  .former-table td:nth-child(2) { grid-area: poste; padding-left: 52px; margin-top: -14px; font-size: 13.5px; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .former-table td:nth-child(3) { display: none; }
  .former-table td:nth-child(4) { grid-area: exit; justify-self: end; font-size: 13.5px; }
  .former-table td:nth-child(5) { grid-area: motif; justify-self: end; margin-top: -14px; font-size: 13px; }
}

/* ---------- Import (salariés, planning) ---------- */
.import-steps { display: flex; gap: 6px; list-style: none; margin: 4px 0 18px; padding: 0; counter-reset: imp; }
.import-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--a-muted); counter-increment: imp; }
.import-steps li::before { content: counter(imp); display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--a-fill); font-size: 12.5px; font-weight: 600; color: var(--a-muted); }
.import-steps li.is-done::before { content: '✓'; background: var(--a-primary-soft); color: var(--a-primary-dark); }
.import-steps li.is-current { color: var(--a-text); font-weight: 600; }
.import-steps li.is-current::before { background: var(--a-primary); color: #fff; }
.import-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 16px 0 4px; padding: 26px 20px; border: 2px dashed rgba(60,60,67,.22); border-radius: 18px; background: rgba(255,255,255,.6); text-align: center; color: var(--a-muted); font-size: 13.5px; }
.import-drop:hover, .import-drop:focus-within { border-color: var(--a-primary); background: var(--a-primary-soft); }
.import-drop .icon { width: 30px; height: 30px; color: var(--a-primary); }
.import-drop strong { font-size: 15px; color: var(--a-text); }
.import-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.import-drop .btn { pointer-events: none; }
.import-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: var(--a-text); }
.import-facts li { display: flex; gap: 10px; align-items: flex-start; }
.import-facts .icon { width: 17px; height: 17px; color: var(--a-primary); flex-shrink: 0; margin-top: 1px; }

/* ---------- Documents > Modèles ---------- */
.tpl-list { background: #fff; border-radius: 18px; box-shadow: var(--a-shadow); overflow: hidden; }
.tpl-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 62px; }
.tpl-row + .tpl-row::before { content: ''; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--a-sep); }
.tpl-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--a-primary-soft); color: var(--a-primary-dark); }
.tpl-icon .icon { width: 19px; height: 19px; }
.tpl-main { flex: 1; min-width: 0; }
.tpl-name { font-size: 15px; font-weight: 600; color: var(--a-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-sub { font-size: 13px; color: var(--a-muted); }
.tpl-row .round-edit-btn .icon { width: 16px; height: 16px; }
.tpl-del { color: var(--danger, #B23A26); }

/* Éditeur de modèle : barre d'outils en verre, page blanche posée comme une feuille */
.doc-edit-head .doc-name-input { font-size: 17px; font-weight: 600; }
.doc-edit-hint { color: var(--a-muted); max-width: 860px; }
.doc-toolbar { background: rgba(255,255,255,.8); border: 0; border-radius: 14px; box-shadow: var(--a-shadow); margin-bottom: 14px; padding: 6px; }
.doc-tool { border: 0; border-radius: 8px; background: transparent; min-width: 32px; }
.doc-tool:hover { background: var(--a-fill); }
.doc-tool-select { border: 0; background-color: var(--a-fill); border-radius: 8px; }
.doc-page { border: 0; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 36px rgba(30,40,35,.12); padding: 56px 64px; }
.doc-page:focus { box-shadow: 0 0 0 2px var(--a-primary), 0 14px 36px rgba(30,40,35,.12); }
.doc-fields { background: #fff; border: 0; border-radius: 18px; box-shadow: var(--a-shadow); }
.doc-fields-group-title { color: var(--a-muted); font-weight: 600; letter-spacing: .02em; }
.doc-field-btn { display: inline-flex; align-items: center; gap: 4px; width: auto; margin: 0 4px 6px 0; padding: 5px 11px; border: 0; border-radius: 999px; background: var(--a-primary-soft); color: var(--a-primary-dark); font-weight: 600; }
.doc-field-btn::before { content: '+'; font-weight: 700; }
.doc-field-btn:hover { background: rgba(31,122,90,.2); }

/* ---------- Coffre-fort (prototype local ; en ligne : page « Bientôt disponible ») ---------- */
.vault-file { border: 0; border-radius: 16px; box-shadow: var(--a-shadow); align-items: center; }
.vault-file-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--a-primary-soft); color: var(--a-primary-dark); }
.vault-file-icon .icon { width: 19px; height: 19px; }
.my-absence-line { background: var(--a-fill); color: var(--a-muted); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.register-table td:nth-child(7), .register-table td:nth-child(8) { min-width: 130px; }
.register-table td:nth-child(11) { min-width: 160px; }
.register-follow { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; white-space: nowrap; }
.register-follow small { padding-left: 24px; font-size: 12.5px; color: var(--a-muted); }
.register-follow .link-chevron { padding: 2px 0; }
/* « Suivi » toujours visible à droite, même quand le tableau défile en largeur */
.register-table th.register-follow-col, .register-table td.register-follow-col { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -8px 0 12px -10px rgba(0,0,0,.25); }
.import-title { margin: 6px 0 12px; }
@media (max-width: 860px) {
  .former-table td:nth-child(1) .emp-row-name { gap: 12px; white-space: nowrap; overflow: hidden; font-size: 16px; font-weight: 600; }
  .former-table td:nth-child(2) { padding-left: 52px; }
}
