/* Famille — feuille de style mobile-first (aucune dépendance externe, CSP-safe).
   Socle repris de ClaireDD (tokens, cartes, boutons, calendrier), repaletté en
   violet/orange pour distinguer les deux PWA sur l'écran d'accueil.

   ⚠ Deux règles à ne pas oublier :
   1. Les tokens sombres sont déclarés DEUX fois (auto via prefers-color-scheme,
      et forcé via [data-theme="dark"]) — toujours modifier les deux ensemble.
   2. Toute modification d'un fichier de public/ impose de bumper le CACHE du
      service worker, sinon les appareils gardent l'ancienne version. */

/* ── Polices auto-hébergées (jamais Google Fonts — CSP font-src 'self') ── */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/jetbrains-mono-500.woff2') format('woff2'); }

:root {
  --bg: #faf7ff;
  --card: #ffffff;
  --card-2: #f5f2fd;
  --ink: #1c1826;
  --muted: #4a4459;
  --line: #e6e1f0;
  --line-strong: #c9c2da;
  --brand: #6d28d9;
  --brand-ink: #ffffff;
  --brand-weak: rgba(109, 40, 217, .10);
  --accent: #ea580c;
  --accent-ink: #c2410c;
  --accent-weak: #fdead9;
  --ok: #059669;
  --warn: #d97706;
  --bad: #ba1a1a;

  /* Couleurs de portée « Concerne » — alignées sur users.color en base. */
  --sc-famille: #059669;
  --sc-claire: #db2777;
  --sc-herve: #0284c7;

  --shadow: 0 2px 8px rgba(24, 16, 40, .05), 0 1px 2px rgba(24, 16, 40, .04);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-badge: 6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --rail: 0px;               /* largeur du rail latéral — passe à 220px sur PC */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14121c; --card: #201c2c; --card-2: #2a2439;
    --ink: #f2f0fa; --muted: #a29bb5; --line: #332c44; --line-strong: #4a4160;
    --brand: #a78bfa; --brand-ink: #1c1826; --brand-weak: rgba(167, 139, 250, .16);
    --accent: #fb923c; --accent-ink: #fb923c; --accent-weak: rgba(251, 146, 60, .14);
    --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
    --sc-famille: #34d399; --sc-claire: #f472b6; --sc-herve: #38bdf8;
    --shadow: 0 2px 10px rgba(0, 0, 0, .42);
  }
}
:root[data-theme="dark"] {
  --bg: #14121c; --card: #201c2c; --card-2: #2a2439;
  --ink: #f2f0fa; --muted: #a29bb5; --line: #332c44; --line-strong: #4a4160;
  --brand: #a78bfa; --brand-ink: #1c1826; --brand-weak: rgba(167, 139, 250, .16);
  --accent: #fb923c; --accent-ink: #fb923c; --accent-weak: rgba(251, 146, 60, .14);
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --sc-famille: #34d399; --sc-claire: #f472b6; --sc-herve: #38bdf8;
  --shadow: 0 2px 10px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--brand); }
.hidden { display: none !important; }

/* Layout */
#app { max-width: 620px; margin: 0 auto; padding: 0 16px calc(92px + var(--safe-b)); }

/* Top app bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  height: 60px; margin: 0 -16px 0; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.1rem; color: var(--brand); letter-spacing: -.02em; }
.topbar .brand svg { width: 22px; height: 22px; flex: none; }
.topbar .who {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; color: var(--brand);
  background: var(--brand-weak); padding: 6px 12px; border-radius: 999px; letter-spacing: .03em;
}
.page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 16px 2px 14px; }

/* Cards */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 16px; margin-bottom: 14px;
}
.card h2 { font-family: var(--mono); font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; margin-bottom: 10px; }

/* Forms */
label { display: block; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 12px 0 5px; font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=month], input[type=file], select, textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: var(--font); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--card); color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 76px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-check { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.inline-check input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.inline-check label { margin: 0; font-family: var(--font); font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.hint { font-size: .8rem; color: var(--muted); margin-top: 6px; line-height: 1.45; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; font-size: 1rem; font-weight: 700; border: none;
  border-radius: var(--radius-sm); background: var(--brand); color: var(--brand-ink); cursor: pointer;
  transition: filter .15s, transform .05s; text-decoration: none; font-family: var(--font);
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { filter: brightness(1.06); }
.btn.secondary { background: transparent; color: var(--brand); border: 1px solid var(--line-strong); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.danger { background: var(--bad); color: #fff; }
.btn:active { transform: scale(.99); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 13px; border-radius: 10px; font-size: .82rem; font-weight: 700; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; font-family: var(--font); min-height: 40px; }
.sbtn.brand { background: var(--brand); color: var(--brand-ink); border: none; }
.sbtn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line-strong)); }
a.sbtn { text-decoration: none; }
.sbtn svg { width: 16px; height: 16px; }

/* Sélecteur segmenté (thème, portée, statut) */
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-width: 0; padding: 11px 6px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: var(--radius-sm); font-weight: 700; font-family: var(--font); font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button svg { width: 17px; height: 17px; }
.seg button.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
/* Le segment « Concerne » se colore de la personne choisie plutôt que du brand. */
.seg.scopes button.active[data-v="famille"] { background: var(--sc-famille); border-color: var(--sc-famille); color: #fff; }
.seg.scopes button.active[data-v="claire"] { background: var(--sc-claire); border-color: var(--sc-claire); color: #fff; }
.seg.scopes button.active[data-v="herve"] { background: var(--sc-herve); border-color: var(--sc-herve); color: #fff; }

/* Menu de navigation interne */
.menu { display: flex; flex-direction: column; }
.navrow { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; font-family: var(--font); cursor: pointer; }
.navrow:last-child { border-bottom: none; }
.navrow .ic { display: inline-flex; width: 20px; height: 20px; color: var(--brand); flex: none; }
.navrow .ic svg { width: 20px; height: 20px; }
.navrow .chev { margin-left: auto; color: var(--muted); display: inline-flex; }
.navrow .chev svg { width: 18px; height: 18px; }

/* Listes clé/valeur (fiche détail, compte) */
.list .item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.list .item:last-child { border-bottom: none; }
.list .item > span:first-child { color: var(--muted); font-size: .84rem; flex: none; }
.list .item > strong { text-align: right; overflow-wrap: anywhere; }
.item .meta { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* Badges */
.badge { font-family: var(--mono); font-size: .68rem; font-weight: 500; padding: 4px 9px; border-radius: var(--radius-badge); background: var(--line); color: var(--ink); letter-spacing: .02em; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.badge.provisoire { background: color-mix(in srgb, var(--warn) 16%, var(--card)); color: var(--warn); }
.badge.confirme { background: color-mix(in srgb, var(--ok) 16%, var(--card)); color: var(--ok); }
.badge.annule { background: color-mix(in srgb, var(--bad) 14%, var(--card)); color: var(--bad); }
.badge.famille { background: color-mix(in srgb, var(--sc-famille) 16%, var(--card)); color: var(--sc-famille); }
.badge.claire { background: color-mix(in srgb, var(--sc-claire) 16%, var(--card)); color: var(--sc-claire); }
.badge.herve { background: color-mix(in srgb, var(--sc-herve) 16%, var(--card)); color: var(--sc-herve); }

/* ─────────── Agenda : liste chronologique ─────────── */
.day-group { margin-bottom: 4px; }
.day-head {
  position: sticky; top: 60px; z-index: 10;
  display: flex; align-items: baseline; gap: 8px; padding: 10px 2px 6px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.day-head .d-name { font-weight: 800; font-size: .95rem; letter-spacing: -.01em; }
.day-head .d-date { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.day-head.today .d-name { color: var(--brand); }
.day-head.today .d-name::after { content: " · aujourd'hui"; font-weight: 600; font-size: .78rem; opacity: .8; }

/* Une ligne d'événement : barre de couleur de portée à gauche. */
.ev {
  display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left;
  padding: 12px 13px; margin-bottom: 8px; border: 1px solid var(--line); border-left: 4px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--shadow);
  color: var(--ink); font-family: var(--font); font-size: 1rem; cursor: pointer;
}
.ev.famille { border-left-color: var(--sc-famille); }
.ev.claire { border-left-color: var(--sc-claire); }
.ev.herve { border-left-color: var(--sc-herve); }
.ev .ev-cat { font-size: 1.05rem; line-height: 1.3; flex: none; }
.ev .ev-body { flex: 1; min-width: 0; }
.ev .ev-title { font-weight: 700; font-size: .96rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ev .ev-meta { font-size: .78rem; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ev .ev-time { font-family: var(--mono); font-size: .74rem; font-weight: 500; color: var(--muted); flex: none; min-width: 60px; text-align: right; }
/* Provisoire : contour pointillé — se lit d'un coup d'œil sans lire le badge. */
.ev.st-provisoire { border-style: dashed; border-left-style: solid; }
/* Annulé : barré et estompé, mais conservé (on veut se souvenir qu'il a sauté). */
.ev.st-annule { opacity: .55; }
.ev.st-annule .ev-title { text-decoration: line-through; }
.empty-day { color: var(--muted); font-size: .88rem; padding: 10px 2px 16px; }

/* ─────────── Calendrier (grille mois) ─────────── */
/* Repris de ClaireDD : 7 colonnes, lundi en tête, teintes par color-mix. */
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-family: var(--mono); font-size: .62rem; color: var(--muted); text-align: center; margin-bottom: 6px; text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  position: relative; min-height: 56px; border-radius: 10px; padding: 4px 5px;
  display: flex; flex-direction: column; align-items: stretch; gap: 3px;
  font-size: .7rem; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: var(--card); overflow: hidden;
  cursor: pointer; font-family: var(--font); text-align: left;
}
.cal-cell.empty { border: none; background: transparent; cursor: default; }
.cal-cell.other-month { opacity: .45; }
.cal-num { font-family: var(--mono); font-weight: 500; font-size: .68rem; opacity: .8; }
.cal-cell.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-cell.today .cal-num { color: var(--brand); font-weight: 700; opacity: 1; }
.cal-cell.selected { background: var(--brand-weak); }
/* Mobile : pastilles de couleur. Desktop : chips avec l'heure et le titre. */
.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; align-content: flex-start; }
.cal-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--line-strong); }
.cal-dot.famille { background: var(--sc-famille); }
.cal-dot.claire { background: var(--sc-claire); }
.cal-dot.herve { background: var(--sc-herve); }
.cal-dot.st-provisoire { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.cal-dot.st-provisoire.famille { color: var(--sc-famille); }
.cal-dot.st-provisoire.claire { color: var(--sc-claire); }
.cal-dot.st-provisoire.herve { color: var(--sc-herve); }
.cal-more { font-family: var(--mono); font-size: .58rem; color: var(--muted); }
.cal-chips { display: none; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-chip {
  font-size: .66rem; line-height: 1.25; padding: 2px 5px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid var(--line-strong); background: var(--card-2);
}
.cal-chip.famille { border-left-color: var(--sc-famille); }
.cal-chip.claire { border-left-color: var(--sc-claire); }
.cal-chip.herve { border-left-color: var(--sc-herve); }
.cal-chip.st-annule { text-decoration: line-through; opacity: .6; }
.cal-chip.st-provisoire { border-left-style: dashed; }
.cal-chip b { font-family: var(--mono); font-weight: 500; opacity: .75; }
.legend2 { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; font-size: .72rem; color: var(--muted); }
.legend2 span { display: inline-flex; align-items: center; gap: 5px; }
.legend2 i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Barre de mois : ‹ septembre 2026 › + Aujourd'hui */
.monthbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.monthbar .m-label { flex: 1; text-align: center; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; text-transform: capitalize; }
.monthbar .sbtn { min-width: 44px; }

/* Filtres de portée */
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 12px; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--muted); font-size: .82rem; font-weight: 700;
  cursor: pointer; font-family: var(--font); white-space: nowrap; min-height: 38px;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip.active[data-v="claire"] { background: var(--sc-claire); border-color: var(--sc-claire); color: #fff; }
.chip.active[data-v="herve"] { background: var(--sc-herve); border-color: var(--sc-herve); color: #fff; }

/* Bouton flottant « + » (création rapide sur mobile) */
.fab {
  position: fixed; right: 18px; bottom: calc(84px + var(--safe-b)); z-index: 25;
  width: 56px; height: 56px; border-radius: 999px; border: none;
  background: var(--brand); color: var(--brand-ink); cursor: pointer;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 40%, transparent);
  display: flex; align-items: center; justify-content: center;
}
.fab svg { width: 26px; height: 26px; }

/* Pop-up bottom-sheet (formulaire d'événement, confirmations) */
.modal-ov { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; }
.modal-card { background: var(--card); color: var(--ink); width: 100%; max-width: 620px; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + var(--safe-b)); box-shadow: 0 -4px 24px rgba(0, 0, 0, .25); animation: sheet-up .18s ease-out; max-height: 92vh; overflow-y: auto; }
.modal-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 14px; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Bottom nav */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--card) 85%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + var(--safe-b));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--muted); font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .02em; padding: 2px 4px; white-space: nowrap; flex: 1; }
.tabbar .ic { display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 16px; border-radius: 999px; transition: background .15s, color .15s; }
.tabbar .ic svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--accent-ink); }
.tabbar a.active .ic { background: var(--accent-weak); color: var(--accent-ink); }
.tabbar .rail-brand { display: none; }

/* Login */
.login-wrap { max-width: 400px; margin: 8vh auto; padding: 0 16px; }
.login-logo { display: flex; align-items: center; justify-content: center; color: var(--brand); margin-bottom: 10px; }
.login-logo svg { width: 52px; height: 52px; }

/* Toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--radius-sm); font-size: .9rem; z-index: 95; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mt { margin-top: 14px; }
.spinner { text-align: center; color: var(--muted); padding: 30px; font-family: var(--mono); font-size: .8rem; }

/* ══════════════════════════════════════════════════════════════════════════
   PC (≥ 900px) — MÊME structure HTML, tout se joue ici.
   La barre d'onglets basse devient un rail latéral vertical ; le calendrier
   passe des pastilles aux chips lisibles. Aucun rendu conditionnel en JS.
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  :root { --rail: 220px; }

  #app { max-width: 1080px; margin: 0 0 0 var(--rail); padding: 0 32px 48px; }
  .topbar { margin: 0 -32px 0; padding: 0 32px; height: 64px; justify-content: flex-end; }
  /* La marque vit dans le rail : la répéter dans la top-bar ferait doublon. */
  .topbar .brand { display: none; }
  .page-title { font-size: 1.9rem; margin: 22px 2px 18px; }

  /* Les commandes restent groupées à gauche plutôt qu'étirées sur 1000 px :
     on ne veut pas traverser l'écran à la souris pour changer de mois. */
  .monthbar { justify-content: flex-start; max-width: 420px; }
  .monthbar .m-label { flex: none; min-width: 190px; font-size: 1.15rem; }
  .monthbar #m-today { margin-left: 8px; }

  /* Tabbar → rail latéral (mêmes éléments <a>, réempilés verticalement) */
  .tabbar {
    top: 0; bottom: 0; right: auto; width: var(--rail);
    flex-direction: column; justify-content: flex-start; gap: 4px;
    border-top: none; border-right: 1px solid var(--line);
    padding: 18px 12px; background: var(--card);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .tabbar .rail-brand {
    display: flex; align-items: center; gap: 9px; padding: 0 10px 18px;
    font-weight: 800; font-size: 1.15rem; color: var(--brand); letter-spacing: -.02em;
  }
  .tabbar .rail-brand svg { width: 24px; height: 24px; }
  .tabbar a {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 12px;
    width: 100%; padding: 11px 12px; border-radius: 10px;
    font-family: var(--font); font-size: .92rem; font-weight: 600;
  }
  .tabbar a:hover { background: var(--card-2); }
  .tabbar .ic { height: auto; padding: 0; border-radius: 0; }
  .tabbar .ic svg { width: 21px; height: 21px; }
  .tabbar a.active { background: var(--brand-weak); color: var(--brand); }
  .tabbar a.active .ic { background: none; color: var(--brand); }

  /* Le « + » flottant redevient un bouton de barre : place perdue sinon. */
  .fab { right: 32px; bottom: 32px; }

  /* Calendrier : cases hautes, chips à la place des pastilles. */
  .cal-cell { min-height: 116px; padding: 6px; }
  .cal-num { font-size: .74rem; }
  .cal-dots { display: none; }
  .cal-chips { display: flex; }
  .cal-more { font-size: .62rem; }

  /* L'agenda respire : deux colonnes de largeur confortable. */
  .day-head { top: 64px; }
  .ev { padding: 13px 15px; }

  /* Le bottom-sheet devient une modale centrée. */
  .modal-ov { align-items: center; padding: 24px; }
  .modal-card { border-radius: var(--radius); max-width: 560px; padding: 24px; animation: none; max-height: 88vh; }
}

/* Écrans très larges : on laisse le contenu centré dans l'espace restant. */
@media (min-width: 1400px) {
  #app { margin-left: var(--rail); padding-left: 64px; padding-right: 64px; }
}
