@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/polices/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/polices/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/polices/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("/polices/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/polices/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/polices/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("/polices/barlow-condensed-800.woff2") format("woff2"); }

/* ===== Jetons de conception ===== */
:root {
  color-scheme: light dark;

  --police-texte: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-titre: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  /* Couleurs : light-dark() suit le thème (auto, clair, sombre) sans dupliquer les valeurs. */
  --bg: light-dark(#F2F3F5, #0E1013);
  --bg-profond: light-dark(#D5DBE6, #06070A);
  --carte: light-dark(rgb(255 255 255 / 0.74), rgb(28 31 38 / 0.62));
  --carte-pleine: light-dark(#FFFFFF, #1A1D23);
  --carte-sans-flou: color-mix(in srgb, var(--carte-pleine) 80%, transparent); /* cartes : pas de flou d'arrière-plan, trop lourd sur un téléphone modeste */
  --verre-bord: light-dark(rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.09));
  --ink: light-dark(#111318, #F2F4F7);
  --muted: light-dark(#5B6270, #9AA2AF);
  --ligne: light-dark(#E2E5EA, #2B3038);
  --champ: light-dark(#F4F5F7, #23272E);
  --toi: light-dark(#1A5FC4, #6EA8FF);
  --toi-fond: light-dark(#E6EFFE, #1A2840);
  --lui: light-dark(#A63D08, #FF9A5C);
  --lui-fond: light-dark(#FFEEE3, #3A2418);
  --ok: light-dark(#15803D, #4ADE80);
  --antenne: light-dark(#E5202E, #FF3B47);
  --antenne-solide: #D61F2C; /* fond de bouton ou de bandeau portant du texte blanc : 5,1:1 */
  --verre-nav: light-dark(rgb(255 255 255 / 0.92), rgb(22 25 31 / 0.92)); /* barres : le contenu ne doit pas se lire à travers */
  --focus: light-dark(#1D6FE0, #8DB9FF);
  --ombre-couleur: light-dark(rgb(16 24 40 / 0.1), rgb(0 0 0 / 0.5));

  /* Couleurs par jour de la semaine. */
  --jour-1: #15803D;
  --jour-2: #DC2626;
  --jour-3: #0E7490;
  --jour-4: #7C3AED;
  --jour-5: #B45309;
  --jour-6: #C2410C;
  --jour-7: #475569;

  /* Rayons, ombres. */
  --rayon-s: 10px;
  --rayon-m: 16px;
  --rayon-l: 22px;
  --rayon-pilule: 999px;
  --ombre-1: 0 1px 2px var(--ombre-couleur), 0 6px 18px var(--ombre-couleur);
  --ombre-2: 0 2px 4px var(--ombre-couleur), 0 18px 44px var(--ombre-couleur);
  --lueur-antenne: 0 0 22px rgb(255 59 71 / 0.45);

  /* Durées et courbes. */
  --duree-courte: 150ms;
  --duree-moyenne: 280ms;
  --duree-longue: 400ms;
  --ease-sortie: cubic-bezier(0.22, 0.8, 0.3, 1);
  --ease-ressort: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Gabarits. */
  --zone-haut: env(safe-area-inset-top, 0px);
  --zone-bas: env(safe-area-inset-bottom, 0px);
  --hauteur-barre: 56px;
  --hauteur-nav: 68px;
  --largeur-contenu: 720px;
}
:root[data-theme="clair"] { color-scheme: light; }
:root[data-theme="sombre"] { color-scheme: dark; }

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  background: transparent; /* le fond « on air » (.fond, z-index -1) doit rester visible : l'opaque est porté par html */
  color: var(--ink);
  font: 400 1rem/1.5 var(--police-texte);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#vue:focus { outline: none; }

.sr-seulement {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ===== Fond « on air » : dégradé profond, lueurs qui dérivent, grain ===== */
.fond {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-profond) 100%);
}
.fond__lueur { position: absolute; border-radius: 50%; will-change: transform; }
.fond__lueur--antenne {
  width: 120vmax; height: 120vmax; top: -78vmax; right: -52vmax;
  background: radial-gradient(closest-side, light-dark(color-mix(in srgb, var(--antenne) 26%, transparent), color-mix(in srgb, var(--antenne) 46%, transparent)), transparent);
  animation: derive-antenne 22s ease-in-out infinite alternate;
}
.fond__lueur--ciel {
  width: 100vmax; height: 100vmax; bottom: -64vmax; left: -56vmax;
  background: radial-gradient(closest-side, light-dark(color-mix(in srgb, var(--toi) 24%, transparent), color-mix(in srgb, var(--toi) 34%, transparent)), transparent);
  animation: derive-ciel 28s ease-in-out infinite alternate;
}
.fond__grain {
  position: absolute; inset: 0; opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
/* Gros voyant « on air » en fond : un disque rouge qui respire, en haut à droite. */
.fond::before {
  content: ""; position: absolute; top: calc(var(--zone-haut) + 54px); right: -34px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--antenne) 60%, transparent) 0 14%, color-mix(in srgb, var(--antenne) 16%, transparent) 40%, transparent 70%);
  animation: respiration-fond 4.8s ease-in-out infinite;
}
