/* ==========================================================================
   EDZOU — identité visuelle du logiciel, alignée sur le site de présentation
   (site/index.html) : violet #6C5CE7, lilas, pêche/corail, titres en Fredoka,
   texte en Nunito Sans. Chargé EN DERNIER : il a le dernier mot sur les
   couleurs héritées de l'ancien habillage (bleu, route, logo « S »).
   Pour changer la charte : modifier ce fichier (et site/index.html).
   ========================================================================== */
:root {
  --ez-encre: #1B1340; --ez-texte: #4A4368; --ez-doux: #7B7598;
  --ez-violet: #6C5CE7; --ez-violet-fonce: #4E3FCB; --ez-violet-clair: #A78BFA;
  --ez-lilas: #EFEBFF; --ez-lilas2: #F7F5FF; --ez-peche: #FFE3DA; --ez-corail: #FF8E7C;
  --ez-menthe: #D5F5E8; --ez-vert: #1E9E74; --ez-ciel: #DCEEFF; --ez-beurre: #FFF1C4;

  --font: 'Nunito Sans', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-titre: 'Fredoka', 'Nunito Sans', system-ui, sans-serif;

  --brand-50: #F7F5FF; --brand-100: #EFEBFF; --brand-200: #D9D1FF;
  --brand-500: #8B7CF0; --brand-600: #6C5CE7; --brand-700: #4E3FCB;
  --brand-shadow: #4E3FCB; --accent-2: #A78BFA;
  --grad-brand: linear-gradient(120deg, #6C5CE7 0%, #A78BFA 60%, #FF8E7C 130%);
  --grad-soft: linear-gradient(135deg, rgba(108, 92, 231, .09), rgba(255, 142, 124, .07));
  --info: #6C5CE7; --info-bg: #EFEBFF;
  --shadow-brand: 0 10px 24px -8px rgba(108, 92, 231, .5);

  /* Fond « verre » : lilas / pêche / menthe au lieu du bleu */
  --v-f1: #F7F5FF; --v-f2: #FFF6F2; --v-f3: #EFEBFF;
  --v-b1: #D9D1FF; --v-b2: #FFE3DA; --v-b3: #DCEEFF; --v-b4: #D5F5E8;
}
:root:not([data-theme="dark"]) { --text: #1B1340; --text-2: #4A4368; --text-3: #7B7598; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #EEEAFB; --text-2: #B4ADD0; --text-3: #7F789C;
    --brand-50: #1E1740; --brand-100: #2A2059; --brand-200: #3B2E7D;
    --brand-500: #A78BFA; --brand-600: #8B7CF0; --brand-700: #C4B5FD;
    --info: #C4B5FD; --info-bg: rgba(167, 139, 250, .16);
    --v-f1: #0D0A1E; --v-f2: #130E2A; --v-f3: #1A1338;
    --v-b1: #3B2E7D; --v-b2: #4A2A3A; --v-b3: #1E2A5C; --v-b4: #123F36;
  }
}
:root[data-theme="dark"] {
  --text: #EEEAFB; --text-2: #B4ADD0; --text-3: #7F789C;
  --brand-50: #1E1740; --brand-100: #2A2059; --brand-200: #3B2E7D;
  --brand-500: #A78BFA; --brand-600: #8B7CF0; --brand-700: #C4B5FD;
  --info: #C4B5FD; --info-bg: rgba(167, 139, 250, .16);
  --v-f1: #0D0A1E; --v-f2: #130E2A; --v-f3: #1A1338;
  --v-b1: #3B2E7D; --v-b2: #4A2A3A; --v-b3: #1E2A5C; --v-b4: #123F36;
}

/* Typographie : mêmes polices que le site */
body, button, input, select, textarea { font-family: var(--font); }
h1, h2, h3, .page-title, .page__title, .topbar__title, .modal__title, .card__title, .wm__txt,
.lg-accroche, .lg-chiffre b, .login__brand h1, .stat__value, .kpi__value {
  font-family: var(--font-titre); letter-spacing: -.01em;
}

/* Logo Edzou (le « e » dans son carré dégradé) à la place de l'ancienne icône */
.wm__mark, .wm--clair .wm__mark, :root[data-theme="dark"] .wm__mark, #login .login__wm .wm__mark {
  background: url(../assets/edzou-logo.svg) center/contain no-repeat !important;
}
.wm__txt { font-weight: 700; text-transform: lowercase; letter-spacing: -.02em; }
html[data-org] .sidebar__brand .wm__txt { text-transform: none; }

/* Boutons principaux : pastille violette comme sur le site */
.btn--primary { background: var(--ez-violet) !important; border-color: transparent !important; color: #fff !important; border-radius: 999px; font-weight: 800; box-shadow: 0 10px 24px -10px rgba(108, 92, 231, .6); }
.btn--primary:hover { background: var(--ez-violet-fonce) !important; }
a { color: var(--brand-600); }
::selection { background: rgba(108, 92, 231, .22); }

/* ---------- Page de connexion : claire, comme l'en-tête du site ---------- */
#login.login {
  background: radial-gradient(900px 620px at 12% 8%, #EFEBFF 0%, transparent 62%),
              radial-gradient(820px 620px at 92% 96%, #FFE3DA 0%, transparent 60%),
              radial-gradient(600px 460px at 62% 30%, #DCEEFF 0%, transparent 60%), #fff !important;
}
#login .login__hero { color: var(--ez-encre); }
.lg-route, .lg-grille { display: none !important; }
.lg-fond i { mix-blend-mode: normal; filter: blur(80px); opacity: .55; }
.lg-fond i:nth-child(1) { background: #D9D1FF; }
.lg-fond i:nth-child(2) { background: #FFD3C6; opacity: .5; }
.lg-fond i:nth-child(3) { background: #D5F5E8; opacity: .55; }
.lg-produit, .lg-produit .wm__txt { color: var(--ez-encre); }
.lg-accroche { color: var(--ez-encre); font-weight: 600; font-size: 40px; line-height: 1.12; }
.lg-accroche em { background: linear-gradient(100deg, #6C5CE7 10%, #A78BFA 55%, #FF8E7C 100%); background-size: 100% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: none; }
.lg-chiffre { background: #fff; border: 1px solid rgba(27, 19, 64, .08); box-shadow: 0 14px 34px -18px rgba(27, 19, 64, .28); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 20px; }
.lg-chiffre:hover { background: #fff; }
.lg-chiffre b { color: var(--ez-encre); font-size: 20px; font-weight: 600; }
.lg-chiffre small { color: var(--ez-texte); }
.lg-chiffre:nth-child(1) { background: var(--ez-lilas); }
.lg-chiffre:nth-child(2) { background: var(--ez-menthe); }
.lg-chiffre:nth-child(3) { background: var(--ez-peche); }
.lg-chiffre:nth-child(4) { background: var(--ez-beurre); }

#login .login__side { background: none !important; }
#login .login__card {
  background: #fff !important; color: var(--ez-encre); border: 1px solid rgba(27, 19, 64, .08) !important; border-radius: 28px;
  box-shadow: 0 30px 70px -28px rgba(27, 19, 64, .35) !important; backdrop-filter: none; -webkit-backdrop-filter: none;
}
#login .login__card h1, #login .login__card .field__label, #login .login__card label { color: var(--ez-encre) !important; }
#login .login__card p, #login .login__card .muted, #login .login__card small { color: var(--ez-doux) !important; }
#login .login__card .input { background: var(--ez-lilas2) !important; border-color: rgba(27, 19, 64, .12) !important; color: var(--ez-encre) !important; }
#login .login__card .input::placeholder { color: #A9A3C2; }
#login .login__card .input:focus { border-color: var(--ez-violet) !important; box-shadow: 0 0 0 4px rgba(108, 92, 231, .18) !important; }
#login .login__wm .wm__txt { color: var(--ez-encre); }
#login .login__wm .wm__devise { color: var(--ez-doux); }
#login .login__mode[aria-pressed="true"] { background: var(--ez-violet) !important; color: #fff !important; }
#login .login__mode { color: var(--ez-texte); }
#login .demo-comptes button { background: var(--ez-lilas2); color: var(--ez-encre); }
#login .demo-comptes button:hover { background: var(--ez-lilas); }
@media (max-width: 1100px) { .lg-accroche { font-size: 30px; } }

/* Écran de démarrage */
.boot { background: linear-gradient(140deg, #F7F5FF, #FFF6F2) !important; }
.boot .wm__txt { color: var(--ez-encre) !important; }
.boot__bar span { background: var(--grad-brand) !important; }

/* Une fois connecté : pastille à la couleur de l'organisme, avec son initiale */
html[data-org] .sidebar__brand .wm__mark { background: var(--org) !important; color: #fff !important; font-size: 17px !important; font-family: var(--font-titre); font-weight: 600; border-radius: 13px !important; }

/* Onglets Équipe / Formateur de la connexion */
#login .login__modes { background: var(--ez-lilas) !important; border-color: transparent !important; }
#login .login__mode { background: transparent !important; color: var(--ez-texte) !important; }
#login .login__mode[aria-pressed="true"] { background: var(--ez-violet) !important; color: #fff !important; }
