/* atsem-theme.css : charte ATSEM (surcharge des variables de styles.css).
   Charge APRES styles.css dans Layout.astro. Re-habille toutes les pages internes
   (blog, legal, metier, faq, contact, annales, app) a la charte de la maquette :
   fond creme, polices Fredoka/Nunito, bleu #2F76E0 / vert #1FA36B / rouge #E24A3B. */
:root {
  --accent: #2F76E0;
  --accent2: #1FA36B;
  --ink: #23314D;
  --encre: #23314D;
  --bg: #FFF9F0;
  --card: #FFFFFF;
  --card2: #FFF4E4;
  --text: #38445E;
  --heading: #23314D;
  --muted: #8892A8;
  --line: #F0EADE;
  --ok: #1FA36B;
  --okbg: #E4F6EC;
  --warn: #B4841A;
  --warnbg: #FFF4D6;
  --bad: #E24A3B;
  --badbg: #FDEAE7;
  --shadow: 0 1px 3px rgba(35, 49, 77, .06), 0 12px 30px rgba(35, 49, 77, .06);
  --shadow-strong: 0 20px 50px rgba(35, 49, 77, .16);
  --radius: 16px;
  --radius-lg: 22px;
  /* Familles « ... Repli ... » : fontes système à métriques ajustées (fonts.css), rendues pendant le
     chargement seulement ; leur unicode-range est la cmap de la police web, elles ne servent jamais
     après le swap. Audit perf du 02/09/2026. */
  --font-sans: 'Nunito', 'Nunito Repli Arial', 'Nunito Repli Roboto', 'Nunito Repli Noto', 'Nunito Repli DejaVu', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Fredoka', 'Fredoka Repli Arial', 'Fredoka Repli Roboto', 'Fredoka Repli Noto', 'Fredoka Repli DejaVu', 'Nunito', system-ui, sans-serif;
  --font-mono: 'Nunito', 'Nunito Repli Arial', 'Nunito Repli Roboto', 'Nunito Repli Noto', 'Nunito Repli DejaVu', ui-monospace, monospace;
}

/* Variante sombre : navy ATSEM cohérent (le toggle de thème reste fonctionnel). */
:root[data-theme="dark"] {
  --accent: #6FA6F5;
  --accent2: #5FD3A0;
  --ink: #0E1626;
  --encre: #EAF0FB;
  --bg: #0E1626;
  --card: #182236;
  --card2: #1F2B44;
  --text: #D7E0F0;
  --heading: #F1F5FC;
  --muted: #96A3BE;
  --line: #29354F;
  --ok: #5FD3A0;
  --okbg: #133026;
  --warn: #F5C451;
  --warnbg: #33280F;
  --bad: #F0776F;
  --badbg: #3A1C1A;
  --shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-strong: 0 18px 50px rgba(0, 0, 0, .55);
}

/* Les titres en Fredoka doivent respirer un peu moins serre que Newsreader. */
h1, h2, h3, .serif, .brand .wm { letter-spacing: 0 !important; }
/* Fredoka n'a pas d'italique : on neutralise les italiques de titres/accroches. */
.serif, h1, h2, h3 { font-style: normal; }
/* Boutons et puces un peu plus ronds, ton maquette. */
.btn { border-radius: 100px; }

/* Bouton IA « orbe multicolore dynamique » (Professeur ATSEM) : identique a l'accueil (#rvchat-orb),
   servi sur toutes les pages (widget statique ET widget React du SPA). */
.chatbtn-orb { position: relative; width: 32px; height: 32px; border: none; border-radius: 50%; cursor: pointer; background: transparent; padding: 0; flex: none; animation: cwFloat 4.5s ease-in-out infinite; }
.chatbtn-orb span { position: absolute; border-radius: 50%; display: block; }
.chatbtn-orb .orb-aura { inset: -6px; background: conic-gradient(from 0deg, #E24A3B, #F5B301, #1FA36B, #2F76E0, #E24A3B); filter: blur(9px); opacity: .5; z-index: 0; animation: cwPulse 3.6s ease-in-out infinite; }
.chatbtn-orb .orb-face { inset: 0; background: conic-gradient(from 0deg, #E24A3B, #F5B301, #1FA36B, #2F76E0, #E24A3B); z-index: 1; animation: cwSpin 9s linear infinite; }
.chatbtn-orb .orb-gloss { inset: 0; background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.75), rgba(255,255,255,0) 46%); z-index: 2; box-shadow: inset 0 -5px 10px rgba(35,49,77,.22); }
.chatbtn-orb:hover { filter: brightness(1.05); }
@keyframes cwFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }
@keyframes cwPulse { 0%, 100% { transform: scale(1); opacity: .42; } 50% { transform: scale(1.22); opacity: .7; } }
@keyframes cwSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chatbtn-orb, .chatbtn-orb .orb-aura, .chatbtn-orb .orb-face { animation: none; } }
