/* ═══════════════════════════════════════════════════════════════════════════
   ev-pro-polish-v306.css  —  2026-05-30
   ───────────────────────────────────────────────────────────────────────────
   POLISH PRO v306 — finition « professionnelle + ergonomique »
   ───────────────────────────────────────────────────────────────────────────
   Directive Directeur : rendre les fonctions déjà présentables plus
   professionnelles et plus esthétiques, SANS toucher au métier (CSS only).

   Chargé EN DERNIER (après v305) → gagne la cascade par ordre.
   Aucune règle ne touche la logique JS ni les valeurs métier.

   Palette verrouillée (cf. unified-dark-v304 / no-fancy-colors) :
     fonds   #020617 / #0F172A / #1E293B
     texte   #FFFFFF / #F1F5F9 / #CBD5E1 / #94A3B8   (jamais plus sombre)
     accent  cyan #22D3EE (interactif/focus) — vif réservé aux bords/glow
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   §1. NAV LATÉRALE (desktop) — fin des restes thème CLAIR
   ───────────────────────────────────────────────────────────────────────────
   Bug réel : .evcx-side gardait texte #475569 (illisible sur #020617),
   hover #F8FAFC (flash BLANC), actif teal #2D5A60 hors-palette.
   → texte lisible, hover sombre, état actif barre d'accent cyan = look SaaS.
═══════════════════════════════════════════════════════════════════════════ */
body:has(#p-app.on) .evcx-side,
body:has(#p-app.on) .evcx-sub {
  color: #CBD5E1 !important;            /* slate-300 — lisible */
  -webkit-text-fill-color: #CBD5E1 !important;
  letter-spacing: .01em;
  transition: background .16s ease-out, color .16s ease-out,
              box-shadow .16s ease-out !important;
}
body:has(#p-app.on) .evcx-side:hover,
body:has(#p-app.on) .evcx-sub:hover {
  background: rgba(30,41,59,.70) !important;   /* slate-800/70, plus de blanc */
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}
body:has(#p-app.on) .evcx-side:hover .evcx-ic,
body:has(#p-app.on) .evcx-side.evcx-navactive .evcx-ic {
  opacity: 1;
}
/* État actif — surface slate-800 + barre d'accent cyan à gauche + label blanc */
body:has(#p-app.on) .evcx-side.evcx-navactive,
body:has(#p-app.on) .evcx-sub.evcx-navactive {
  background: rgba(34,211,238,.10) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  font-weight: 800 !important;
  box-shadow: inset 3px 0 0 0 #22D3EE,
              0 1px 3px rgba(0,0,0,.30) !important;
}
/* Icône légèrement atténuée au repos pour la hiérarchie */
body:has(#p-app.on) .evcx-side .evcx-ic { opacity: .82; transition: opacity .16s; }


/* ═══════════════════════════════════════════════════════════════════════════
   §2. BOTTOM NAV (mobile) — actif cyan + indicateur haut
═══════════════════════════════════════════════════════════════════════════ */
body:has(#p-app.on) .evcx-bn {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  transition: color .16s ease-out !important;
  position: relative;
}
body:has(#p-app.on) .evcx-bn.evcx-navactive {
  color: #22D3EE !important;
  -webkit-text-fill-color: #22D3EE !important;
}
/* Petit trait indicateur au-dessus de l'item actif */
body:has(#p-app.on) .evcx-bn.evcx-navactive::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px;
  background: #22D3EE;
  box-shadow: 0 0 8px rgba(34,211,238,.55);
}
body:has(#p-app.on) .evcx-bn:active { transform: scale(.94); }


/* ═══════════════════════════════════════════════════════════════════════════
   §3. TABLES DE DONNÉES (.tbl2) — Clients / Équipe / Rapports / Caisse PRO
   ───────────────────────────────────────────────────────────────────────────
   En-tête sticky OPAQUE (sinon les lignes transparaissent au scroll),
   hover de ligne plus net, 1ʳᵉ colonne mise en valeur, chiffres tabulaires.
═══════════════════════════════════════════════════════════════════════════ */
body:has(#p-app.on) .tbl2 th {
  background: #1E293B !important;        /* slate-800 opaque — fix scroll */
  color: #CBD5E1 !important;
  -webkit-text-fill-color: #CBD5E1 !important;
  font-weight: 800 !important;
  letter-spacing: .06em !important;
  border-bottom: 1px solid #334155 !important;
  z-index: 2;
  white-space: nowrap;
}
body:has(#p-app.on) .tbl2 td {
  border-bottom: 1px solid rgba(51,65,85,.45) !important;  /* slate-700/45 */
  color: #E2E8F0 !important;
}
/* Zebra douce + hover de ligne net (remplace le 5% trop discret) */
body:has(#p-app.on) .tbl2 tbody tr:nth-child(even) td {
  background: rgba(30,41,59,.28);
}
body:has(#p-app.on) .tbl2 tbody tr:hover td {
  background: rgba(34,211,238,.08) !important;
}
/* 1ʳᵉ colonne (nom/identité) plus présente */
body:has(#p-app.on) .tbl2 tbody td:first-child {
  color: #FFFFFF !important;
  font-weight: 600;
}
/* Tous les nombres en chiffres tabulaires pour l'alignement vertical */
body:has(#p-app.on) .tbl2 td,
body:has(#p-app.on) .tbl2 th { font-variant-numeric: tabular-nums; }


/* ═══════════════════════════════════════════════════════════════════════════
   §4. FORMULAIRES — labels micro-typo + champ requis + espacement
═══════════════════════════════════════════════════════════════════════════ */
body:has(#p-app.on) .fg { gap: 7px !important; }
body:has(#p-app.on) .fl {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase;
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
}
/* Astérisque rouge discret pour les libellés requis (classe .req) */
body:has(#p-app.on) .fl.req::after,
body:has(#p-app.on) .fl[data-req]::after {
  content: " *";
  color: #F43F5E;
  -webkit-text-fill-color: #F43F5E;
  font-weight: 800;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §5. ÉTATS VIDES (.emp) — centrés, posés, lisibles
═══════════════════════════════════════════════════════════════════════════ */
body:has(#p-app.on) .emp {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  gap: 8px; padding: 28px 16px;
}
body:has(#p-app.on) .emp .ei,
body:has(#p-app.on) .emp > span:first-child {
  font-size: 42px !important;
  opacity: .42 !important;
  filter: grayscale(.2);
}


/* ═══════════════════════════════════════════════════════════════════════════
   §6. TOASTS — entrée souple + barre sémantique cohérente
═══════════════════════════════════════════════════════════════════════════ */
#toast, #mb-toast {
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.50), 0 4px 10px rgba(0,0,0,.30) !important;
  font-weight: 700 !important;
  letter-spacing: .01em;
  border-left: 4px solid #22D3EE;        /* info par défaut */
}
.toast.success, #toast.success, #mb-toast.success { border-left-color: #10B981 !important; }
.toast.error, .toast.critique, .toast.danger,
#toast.error, #mb-toast.error { border-left-color: #F43F5E !important; }
.toast.warn, .toast.warning, #toast.warn { border-left-color: #F59E0B !important; }


/* ═══════════════════════════════════════════════════════════════════════════
   §7. TITRES — en-têtes de carte et de modale homogènes
═══════════════════════════════════════════════════════════════════════════ */
body:has(#p-app.on) .cd-h {
  letter-spacing: -.01em;
  font-weight: 900 !important;
}
/* Filet de séparation sous le titre de modale pour structurer le contenu */
body:has(#p-app.on) .mdt {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(51,65,85,.45);
  margin-bottom: 4px;
}
/* Footer de modale : léger filet haut pour décoller les actions du contenu */
body:has(#p-app.on) .mdb {
  padding-top: 12px;
  border-top: 1px solid rgba(51,65,85,.40);
}


/* ═══════════════════════════════════════════════════════════════════════════
   §8. PILLS / TAGS (.tg) — rendu net et homogène
═══════════════════════════════════════════════════════════════════════════ */
body:has(#p-app.on) .tg {
  font-weight: 700 !important;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  border-radius: 999px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
   §9. DÉTAILS — sélection texte + liens cohérents avec l'accent
═══════════════════════════════════════════════════════════════════════════ */
body:has(#p-app.on) ::selection {
  background: rgba(34,211,238,.30);
  color: #FFFFFF;
}
body:has(#p-app.on) #p-app a:not(.btn) {
  color: #38BDF8;                        /* sky-400 — lien lisible */
  text-underline-offset: 2px;
}
body:has(#p-app.on) #p-app a:not(.btn):hover { color: #7DD3FC; }


/* ═══════════════════════════════════════════════════════════════════════════
   §10. ACCESSIBILITÉ MOUVEMENT — respect prefers-reduced-motion
═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  body:has(#p-app.on) .evcx-side,
  body:has(#p-app.on) .evcx-bn,
  body:has(#p-app.on) .evcx-bn.evcx-navactive::before {
    transition: none !important;
    animation: none !important;
  }
}

/* Fin du fichier — ev-pro-polish-v306.css */
