/* CadListes · charte Naroum (Naroum Design System)
   Montserrat : titres, boutons, éléments forts · Sora : sous-titres, menus, textes
   Bleu nuit #071F43 marque · Azur #2F7FED action · Ciel #5BB1EF secondaire · Saphir #205493 complémentaire
   Encre #161E2B texte · Alice #E2E8F0 pour varier du blanc. Plat : pas de dégradé ni de texture. */

/* ===== Polices (hébergées par l'app, fonctionnent hors ligne) ===== */
@font-face { font-family: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/montserrat-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Montserrat'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/montserrat-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,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: 'Sora'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(/fonts/sora-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Sora'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(/fonts/sora-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,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; }

/* ===== Couleurs (paires clair / sombre de la charte) ===== */
:root {
  --bg: #eef2f7;          /* fond de page */
  --surface: #ffffff;     /* cartes */
  --subtle: #e2e8f0;      /* alice : fonds doux, boutons secondaires */
  --field: #f5f8fc;       /* zones de saisie */
  --line: #d3dce8;        /* bordures */
  --hover: #c9d6e6;
  --text: #161e2b;        /* encre */
  --title: #071f43;       /* bleu nuit : titres */
  --muted: #55657c;
  --link: #205493;        /* saphir : liens lisibles sur blanc */
  --action: #2f7fed;      /* azur : tout ce qui se clique */
  --action-hover: #2465bf;
  --action-active: #1a5098;
  --accent: #5bb1ef;      /* ciel : petits accents */
  --bar: #071f43;         /* barre du haut */
  --bar-text: #ffffff;
  --success: #1e7f4f;
  --success-bg: #dff3e9;
  --warning: #a15c00;
  --warning-bg: #fdf1de;
  --danger: #c2452a;
  --danger-bg: #fdecea;
  --secret: #205493;
  --secret-bg: #e3edfb;
  --shadow: 0 4px 16px rgba(7, 31, 67, .10);
  --shadow-lg: 0 12px 32px rgba(7, 31, 67, .18);
  --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --tabbar: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: 'Montserrat', system-ui, sans-serif;
  --body: 'Sora', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1e33; --surface: #161e2b; --subtle: #1a2d45; --field: #0b1626; --line: #1a2d45; --hover: #24405f;
    --text: #e2e8f0; --title: #ffffff; --muted: #8fa0b8; --link: #5bb1ef;
    --action: #2f7fed; --action-hover: #2355c9; --action-active: #1a4aa8; --accent: #5bb1ef;
    --bar: #0b1626; --bar-text: #e2e8f0;
    --success: #3dd68c; --success-bg: #12362a; --warning: #ffb547; --warning-bg: #3a2a10;
    --danger: #ff7a59; --danger-bg: #3a1520; --secret: #5bb1ef; --secret-bg: #16304f;
    --shadow: 0 4px 16px rgba(0, 0, 0, .35); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
a { color: var(--link); font-weight: 600; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--display); font-weight: 700; color: var(--title); }
h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.gold { color: var(--link); }
.hide { display: none !important; }

.splash { min-height: 100dvh; display: grid; place-items: center; background: #071f43; }
.splash img { width: 110px; border-radius: 24px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .7; } }

:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1; min-width: 0; }
.row > .btn { flex: none; }
.stack { display: grid; gap: 14px; }

.scroll-x { overflow-x: auto; }
.spinner { width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--action); border-radius: 50%; animation: spin .8s linear infinite; }
.btn .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { display: grid; place-items: center; padding: 40px; }

/* Filet de sécurité : une icône sans taille prévue reste petite (spécificité nulle, toute règle précise l'emporte) */
:where(svg[aria-hidden="true"]) { width: 24px; height: 24px; flex: none; }
