/* LES VARIABLES DE DESIGN de la nouvelle app, a un seul endroit : couleurs, polices, rayons, ombres, decor.
   DEUX THEMES FIGES (AA-P4-E01-C05, Mathieu, 30 nov. 2026 15h12 : « La V3 l'emporte »), un jeu de variables chacun :
     clair  (:root)                 = la direction A, « creme raffinee », suite de la V3 validee par Patrice ;
     sombre ([data-theme="sombre"]) = le sombre de la V3, valeurs relevees dans dashboard/static/css/v3_creme.css
                                      ligne 35 (Link-Card/apex-action, origin/main 71115fa). UN seul ecart : le rouge
                                      d'erreur, eclairci juste assez pour WCAG AA (#e0766d -> #e17b72, 4,33 -> 4,51:1).
   Le theme vient du compte (Mon compte > Apparence), sinon du dernier compte de l'appareil, sinon clair.
   Polices DM Sans et Playfair Display servies en local (SIL OFL 1.1). Contrastes WCAG AA : tests/test_themes.py. */

@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../polices/dm-sans-latin-400-700.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../polices/playfair-display-latin-600.woff2") format("woff2"); }

/* ── clair (= A, creme raffinee) ── */
:root {
  --fond: #f6f3ec; --panneau: #fffdf8; --panneau-2: #efe8d8; --bord: #e3ddcf;
  --texte: #1d2a22; --texte-2: #5f6b63; --texte-3: #646f68;   /* texte-3 : v3 #6f7a72, assombri pour WCAG AA (4,5:1) */
  --vert: #1c7449; --vert-fond: rgba(47, 143, 91, .13);   /* v3 #1f7a4d, assombri pour WCAG AA sur son fond */
  --rouge: #b23a3a; --rouge-fond: rgba(192, 72, 63, .11);
  --orange: #9a6410; --orange-fond: rgba(201, 138, 28, .14);
  --accent: #1b3a2b; --accent-fond: rgba(27, 58, 43, .08); --sur-accent: #f6f3ec; --or: #a8874d;
  --fond-fonce: #141a16;                                   /* fond de la planche « fond fonce » */
  --qr-fond: #ffffff;                                      /* le code QR reste noir sur blanc dans les deux themes (lecture par le telephone) */
  --ombre: 0 8px 22px rgba(0, 0, 0, .08);
  /* la page de connexion */
  --fond-image: radial-gradient(90rem 50rem at 12% 0%, #fffdf8 0%, rgba(255, 253, 248, 0) 60%),
                radial-gradient(60rem 40rem at 100% 100%, #efe8d8 0%, rgba(239, 232, 216, 0) 65%);
  --carte-fond: #fffdf8; --carte-bord: #e3ddcf; --carte-ombre: 0 24px 60px rgba(29, 42, 34, .10);
  --carte-flou: none;
  --champ-fond: #f6f3ec; --champ-bord: #ddd5c3; --champ-texte: #1d2a22;
  --bouton-fond: #1b3a2b; --bouton-texte: #f6f3ec;
  --lien: #1f7a4d; --filet: #a8874d;                       /* le filet or sous le titre */
  --accroche: #5f6b63;
  --deco-1: transparent; --deco-2: transparent;
  --police-texte: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-titre: "Playfair Display", Georgia, serif;
  --poids-titre: 600;
  --rayon: 16px; --rayon-bouton: 999px;
  --largeur-carte: 25rem;
  color-scheme: light;
}

/* ── sombre (= le sombre de la V3 ; un seul ecart, le rouge d'erreur) ── */
[data-theme="sombre"] {
  --fond: #141a16; --panneau: #1c241f; --panneau-2: #222b24; --bord: #2c3630;
  --texte: #e8ece6; --texte-2: #9aa69e; --texte-3: #84908a;
  --vert: #5fc48d; --vert-fond: rgba(95, 196, 141, .14);
  --rouge: #e17b72; --rouge-fond: rgba(224, 118, 109, .14);   /* V3 #e0766d (4,33:1) -> #e17b72 (4,51:1), WCAG AA */
  --orange: #e0a840; --orange-fond: rgba(224, 168, 64, .14);
  --accent: #8fc1a2; --accent-fond: rgba(143, 193, 162, .12); --sur-accent: #10231a; --or: #c9a96a;
  --ombre: 0 8px 22px rgba(0, 0, 0, .4);
  --fond-image: none;
  --carte-fond: #1c241f; --carte-bord: #2c3630; --carte-ombre: 0 8px 22px rgba(0, 0, 0, .4); --carte-flou: none;
  --champ-fond: #141a16; --champ-bord: #2c3630; --champ-texte: #e8ece6;
  --bouton-fond: #8fc1a2; --bouton-texte: #10231a;
  --lien: #5fc48d; --filet: #c9a96a;
  --accroche: #9aa69e;
  --deco-1: transparent; --deco-2: transparent;
  color-scheme: dark;
}
