/* ═══════════════════════════════════════════════
   THÈME ESTHEDESK v2 — « grande entreprise » (01/11/2026)

   Source : replica/design/tokens.json (contraste vérifié : 0 échec AA) et
   replica/design/components.md. Chargé EN DERNIER dans chaque écran : il
   reprend les classes communes héritées (.btn, .form-control, .section-card,
   .modal, tableaux, onglets…) pour qu'elles aient partout le même aspect.
   Règle : il ne change que l'apparence (couleurs, police, bordures, rayons,
   ombres, hauteurs de contrôle), jamais la mise en page d'un écran.
   Sélecteurs « body .x » : passent devant la règle « .x » de l'écran, mais
   cèdent aux variantes plus précises propres à un écran.
═══════════════════════════════════════════════ */

/* ── Police : Inter (licence SIL OFL 1.1, polices/LICENCE-Inter.txt), hébergée ici ── */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('polices/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('polices/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ── Jetons (rôles) ── */
:root:root {
  --ed-bg: #f5f6f8; --ed-surface: #ffffff; --ed-surface-soft: #f8f9fb; --ed-surface-hover: #f2f4f7;
  --ed-border: #e4e7ec; --ed-border-strong: #d0d5dd; --ed-border-input: #868e9c;
  --ed-text: #101828; --ed-text-muted: #475467; --ed-text-faint: #667085;
  --ed-accent: #5b35d5; --ed-accent-strong: #4a22b8; --ed-accent-soft: #f3effe; --ed-on-accent: #ffffff;
  --ed-danger: #b42318; --ed-danger-soft: #fef3f2;
  --ed-success: #067647; --ed-success-soft: #ecfdf3;
  --ed-warning: #93370d; --ed-warning-soft: #fffaeb;
  --ed-neutral-soft: #f2f4f7;
  --ed-sidebar: #ffffff; --ed-sidebar-text: #344054; --ed-sidebar-label: #667085;
  --ed-sidebar-active: #f3effe; --ed-sidebar-active-text: #4a22b8;
  /* Marque Esthedesk (logo et site esthedesk.com) : encre et dégradés. */
  --ed-ink: #0b1023; --ed-degrade-logo: linear-gradient(135deg, #4f46e5, #6d28d9);
  --ed-degrade-signature: linear-gradient(110deg, #4f46e5 0%, #7c3aed 38%, #e5468a 72%, #f59e6b 100%);
  --ed-radius-sm: 6px; --ed-radius-md: 10px; --ed-radius-lg: 12px; --ed-radius-pill: 999px;
  --ed-shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --ed-shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --ed-shadow-pop: 0 12px 16px -4px rgba(16,24,40,.08), 0 4px 6px -2px rgba(16,24,40,.03);
  --ed-focus: 0 0 0 4px rgba(91,53,213,.18);
  --ed-fast: 120ms; --ed-ease: cubic-bezier(.2,.8,.2,1);
  --ed-police: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ed-police-arabe: 'Segoe UI', Tahoma, 'Noto Sans Arabic', sans-serif;
  --ed-controle: 38px;
}

/* ── Base ── */
html body { font-family: var(--ed-police); color: var(--ed-text); background: var(--ed-bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv11', 'ss01'; }
html[dir="rtl"] body, html[lang="ar"] body { font-family: var(--ed-police-arabe); }
html body button, html body input, html body select, html body textarea { font-family: inherit; }
html.integre body { background: var(--ed-surface); }
::selection { background: rgba(91,53,213,.18); }
body :focus-visible { outline: 2px solid var(--ed-accent); outline-offset: 2px; }
/* Chiffres alignés dans les tableaux et indicateurs. */
body table, body .kpi-value, body .stat-val, body .kpi, body .ed-chiffre { font-variant-numeric: tabular-nums; }

/* ── Menu latéral : clair, pictogrammes, rubriques discrètes ── */
body .main-sidebar, body .sidebar { background: var(--ed-sidebar); border-right: 1px solid var(--ed-border); box-shadow: none; }
body .sidebar-logo, body .sb-brand { border-bottom: 1px solid var(--ed-border); padding: 18px 18px 16px; }
body .sidebar-logo h2, body .sb-brand h2 { color: var(--ed-text); font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
body .sidebar-logo p, body .sb-brand p { color: var(--ed-text-faint); font-size: 11px; letter-spacing: .02em; text-transform: none; }
body .sb-marque { display: flex; align-items: center; gap: 10px; }
body .sb-marque-logo { width: 32px; height: 32px; border-radius: 8px; flex: none; background: var(--ed-degrade-logo); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; overflow: hidden;
  border-radius: 9px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
body .sb-marque-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
body .sidebar-nav, body .sb-nav { padding: 8px 10px 12px; scrollbar-color: var(--ed-border-strong) transparent; }
body .sidebar-nav::-webkit-scrollbar-thumb, body .sb-nav::-webkit-scrollbar-thumb { background: var(--ed-border-strong); }
body .nav-section-label, body .sb-label { color: var(--ed-sidebar-label); font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 16px 10px 6px; }
body .nav-item, body .sb-link { color: var(--ed-sidebar-text); font-size: 13.5px; font-weight: 500; padding: 8px 10px; border-radius: var(--ed-radius-sm);
  border-left: 0; gap: 10px; transition: background var(--ed-fast) var(--ed-ease), color var(--ed-fast) var(--ed-ease); }
body .nav-item:hover, body .sb-link:hover { background: var(--ed-surface-hover); color: var(--ed-text); }
body .nav-item.active, body .sb-link.active { background: var(--ed-sidebar-active); color: var(--ed-sidebar-active-text); font-weight: 600; border-left: 0; padding-left: 10px; }
body .sb-ico { width: 18px; height: 18px; flex: none; color: var(--ed-text-faint); }
body .sb-link:hover .sb-ico { color: var(--ed-text-muted); }
body .sb-link.active .sb-ico { color: var(--ed-accent); }
body .sb-user { background: var(--ed-surface-soft); border: 1px solid var(--ed-border); color: var(--ed-text-muted); }
body .sb-user-nom { color: var(--ed-text); }
body .nav-logout, body .sb-foot { border-top: 1px solid var(--ed-border); color: var(--ed-text-muted); display: flex; align-items: center; gap: 10px; font-size: 13px; }
body .nav-logout:hover, body .sb-foot:hover { color: var(--ed-danger); }
body .nav-badge { background: var(--ed-danger); }

/* ── En-tête d'écran ── */
body .page-title, body .ed-titre { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.015em; color: var(--ed-text); }
body .page-sub, body .page-subtitle, body .ed-sous-titre { font-size: 14px; line-height: 20px; color: var(--ed-text-muted); }

/* ── Boutons ── */
body .btn, body .ed-btn { font-family: inherit; font-weight: 600; border-radius: var(--ed-radius-md); letter-spacing: 0;
  transition: background var(--ed-fast) var(--ed-ease), border-color var(--ed-fast) var(--ed-ease), box-shadow var(--ed-fast) var(--ed-ease), color var(--ed-fast) var(--ed-ease); }
body .btn:focus-visible, body .ed-btn:focus-visible { outline: none; box-shadow: var(--ed-focus); }
body .btn-primary, body .ed-btn-principal { background: var(--ed-accent); color: var(--ed-on-accent); border: 1px solid var(--ed-accent); box-shadow: var(--ed-shadow-xs); }
body .btn-primary:hover:not(:disabled), body .ed-btn-principal:hover:not(:disabled) { background: var(--ed-accent-strong); border-color: var(--ed-accent-strong); filter: none; transform: none; }
body .btn-ghost, body .btn-secondary, body .ed-btn-discret { background: var(--ed-surface); color: var(--ed-text-muted); border: 1px solid var(--ed-border-strong); box-shadow: var(--ed-shadow-xs); }
body .btn-ghost:hover:not(:disabled), body .btn-secondary:hover:not(:disabled), body .ed-btn-discret:hover:not(:disabled) { background: var(--ed-surface-soft); color: var(--ed-text); }
body .ed-btn-second { background: var(--ed-accent-soft); color: var(--ed-accent-strong); border: 1px solid transparent; }
body .btn-danger, body .ed-btn-danger { background: var(--ed-danger); color: #fff; border: 1px solid var(--ed-danger); }
body .btn-danger:hover:not(:disabled) { background: #912018; }
body .btn-success { background: var(--ed-success); color: #fff; border: 1px solid var(--ed-success); }
body .btn-warning { background: var(--ed-warning-soft); color: var(--ed-warning); border: 1px solid #fedf89; }
body .btn:disabled, body .ed-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ── Champs ── */
body .form-label, body .ed-champ > label { color: var(--ed-text); font-size: 13px; font-weight: 500; }
body .form-control, body .ed-champ input, body .ed-champ select, body .ed-champ textarea {
  border: 1px solid var(--ed-border-strong); border-radius: var(--ed-radius-md); background: var(--ed-surface); color: var(--ed-text);
  font-family: inherit; box-shadow: var(--ed-shadow-xs); transition: border-color var(--ed-fast) var(--ed-ease), box-shadow var(--ed-fast) var(--ed-ease); }
body input.form-control, body select.form-control { min-height: var(--ed-controle); }
body .form-control:hover:not(:focus):not(:disabled) { border-color: var(--ed-border-input); }
body .form-control:focus, body .ed-champ input:focus, body .ed-champ select:focus, body .ed-champ textarea:focus {
  outline: none; border-color: var(--ed-accent); box-shadow: var(--ed-focus); }
body .form-control::placeholder { color: var(--ed-text-faint); }
body .form-control:disabled { background: var(--ed-surface-soft); color: var(--ed-text-faint); }
body input[type="checkbox"], body input[type="radio"] { accent-color: var(--ed-accent); }

/* ── Cartes et sections ── */
body .section-card, body .card, body .kpi-card, body .stat-card, body .ed-carte {
  background: var(--ed-surface); border: 1px solid var(--ed-border); border-radius: var(--ed-radius-lg); box-shadow: var(--ed-shadow-xs); }
body .section-title, body .card-title { color: var(--ed-text); font-weight: 600; letter-spacing: -.005em; }
body .kpi-label, body .stat-lbl { color: var(--ed-text-muted); font-weight: 500; }
body .kpi-value, body .stat-val { color: var(--ed-text); font-weight: 600; letter-spacing: -.02em; }

/* ── Tableaux (contenu de l'écran) ── */
body .page-wrapper table th, body .main table th, body .main-content table th {
  color: var(--ed-text-muted); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; background: var(--ed-surface-soft); border-bottom: 1px solid var(--ed-border); }
body .page-wrapper table td, body .main table td, body .main-content table td { border-bottom-color: var(--ed-border); }
body .page-wrapper table tbody tr:hover, body .main table tbody tr:hover { background: var(--ed-surface-soft); }

/* ── Fenêtres ── */
body .modal-overlay, body .modal-bg, body .ed-voile { background: rgba(16,24,40,.55); backdrop-filter: blur(2px); }
body .modal, body .modal-content, body .ed-dialogue { border-radius: var(--ed-radius-lg); box-shadow: var(--ed-shadow-pop), 0 0 0 1px rgba(16,24,40,.04); }
body .modal-title, body .ed-dialogue h3 { color: var(--ed-text); font-weight: 600; letter-spacing: -.01em; }
body .modal-close { color: var(--ed-text-faint); border-radius: var(--ed-radius-sm); }
body .modal-close:hover { background: var(--ed-surface-hover); color: var(--ed-text); }

/* ── Pastilles ── */
body .badge, body .ed-pastille { border-radius: var(--ed-radius-pill); font-weight: 500; font-size: 12px; letter-spacing: 0; }

/* ── Interrupteurs ── */
body .toggle-slider { background: var(--ed-border-strong); }
body input:checked + .toggle-slider { background: var(--ed-accent); }

/* ── Onglets : un seul style (pilules sur fond clair) ── */
body .config-tab, body .content-tab, body .packs-tab, body .ed-onglet, body .tab {
  font-family: inherit; font-weight: 500; color: var(--ed-text-muted); border-radius: var(--ed-radius-sm); transition: background var(--ed-fast) var(--ed-ease), color var(--ed-fast) var(--ed-ease); }
body .config-tab:hover, body .content-tab:hover, body .packs-tab:hover, body .tab:hover { color: var(--ed-text); background: var(--ed-surface-hover); }
body .config-tab.active, body .packs-tab.active, body .tab.active { background: var(--ed-surface); color: var(--ed-text); font-weight: 600; box-shadow: var(--ed-shadow-card), 0 0 0 1px var(--ed-border); }
body .content-tab.active { color: var(--ed-accent-strong); border-bottom-color: var(--ed-accent); background: transparent; }
body .ed-onglet[aria-selected="true"], body .ed-onglet.actif { background: var(--ed-text); border-color: var(--ed-text); color: #fff; }
body .config-tabs, body .packs-tabs { background: var(--ed-neutral-soft); box-shadow: none; border: 1px solid var(--ed-border); }

/* ── États vides ── */
body .empty, body .empty-state, body .ed-vide { color: var(--ed-text-muted); }

/* ── Indicateurs : plus de bordures de couleur épaisses (arc-en-ciel) ; la couleur
   reste dans la pastille ou le chiffre. [class] : passe devant .kpi.green, .counter.c-… ── */
body .kpi[class], body .counter[class] { border: 1px solid var(--ed-border); border-radius: var(--ed-radius-lg); box-shadow: var(--ed-shadow-xs); }
body .counter[class]:hover { border-color: var(--ed-border-strong); box-shadow: var(--ed-shadow-card); transform: none; }
body .counter.active[class], body .counter.selected[class] { border-color: var(--ed-accent); box-shadow: 0 0 0 1px var(--ed-accent); }
body .counter-tag { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; border-radius: var(--ed-radius-pill); }

/* ── Libellés : casse de phrase (plus de petites majuscules espacées) ── */
body .kpi-label, body .stat-lbl, body .form-label, body .section-title, body .card-title, body .modal-section-title {
  text-transform: none; letter-spacing: 0; }
body .kpi-label, body .stat-lbl { font-size: 13px; }
body .section-title { font-size: 15px; }

/* ── États vides illustrés (décorés par icones.js) ── */
body .ed-etat { text-align: center; color: var(--ed-text-muted); }
body .ed-etat-ico { display: flex; justify-content: center; margin: 0 auto 12px; }
body .ed-etat-vide .ed-etat-ico .ed-ico, body .ed-etat-erreur .ed-etat-ico .ed-ico {
  width: 44px; height: 44px; padding: 11px; border-radius: 50%; box-sizing: border-box; }
body .ed-etat-vide .ed-etat-ico .ed-ico { background: var(--ed-accent-soft); color: var(--ed-accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ed-accent-soft) 45%, transparent); }
body .ed-etat-erreur .ed-etat-ico .ed-ico { background: var(--ed-danger-soft); color: var(--ed-danger); }
body .ed-etat-erreur { color: var(--ed-danger); }
body .ed-etat-points { display: inline-flex; gap: 5px; height: 20px; align-items: center; }
body .ed-etat-points i { width: 7px; height: 7px; border-radius: 50%; background: var(--ed-accent); opacity: .25; animation: ed-points 1s infinite ease-in-out; }
body .ed-etat-points i:nth-child(2) { animation-delay: .15s; } body .ed-etat-points i:nth-child(3) { animation-delay: .3s; }
@keyframes ed-points { 0%, 80%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { body .ed-etat-points i { animation: none; opacity: .6; } }
body td.ed-etat .ed-etat-ico { margin-bottom: 8px; }

/* ═══ MODE SOMBRE (replica/design/tokens-dark.json, 0 échec AA) ═══
   Activé par html[data-theme="dark"] (bouton du menu, mémorisé sur le poste ; icones.js
   l'applique avant l'affichage). Fond = encre de marque Esthedesk. Accent éclairci, texte
   à l'encre sur les aplats d'accent (le blanc n'y serait pas lisible). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ed-bg: #0b1023; --ed-surface: #121a33; --ed-surface-soft: #161f3d; --ed-surface-hover: #1d2747;
  --ed-border: #273152; --ed-border-strong: #363f61; --ed-border-input: #737c9c;
  --ed-text: #eef0f8; --ed-text-muted: #b8bdd6; --ed-text-faint: #9097b5;
  --ed-accent: #9a82f6; --ed-accent-strong: #b3a1f9; --ed-accent-soft: #262050; --ed-on-accent: #0b1023;
  --ed-danger: #fda29b; --ed-danger-soft: #3b1a1f; --ed-success: #6ce9a6; --ed-success-soft: #0d2b20;
  --ed-warning: #fec84b; --ed-warning-soft: #33270b; --ed-neutral-soft: #1d2747;
  --ed-sidebar: #0e1530; --ed-sidebar-text: #d0d4e6; --ed-sidebar-label: #9097b5; --ed-sidebar-active: #262050; --ed-sidebar-active-text: #d6ccff;
  --ed-shadow-xs: 0 1px 2px rgba(0,0,0,.4); --ed-shadow-card: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.4);
  --ed-shadow-pop: 0 16px 32px -8px rgba(0,0,0,.6); --ed-focus: 0 0 0 4px rgba(154,130,246,.35);
}
:root[data-theme="dark"] body { background: var(--ed-bg); }
:root[data-theme="dark"] .sb-marque-logo { color: #fff; }
/* Aplats d'accent des écrans (onglets, filtres actifs…) : texte à l'encre. */
:root[data-theme="dark"] body :is(.btn-primary, .ed-btn-principal, .tab.active, .type-tab.active, .fbtn.active, .fctl.filter-active,
  .config-tab.active, .view-btn.active, .counter.active, .btn-login) { color: var(--ed-on-accent) !important; }
:root[data-theme="dark"] body .ed-onglet[aria-selected="true"] { background: var(--ed-text); border-color: var(--ed-text); color: var(--ed-bg); }
:root[data-theme="dark"] img { opacity: .95; }

/* Bouton du thème (menu, au-dessus de « Déconnexion ») */
body .sb-theme { display: flex; align-items: center; gap: 10px; width: calc(100% - 20px); margin: 6px 10px 0; padding: 8px 10px; border: 0; border-radius: var(--ed-radius-sm);
  background: transparent; color: var(--ed-sidebar-text); font: 500 13px/1.2 inherit; cursor: pointer; text-align: left; }
body .sb-theme:hover { background: var(--ed-surface-hover); }

/* ═══ NOUVELLE GÉNÉRATION (v2.2, 01/11/2026) — mode clair ═══
   Couleur dosée tirée de la signature Esthedesk (indigo → violet → rose → pêche) et
   profondeur : fond « aurore », menu en verre dépoli, actions en dégradé du logo avec
   lueur, cartes qui se soulèvent au survol, fenêtres qui apparaissent en douceur.
   Contraste vérifié (tokens.json, 0 échec AA). Tout mouvement est coupé si le poste
   demande moins d'animations. Le mode sombre (essai) n'est pas concerné. */
:root:root {
  --ed-grad: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
  --ed-grad-signature: linear-gradient(90deg, #4f46e5 0%, #7c3aed 38%, #e5468a 72%, #f59e6b 100%);
  --ed-aurore: radial-gradient(1200px 600px at 100% -10%, rgba(124,58,237,.10), transparent 60%),
               radial-gradient(900px 500px at -10% 110%, rgba(229,70,138,.07), transparent 60%),
               radial-gradient(700px 400px at 60% 120%, rgba(245,158,107,.06), transparent 60%);
  --ed-lueur: 0 6px 20px -6px rgba(91,53,213,.45);
  --ed-leve: 0 12px 24px -10px rgba(16,24,40,.18), 0 2px 6px -2px rgba(16,24,40,.06);
  --ed-teinte: #faf8ff;
}
/* Fond aurore, fixe : la couleur reste dans les coins, le contenu reste sur blanc. */
:root:not([data-theme="dark"]) body { background: var(--ed-aurore), var(--ed-bg); background-attachment: fixed; }
:root:not([data-theme="dark"]).integre body { background: var(--ed-surface); }

/* Menu en verre dépoli + fil de signature à droite. */
:root:not([data-theme="dark"]) body .main-sidebar, :root:not([data-theme="dark"]) body .sidebar {
  background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  border-right: 1px solid rgba(16,24,40,.06); }
body .main-sidebar::after, body .sidebar::after { content: ''; position: absolute; top: 0; right: -1px; width: 1px; height: 100%;
  background: linear-gradient(180deg, rgba(79,70,229,.0), rgba(124,58,237,.35) 30%, rgba(229,70,138,.25) 70%, rgba(245,158,107,0)); pointer-events: none; }
body .sb-marque-logo { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 12px -4px rgba(91,53,213,.55); }
/* Entrée active : barre de signature à gauche + fond teinté. */
body .sb-link.active, body .nav-item.active { background: linear-gradient(90deg, rgba(91,53,213,.10), rgba(91,53,213,.04)); }
body .sb-link.active::before, body .nav-item.active::before { content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ed-grad); }
body .sb-link { transition: background var(--ed-fast) var(--ed-ease), color var(--ed-fast) var(--ed-ease), transform var(--ed-fast) var(--ed-ease); }
body .sb-link:hover:not(.active) { transform: translateX(2px); }

/* Action principale : dégradé du logo, reflet, lueur au survol, pression au clic. */
body .btn-primary, body .ed-btn-principal {
  background: var(--ed-grad); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(16,24,40,.08), 0 4px 12px -6px rgba(91,53,213,.5); }
body .btn-primary:hover:not(:disabled), body .ed-btn-principal:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca 0%, #5b21b6 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), var(--ed-lueur); transform: translateY(-1px); }
body .btn:active:not(:disabled), body .ed-btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
body .btn, body .ed-btn { transition: background var(--ed-fast) var(--ed-ease), border-color var(--ed-fast) var(--ed-ease), box-shadow 200ms var(--ed-ease), color var(--ed-fast) var(--ed-ease), transform 120ms var(--ed-ease); }
body .btn-ghost:hover:not(:disabled), body .btn-secondary:hover:not(:disabled), body .ed-btn-discret:hover:not(:disabled) { border-color: rgba(91,53,213,.35); color: var(--ed-accent-strong); }

/* Onglets et filtres actifs : dégradé du logo. */
body .tab.active, body .type-tab.active, body .fbtn.active, body .ed-onglet[aria-selected="true"], body .ed-onglet.actif {
  background: var(--ed-grad) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 4px 12px -6px rgba(91,53,213,.55); }

/* Cartes : fine lumière en haut ; les cartes cliquables se soulèvent au survol. */
body .section-card, body .card, body .kpi-card, body .stat-card, body .ed-carte, body .kpi[class], body .counter[class] {
  transition: transform 200ms var(--ed-ease), box-shadow 200ms var(--ed-ease), border-color 200ms var(--ed-ease); }
body a.carte, body .counter[class], body .kpi[onclick], body .ed-carte[onclick], body .carte[onclick] { cursor: pointer; }
body a.carte:hover, body .counter[class]:hover, body .kpi[onclick]:hover, body .ed-carte[onclick]:hover {
  transform: translateY(-2px); box-shadow: var(--ed-leve); border-color: rgba(91,53,213,.22); }
/* Indicateurs : chiffre en dégradé de la marque, fine barre de signature en haut. */
body .kpi[class], body .counter[class], body .kpi-card { position: relative; overflow: hidden; }
body .kpi[class]::after, body .counter[class]::after, body .kpi-card::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--ed-grad-signature); opacity: .0; transition: opacity 200ms var(--ed-ease); }
body .kpi[class]:hover::after, body .counter[class]:hover::after, body .kpi-card:hover::after { opacity: .9; }
body .kpi-value, body .counter-val, body .stat-val { background: var(--ed-grad); -webkit-background-clip: text; background-clip: text; color: transparent !important; }

/* Tableaux : survol teinté de violet. */
body .page-wrapper table tbody tr, body .main table tbody tr { transition: background var(--ed-fast) var(--ed-ease); }
body .page-wrapper table tbody tr:hover, body .main table tbody tr:hover { background: var(--ed-teinte); }

/* Fenêtres et menus : apparition douce ; voile en verre. */
@keyframes ed-entree { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
body .modal, body .modal-content, body .ed-dialogue, body .ed-plus.ouvert .ed-menu-actions { animation: ed-entree 180ms var(--ed-ease); }
body .modal-overlay, body .modal-bg, body .ed-voile { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); background: rgba(16,24,40,.42); }

/* En-tête d'écran : le filet de séparation prend la signature, très léger. */
html body .page-header, html body .ph, html body .entete, html body .ed-entete { border-bottom: 0; background-image: linear-gradient(90deg, rgba(79,70,229,.35), rgba(124,58,237,.25) 30%, rgba(229,70,138,.18) 65%, rgba(228,231,236,.9) 100%);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: bottom; }

/* États vides : halo doux. */
body .ed-etat-vide .ed-etat-ico .ed-ico { background: linear-gradient(135deg, #eef0ff, #f6eefe); box-shadow: 0 0 0 6px rgba(124,58,237,.06), 0 8px 20px -10px rgba(91,53,213,.45); }

/* Champs : lueur de focus de la marque. */
body .form-control:focus, body .fctl:focus, body .ed-champ input:focus, body .ed-champ select:focus, body .ed-champ textarea:focus { box-shadow: 0 0 0 4px rgba(91,53,213,.14), 0 1px 2px rgba(16,24,40,.05); }

@media (prefers-reduced-motion: reduce) {
  body *, body *::before, body *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  body a.carte:hover, body .counter[class]:hover, body .kpi[onclick]:hover, body .ed-carte[onclick]:hover, body .sb-link:hover, body .btn-primary:hover { transform: none !important; }
}

/* ── Nouvelle génération, couleur plus présente (v2.2b) ── */
:root:root { --ed-aurore: radial-gradient(1100px 560px at 100% -8%, rgba(124,58,237,.16), transparent 62%),
  radial-gradient(900px 520px at -8% 108%, rgba(229,70,138,.10), transparent 60%),
  radial-gradient(760px 420px at 62% 118%, rgba(245,158,107,.10), transparent 60%),
  radial-gradient(600px 300px at 20% -10%, rgba(79,70,229,.08), transparent 60%); }
/* Pictogramme du titre (posé par menu.js). */
html body .ed-titre-avec-ico { display: inline-flex !important; align-items: center; gap: 12px; }
body .ed-titre-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--ed-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px -6px rgba(91,53,213,.6); }
body .ed-titre-ico .ed-ico { width: 19px; height: 19px; }
/* Bandeau d'essai aux couleurs de la signature. */
body .ed-bandeau-licence.ed-bl-essai { background: linear-gradient(90deg, #eef0ff 0%, #f5edfe 45%, #fdeef4 75%, #fff2ea 100%) !important;
  color: var(--ed-accent-strong) !important; border-bottom: 1px solid rgba(91,53,213,.14) !important; font-family: var(--ed-police) !important; font-weight: 500 !important; }
body .ed-bandeau-licence a { font-weight: 600; }
/* Entrée active du menu plus affirmée. */
body .sb-link.active, body .nav-item.active { background: linear-gradient(90deg, rgba(91,53,213,.14), rgba(124,58,237,.05)); color: var(--ed-accent-strong); }
/* En-têtes de tableau légèrement teintés. */
body .page-wrapper table th, body .main table th, body .main-content table th { background: linear-gradient(180deg, #faf8ff, #f6f4fd); }
/* Rubriques du menu : petite pastille de couleur. */
body .nav-section-label::before, body .sb-label::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 7px; vertical-align: 2px;
  background: var(--ed-grad-signature); }
:root[data-theme="dark"] body .ed-bandeau-licence.ed-bl-essai { background: #1d2747 !important; color: var(--ed-text) !important; }
