/* ==========================================================================
   AURORE (choisie par Adrien le 05/11/2026) : verre dépoli sur une aurore bleue,
   cyan et violette. Le décor (étoiles, houle, phare du canvas #bgStars) est gardé
   et se peint au-dessus de l'aurore. Thème sombre et écrans de plus de 768 px
   seulement : le thème clair et la couche mobile ne changent pas.
   Pour revenir en arrière : retirer le lien vers ce fichier dans index.html.
   ========================================================================== */
@media (min-width:769px){
body:not(.light-theme){
  --bg:#050A18; --bg2:#111B3A; --bg3:#19244A; --card:#111A38;
  --border:rgba(255,255,255,.10); --text:#F4F8FF; --text2:#C9D5EC; --text3:#97A7C7; --text4:#7586A8;
  --accent:#4F8CFF; --accent2:#3FD8FF; --grad:linear-gradient(135deg,#2466EE,#00D4FF);
  --success:#3BE0A6; --warn:#FFC35A; --danger:#FF7D6E; --glass:#0E1630;
  background:#050A18 !important;
}
html:has(> body:not(.light-theme)){background:#050A18 !important}
body:not(.light-theme)::after{display:none !important}
body:not(.light-theme)::before{
  display:block !important;content:'' !important;position:fixed !important;inset:-8% !important;z-index:0 !important;pointer-events:none;
  background:
    radial-gradient(48% 44% at 8% 4%,rgba(36,102,238,.95),transparent 70%),
    radial-gradient(40% 36% at 92% 8%,rgba(0,212,255,.55),transparent 70%),
    radial-gradient(52% 46% at 78% 98%,rgba(139,92,246,.60),transparent 70%),
    radial-gradient(44% 40% at 16% 92%,rgba(0,150,255,.45),transparent 70%),
    radial-gradient(36% 30% at 52% 46%,rgba(36,102,238,.22),transparent 70%) !important;
}

/* Surfaces de verre */
body:not(.light-theme) .dz2-sec,
body:not(.light-theme) .dz2-stat,
body:not(.light-theme) .apercu-card,
body:not(.light-theme) .client-page-header,
body:not(.light-theme) .client-tabs,
body:not(.light-theme) .kanban-col,
body:not(.light-theme) .lifeline,
body:not(.light-theme) #page-clients > .card,
body:not(.light-theme) #page-fiche-client .card{
  background:linear-gradient(155deg,rgba(36,54,108,.66),rgba(10,18,42,.60)) !important;
  border:1px solid rgba(255,255,255,.11) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 30px 60px -30px rgba(0,0,0,.75) !important;
}
/* Pas de flou d'arrière-plan sur les surfaces de la page ni sur le rail : le décor est animé
   en continu, et un flou posé dessus se recalcule à chaque image (lenteurs, surtout à
   l'ouverture du rail). Le verre est imité par des fonds plus couvrants. */
body:not(.light-theme) :is(.card,.dz2-sec,.dz2-stat,.apercu-card,.client-page-header,.client-tabs,.timeline-panel,.kanban-col,.lifeline,.sidebar,.btn-notif,.profile-btn,.persistent-tab){
  -webkit-backdrop-filter:none !important;backdrop-filter:none !important;
}
body:not(.light-theme) .dz2-sec,body:not(.light-theme) .apercu-card,body:not(.light-theme) .lifeline{border-radius:24px !important}
body:not(.light-theme) .client-page-header{border-radius:26px 26px 0 0 !important;border-bottom:none !important}
body:not(.light-theme) .client-tabs{border-radius:0 0 26px 26px !important;border-top:1px solid rgba(255,255,255,.06) !important}

/* Tableau de bord */
body:not(.light-theme) .dz2-date{font-size:40px !important;background:linear-gradient(100deg,#FFFFFF 35%,#7FE3FF 75%,#9C8CFF) !important;-webkit-background-clip:text !important;background-clip:text !important;-webkit-text-fill-color:transparent !important;margin:8px 0 2px !important}
body:not(.light-theme) .dz2-hero{gap:14px !important;border-bottom:none !important;padding:18px 0 18px !important}
body:not(.light-theme) .dz2-stat{border-radius:22px !important;padding:18px 22px 16px !important}
body:not(.light-theme) .dz2-stat + .dz2-stat{border-left:1px solid rgba(255,255,255,.11) !important}
body:not(.light-theme) .dz2-k{color:#8FB4FF !important;letter-spacing:.18em !important}
body:not(.light-theme) .dz2-n{font-size:40px !important;background:linear-gradient(180deg,#FFFFFF 25%,#9CDCFF) !important;-webkit-background-clip:text !important;background-clip:text !important;-webkit-text-fill-color:transparent !important}
body:not(.light-theme) #dzCAPend{background:linear-gradient(180deg,#FFE7B0 15%,#FFB547) !important;-webkit-background-clip:text !important;background-clip:text !important}
body:not(.light-theme) .dz2-cols{gap:0 18px !important}
body:not(.light-theme) .dz2-sec{padding:20px 24px 22px !important;margin-bottom:18px !important}
body:not(.light-theme) .dz2-tick{width:8px !important;height:8px !important;border-radius:50% !important;box-shadow:0 0 12px currentColor,0 0 0 3px rgba(255,255,255,.06)}
body:not(.light-theme) .dz2-t{font-size:17px !important}

/* Rail, barre du haut, onglets */
body:not(.light-theme) .sidebar{background:linear-gradient(180deg,rgba(28,44,90,.90),rgba(10,18,40,.88)) !important;border:1px solid rgba(255,255,255,.12) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 24px 50px -24px rgba(0,0,0,.8)}
body:not(.light-theme) .sidebar .nav-item{color:rgba(220,232,255,.62) !important}
body:not(.light-theme) .sidebar .nav-item.active{background:linear-gradient(135deg,#2466EE,#00C8FF) !important;color:#fff !important;border:none !important;box-shadow:0 10px 26px -6px rgba(0,170,255,.75),inset 0 1px 0 rgba(255,255,255,.35) !important}
body:not(.light-theme) .btn-notif,body:not(.light-theme) .profile-btn{background:rgba(26,40,80,.82) !important;border:1px solid rgba(255,255,255,.12) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.1) !important;color:#DCE8FF !important}
body:not(.light-theme) .persistent-tab{background:rgba(26,40,80,.82) !important;border:1px solid rgba(255,255,255,.12) !important}
body:not(.light-theme) .persistent-tab.active{background:linear-gradient(135deg,rgba(36,102,238,.9),rgba(0,200,255,.75)) !important;border-color:rgba(255,255,255,.25) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.28) !important;color:#fff !important}

/* Boutons et repères de la fiche */
body:not(.light-theme) .btn-primary{background:linear-gradient(135deg,#2466EE,#00C8FF) !important;border:none !important;box-shadow:0 10px 26px -8px rgba(0,170,255,.7),inset 0 1px 0 rgba(255,255,255,.3) !important;color:#fff !important}
body:not(.light-theme) .btn-secondary{background:rgba(255,255,255,.07) !important;border:1px solid rgba(255,255,255,.14) !important}
body:not(.light-theme) .fiche-tab-glider{background:linear-gradient(135deg,#2466EE,#00C8FF) !important;box-shadow:0 10px 24px -8px rgba(0,170,255,.75) !important}
body:not(.light-theme) .client-page-avatar-initials{background:linear-gradient(145deg,#2466EE,#00C8FF) !important;box-shadow:0 0 0 4px rgba(255,255,255,.06),0 14px 34px -10px rgba(0,170,255,.8) !important}
body:not(.light-theme) #ficheClientName{font-size:30px !important;background:linear-gradient(100deg,#FFFFFF 45%,#9CDCFF) !important;-webkit-background-clip:text !important;background-clip:text !important;-webkit-text-fill-color:transparent !important}
body:not(.light-theme) #apSynthTotal{background:linear-gradient(180deg,#FFFFFF 25%,#7FE3FF) !important;-webkit-background-clip:text !important;background-clip:text !important;-webkit-text-fill-color:transparent !important}
body:not(.light-theme) .fiche-memo{background:linear-gradient(155deg,rgba(255,195,90,.16),rgba(255,195,90,.04)) !important;border:1px solid rgba(255,195,90,.28) !important}
body:not(.light-theme) .kanban-card{background:rgba(255,255,255,.06) !important;border:1px solid rgba(255,255,255,.12) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08) !important}
body:not(.light-theme) .client-page-header::before{background:linear-gradient(90deg,rgba(36,102,238,.38),rgba(0,212,255,.10)) !important}
body:not(.light-theme) .ap-alaia{background:linear-gradient(90deg,rgba(36,102,238,.30),rgba(0,212,255,.14)) !important;border:1px solid rgba(127,227,255,.30) !important}

/* Commun aux trois directions : onglets de fiche sur une ligne, sans élargir la page */
body:not(.light-theme) main.main,body:not(.light-theme) .content,body:not(.light-theme) #page-fiche-client,body:not(.light-theme) .client-tabs,body:not(.light-theme) .client-tabs > div{min-width:0 !important}
body:not(.light-theme) .client-tab{white-space:nowrap !important}

/* Fenêtres, menus et notifications : verre presque opaque, pour rester lisibles au-dessus des pages */
body:not(.light-theme) :is(.toast,.tag-dropdown,.profile-dropdown,.esign-modal,.qpr-maj-modal,.actu-modal,#rtoDetailsModal .modal,#rtoDetailsModal .modal-header),
body:not(.light-theme) :is([style*="position:fixed"],[style*="position: fixed"]) > :is([style*="var(--card)"],[style*="var(--bg3)"]){
  background:rgba(17,27,58,.96) !important;
  -webkit-backdrop-filter:blur(24px) saturate(150%);backdrop-filter:blur(24px) saturate(150%);
}

/* Couleurs de base opaques (06/11/2026) : menus, volets et fenêtres s'en servent, ils ne
   doivent jamais laisser voir la page dessous. Le verre ne vit que sur les surfaces listées plus haut. */
body:not(.light-theme) .timeline-panel{
  background:linear-gradient(160deg,#1A2752,#0C1430) !important;border:1px solid rgba(255,255,255,.11) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 30px 60px -30px rgba(0,0,0,.75) !important;
}

/* Barre du haut : elle part avec la page, donc aucun fond sombre au défilement (il formait une
   bande noire sur l'aurore). Onglet client actif sans ombre portée : la barre d'onglets la coupait net. */
body:not(.light-theme).tb-scrolled .topbar{background:transparent !important;box-shadow:none !important}
}
