/* Polices Outfit / IBM Plex Mono auto-hébergées (public/fonts/) plutôt que chargées depuis
   Google Fonts à chaque visite — pas de dépendance à un service tiers pour une application
   de données RH/santé, et ça fonctionne aussi hors ligne. Sous-familles latin + latin-ext
   uniquement (suffisant pour le français ; les autres écritures ne sont pas utilisées ici). */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/outfit-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/outfit-400-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: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/outfit-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/outfit-500-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: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/outfit-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/outfit-600-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: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/outfit-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/outfit-700-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-600-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;
}

:root {
  --canvas: #EFEFEF;
  --sidebar-bg: #E6E1D5;
  --surface: #FFFFFF;
  --ink: #14181F;
  --ink-soft: #5B6168;
  --muted: #8B9198;
  --muted-2: #C8CCC5;
  --line: #EDECE7;
  --line-soft: #F5F4F0;
  --good: #3B6D11;
  --good-bg: #EAF3DE;
  --warn: #A32D2D;
  --warn-bg: #FCEBEB;
  --dark: #1F4959;
  --dark-hover: #163540;
  --dark-soft: #B7C7CC;
  --dark-good: #E8C27E;
  --gold: #C1852E;
  --gold-bg: #F1DFB8;

  --typeA: #1F4959; --typeA-bg: #D9E4E7;
  --typeB: #C1852E; --typeB-bg: #F1DFB8;
  --typeC: #B24A2E; --typeC-bg: #F3DFD8;
  --typeD: #5B4B8A; --typeD-bg: #E3DDF0;

  --radius: 16px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0 0 4px; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Outfit', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.mono { font-family: 'IBM Plex Mono', monospace; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
select:not(:disabled), input[type=time]:not(:disabled) { cursor: pointer; }
a { color: inherit; text-decoration: none; }

#app { min-height: 100vh; }
.hidden { display: none !important; }

/* ---------- Boutons ---------- */
.btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
  transition: transform .05s ease, background .15s ease;
}
.btn:hover { background: #F6F6F3; }
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-hover); }
.btn-danger { background: #fff; border-color: var(--warn); color: var(--warn); }
.btn-danger:hover { background: var(--warn-bg); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #E4E8E0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Champs ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.date-panel-row { display: flex; gap: 14px; flex-wrap: wrap; }
.date-panel-row .field { flex: 1; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.input, select.input {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 14.5px;
  background: #fff; color: var(--ink); min-width: 0;
}
.input:focus, select.input:focus { outline: 2px solid var(--dark); outline-offset: 1px; }
/* Champ d'heure sans cadre ni fond — juste une ligne discrète qui apparaît au survol/focus,
   comme un texte éditable plutôt qu'une case à cocher. La petite icône horloge native reste
   cliquable (ouvre le sélecteur natif) mais estompée, pour ne pas dominer visuellement une
   ligne qui peut contenir jusqu'à 4 champs d'heure (matin + après-midi). */
input[type=time] {
  border: none; background: transparent; border-radius: 0; border-bottom: 1px solid transparent;
  padding: 4px 1px; width: 86px; font-size: 12.5px; font-family: 'IBM Plex Mono', monospace;
  color: var(--ink); transition: border-color .15s;
}
input[type=time]:hover:not(:disabled) { border-bottom-color: var(--muted-2); }
input[type=time]:focus { outline: none; border-bottom-color: var(--dark); }
input[type=time]:disabled { color: var(--muted-2); }
input[type=time]::-webkit-calendar-picker-indicator { opacity: .3; filter: grayscale(1); cursor: pointer; padding: 2px; }
input[type=time]::-webkit-calendar-picker-indicator:hover { opacity: .65; }

/* Champ Motif (Saisie d'heures) : même traitement discret, cohérent avec les champs
   d'heure sur la même ligne. Garde .input pour le comportement (liste de suggestions native
   via l'attribut "list"), seul l'habillage visuel change. */
.motif-input {
  border: none; background: transparent; border-radius: 0; border-bottom: 1px solid transparent;
  padding: 4px 2px;
}
.motif-input:hover:not(:disabled) { border-bottom-color: var(--muted-2); }
.motif-input:focus { outline: none; border-bottom-color: var(--dark); }

/* ---------- Connexion ---------- */
.login-wrap { min-height: 100vh; display: flex; }

/* Panneau de marque (gauche) */
.login-brand {
  position: relative; width: 42%; min-width: 420px; background: var(--dark);
  overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px 36px;
}
/* Le médaillon bleu générique de login-background.jpg est inversé (le bleu devient sa
   complémentaire — or/ambre — le fond quasi blanc devient quasi noir) puis fondu au
   panneau en mix-blend-mode: screen : le noir de fond disparaît dans le teal, seul le
   motif se détache, en écho à l'accent or du logo. Recadré serré sur le seul médaillon
   (le reste de l'image — fond, pli en diagonale — est un artefact de banque d'images sans
   rapport avec le motif) ; opacité et masque faibles pour rester une texture d'ambiance
   discrète, pas l'élément principal du panneau. */
.login-art { position: absolute; inset: 0; overflow: hidden; }
.login-art::before {
  content: ''; position: absolute; inset: -30%;
  background-image: url('/img/login-background.jpg');
  background-repeat: no-repeat;
  background-size: 480% auto;
  background-position: 16% 46%;
  mix-blend-mode: screen;
  filter: invert(1) saturate(1.05) brightness(.7);
  opacity: .4;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 70% 45%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 55% at 70% 45%, #000 0%, transparent 72%);
}
.login-brand-top, .login-brand-content { position: relative; z-index: 1; }
.login-chip {
  display: inline-flex; background: #fff; border-radius: 14px; padding: 20px 28px;
  box-shadow: 0 4px 18px rgba(0,0,0,.22); margin-bottom: 28px;
}
.login-chip img { height: 102px; display: block; }
.login-eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--dark-good); margin: 0 0 14px;
}
.login-welcome {
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 30px;
  line-height: 1.22; letter-spacing: -.015em; color: #fff; margin: 0 0 12px; max-width: 380px;
}
.login-welcome-sub { font-size: 13.5px; color: var(--dark-soft); max-width: 320px; line-height: 1.5; margin: 0; }
.login-credit { position: relative; z-index: 1; margin-top: 40px; font-size: 10.5px; color: rgba(255,255,255,.4); }
.login-credit a { color: inherit; }
.login-credit a:hover { color: rgba(255,255,255,.7); }

/* Panneau de formulaire (droite) */
.login-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card {
  width: 100%; max-width: 340px; background: var(--surface); border-radius: var(--radius);
  padding: 34px 32px; box-shadow: 0 1px 3px rgba(31,73,89,.06), 0 20px 44px rgba(31,73,89,.08);
}
.login-card-title { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 19px; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }
.login-sub { font-size: 13px; color: var(--muted); margin: 0 0 28px; }
.login-error { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-top: 14px; }
.login-forgot-link {
  display: block; text-align: center; margin-top: 18px; font-size: 12.5px;
  color: var(--muted); text-decoration: none;
}
.login-forgot-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .login-wrap { flex-direction: column; }
  .login-brand { width: 100%; min-width: 0; padding: 40px 28px 32px; justify-content: flex-start; }
  .login-chip { padding: 12px 18px; margin-bottom: 20px; }
  .login-chip img { height: 56px; }
  .login-welcome { font-size: 24px; }
  .login-credit { display: none; }
  .login-form-panel { padding: 32px 24px; }
}

/* ---------- Coquille de l'application ---------- */
.shell { display: flex; gap: 16px; padding: 18px; min-height: 100vh; align-items: flex-start; }

.sidebar { width: 210px; flex-shrink: 0; background: var(--sidebar-bg); border-radius: var(--radius); padding: 18px 14px; display: flex; flex-direction: column; position: sticky; top: 18px; min-height: calc(100vh - 36px); }
.sidebar-brand { margin: 0 -6px 22px; background: #fff; border-radius: 10px; padding: 4px; box-shadow: 0 1px 5px rgba(31,73,89,.14); cursor: pointer; transition: box-shadow .15s; }
.sidebar-brand:hover { box-shadow: 0 2px 8px rgba(31,73,89,.22); }
.sidebar-brand img { width: 100%; height: auto; display: block; border-radius: 6px; }



.employee-picker { margin-bottom: 14px; }
.employee-picker select.input { font-weight: 600; }

.inline-picker { display: flex; gap: 6px; }
.inline-picker select.input { padding: 6px 10px; font-size: 13px; font-weight: 600; width: auto; }
.topbar-title { cursor: pointer; }
.topbar-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: var(--radius-sm); color: var(--ink-soft); font-size: 13px; font-weight: 500; cursor: pointer; }
.nav-item:hover { background: rgba(0,0,0,.04); }
.nav-item.active { background: var(--dark); color: #fff; font-weight: 600; }
.nav-item .ti { font-size: 17px; }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 1px 5px rgba(31,73,89,.1); }
.history-nav { display: flex; gap: 6px; margin-left: auto; }
.circle-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--dark); color: #fff; border: none; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; }
.circle-btn:hover:not(:disabled) { background: var(--gold); }
.circle-btn:disabled { opacity: .3; cursor: default; }
.circle-btn svg { display: block; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--typeA-bg); color: var(--typeA); display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
.sidebar-user-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.sidebar-user-role { font-size: 11px; color: var(--muted); }
.sidebar-logout { margin-top: 10px; }

.main { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#main-content { display: flex; flex-direction: column; gap: 14px; }

.view-toolbar { display: flex; align-items: center; gap: 10px; }
.view-toolbar:empty { display: none; }
.view-toolbar .employee-picker { margin-bottom: 0; flex: 1; max-width: 260px; }
.employee-picker select optgroup { color: var(--dark); font-weight: 700; font-style: normal; }
.view-toolbar .history-nav { display: flex; gap: 6px; }

.topbar { background: var(--surface); border-radius: var(--radius); padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; box-shadow: 0 1px 3px rgba(31,73,89,.06); }
.topbar-nav { display: flex; align-items: center; gap: 10px; }
.topbar-nav .ti { font-size: 18px; color: var(--muted); cursor: pointer; }
.topbar-title { font-weight: 600; font-size: 14.5px; color: var(--ink); min-width: 220px; text-align: center; letter-spacing: -.01em; }
.segmented { display: flex; background: var(--sidebar-bg); border-radius: var(--radius-sm); padding: 3px; }
.segmented button { padding: 6px 14px; border-radius: 7px; border: none; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.segmented button.active { background: var(--dark); color: #fff; }

.card { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 1px 3px rgba(31,73,89,.06); }
.card-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; }
table.table-simple { width: 100%; border-collapse: collapse; }
/* Défilement horizontal contenu à l'intérieur du tableau lui-même, pour les tableaux à
   nombreuses colonnes (Planning : une colonne par salariée) qui ne peuvent pas se resserrer
   sans devenir illisibles sur un écran plus étroit — le reste de la page ne défile pas. */
.table-scroll { overflow-x: auto; max-width: 100%; }
.table-scroll table.tt { width: auto; min-width: 100%; table-layout: auto; }
table.table-simple td { padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
table.table-simple tr:last-child td { border-bottom: none; }

/* ---------- Carte semaine ---------- */
.week-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.week-title-row { display: flex; align-items: center; gap: 18px; }
.stamp { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; border: 2px solid; transform: rotate(-6deg); flex-shrink: 0; }
.stamp-A { color: var(--typeA); border-color: var(--typeA); background: var(--typeA-bg); }
.stamp-B { color: var(--typeB); border-color: var(--typeB); background: var(--typeB-bg); }
.stamp-C { color: var(--typeC); border-color: var(--typeC); background: var(--typeC-bg); }
.stamp-D { color: var(--typeD); border-color: var(--typeD); background: var(--typeD-bg); }
.stamp-none { color: var(--muted-2); border-color: var(--muted-2); background: #F5F5F1; font-size: 13px; }
.stamp-ferie { color: #FFFFFF; border-color: #F97316; background: #F97316; border-radius: 3px; transform: none; }
.stamp-solidarite { color: #FFFFFF; border-color: #E33B3B; background: #E33B3B; border-radius: 3px; transform: none; }
.stamp-special { color: #15803D; border-color: #86EFAC; background: #DCFCE7; font-weight: 700; }
/* "Paire"/"Impaire" est un mot entier (pas juste une lettre comme A/B/C/D) : plutôt que de le
   couper au milieu (illisible sur plusieurs lignes), les endroits qui affichent cette pastille
   lui donnent une forme de pilule à largeur automatique (voir public/js/views/plannings.js et
   saisieHeures.js) — le mot tient sur une seule ligne, sans avoir besoin d'être coupé ici. */
.stamp-PAIRE { color: #1D4ED8; border-color: #93C5FD; background: #DBEAFE; }
.stamp-IMPAIRE { color: #B91C1C; border-color: #FCA5A5; background: #FEE2E2; }
.week-title-row { position: relative; }
.stamp.editable, .week-title.editable, .editable { cursor: pointer; }
.stamp.editable:hover { filter: brightness(0.92); }
.week-title.editable:hover { text-decoration: underline; text-underline-offset: 3px; }
td.day-name span.editable:hover { text-decoration: underline; text-underline-offset: 3px; }
.week-type-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; background: var(--surface); border-radius: var(--radius-sm); box-shadow: 0 4px 16px rgba(31,73,89,.22); min-width: 220px; padding: 6px; }
.week-type-menu-item { padding: 8px 10px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.week-type-menu-item:hover { background: var(--sidebar-bg); }
.week-type-menu-sep { padding: 8px 10px 4px; font-size: 10.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.week-title { font-size: 15.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.week-subtitle { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.week-stats { display: flex; gap: 22px; }
.stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.stat-value { font-family: 'IBM Plex Mono', monospace; font-size: 19px; font-weight: 600; color: var(--ink); }
.stat-value.good { color: var(--good); }
.stat-value.warn { color: var(--warn); }

table.tt { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.tt th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); padding: 7px 6px; border-bottom: 1px solid var(--line); font-weight: 600; }
table.tt td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 13px; }
table.tt tr:last-child td { border-bottom: none; }
table.tt tr.non-prevu td { color: var(--muted-2); background: #F7F7F4; }

table.tt th.col-matin { background: var(--typeA-bg); color: var(--typeA); }
table.tt td.col-matin { background: rgba(31,73,89,.05); }
table.tt th.col-apresmidi { background: var(--typeB-bg); color: var(--typeB); }
table.tt td.col-apresmidi { background: rgba(193,133,46,.06); }
table.tt th.col-total { background: var(--dark); color: #fff; }
table.tt td.col-total { background: var(--sidebar-bg); font-family: 'IBM Plex Mono', monospace; }
.day-name { font-weight: 600; }
.day-name.muted { color: var(--muted); font-weight: 500; }
.num-cell { font-family: 'IBM Plex Mono', monospace; white-space: nowrap; }
.num-cell.good { color: var(--good); font-weight: 600; }
.num-cell.warn { color: var(--warn); font-weight: 600; }
.num-cell.soft { color: var(--muted); }
.time-pair { display: flex; gap: 4px; align-items: center; }
.time-sep { color: var(--muted); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.doc-badge, .sidebar-nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 50%; background: linear-gradient(145deg, var(--gold), #A6721F); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .01em; box-shadow: 0 1px 3px rgba(193,133,46,.45); }
.doc-badge { margin-left: 7px; vertical-align: middle; }
.sidebar-nav-badge { margin-left: auto; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-neutral { background: var(--sidebar-bg); color: var(--ink-soft); }
.badge-special { background: #FDECD8; color: #B65C1F; font-weight: 700; border: 1px solid #F0B57A; }

/* ---------- Bloc totaux (sombre) ---------- */
.totals-bar { background: var(--dark); border-radius: var(--radius); padding: 16px 20px; display: flex; gap: 30px; flex-wrap: wrap; }
.total-item { position: relative; }
.total-item.clickable { cursor: pointer; }
.total-item.clickable:hover .total-arrow { background: var(--gold); }
.total-item .stat-label { color: var(--dark-soft); }
.total-item .stat-value { color: #fff; }
.total-item .stat-value.accent { color: var(--dark-good); }
.total-arrow { position: absolute; top: -4px; right: -22px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; transition: background .15s; }
.total-arrow svg { color: #fff; }

.btn-today-arrow { position: relative; padding-right: 30px !important; }
.btn-today-arrow .total-arrow-light { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--dark); display: flex; align-items: center; justify-content: center; transition: background .15s; }
.btn-today-arrow .total-arrow-light svg { color: #fff; width: 9px; height: 9px; }
.btn-today-arrow:hover .total-arrow-light { background: var(--gold); }
.total-divider { width: 1px; background: rgba(255,255,255,.12); align-self: stretch; }

/* ---------- Génériques ---------- */
.muted-text { color: var(--muted); font-size: 13px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.save-flash { font-size: 11.5px; color: var(--good); font-weight: 600; opacity: 0; transition: opacity .3s; }
.save-flash.show { opacity: 1; }

/* ---------- Squelettes de chargement ---------- */
.skeleton-line { background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 50%, var(--line-soft) 75%); background-size: 200% 100%; animation: skeleton-pulse 1.4s ease-in-out infinite; border-radius: 6px; height: 14px; }
@keyframes skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.mobile-menu-btn { display: none; }
.sidebar-backdrop { display: none; }

/* En dessous de 860px, le menu latéral devient un panneau hors-écran (ouvert par un bouton
   "hamburger" fixe) plutôt qu'une rangée qui pousse le contenu vers le bas : sur un téléphone,
   7 liens + logo + compte + déconnexion en rangée ne tenaient pas sur la largeur et
   obligeaient à faire défiler toute la page horizontalement pour voir le contenu. */
@media (max-width: 860px) {
  .shell { padding: 12px; gap: 0; }

  .mobile-menu-btn {
    display: flex; align-items: center; justify-content: center;
    position: fixed; top: 14px; left: 14px; z-index: 40;
    width: 42px; height: 42px; border: none; border-radius: var(--radius-sm);
    background: var(--dark); color: #fff; box-shadow: 0 2px 8px rgba(31,73,89,.3);
    cursor: pointer;
  }
  .mobile-menu-btn .ti { font-size: 20px; }

  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 35;
    width: 78vw; max-width: 280px; height: 100vh; min-height: 0;
    border-radius: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .shell.sidebar-open .sidebar { transform: translateX(0); }

  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 30;
    background: rgba(20,24,31,.45); opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  .shell.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

  .nav { flex-direction: column; }
  .sidebar-user { margin-top: auto; margin-left: 0; border-top: none; padding-top: 0; }

  /* Espace en haut pour ne pas passer sous le bouton hamburger, qui reste fixe. */
  .main { padding-top: 54px; }
}
