/* Public Épure design values — audit §5.1. */
:root {
  color-scheme: light;
  /* Neutres (6) */
  --bg: #FFFFFF;            /* fond principal, cellules */
  --bg-2: #F2F2F7;          /* fond groupé, barre latérale, feuilles, cartes */
  --fill: rgba(118,118,128,.12);   /* pistes, champs, états pressés, badges neutres */
  --separator: rgba(60,60,67,.29); /* hairlines (décoratif) */
  --label: #1C1C1E;         /* texte, encre interactive, focus, pastille du jour */
  --label-2: #636366;       /* texte secondaire */
  /* Dérivé non chromatique (chevrons, jours hors mois bureau) */
  --label-3: #767679;
  /* Un seul rouge */
  --danger: #C0261C;  --danger-tint: #F9E9E8;  --badge: #C0261C;  --on-badge: #FFFFFF;
  --on-label: #FFFFFF;      /* texte sur bouton encre */
  /* Sources : barre / pastille ; teinte = color-mix 12 % sur --bg */
  --src-personnel: #C2416B; --src-travail: #0F766E; --src-syndicat: #2456D6;
  --src-gmail: #8A3FA0;     --src-ferie: #A86500;   --src-autre: #5B6B7F;
  --tint: 12%;
  /* Verre (2 barres) */
  --bar: color-mix(in srgb, var(--bg) 92%, transparent);
  --scrim: rgba(0,0,0,.25);
  --shadow-1: 0 1px 2px rgba(0,0,0,.06), 0 0 0 .5px rgba(0,0,0,.04);
  --shadow-2: 0 10px 30px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  /* Mesures */
  --r-block: 6px; --r-field: 10px; --r-card: 14px; --r-pill: 999px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --hit: 44px;
  --hour-h: 52px; --bar-w: 3px; --dot: 8px; --hairline: .5px;
  --ease: cubic-bezier(.2,.8,.2,1); --ease-sheet: cubic-bezier(.32,.72,0,1);
  --t-press: 80ms; --t-fast: 120ms; --t-base: 200ms; --t-sheet: 280ms; --t-slow: 350ms;
  /* safe-areas : conserver tels quels (contournement top-layer iOS) */
  --safe-top: env(safe-area-inset-top); --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left); --safe-right: env(safe-area-inset-right);
}
/* Sombre : appliqué par [data-theme="dark"] ET par prefers-color-scheme sans thème forcé */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000; --bg-2: #1C1C1E; --fill: rgba(118,118,128,.24);
  --separator: rgba(84,84,88,.6); --label: #F2F2F7; --label-2: #A1A1A8; --label-3: #8E8E93;
  --danger: #FF7A6E; --danger-tint: #2E1614; --badge: #D73A31; --on-badge: #FFFFFF; --on-label: #000000;
  --src-personnel: #F28CAB; --src-travail: #5EC4B6; --src-syndicat: #8AB0FF;
  --src-gmail: #E0A6EE; --src-ferie: #F0B45A; --src-autre: #9AA8BA;
  --tint: 22%; --scrim: rgba(0,0,0,.5);
  --shadow-1: 0 0 0 .5px rgba(255,255,255,.08); --shadow-2: 0 0 0 .5px rgba(255,255,255,.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
  color-scheme: dark;
  --bg: #000000; --bg-2: #1C1C1E; --fill: rgba(118,118,128,.24);
  --separator: rgba(84,84,88,.6); --label: #F2F2F7; --label-2: #A1A1A8; --label-3: #8E8E93;
  --danger: #FF7A6E; --danger-tint: #2E1614; --badge: #D73A31; --on-badge: #FFFFFF; --on-label: #000000;
  --src-personnel: #F28CAB; --src-travail: #5EC4B6; --src-syndicat: #8AB0FF;
  --src-gmail: #E0A6EE; --src-ferie: #F0B45A; --src-autre: #9AA8BA;
  --tint: 22%; --scrim: rgba(0,0,0,.5);
  --shadow-1: 0 0 0 .5px rgba(255,255,255,.08); --shadow-2: 0 0 0 .5px rgba(255,255,255,.1);
  }
}

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --text-xs: .6875rem; --text-sm: .75rem; --text-meta: .8125rem; --text-body: 1.0625rem;
  --text-title: 1.0625rem; --text-section: 1.375rem; --text-view: 1.75rem; --text-today: 2.125rem;
}
