/* ===================================================================
   Module RH — Saraïlis avocats
   Identité de la famille d'apps (noir/blanc/or, Poppins + Lora),
   signature propre au RH : un pétrole sobre (confidentialité).
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  /* Base sombre (page de connexion, famille) */
  --bg-dark-1: #1d2026;
  --bg-dark-2: #16181d;

  /* Papier / surfaces claires */
  --paper: #f6f2ea;
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --line: #e6ded0;

  /* Encres */
  --ink: #1f2127;
  --ink-soft: #5a5750;
  --ink-faint: #8c887f;

  /* Or — fil conducteur de la marque */
  --or: #b98e3c;
  --or-fonce: #9a722c;

  /* Accents famille (connexion) */
  --corail: #b5482f;
  --bordeaux: #7a1e30;

  /* Signature RH — pétrole confidentiel */
  --rh: #234e49;
  --rh-clair: #2f6760;
  --rh-pale: #e7efed;

  /* États */
  --rouge: #cb2030;
  --ambre: #c98a1e;
  --vert: #3f7d4f;

  --rayon: 14px;
  --ombre: 0 10px 30px rgba(20, 22, 28, .12);
  --ombre-douce: 0 2px 10px rgba(20, 22, 28, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Lora', Georgia, serif; font-weight: 500; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.hidden { display: none !important; }

/* ============================= CONNEXION ============================= */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 30%, var(--bg-dark-1), var(--bg-dark-2));
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--ombre);
  padding: 38px 34px 32px;
}

.auth-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  color: var(--ink);
}

/* Wordmark de marque (hérite de currentColor pour le nom) */
.wm svg { display: block; height: 42px; width: auto; }
.wm-img { display: block; height: 38px; width: auto; }
.auth-lockup .wm-img { filter: none; } /* logo foncé déjà adapté à la carte claire */
.lien-discret {
  display: block; width: 100%; margin-top: 14px; padding: 4px;
  background: none; border: none; color: var(--ink-faint);
  font-size: 12.5px; cursor: pointer; text-align: center;
}
.lien-discret:hover { color: var(--rh); text-decoration: underline; }
.wm-name { font-family: 'Lora', Georgia, serif; font-size: 27px; font-weight: 600; fill: currentColor; }
.wm-wave { fill: none; stroke: var(--or); stroke-width: 1.7; stroke-linecap: round; }
.wm-sub { font-family: 'Poppins', sans-serif; font-size: 8.5px; letter-spacing: 3.5px; fill: var(--or); }

.auth-mark {
  width: 46px; height: 46px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--rh), var(--rh-clair));
  display: grid; place-items: center;
  color: #fff; font-family: 'Lora', serif; font-size: 22px; font-weight: 600;
}

.auth-sep { width: 1px; align-self: stretch; background: var(--line); }

.auth-titles h1 {
  margin: 0;
  font-size: 25px;
  color: var(--corail);
  line-height: 1.1;
}
.auth-titles .sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--rh-clair);
  box-shadow: 0 0 0 3px var(--rh-pale);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  background: var(--rh);
  color: #fff;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--rh-clair); }
.btn:active { transform: translateY(1px); }
.btn--bloc { width: 100%; }
.btn--bordeaux { background: var(--bordeaux); }
.btn--bordeaux:hover { background: #93283d; }
.btn--or { background: var(--or); }
.btn--or:hover { background: var(--or-fonce); }
.btn--ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: transparent; color: var(--rouge); border: 1px solid #eccfd2; }
.btn--danger:hover { background: #fbf0f1; }
.btn--sm { padding: 7px 12px; font-size: 12.5px; }

.auth-msg { margin-top: 14px; font-size: 13px; min-height: 18px; }
.auth-msg.err { color: var(--rouge); }
.auth-msg.ok { color: var(--vert); }
.auth-note { margin-top: 18px; font-size: 12px; color: var(--ink-faint); line-height: 1.5; }

/* ============================= APPLICATION ============================= */
.app { display: none; min-height: 100vh; flex-direction: column; }
.app.actif { display: flex; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 22px;
  background: var(--rh);
  color: #fff;
}
.topbar .wm--bar svg { height: 30px; }
.topbar .wm--bar .wm-img { height: 28px; filter: none; }
.topbar .bar-sep { width: 1px; height: 26px; background: rgba(255,255,255,.28); }
.topbar h1 { margin: 0; font-size: 17px; color: #fff; font-weight: 500; }
.topbar .tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 12.5px; opacity: .85; }
.topbar .who b { font-weight: 500; }
.topbar .role-chip {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 20px; background: rgba(255,255,255,.15); margin-left: 8px;
}
.linkbtn { background: none; border: none; color: rgba(255,255,255,.85); font-size: 12.5px; text-decoration: underline; }
.linkbtn:hover { color: #fff; }

.layout { flex: 1; display: grid; grid-template-columns: 320px 1fr; min-height: 0; }

/* — Liste des employés — */
.aside {
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  display: flex; flex-direction: column;
  min-height: 0;
}
.aside-head {
  padding: 16px 18px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.aside-head h2 { margin: 0; font-size: 15px; }
.search { padding: 0 14px 10px; }
.search input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; background: var(--surface); }
.emp-list { list-style: none; margin: 0; padding: 4px 10px 16px; overflow-y: auto; flex: 1; }
.emp-item {
  position: relative;
  padding: 11px 13px;
  padding-right: 58px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 4px;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.emp-item:hover { background: var(--surface); }
.emp-item.sel { background: var(--surface); border-color: var(--rh); }
.emp-item .nom { font-size: 14px; font-weight: 500; }
.emp-item .meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.lock { font-size: 11px; color: var(--rh); }
.empty-aside { padding: 24px 18px; color: var(--ink-faint); font-size: 13px; line-height: 1.5; }

/* — Panneau de détail — */
.main { padding: 24px 28px; overflow-y: auto; }
.main-empty {
  height: 100%; display: grid; place-items: center; text-align: center; color: var(--ink-faint);
}
.main-empty .big { font-family: 'Lora', serif; font-size: 20px; color: var(--ink-soft); margin-bottom: 6px; }

.fiche-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.avatar {
  width: 56px; height: 56px; border-radius: 14px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--or), var(--or-fonce));
  color: #fff; display: grid; place-items: center;
  font-family: 'Lora', serif; font-size: 22px; font-weight: 600;
}
.fiche-head .id h2 { margin: 0; font-size: 22px; }
.fiche-head .id .fonc { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.fiche-head .actions { margin-left: auto; display: flex; gap: 8px; }

.confid-banner {
  display: flex; align-items: center; gap: 8px;
  background: var(--rh-pale); color: var(--rh);
  border: 1px solid #cfe0dd;
  padding: 9px 13px; border-radius: 10px; font-size: 12.5px;
  margin-bottom: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-douce);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card h3 {
  margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--or-fonce); font-family: 'Poppins', sans-serif; font-weight: 600;
}

/* Cartes repliables (ouvertes par défaut) */
.card.collapsible { padding: 0; }
.card.collapsible .card-head {
  width: 100%; display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  padding: 16px 22px; background: none; border: none; cursor: pointer; text-align: left;
}
.card.collapsible .card-head h3 { margin: 0; }
.card.collapsible .card-head:hover h3 { color: var(--or); }
.card.collapsible .card-body { padding: 0 22px 20px; }
.card.collapsible .chev { color: var(--ink-faint); font-size: 12px; transition: transform .2s; }
.card.collapsible.collapsed .card-body { display: none; }
.card.collapsible.collapsed .chev { transform: rotate(-90deg); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
@media (max-width: 720px){ .grid2 { grid-template-columns: 1fr; } }

.kv label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 4px; }
.kv .val { font-size: 14px; }
.kv input, .kv select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; background: var(--surface); }
.kv input:focus, .kv select:focus { outline: none; border-color: var(--rh-clair); box-shadow: 0 0 0 3px var(--rh-pale); }

.toggle-confid { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* — Notes au dossier — */
.note-form textarea { width: 100%; min-height: 78px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; resize: vertical; background: var(--surface); }
.note-form textarea:focus { outline: none; border-color: var(--rh-clair); box-shadow: 0 0 0 3px var(--rh-pale); }
.note-form .row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.note-form select { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; background: var(--surface); }

.note-list { list-style: none; margin: 16px 0 0; padding: 0; }
.note {
  border-left: 3px solid var(--or);
  background: var(--surface-2);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.note .note-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note .cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; background: var(--rh-pale); color: var(--rh); padding: 2px 8px; border-radius: 20px; }
.note .when { font-size: 11.5px; color: var(--ink-faint); }
.note .by { font-size: 11.5px; color: var(--ink-faint); margin-left: auto; }
.note .corps { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.note .del { background: none; border: none; color: var(--ink-faint); font-size: 12px; margin-left: 6px; }
.note .del:hover { color: var(--rouge); }
.note-empty { color: var(--ink-faint); font-size: 13px; padding: 8px 0; }

/* — Documents — */
.doc-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 4px; }
.doc-upload select { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; background: var(--surface); }
.doc-file-label {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
  border: 1px dashed var(--line); border-radius: 9px; font-size: 13px; color: var(--ink-soft); cursor: pointer; background: var(--surface);
}
.doc-file-label:hover { border-color: var(--rh-clair); color: var(--rh); }
.doc-file-name { font-size: 12.5px; color: var(--ink-faint); }
.doc-hint { font-size: 11.5px; color: var(--ink-faint); margin-top: 8px; }
.doc-list { list-style: none; margin: 16px 0 0; padding: 0; }
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--surface-2);
}
.doc-ico {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 8px;
  background: var(--rh-pale); color: var(--rh); display: grid; place-items: center; font-size: 15px;
}
.doc-meta { min-width: 0; flex: 1; }
.doc-meta .dn { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta .dd { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.doc-cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; background: var(--rh-pale); color: var(--rh); padding: 2px 8px; border-radius: 20px; }
.doc-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.doc-empty { color: var(--ink-faint); font-size: 13px; padding: 8px 0; }

/* — Modale comptes — */
.overlay { position: fixed; inset: 0; background: rgba(20,22,28,.5); display: grid; place-items: center; padding: 24px; z-index: 50; }
.modal { background: var(--paper); border-radius: 16px; box-shadow: var(--ombre); width: 100%; max-width: 480px; padding: 26px 26px 22px; }
.modal h2 { margin: 0 0 4px; font-size: 19px; }
.modal .lede { color: var(--ink-soft); font-size: 13px; margin: 0 0 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.user-row .user-mail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .role-chip { background: var(--rh-pale); color: var(--rh); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--ombre); opacity: 0; transition: opacity .2s; z-index: 60; }
.toast.show { opacity: 1; }

@media (max-width: 820px){
  .layout { grid-template-columns: 1fr; }
  .aside { border-right: none; border-bottom: 1px solid var(--line); max-height: 38vh; }
}

/* ===================== Ajouts : rémunération, filtres, types, notifications ===================== */

/* Sous-titres dans une carte */
.sous-titre { margin: 0 0 10px; font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }

/* Historique de périodes — affichage */
.periode-list { list-style: none; margin: 0; padding: 0; }
.periode { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 7px; background: var(--surface-2); }
.periode.actuel { border-color: var(--rh); background: var(--rh-pale); }
.periode .p-montant { font-weight: 600; font-size: 14px; min-width: 90px; }
.periode .p-desc { font-size: 13px; color: var(--ink-soft); flex: 1; }
.periode .p-dates { font-size: 12.5px; color: var(--ink-faint); margin-left: auto; }
.periode .p-actuel { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; background: var(--rh); color: #fff; padding: 2px 8px; border-radius: 20px; }
.periode-vide { color: var(--ink-faint); font-size: 13px; }

/* Historique de périodes — édition */
.periode-row { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; flex-wrap: wrap; }
.periode-row .p-in { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--surface); }
.periode-row .p-montant-in { width: 120px; }
.periode-row .p-desc-in { flex: 1; min-width: 140px; }
.periode-row .p-del { background: none; border: none; color: var(--ink-faint); font-size: 15px; cursor: pointer; padding: 4px 6px; }
.periode-row .p-del:hover { color: var(--rouge); }
.p-add { margin-top: 4px; }

/* Filtre des notes — rail de pastilles (style Académie) */
.notes-rail { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 6px; scrollbar-width: thin; }
.notes-rail .chip {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-size: 12.5px; cursor: pointer;
  white-space: nowrap; transition: background .12s, color .12s, border-color .12s;
}
.notes-rail .chip:hover { border-color: var(--rh-clair); color: var(--rh); }
.notes-rail .chip.actif { background: var(--rh); color: #fff; border-color: var(--rh); }

/* Notes en attente de confirmation de suppression */
.note--attente { border-left-color: var(--ambre); background: #fdf6e8; }
.note-attente { font-size: 12px; color: #9a6a14; margin-bottom: 6px; }
.del.del--ok { color: var(--rh); }

/* Cloche de notifications */
.notif-btn { position: relative; }
.notif-count {
  position: absolute; top: -7px; right: -10px; min-width: 17px; height: 17px;
  background: var(--rouge); color: #fff; border-radius: 10px; font-size: 10.5px;
  display: grid; place-items: center; padding: 0 4px; font-weight: 600;
}

/* Modale Types */
.types-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.types-tab { padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 13px; cursor: pointer; color: var(--ink-soft); }
.types-tab.actif { background: var(--rh); color: #fff; border-color: var(--rh); }
.types-list { list-style: none; margin: 0 0 14px; padding: 0; max-height: 320px; overflow-y: auto; }
.type-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.type-row .type-grip { cursor: grab; color: var(--ink-faint); font-size: 15px; user-select: none; padding-right: 4px; }
.type-row.dragging { opacity: .5; }
.type-row.drop-cible { box-shadow: inset 0 2px 0 var(--rh); }
.type-nom { font-size: 14px; flex: 1; }
.type-actions { display: flex; gap: 6px; }
.types-add { display: flex; gap: 8px; }
.types-add input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; background: var(--surface); }

/* Modale Notifications */
.notif-list { list-style: none; margin: 0 0 8px; padding: 0; max-height: 360px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif-meta { flex: 1; min-width: 0; }
.ni-emp { font-size: 13.5px; font-weight: 500; margin-bottom: 3px; }
.ni-extrait { font-size: 13px; color: var(--ink-soft); margin-bottom: 3px; }
.ni-by { font-size: 11.5px; color: var(--ink-faint); }
.notif-actions { display: flex; flex-direction: column; gap: 5px; flex: 0 0 auto; }
.notif-empty { color: var(--ink-faint); font-size: 13px; padding: 8px 0; }

/* ===================== Ajouts : pastille d'accès, cloche, notifications ===================== */

/* Pastille de rôle d'accès sur la carte employé (menu de gauche) */
.acces-pastille {
  position: absolute; top: 9px; right: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: .03em;
  padding: 2px 7px; border-radius: 20px; line-height: 1.4;
}
.acces-pastille.ap-rh { background: var(--rh); color: #fff; }
.acces-pastille.ap-direction { background: var(--or); color: #fff; }
.acces-pastille.ap-aucun { background: var(--line); color: var(--ink-faint); }

/* Cloche de notifications minimaliste + point rouge */
.notif-btn { position: relative; display: inline-flex; align-items: center; color: rgba(255,255,255,.85); }
.notif-btn:hover { color: #fff; }
.bell-ico { display: block; }
.notif-dot {
  position: absolute; top: -2px; right: -2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rouge); border: 1.5px solid var(--rh);
}

/* Types de notifications */
.notif-item--neuf { background: var(--rh-pale); border-radius: 8px; padding-left: 8px; }
.ni-type {
  display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
  background: var(--rh-pale); color: var(--rh); padding: 1px 7px; border-radius: 20px; margin-right: 4px; font-weight: 600;
}
.ni-type--alerte { background: #fdf0e8; color: #b5482f; }

/* ===================== Filtre par période (notes) ===================== */
.notes-datefiltre { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.ndf-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 600; }
.notes-datefiltre select, .notes-datefiltre input[type="date"] {
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; background: var(--surface); color: var(--ink);
}
.ndf-ctrl { display: inline-flex; align-items: center; gap: 6px; }
.ndf-tiret { color: var(--ink-faint); }
.cal-btn {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--rh); cursor: pointer; transition: background .12s, border-color .12s;
}
.cal-btn:hover { background: var(--rh-pale); border-color: var(--rh); }

/* ===================== Modale calendrier ===================== */
.modal--lg { max-width: 620px; }
.cal-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0 14px; }
.cal-titre { font-size: 15px; font-weight: 600; text-transform: capitalize; min-width: 150px; text-align: center; }
.cal-navbtn {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  font-size: 18px; line-height: 1; color: var(--ink-soft); cursor: pointer;
}
.cal-navbtn:hover { background: var(--rh-pale); color: var(--rh); border-color: var(--rh); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); font-weight: 600; padding-bottom: 4px; }
.cal-cell {
  position: relative; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px;
  background: var(--surface); cursor: default; display: flex; flex-direction: column; gap: 3px;
}
.cal-cell--vide { border: none; background: transparent; }
.cal-cell--actif { cursor: pointer; border-color: var(--rh-pale); }
.cal-cell--actif:hover { background: var(--rh-pale); border-color: var(--rh); }
.cal-cell--auj { box-shadow: inset 0 0 0 1.5px var(--or); }
.cal-cell--sel { background: var(--rh-pale); border-color: var(--rh); }
.cal-num { font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.cal-count { position: absolute; top: 4px; right: 6px; font-size: 10px; color: var(--ink-faint); font-weight: 600; }
.cal-jour { margin-top: 14px; max-height: 230px; overflow-y: auto; }
.cal-jour-vide { color: var(--ink-faint); font-size: 13px; text-align: center; padding: 14px 0; }
.cal-jour-titre { font-size: 12px; font-weight: 600; text-transform: capitalize; color: var(--ink-soft); margin-bottom: 8px; }
.cal-note { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
.cal-note-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; margin-bottom: 5px; }
.cal-note-top .cat { padding: 1px 8px; border-radius: 20px; font-weight: 600; }
.cal-note-top .when { color: var(--ink-soft); }
.cal-note-top .by { color: var(--ink-faint); margin-left: auto; }
.cal-note .corps { font-size: 13px; white-space: pre-wrap; line-height: 1.45; }

/* ===================== Grille d'accès (3 applications) ===================== */
.acces-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 560px) { .acces-grille { grid-template-columns: 1fr; } }
