/*
 * Thème Brésil — palette vert / or / bleu (drapeau + végétation).
 * Activer via data-theme="bresil" sur <html>.
 * Autres thèmes : créer theme_*.css avec [data-theme="nom"].
 */
:root,
[data-theme="bresil"] {
  /* Marque */
  --brand-green: #009c3b;
  --brand-gold: #f0b429;
  --brand-blue: #002776;
  --brand-blue-bright: #1351b4;
  --brand-green-muted: #1e4d32;
  --brand-green-deep: #0f5132;

  /* Fonds */
  --bg-app: #eef6f0;
  --bg-surface: #ffffff;
  --bg-muted: #f2f8f4;
  --bg-hover: #e6f2ea;
  --bg-accent: #e8f5ec;
  --bg-auth: #0a2818;
  --bg-overlay: rgba(10, 40, 24, 0.52);
  --bg-neutral: #edf2ef;
  --bg-neutral-hover: #e2ebe5;
  --neutral-row-alt: #f6fbf8;

  /* Texte */
  --text-primary: #0d3b28;
  --text-body: #2a4a3a;
  --text-strong: #1e3d2f;
  --text-table-head: #0f2e22;
  --text-muted: #5a7568;
  --text-placeholder: #8aa394;
  --text-inverse: #ffffff;
  --text-sidebar: #ecfdf3;
  --text-label: #234835;

  /* Actions (vert brésilien) + liens (bleu drapeau) */
  --primary: #008f38;
  --primary-hover: #007530;
  --primary-dark: #0f5132;
  --primary-focus: #00a848;
  --primary-border: #9fd4b0;
  --primary-border-soft: #b8e0c4;
  --primary-active: #dcf3e4;
  --primary-light: #3dba6a;
  --primary-focus-ring: rgba(0, 156, 59, 0.18);
  --primary-link: #1351b4;
  --primary-soft: var(--bg-accent);

  /* Bordures */
  --border: #cce0d4;
  --border-light: #ddebe2;
  --border-input: #b8d4c4;
  --border-tabs: #dcebe3;
  --border-neutral: #b0c9ba;
  --border-input-soft: var(--border-input);

  /* Succès (vert) */
  --success-bg: #e4f6ea;
  --success-text: #0f5132;
  --success-border: #9fd4b0;
  --success-alt-bg: #ecfdf5;
  --success-alt-text: #047857;
  --success-alt-border: #a7f3d0;
  --success-modal-bg: #f0fdf4;
  --success-modal-border: #bbf7d0;
  --success-modal-text: var(--success-text);

  /* Erreur (rouge chaud, lisible sur fond vert) */
  --error-bg: #fdecea;
  --error-text: #9b1c1c;
  --error-border: #f5c2c2;
  --error-alt-bg: #fef2f2;
  --error-alt-text: #b91c1c;
  --error-alt-border: #fecaca;
  --error-strong: #c62828;
  --error-modal-bg: #fff5f5;
  --error-modal-border: var(--error-alt-border);

  /* Avertissement (or brésilien) */
  --warning-bg: #fff8e6;
  --warning-text: #7a5a00;
  --warning-border: #f0d080;
  --warning-row: #fff3d4;
  --warning-row-hover: #ffe8a8;

  /* Sidebar */
  --sidebar-bg: linear-gradient(180deg, #5a7f32 0%, #2f7a47 20%, #168347 42%, #136f3e 68%, #0f5132 100%);
  --sidebar-border: rgba(255, 255, 255, 0.14);
  --sidebar-link: rgba(255, 255, 255, 0.9);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.12);
  --sidebar-hover-border: rgba(255, 255, 255, 0.16);
  --sidebar-active-bg: linear-gradient(135deg, rgba(240, 180, 41, 0.24) 0%, rgba(255, 255, 255, 0.14) 100%);
  --sidebar-active-border: rgba(240, 180, 41, 0.42);
  --sidebar-user: rgba(255, 255, 255, 0.78);
  --sidebar-divider: rgba(255, 255, 255, 0.18);
  --sidebar-shadow: rgba(15, 40, 24, 0.18);

  /* Auth */
  --auth-card-bg: rgba(255, 255, 255, 0.28);
  --auth-card-border: rgba(255, 255, 255, 0.24);
  --auth-header-border: rgba(255, 255, 255, 0.16);
  --auth-name-gradient: linear-gradient(120deg, var(--brand-green) 0%, var(--brand-gold) 30%, var(--brand-green) 52%, var(--brand-blue-bright) 78%, var(--brand-blue) 100%);
  --auth-brand-bg: rgba(232, 245, 236, 0.55);
  --auth-brand-border: rgba(159, 212, 176, 0.6);
  --auth-input-bg: rgba(255, 255, 255, 0.55);
  --auth-note-bg: rgba(242, 248, 244, 0.32);
  --auth-note-border: rgba(204, 224, 212, 0.4);
  --auth-stroke: rgba(0, 39, 118, 0.28);
  --auth-glow-green: rgba(0, 156, 59, 0.28);
  --auth-glow-blue: rgba(0, 39, 118, 0.22);

  /* Ombres */
  --shadow-color: rgba(15, 40, 24, 0.08);
  --shadow-color-md: rgba(15, 40, 24, 0.12);
  --shadow-color-lg: rgba(15, 40, 24, 0.14);
  --shadow-primary: rgba(0, 143, 56, 0.22);
  --shadow-primary-hover: rgba(0, 117, 48, 0.28);
  --shadow-primary-soft: rgba(0, 156, 59, 0.12);
  --shadow-primary-ring: rgba(0, 156, 59, 0.2);
  --shadow-primary-inset: rgba(15, 80, 50, 0.32);

  /* Divers */
  --pending: var(--text-placeholder);
  --btn-alt-text: var(--text-strong);
  --tabs-inactive: #5a7568;
  --tabs-track: linear-gradient(180deg, #fafdfb 0%, #f4f9f6 100%);
  --tabs-active-bg: #8fd4a6;
  --tabs-active-border: #009c3b;
  --tabs-active-text: #002776;
  --tabs-active-shadow: rgba(0, 156, 59, 0.22);

  /* Accents onglets (vert / or / bleu brésilien) */
  --accent-sky: #1351b4;
  --accent-sky-active: #002776;
  --accent-violet: #1a6b9a;
  --accent-violet-active: #1351b4;
  --accent-emerald: #009c3b;
  --accent-emerald-active: #0f5132;
  --accent-amber: #f0b429;
  --accent-amber-active: #d4990f;
}
