/* ============================================================================
   AutoAgenti — couche commune (toutes les pages), chargée juste après tokens.css.
   Jetons propres au produit + marque (logo) + bouton Thème.
   Seul fichier (avec tokens.css) autorisé à contenir des couleurs littérales :
   les gabarits n'utilisent que var(--…).
   ============================================================================ */

:root{
  /* ---- alias des anciens noms utilisés par les gabarits AutoAgenti ---- */
  --txt:var(--text);
  --accent-txt:var(--on-accent);
  --terra:var(--accent);           /* l'ancien CTA « terracotta » devient l'accent */
  --err:var(--danger);
  --r:var(--radius);
  --serif:var(--font-ui);          /* fin de Georgia : Jost partout */

  /* ---- blocs de code / clés API (fond encre dans les deux thèmes) ---- */
  --code-bg:var(--brand-ink);
  --code-fg:#8FE3B0;
  --code-fg-2:#E3E9EC;

  /* ---- dégradés du site (mêmes valeurs que le site vitrine) ---- */
  --brand-violet:#7B5CFF;
  --brand-grad:linear-gradient(120deg,var(--accent) 0%,var(--brand-violet) 55%,var(--brand-amber) 100%);
  --text-grad:linear-gradient(100deg,var(--accent) 10%,var(--brand-violet) 55%,var(--brand-amber) 95%);
  --hero-glow-1:rgba(47,109,246,.16);
  --hero-glow-2:rgba(232,163,61,.14);
  --grid-line:rgba(31,41,51,.055);
  --mark-ring:rgba(232,163,61,.25);

  /* ---- interrupteur (switch) éteint, bouton d'enregistrement ---- */
  --switch-off:var(--line-strong);
  --knob:#FFFFFF;

  /* ---- couleurs officielles du logo Google (bouton « Continua con Google ») ---- */
  --g-yellow:#FFC107; --g-red:#FF3D00; --g-green:#4CAF50; --g-blue:#1976D2;

  /* ---- couleurs des assistants sur la landing (identité de chaque persona) ---- */
  --p-sofia:var(--accent); --p-marco:#2563EB; --p-luca:#C2410C; --p-elena:#0D9488;
  --p-matteo:#7C3AED; --p-chiara:#B45309; --p-francesca:#4F46E5; --p-davide:#DB2777;
  --wa-green:#25D366;
  --p-phone:#7C3AED;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --hero-glow-1:rgba(110,155,255,.20);
    --hero-glow-2:rgba(232,163,61,.12);
    --grid-line:rgba(227,233,236,.045);
    --text-grad:linear-gradient(100deg,#8FB2FF 10%,#A995FF 55%,#F2B865 95%);
    --knob:#E3E9EC;
  }
}
:root[data-theme="dark"]{
  --hero-glow-1:rgba(110,155,255,.20);
  --hero-glow-2:rgba(232,163,61,.12);
  --grid-line:rgba(227,233,236,.045);
  --text-grad:linear-gradient(100deg,#8FB2FF 10%,#A995FF 55%,#F2B865 95%);
  --knob:#E3E9EC;
}

/* ---------- marque ---------- */
.aa-mark{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none;color:#fff;
  background:linear-gradient(135deg,var(--accent) 0%,var(--brand-violet) 100%);box-shadow:0 0 0 1px var(--mark-ring) inset}
.aa-mark svg{width:20px;height:20px}
.aa-mark.sm{width:28px;height:28px;border-radius:8px}
.aa-mark.sm svg{width:16px;height:16px}
.aa-word{font-family:var(--font-ui);font-weight:700;letter-spacing:-.01em;font-size:18px;color:var(--text)}

/* ---------- bouton Thème (soleil / lune selon le thème effectif) ---------- */
.aa-theme{width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--text);
  display:inline-grid;place-items:center;cursor:pointer;flex:none;padding:0;font:inherit;transition:border-color .2s,background-color .2s,color .2s}
.aa-theme:hover{border-color:var(--line-strong);color:var(--accent)}
.aa-theme svg{width:18px;height:18px;display:block}
.aa-theme.sm{width:32px;height:32px;border-radius:50%}
.aa-theme.sm svg{width:16px;height:16px}
.aa-theme .ti-sun{display:none}
:root[data-theme="dark"] .aa-theme .ti-sun{display:block}
:root[data-theme="dark"] .aa-theme .ti-moon{display:none}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .aa-theme .ti-sun{display:block}
  :root:not([data-theme="light"]) .aa-theme .ti-moon{display:none}
}
