/* ═══════════════════════════════════════════
   SERIANCE — Variables & Reset
   Tokens CSS, thèmes dark/light, base globale
═══════════════════════════════════════════ */

/* ── Thème dark (défaut) ── */
:root {
  --bg:         #121312;
  --bg2:        #171817;
  --glass:      #1c1d1c;
  --glass-h:    #242524;
  --glass-a:    #2b2c2b;
  --glass-sb:   #161716;
  --modal-bg:   #1a1b1a;
  --gb:         rgba(255,255,255,.12);
  --gb-hi:      rgba(255,255,255,.22);
  --gb-in:      rgba(255,255,255,.16);
  --blur:       none;
  --blur-sm:    none;
  --text:       rgba(255,255,255,.92);
  --text-muted: rgba(255,255,255,.48);
  --text-dim:   rgba(255,255,255,.42);
  --accent:     #92BF3B;
  --accentbg:   rgba(146,191,59,.14);
  --accent-glow: rgba(146,191,59,.38);
  --on-accent:  #101a02;
  --on-wallpaper: #ffffff;  /* texte posé sur un fond d'écran choisi (écran de chargement) : blanc dans les deux thèmes */
  --accent-2:   #5aa82e;
  --green:      #30D158;
  --green-bg:   rgba(48,209,88,.13);
  --red:        #FF453A;
  --red-bg:     rgba(255,69,58,.13);
  --blue:       #0A84FF;
  --blue-bg:    rgba(10,132,255,.13);
  --orange:     #FF9F0A;
  --orange-bg:  rgba(255,159,10,.13);
  --surface2:   rgba(255,255,255,.06);
  --border:     rgba(255,255,255,.10);
  --sh:         0 1px 2px rgba(0,0,0,.35);
  --sh-lg:      0 10px 28px rgba(0,0,0,.45);
  --sh-sm:      0 1px 2px rgba(0,0,0,.3);
  --hi:         0 0 #0000;
  --sidebar-w:  0px;
  /* Échelle typographique (1 rem = 14 px) : seules ces tailles existent. Plancher 11 px (.79rem). */
  --fs-xs: .79rem; --fs-sm: .85rem; --fs-base: .9rem; --fs-md: 1rem; --fs-lg: 1.1rem; --fs-xl: 1.4rem; --fs-2xl: 2rem;
}

/* ── Thème light ── */
:root[data-theme="light"] {
  --bg:         #efefeb;
  --bg2:        #e6e6e1;
  --glass:      #ffffff;
  --glass-h:    #f5f5f2;
  --glass-a:    #ecece7;
  --glass-sb:   #f8f8f5;
  --modal-bg:   #fbfbf9;
  --gb:         rgba(0,0,0,.10);
  --gb-hi:      rgba(0,0,0,.14);
  --gb-in:      rgba(0,0,0,.11);
  --text:       rgba(0,0,0,.87);
  --text-muted: rgba(0,0,0,.60);
  --text-dim:   rgba(0,0,0,.48);
  --accent:     #4a7312;
  --accentbg:   rgba(74,115,18,.10);
  --accent-glow: rgba(74,115,18,.28);
  --on-accent:  #ffffff;
  --accent-2:   #3d6310;
  --green:      #12702d;
  --green-bg:   rgba(26,138,58,.11);
  --red:        #c02010;
  --red-bg:     rgba(192,32,16,.09);
  --blue:       #0055cc;
  --blue-bg:    rgba(0,85,204,.09);
  --orange:     #955300;
  --orange-bg:  rgba(170,96,0,.09);
  --surface2:   rgba(0,0,0,.04);
  --border:     rgba(0,0,0,.10);
  --sh:         0 1px 2px rgba(0,0,0,.06);
  --sh-lg:      0 10px 28px rgba(0,0,0,.12);
  --sh-sm:      0 1px 2px rgba(0,0,0,.05);
  --hi:         0 0 #0000;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}
/* Mon profil > Affichage (affichage.js) : taille du texte et contraste élevé, par appareil */
html.aff-txt-l { font-size: 15.5px; }
html.aff-txt-xl { font-size: 17px; }
:root:not([data-theme="light"]).aff-contraste {
  --text: #ffffff; --text-muted: rgba(255,255,255,.82); --text-dim: rgba(255,255,255,.74);
  --gb: rgba(255,255,255,.36); --gb-hi: rgba(255,255,255,.52); --gb-in: rgba(255,255,255,.42); --border: rgba(255,255,255,.32);
}
:root[data-theme="light"].aff-contraste {
  --bg: #ffffff; --bg2: #f4f4f1;
  --text: #000000; --text-muted: rgba(0,0,0,.84); --text-dim: rgba(0,0,0,.74);
  --gb: rgba(0,0,0,.40); --gb-hi: rgba(0,0,0,.55); --gb-in: rgba(0,0,0,.45); --border: rgba(0,0,0,.34);
  --accent: #365a08;
}

* { cursor: inherit; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  transition: background .3s, color .3s;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

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



/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar              { width: 4px; height: 4px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: var(--gb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover  { background: var(--gb-hi); }
