/* Socle visuel commun (application et vitrine) — « l'heure dorée ».
   Encre bleu nuit / papier crème, dégradé coucher de soleil corail → ambre pour l'action,
   menthe pour la réussite, lilas pour l'information. Titres Fraunces, texte Inter (OFL, embarquées). */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-wght-normal.woff2) format("woff2");
  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: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-wght-italic.woff2) format("woff2");
  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: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-ext-wght-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2");
  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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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; }

:root {
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* Clair : papier crème */
  --bg: #faf6f0;
  --bg-2: #f4ede3;
  --surface: #ffffff;
  --surface-2: #f6f0e8;
  --line: #ebe2d6;
  --line-strong: #dccfbf;
  --text: #1d1a2c;
  --text-2: #5d596e;
  --text-3: #6c667e;

  --sun-1: #f2553e;          /* corail */
  --sun-2: #ffaa36;          /* ambre */
  --sun: linear-gradient(135deg, var(--sun-1) 0%, #fb7a3c 45%, var(--sun-2) 100%);
  --on-sun: #1d0f16;         /* texte posé sur le dégradé (contraste > 6:1) */
  --sun-soft: #fdebe2;
  --link: #c13f29;           /* corail foncé, 4,9:1 sur blanc */
  --lilac: #6c5ae6;
  --lilac-soft: #ece9fd;
  --mint: #198f64;
  --mint-text: #147a55;  /* vert lisible pour du petit texte sur fond vert pâle (4,7:1) */
  --mint-soft: #e2f4ec;
  --warn: #a86b00;
  --warn-soft: #fbf0d9;

  --glow: radial-gradient(60% 50% at 85% -10%, rgba(255, 150, 80, .20), transparent 70%),
          radial-gradient(45% 40% at 5% 0%, rgba(140, 120, 255, .10), transparent 70%);
  --shadow: 0 1px 2px rgba(40, 24, 10, .05), 0 6px 20px rgba(40, 24, 10, .06);
  --shadow-lg: 0 24px 60px rgba(40, 24, 10, .16);
  --shadow-sun: 0 8px 24px rgba(242, 85, 62, .28);
  --radius: 16px;
  --radius-sm: 11px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f1c;
    --bg-2: #13142400;
    --surface: #171929;
    --surface-2: #1e2136;
    --line: #282b45;
    --line-strong: #383c5c;
    --text: #f6f1e9;
    --text-2: #b8b3c8;
    --text-3: #958fa8;
    --sun-1: #ff6b57;
    --sun-2: #ffb547;
    --on-sun: #1a0f17;
    --sun-soft: #2e1c22;
    --link: #ffa27a;
    --lilac: #a899ff;
    --lilac-soft: #24213f;
    --mint: #58d8a9; --mint-text: #58d8a9;
    --mint-soft: #15302a;
    --warn: #ffc962;
    --warn-soft: #33290f;
    --glow: radial-gradient(60% 55% at 88% -12%, rgba(255, 120, 70, .22), transparent 70%),
            radial-gradient(50% 45% at 0% 0%, rgba(130, 110, 255, .14), transparent 70%);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .28);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, .55);
    --shadow-sun: 0 10px 30px rgba(255, 107, 87, .30);
    color-scheme: dark;
  }
}

/* Sombre choisi à la main (bouton de thème), quel que soit le réglage du système. */
:root[data-theme="dark"] {
  --bg: #0e0f1c;
  --bg-2: #13142400;
  --surface: #171929;
  --surface-2: #1e2136;
  --line: #282b45;
  --line-strong: #383c5c;
  --text: #f6f1e9;
  --text-2: #b8b3c8;
  --text-3: #958fa8;
  --sun-1: #ff6b57;
  --sun-2: #ffb547;
  --on-sun: #1a0f17;
  --sun-soft: #2e1c22;
  --link: #ffa27a;
  --lilac: #a899ff;
  --lilac-soft: #24213f;
  --mint: #58d8a9; --mint-text: #58d8a9;
  --mint-soft: #15302a;
  --warn: #ffc962;
  --warn-soft: #33290f;
  --glow: radial-gradient(60% 55% at 88% -12%, rgba(255, 120, 70, .22), transparent 70%),
          radial-gradient(50% 45% at 0% 0%, rgba(130, 110, 255, .14), transparent 70%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .55);
  --shadow-sun: 0 10px 30px rgba(255, 107, 87, .30);
  color-scheme: dark;
}

/* Bouton de thème (application, accueil, pages d'aide). */
.theme-btn {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer;
  transition: color .15s, background .15s, transform .2s;
}
.theme-btn:hover { color: var(--text); background: var(--surface-2); }
.theme-btn:active { transform: rotate(-20deg) scale(.95); }
.theme-btn svg { width: 17px; height: 17px; }
