/* ============================================================
   Codélior — Thème REFONTE v2 (activable via ?refonte=1)
   Scopé à body.glt-refonte. Aurora + témoin en PSEUDO-ÉLÉMENTS
   du <body> → survivent aux reconstructions DOM du SPA.
   ============================================================ */

/* ----- Aurora : pseudo-élément du body (SPA-proof) ----- */
body.glt-refonte::before{
  content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(640px circle at 82% 0%,  rgba(var(--charte-bleu-clair-rgb),.55), transparent 58%),
    radial-gradient(580px circle at 99% 44%, rgba(var(--charte-ciel-rgb),.50), transparent 58%),
    /* Le halo bas-gauche était framboise : une « tache » rose sur le fond. Le framboise
       décide (boutons, alertes), il ne fait pas d'ambiance : halo bleu ciel, discret. */
    radial-gradient(560px circle at 24% 90%, rgba(var(--charte-ciel-rgb),.30), transparent 58%);
  animation:gltAur 24s ease-in-out infinite;
}
@keyframes gltAur{0%,100%{transform:translate(0,0)}50%{transform:translate(-28px,26px)}}

/* ----- Laisser voir l'aurora : app/contenu transparents ----- */
body.glt-refonte{background:var(--charte-pale) !important}
/* SEUL .glt-app crée le contexte au-dessus de l'aurora — PAS les conteneurs imbriqués
   (sinon ils piègent les overlays : modales, menus… sous la sidebar). */
body.glt-refonte .glt-app{background:transparent !important;position:relative;z-index:1}
body.glt-refonte .glt-main,
body.glt-refonte .glt-content,
body.glt-refonte .glt-page,
body.glt-refonte .glt-content-inner{background:transparent !important}

/* ----- Header en verre ----- */
body.glt-refonte .glt-header{
  background:rgba(255,255,255,.5) !important;
  -webkit-backdrop-filter:blur(16px) saturate(150%);backdrop-filter:blur(16px) saturate(150%);
  border-bottom:1px solid rgba(255,255,255,.55) !important;
}
body.glt-refonte .glt-header-search{background:rgba(255,255,255,.72) !important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}

/* ----- Cartes (Accueil + génériques) en verre dépoli ----- */
body.glt-refonte .glt-acc-card,
body.glt-refonte .glt-card{
  background:rgba(255,255,255,.62) !important;
  -webkit-backdrop-filter:blur(20px) saturate(160%);backdrop-filter:blur(20px) saturate(160%);
  border:1px solid rgba(255,255,255,.8) !important;
  border-radius:24px !important;
  box-shadow:0 16px 44px rgba(20,40,80,.14) !important;
  transition:transform .22s ease,box-shadow .22s ease !important;
}
body.glt-refonte .glt-acc-card:hover,
body.glt-refonte .glt-card:hover{transform:translateY(-5px);box-shadow:0 28px 60px rgba(20,40,80,.2) !important}

/* tuiles accès rapide + tuiles internes */
body.glt-refonte .glt-acc-qtile{background:rgba(255,255,255,.7) !important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.75) !important;border-radius:16px !important}
body.glt-refonte .glt-acc-tile{background:rgba(255,255,255,.45) !important;border:1px solid rgba(255,255,255,.55) !important;transition:transform .15s,background .15s !important}
body.glt-refonte .glt-acc-tile:hover{transform:translateY(-2px);background:rgba(255,255,255,.9) !important}

/* hero : halo lumineux renforcé */
body.glt-refonte .glt-acc-hero{box-shadow:0 24px 56px rgba(var(--charte-bleu-rgb),.34) !important;border:1px solid rgba(255,255,255,.14)}

/* ----- Sidebar : profondeur ----- */
body.glt-refonte .glt-sidebar{box-shadow:8px 0 48px rgba(16,26,48,.22)}

/* ----- Coins / champs plus doux ----- */
body.glt-refonte .glt-btn,
body.glt-refonte .glt-btn-sm{border-radius:11px !important;transition:transform .14s ease, box-shadow .18s ease, filter .15s ease !important}
body.glt-refonte .glt-btn:hover{transform:translateY(-1px)}
/* boutons-icônes : taille + forme HOMOGÈNES (carré arrondi), quel que soit le variant */
body.glt-refonte .glt-btn-icon,
body.glt-refonte .glt-btn-icon-round{
  width:36px !important;height:36px !important;min-width:36px !important;padding:0 !important;
  border-radius:10px !important;border:none !important;
  display:inline-flex;align-items:center;justify-content:center;
  transition:transform .14s ease, background .18s ease, color .18s ease !important;
}
body.glt-refonte .glt-btn-icon:hover,
body.glt-refonte .glt-btn-icon-round:hover{transform:translateY(-1px)}
body.glt-refonte .glt-btn-icon .dashicons,
body.glt-refonte .glt-btn-icon-round .dashicons{font-size:18px;width:18px;height:18px}
/* variante danger : pastille rouge discrète par défaut, pleine au survol */
body.glt-refonte .glt-btn-icon-danger{background:rgba(var(--glt-danger-rgb),.13) !important;color:var(--glt-danger) !important}
body.glt-refonte .glt-btn-icon-danger:hover{background:var(--glt-danger) !important;color:#fff !important}

/* ----- Boutons d'action en liste (.glt-at-actions) : cohérents + supprimer soigné ----- */
body.glt-refonte .glt-at-actions .glt-btn{
  border-radius:10px !important;
  transition:transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, border-color .2s, color .2s !important;
}
body.glt-refonte .glt-at-actions .glt-btn:hover{transform:translateY(-2px)}

/* bouton SUPPRIMER (classe exacte) + variante outline-danger partout */
body.glt-refonte .glt-btn-delete-action,
body.glt-refonte .glt-btn-outline-danger{
  border:1.5px solid rgba(var(--glt-danger-rgb),.38) !important;
  background:rgba(var(--glt-danger-rgb),.1) !important;
  color:var(--glt-danger) !important;
  border-radius:10px !important;
}
body.glt-refonte .glt-btn-delete-action:hover,
body.glt-refonte .glt-btn-outline-danger:hover{
  background:var(--glt-danger) !important;border-color:var(--glt-danger) !important;color:#fff !important;
  transform:translateY(-2px) scale(1.1);
  box-shadow:0 8px 22px rgba(var(--glt-danger-rgb),.45) !important;
}

/* ----- Remplacer les emojis des boutons d'action par de vraies icônes (CSS only) ----- */
body.glt-refonte .glt-at-actions .glt-btn{
  font-size:0 !important;line-height:0 !important;
  position:relative !important;
  width:34px !important;height:34px !important;min-width:34px !important;padding:0 !important;
  overflow:hidden;
}
body.glt-refonte .glt-at-actions .glt-btn-delete-action::before,
body.glt-refonte .glt-at-actions .glt-btn-view-action-full::before,
body.glt-refonte .glt-at-actions .glt-btn-remind::before,
body.glt-refonte .glt-at-actions .glt-btn-send-transfer::before{
  content:"";width:16px;height:16px;background-color:currentColor;
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  -webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;
  transition:transform .2s ease;
}
body.glt-refonte .glt-btn-delete-action:hover::before{transform:translate(-50%,-50%) rotate(-12deg) scale(1.1)}
body.glt-refonte .glt-at-actions .glt-btn-delete-action::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E")}
body.glt-refonte .glt-at-actions .glt-btn-view-action-full::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5C21.27 7.61 17 4.5 12 4.5zm0 12a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-7a2.5 2.5 0 100 5 2.5 2.5 0 000-5z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5C21.27 7.61 17 4.5 12 4.5zm0 12a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-7a2.5 2.5 0 100 5 2.5 2.5 0 000-5z'/%3E%3C/svg%3E")}
body.glt-refonte .glt-at-actions .glt-btn-remind::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5S10.5 3.17 10.5 4v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5S10.5 3.17 10.5 4v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z'/%3E%3C/svg%3E")}
body.glt-refonte .glt-at-actions .glt-btn-send-transfer::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E")}
body.glt-refonte input[type=text],
body.glt-refonte input[type=search],
body.glt-refonte select,
body.glt-refonte textarea{border-radius:11px !important}

/* ----- Mode sombre ----- */
html[data-theme="dark"] body.glt-refonte{background:#0c1220 !important}
html[data-theme="dark"] body.glt-refonte::before{opacity:.4}
html[data-theme="dark"] body.glt-refonte .glt-acc-card,
html[data-theme="dark"] body.glt-refonte .glt-card{background:#161f33 !important;border:1px solid rgba(255,255,255,.08) !important}
/* cartes KPI/modern opaques aussi en sombre (pas de bleed d'aurora) */
html[data-theme="dark"] body.glt-refonte .glt-stat-card,
html[data-theme="dark"] body.glt-refonte .glt-modern-card{background:#161f33 !important}
html[data-theme="dark"] body.glt-refonte .glt-header{background:rgba(12,18,32,.55) !important;border-bottom:1px solid rgba(255,255,255,.06) !important}

@media(prefers-reduced-motion:reduce){
  body.glt-refonte::before{animation:none}
  body.glt-refonte .glt-acc-card,body.glt-refonte .glt-card{transition:none !important}
}

/* ============================================================
   PHASE 2 — Accueil : HERO premium + grille BENTO
   ============================================================ */

/* ----- Hero premium : mesh vibrant sur la couleur de marque ----- */
body.glt-refonte .glt-acc-hero{
  background:
    radial-gradient(120% 135% at 6% -20%, rgba(var(--charte-bleu-clair-rgb),.55), transparent 55%),
    radial-gradient(95% 130% at 100% 0%, rgba(var(--charte-ciel-rgb),.32), transparent 55%),
    radial-gradient(80% 120% at 50% 130%, rgba(var(--charte-ciel-rgb),.22), transparent 60%),
    linear-gradient(135deg, var(--glt-primary), var(--glt-primary-light)) !important;
  border-radius:26px !important;
  padding:36px 40px !important;
  box-shadow:0 28px 64px rgba(20,40,80,.34) !important;
  border:1px solid rgba(255,255,255,.16);
}
/* halo lumineux animé dans le hero */
body.glt-refonte .glt-acc-hero::after{
  width:300px !important;height:300px !important;right:-90px !important;top:-110px !important;
  background:radial-gradient(circle, rgba(255,255,255,.18), transparent 70%) !important;
  animation:gltHeroGlow 9s ease-in-out infinite;
}
@keyframes gltHeroGlow{0%,100%{transform:translate(0,0) scale(1);opacity:.9}50%{transform:translate(-18px,22px) scale(1.12);opacity:1}}

/* horloge mise en valeur */
body.glt-refonte .glt-acc-time{
  font-size:46px !important;font-variant-numeric:tabular-nums;letter-spacing:-1px;
  text-shadow:0 3px 22px rgba(0,0,0,.28);
}
body.glt-refonte .glt-acc-hello{letter-spacing:-.5px}

/* ----- Tuiles d'accès rapide : boutons bento ----- */
body.glt-refonte .glt-acc-qtile{
  padding:14px 22px !important;font-size:15px !important;border-radius:16px !important;
  box-shadow:0 6px 18px rgba(20,40,80,.08) !important;
}

/* ----- Grille BENTO : Visites grande à gauche, Modules+Paramétrage à droite ----- */
body.glt-refonte .glt-acc-grid{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:22px !important;
}
/* Visites : pleine largeur en haut ; Modules + Paramétrage côte à côte dessous */
body.glt-refonte .glt-acc-card[data-cat="visites"]{grid-column:1 / -1}
body.glt-refonte .glt-acc-card[data-cat="modules"]{grid-column:1}
body.glt-refonte .glt-acc-card[data-cat="parametrage"]{grid-column:2}
/* la carte large « Visites » : ses tuiles sur 4 colonnes (desktop) */
@media(min-width:981px){
  body.glt-refonte .glt-acc-card[data-cat="visites"] .glt-acc-tiles{grid-template-columns:repeat(4,1fr) !important}
}

/* ----- Cartes : barre d'accent dégradée + icône animée ----- */
body.glt-refonte .glt-acc-card[data-cat]{
  border-top:none !important;position:relative;overflow:hidden;
}
body.glt-refonte .glt-acc-card[data-cat]::before{
  content:"";position:absolute;top:0;left:0;right:0;height:4px;
  background:linear-gradient(90deg,var(--cat),var(--cat2));
}
body.glt-refonte .glt-acc-card-ic{transition:transform .28s cubic-bezier(.22,1,.36,1)}
body.glt-refonte .glt-acc-card:hover .glt-acc-card-ic{transform:scale(1.14) rotate(-5deg)}
body.glt-refonte .glt-acc-card[data-cat]:hover{box-shadow:0 30px 64px rgba(var(--cat-rgb),.26) !important}

/* ----- Repli mobile : 1 colonne, qualité = desktop ----- */
@media(max-width:980px){
  body.glt-refonte .glt-acc-grid{grid-template-columns:1fr !important}
  body.glt-refonte .glt-acc-card[data-cat]{grid-column:auto !important;grid-row:auto !important}
  body.glt-refonte .glt-acc-hero{padding:26px 24px !important}
  body.glt-refonte .glt-acc-time{font-size:34px !important}
}

/* ============================================================
   PHASE 3 — Tableau de bord : KPI v2 + polish
   ============================================================ */
@keyframes gltKpiIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}

/* ----- Cartes KPI en verre + accent couleur ----- */
body.glt-refonte .glt-stat-card{
  background:rgba(255,255,255,.62) !important;
  -webkit-backdrop-filter:blur(20px) saturate(160%);backdrop-filter:blur(20px) saturate(160%);
  border:1px solid rgba(255,255,255,.8) !important;
  border-radius:22px !important;
  box-shadow:0 16px 44px rgba(20,40,80,.12) !important;
  position:relative;overflow:hidden;
  transition:transform .22s ease,box-shadow .22s ease !important;
  animation:gltKpiIn .5s cubic-bezier(.22,1,.36,1) both;
}
body.glt-refonte .glt-stat-card:nth-child(1){animation-delay:.04s}
body.glt-refonte .glt-stat-card:nth-child(2){animation-delay:.10s}
body.glt-refonte .glt-stat-card:nth-child(3){animation-delay:.16s}
body.glt-refonte .glt-stat-card:nth-child(4){animation-delay:.22s}
body.glt-refonte .glt-stat-card:hover{transform:translateY(-5px);box-shadow:0 28px 60px rgba(20,40,80,.18) !important}

/* barre d'accent gauche par couleur */
body.glt-refonte .glt-stat-card::before{content:"";position:absolute;top:0;bottom:0;left:0;width:5px;background:var(--kpi,var(--charte-bleu-clair))}
body.glt-refonte .glt-stat-blue{--kpi:var(--charte-bleu-clair);--kpi2:var(--charte-sur-sombre);--kpi-rgb:var(--charte-bleu-clair-rgb)}
body.glt-refonte .glt-stat-green{--kpi:#10b981;--kpi2:#34d399;--kpi-rgb:16,185,129}
body.glt-refonte .glt-stat-purple{--kpi:var(--charte-accent);--kpi2:var(--charte-accent-clair);--kpi-rgb:var(--charte-accent-rgb)}
body.glt-refonte .glt-stat-orange{--kpi:#f59e0b;--kpi2:#fb923c;--kpi-rgb:245,158,11}

/* icône en pastille dégradée */
body.glt-refonte .glt-stat-icon{
  background:linear-gradient(135deg,var(--kpi),var(--kpi2)) !important;
  border-radius:15px !important;
  box-shadow:0 8px 20px rgba(var(--kpi-rgb),.38) !important;
  transition:transform .25s cubic-bezier(.22,1,.36,1);
}
body.glt-refonte .glt-stat-icon .dashicons{color:#fff !important}
body.glt-refonte .glt-stat-card:hover .glt-stat-icon{transform:scale(1.1) rotate(-5deg)}

/* valeur KPI en grand — texte foncé pour la lisibilité (a11y) ----- */
body.glt-refonte .glt-stat-value{
  font-size:34px !important;font-weight:800 !important;letter-spacing:-1px;
  font-variant-numeric:tabular-nums;
}

/* ----- Sélecteur d'année : pilule en verre ----- */
/* z-index : la barre crée un contexte d'empilement (backdrop-filter) ; on l'élève
   pour que le menu ⚙️ Afficher/Masquer reste AU-DESSUS des cartes KPI en verre. */
body.glt-refonte .glt-year-selector{
  background:rgba(255,255,255,.6) !important;
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.7) !important;border-radius:16px !important;
  position:relative;z-index:200;
}
/* sécurité : les cartes KPI ne doivent pas s'élever au survol au point de masquer le menu */
body.glt-refonte .glt-stats-grid{position:relative;z-index:1}

/* ----- En-têtes de cartes contenu ----- */
body.glt-refonte .glt-card-header h3{letter-spacing:-.3px}

/* ============================================================
   PHASE 4 — Transversal : tableaux + formulaires + champs
   ============================================================ */

/* ----- Tableaux ----- */
body.glt-refonte .glt-table{border-collapse:separate;border-spacing:0;background:transparent !important;width:100%}
body.glt-refonte .glt-table th{
  background:rgba(var(--glt-primary-rgb),.07) !important;
  color:var(--glt-text-strong) !important;
  font-size:12px !important;font-weight:700 !important;letter-spacing:.02em;text-transform:uppercase;
  padding:12px 14px !important;border:none !important;
  border-bottom:2px solid rgba(var(--glt-primary-rgb),.16) !important;
}
body.glt-refonte .glt-table td{
  padding:12px 14px !important;border:none !important;
  border-bottom:1px solid rgba(20,40,80,.07) !important;
  vertical-align:middle !important;   /* centre les cellules même si un badge passe sur 2 lignes */
}
body.glt-refonte .glt-table th{vertical-align:middle !important}
/* Top 10 (tableaux compacts) : hauteur de ligne fixe (contient nom 2 lignes + type) → les 2 tableaux s'alignent ligne par ligne */
body.glt-refonte .glt-table-compact tbody tr{height:86px !important}
/* Cartes côte à côte du dashboard : même hauteur (la carte remplit sa colonne flex déjà étirée) */
body.glt-refonte #glt-page-dashboard .glt-col-6 > .glt-card{height:100% !important}

/* ============================================================
   PHASE 8 — Listes déroulantes (<select>) v2
   ============================================================ */
body.glt-refonte select{
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
  border-radius:11px !important;
  padding:10px 38px 10px 14px !important;
  border:1.5px solid rgba(20,40,80,.16) !important;
  background-color:#fff !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;background-position:right 13px center !important;background-size:15px !important;
  cursor:pointer;
  transition:border-color .18s ease, box-shadow .18s ease !important;
}
body.glt-refonte select:hover{border-color:rgba(20,40,80,.32) !important}
body.glt-refonte select:focus{border-color:var(--glt-primary) !important;box-shadow:0 0 0 3px rgba(var(--glt-primary-rgb),.18) !important;outline:none !important}
/* mode sombre */
html[data-theme="dark"] body.glt-refonte select{
  background-color:rgba(255,255,255,.06) !important;color:#e8eef7 !important;border-color:rgba(255,255,255,.14) !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
}
html[data-theme="dark"] body.glt-refonte select option{background:#161f33 !important;color:#e8eef7 !important}

/* ============================================================
   MODE SOMBRE — panneaux à fond clair codé en INLINE dans les modales
   (ex. modale "voir un contrôle" : préconisations #fff / #f8fafc)
   ============================================================ */
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#fff"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background: #fff"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#f8fafc"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background: #f8fafc"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#fafafa"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:white"]{background:#1c2740 !important;border-color:rgba(255,255,255,.1) !important;color:#e8eef7 !important}
/* texte éclairci UNIQUEMENT dans les panneaux assombris ci-dessus (pas les titres sur fond vert/rouge) */
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#f8fafc"] :not(a):not([style*="color:#"]),
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#fff"] :not(a):not([style*="color:#"]){color:#e8eef7 !important}
/* Panneaux de STATUT checklist (vert OK / rouge Pas-OK) → teintes FONCÉES en sombre */
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#dcfce7"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background: #dcfce7"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#f0fdf4"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#ecfdf5"]{background:rgba(20,83,45,.34) !important;border-color:rgba(34,197,94,.35) !important}
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#fee2e2"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background: #fee2e2"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#fef2f2"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="background:#fff5f5"]{background:rgba(127,29,29,.30) !important;border-color:rgba(239,68,68,.35) !important}
/* titres de section + textes de statut → clairs/lisibles en sombre */
html[data-theme="dark"] body.glt-refonte .glt-modal .section-title,
html[data-theme="dark"] body.glt-refonte .glt-modal .glt-checklist-category-title,
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="color:#166534"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="color:#991b1b"],
html[data-theme="dark"] body.glt-refonte .glt-modal [style*="color:#15803d"]{color:#e8eef7 !important}

/* ============================================================
   PHASE 9 — Barre de recherche (.glt-search-box) moderne
   ============================================================ */
body.glt-refonte .glt-search-box{
  display:flex;align-items:center;gap:8px;
  background:rgba(255,255,255,.9) !important;
  border:1.5px solid rgba(20,40,80,.14) !important;
  border-radius:13px !important;
  padding:3px 14px !important;
  box-shadow:0 4px 14px rgba(20,40,80,.05) !important;
  transition:border-color .18s ease, box-shadow .18s ease !important;
}
body.glt-refonte .glt-search-box:focus-within{
  border-color:var(--glt-primary) !important;
  box-shadow:0 0 0 3px rgba(var(--glt-primary-rgb),.16) !important;
}
body.glt-refonte .glt-search-box .dashicons-search,
body.glt-refonte .glt-search-box .dashicons{color:var(--glt-primary) !important}
body.glt-refonte .glt-search-box input{
  background:transparent !important;border:none !important;box-shadow:none !important;border-radius:0 !important;
  padding:8px 2px !important;
}
body.glt-refonte .glt-search-box input:focus{box-shadow:none !important;border:none !important}
/* mode sombre */
html[data-theme="dark"] body.glt-refonte .glt-search-box{background:rgba(255,255,255,.06) !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] body.glt-refonte .glt-search-box input{color:#e8eef7 !important}

/* ============================================================
   PHASE 10 — Boutons d'action Contrôles = même style qu'Actions
   ============================================================ */
body.glt-refonte .glt-view-controle-btn,
body.glt-refonte .glt-edit-controle-btn,
body.glt-refonte .glt-delete-controle-btn,
body.glt-refonte td.glt-actions .glt-open-direction-modal-btn{
  width:34px !important;height:34px !important;min-width:34px !important;padding:0 !important;
  border-radius:10px !important;
  display:inline-flex !important;align-items:center !important;justify-content:center !important;
  transition:transform .14s ease, background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}
body.glt-refonte .glt-view-controle-btn .dashicons,
body.glt-refonte .glt-edit-controle-btn .dashicons,
body.glt-refonte .glt-delete-controle-btn .dashicons,
body.glt-refonte td.glt-actions .glt-open-direction-modal-btn .dashicons{font-size:18px !important;width:18px !important;height:18px !important;transition:transform .2s}
body.glt-refonte .glt-view-controle-btn:hover,
body.glt-refonte .glt-edit-controle-btn:hover,
body.glt-refonte td.glt-actions .glt-open-direction-modal-btn:hover{transform:translateY(-1px)}
/* supprimer = pastille rouge animée, identique à Actions */
body.glt-refonte .glt-delete-controle-btn{
  background:rgba(var(--glt-danger-rgb),.12) !important;
  color:var(--glt-danger) !important;
  border:1.5px solid rgba(var(--glt-danger-rgb),.32) !important;
}
body.glt-refonte .glt-delete-controle-btn:hover{
  background:var(--glt-danger) !important;color:#fff !important;
  transform:translateY(-2px) scale(1.08);
  box-shadow:0 8px 22px rgba(var(--glt-danger-rgb),.45) !important;
}
body.glt-refonte .glt-delete-controle-btn:hover .dashicons{transform:rotate(-10deg)}
/* view + edit = blanc contour (comme l'oeil d'Actions), pas de carré sombre plein */
body.glt-refonte .glt-view-controle-btn,
body.glt-refonte .glt-edit-controle-btn{
  background:#fff !important;
  border:1.5px solid rgba(20,40,80,.14) !important;
  color:#475569 !important;
  box-shadow:0 1px 2px rgba(20,40,80,.06) !important;
}
body.glt-refonte .glt-view-controle-btn:hover,
body.glt-refonte .glt-edit-controle-btn:hover{
  background:var(--charte-pale) !important;
  border-color:var(--charte-bleu-clair) !important;
  color:var(--charte-bleu-2) !important;
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(var(--charte-bleu-clair-rgb),.22) !important;
}
/* espacement des boutons dans la colonne actions des contrôles */
body.glt-refonte td.glt-actions{white-space:nowrap}
body.glt-refonte td.glt-actions .glt-btn{margin-left:6px}

/* ============================================================
   PHASE 11 — Icône des modales de confirmation POSITIVE = vert
   (la base redéfinit .glt-confirm-icon en rouge plus bas → on corrige
    pour les validations/réceptions, sans toucher aux suppressions)
   ============================================================ */
body.glt-refonte #glt-modal-confirm-direction .glt-confirm-icon,
body.glt-refonte #glt-modal-confirm-validation .glt-confirm-icon,
body.glt-refonte #glt-modal-confirm-reception .glt-confirm-icon{
  background:linear-gradient(135deg, var(--glt-success,#10b981), var(--charte-ciel)) !important;
}
body.glt-refonte #glt-modal-confirm-direction .glt-confirm-icon .dashicons,
body.glt-refonte #glt-modal-confirm-validation .glt-confirm-icon .dashicons,
body.glt-refonte #glt-modal-confirm-reception .glt-confirm-icon .dashicons{
  color:#fff !important;
}
/* Dialogue de confirmation = centré + encadré (le contenu n'est pas dans .glt-modal-body,
   donc le centrage de la base ne s'appliquait pas → texte collé à gauche) */
body.glt-refonte .glt-modal-container.glt-modal-confirm{
  max-width:460px !important;
  text-align:center !important;
  padding:34px 30px 28px !important;
  border:1px solid rgba(20,40,80,.07) !important;
}
body.glt-refonte .glt-modal-container.glt-modal-confirm h2{
  text-align:center !important;
  margin:4px 0 8px !important;
  font-size:21px !important;
}
body.glt-refonte .glt-modal-container.glt-modal-confirm .glt-confirm-message{
  text-align:center !important;
  color:#475569 !important;
  margin:0 0 6px !important;
}
body.glt-refonte .glt-modal-container.glt-modal-confirm .glt-confirm-detail{
  text-align:center !important;
  color:#94a3b8 !important;
  font-size:13px !important;
  margin:0 0 22px !important;
}
body.glt-refonte .glt-modal-container.glt-modal-confirm .glt-confirm-actions{
  display:flex !important;
  justify-content:center !important;
  gap:12px !important;
}

/* Graphe Évolution : remplir la carte étirée (plus de vide en bas) */
body.glt-refonte #glt-card-evolution{display:flex;flex-direction:column}
body.glt-refonte #glt-card-evolution .glt-card-body{flex:1;min-height:0;position:relative}
body.glt-refonte #glt-card-evolution canvas{position:absolute !important;inset:0 !important;width:100% !important;height:100% !important}
body.glt-refonte .glt-table tbody tr{transition:background .15s}
body.glt-refonte .glt-table tbody tr:hover{background:rgba(var(--glt-primary-rgb),.06) !important}
body.glt-refonte .glt-table tbody tr:last-child td{border-bottom:none !important}
body.glt-refonte .glt-table-wrapper,
body.glt-refonte .glt-table-container{border-radius:16px !important;overflow:hidden}

/* ----- Champs de formulaire ----- */
body.glt-refonte .glt-field input,
body.glt-refonte .glt-field select,
body.glt-refonte .glt-field textarea,
body.glt-refonte .glt-search-box input,
body.glt-refonte .glt-filters select{
  border-radius:11px !important;
  border:1px solid rgba(20,40,80,.16) !important;
  background:rgba(255,255,255,.82) !important;
  transition:border-color .18s, box-shadow .18s !important;
}
body.glt-refonte .glt-field input:focus,
body.glt-refonte .glt-field select:focus,
body.glt-refonte .glt-field textarea:focus,
body.glt-refonte .glt-search-box input:focus,
body.glt-refonte .glt-filters select:focus{
  border-color:var(--glt-primary) !important;
  box-shadow:0 0 0 3px rgba(var(--glt-primary-rgb),.2) !important;
  outline:none !important;
}
body.glt-refonte .glt-field label{font-weight:600 !important;color:var(--glt-text-strong) !important}

/* ============================================================
   PHASE 4b — Transversal : modales + badges + toasts
   ============================================================ */

/* MODALES = STYLE CLASSIQUE. On garde le z-index (au-dessus de la sidebar) ET on
   NEUTRALISE le verre/flou que les .glt-card INTERNES héritent de la base refonte
   (c'était LA source du flou par-dessus le contenu). Rien d'autre n'est touché. */
body.glt-refonte .glt-modal{z-index:99999 !important}
body.glt-refonte .glt-modal *{
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}
body.glt-refonte .glt-modal .glt-card{background:#fff !important}

/* badges : pilules nettes */
body.glt-refonte .glt-badge{border-radius:999px !important;font-weight:700 !important;letter-spacing:.01em}

/* toasts : verre + ombre douce */
body.glt-refonte .glt-toast{
  border-radius:14px !important;
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  box-shadow:0 14px 38px rgba(10,20,45,.22) !important;
  border:1px solid rgba(255,255,255,.5) !important;
}

/* ============================================================
   PHASE 5 — Messagerie (#glt-page-messagerie)
   ============================================================ */
/* conteneur 2 panneaux : carte verre nette */
body.glt-refonte .glt-messaging-container{
  background:rgba(255,255,255,.72) !important;
  -webkit-backdrop-filter:blur(16px) saturate(160%);backdrop-filter:blur(16px) saturate(160%);
  border:1px solid rgba(255,255,255,.7) !important;
  border-radius:22px !important;
  box-shadow:0 16px 44px rgba(20,40,80,.1) !important;
  overflow:hidden;
}
/* items conversation : arrondis, hover doux, actif = accent marque */
body.glt-refonte .glt-conversation-item{border-radius:14px !important;margin:4px 8px !important;transition:background .15s ease, transform .12s ease !important}
body.glt-refonte .glt-conversation-item:hover{background:rgba(var(--glt-primary-rgb),.06) !important;transform:translateX(2px)}
body.glt-refonte .glt-conversation-item.active{
  background:rgba(var(--glt-primary-rgb),.12) !important;
  box-shadow:inset 3px 0 0 var(--glt-primary) !important;
}
/* bulles façon chat moderne */
body.glt-refonte .glt-message-bubble{border-radius:18px !important;box-shadow:0 2px 8px rgba(20,40,80,.06) !important}
body.glt-refonte .glt-message-bubble.glt-message-sent{
  background:linear-gradient(135deg,var(--glt-primary),var(--glt-primary-light)) !important;color:#fff !important;
  border-bottom-right-radius:6px !important;
}
body.glt-refonte .glt-message-bubble.glt-message-sent .glt-message-text,
body.glt-refonte .glt-message-bubble.glt-message-sent .glt-message-sender{color:#fff !important}
body.glt-refonte .glt-message-bubble.glt-message-received{
  background:#fff !important;border:1px solid rgba(20,40,80,.08) !important;
  border-bottom-left-radius:6px !important;
}
/* zone de saisie : barre nette + champ arrondi */
body.glt-refonte .glt-message-input-area{
  background:rgba(255,255,255,.85) !important;border-top:1px solid rgba(20,40,80,.08) !important;
}
body.glt-refonte #glt-message-input{border-radius:14px !important}
/* avatar liste conversation : pastille dégradée + initiales blanches lisibles */
body.glt-refonte .glt-conversation-avatar{
  background:linear-gradient(135deg,var(--glt-primary),var(--glt-primary-light)) !important;
  color:#fff !important;font-weight:700 !important;
}
/* pièce jointe dans une bulle ENVOYÉE (bleue) : texte + icône blancs lisibles */
body.glt-refonte .glt-message-bubble.glt-message-sent .glt-msg-attachment{
  background:rgba(255,255,255,.18) !important;
  border-color:rgba(255,255,255,.4) !important;
  color:#fff !important;
}
body.glt-refonte .glt-message-bubble.glt-message-sent .glt-msg-attachment *{color:#fff !important}
body.glt-refonte .glt-message-bubble.glt-message-sent .glt-msg-attachment:hover{background:rgba(255,255,255,.3) !important}

/* ============================================================
   PHASE 6 — Modales de confirmation / suppression (TÉMOIN v2)
   Minimal & sûr : boîte arrondie + ombre + entrée animée + header net.
   (le flou/transparence/z-index restent neutralisés par la règle modale)
   ============================================================ */
/* cible TOUTES les modales à header rouge (= confirmation/suppression), peu importe leur classe de taille */
body.glt-refonte .glt-modal-container:has(.glt-modal-header-danger){
  border-radius:22px !important;
  box-shadow:0 26px 70px rgba(190,30,30,.26) !important;  /* ombre légèrement rouge */
  border:1px solid rgba(255,255,255,.6) !important;
  overflow:hidden !important;
}
@keyframes gltConfirmIn{from{opacity:0;transform:translateY(14px) scale(.9)}to{opacity:1;transform:none}}
body.glt-refonte .glt-modal.active .glt-modal-container:has(.glt-modal-header-danger){
  animation:gltConfirmIn .28s cubic-bezier(.34,1.56,.64,1);
}
/* header rouge moderne + titre blanc gras */
body.glt-refonte .glt-modal-header-danger{
  background:linear-gradient(135deg,#ef4444,#dc2626) !important;
  padding:20px 24px !important;border-bottom:none !important;
}
body.glt-refonte .glt-modal-header-danger h2{color:#fff !important;font-weight:800 !important;font-size:18px !important}
body.glt-refonte .glt-modal-header-danger .glt-modal-close{color:#fff !important;opacity:.92}
body.glt-refonte .glt-modal-header-danger .glt-modal-close:hover{opacity:1;background:rgba(255,255,255,.18) !important}
/* corps aéré */
body.glt-refonte .glt-modal-container:has(.glt-modal-header-danger) .glt-modal-body{padding:24px !important}
/* bouton ANNULER (= .glt-modal-close du footer) : neutre, PAS rouge. Seul Supprimer reste rouge. */
/* Bouton ANNULER / FERMER du footer = TOUJOURS neutre (jamais rouge), quel que soit le header */
body.glt-refonte .glt-modal-footer button.glt-modal-close,
body.glt-refonte .glt-modal-footer button.glt-modal-cancel,
body.glt-refonte .glt-modal-footer a.glt-modal-close,
body.glt-refonte .glt-confirm-actions button.glt-modal-close,
body.glt-refonte .glt-confirm-actions button.glt-modal-cancel,
body.glt-refonte .glt-confirm-actions a.glt-modal-close{
  background:#fff !important;
  color:#475569 !important;
  border:1.5px solid rgba(20,40,80,.18) !important;
}
body.glt-refonte .glt-modal-footer button.glt-modal-close:hover,
body.glt-refonte .glt-modal-footer button.glt-modal-cancel:hover,
body.glt-refonte .glt-modal-footer a.glt-modal-close:hover,
body.glt-refonte .glt-confirm-actions button.glt-modal-close:hover,
body.glt-refonte .glt-confirm-actions button.glt-modal-cancel:hover,
body.glt-refonte .glt-confirm-actions a.glt-modal-close:hover{
  background:#f1f5f9 !important;border-color:rgba(20,40,80,.32) !important;color:#0f172a !important;
}

/* ============================================================
   PHASE 6b — Toutes les autres modales (même langage v2)
   Uniquement du visuel sûr (coins/ombre/anim/header) — la neutralisation
   flou/transparence/z-index/clics reste en place.
   ============================================================ */
body.glt-refonte .glt-modal-container,
body.glt-refonte .glt-modal-content{
  border-radius:20px !important;
  box-shadow:0 26px 70px rgba(10,20,45,.3) !important;
  overflow:hidden !important;
}
body.glt-refonte .glt-modal.active .glt-modal-container,
body.glt-refonte .glt-modal.active .glt-modal-content{animation:gltConfirmIn .26s cubic-bezier(.22,1,.36,1)}
/* header bleu « gradient » : titre blanc net */
body.glt-refonte .glt-modal-header-gradient h2{color:#fff !important;font-weight:800 !important}
/* header neutre (blanc) : teinte de marque douce.
   SANS !important : un fond foncé posé en INLINE (ex. #glt-modal-view-validation) garde
   sa couleur → son texte blanc reste lisible ; seuls les vrais headers blancs sont teintés. */
body.glt-refonte .glt-modal-header:not(.glt-modal-header-danger):not(.glt-modal-header-gradient):not(.glt-modal-header-remind){
  background:linear-gradient(135deg, var(--charte-pale), #fff);
  border-bottom:1px solid rgba(20,40,80,.08);
}
/* bouton fermer (X) : carré arrondi, pivote au survol (sauf header rouge déjà géré) */
body.glt-refonte .glt-modal-header .glt-modal-close:not(.glt-btn){border-radius:9px !important;transition:background .15s ease, transform .2s ease !important}
body.glt-refonte .glt-modal-header:not(.glt-modal-header-danger):not(.glt-modal-header-gradient) .glt-modal-close:not(.glt-btn):hover{background:rgba(120,130,150,.15) !important;transform:rotate(90deg)}

/* ============================================================
   PHASE 7 — Système "modern" (Réponse Direction, Actions, etc.)
   ============================================================ */
/* header premium : mesh sur la couleur de marque + halo + coin doux */
body.glt-refonte .glt-modern-header{
  border-radius:0 0 28px 28px !important;
  box-shadow:0 18px 44px rgba(20,40,80,.22) !important;
  position:relative;
  /* PAS d'overflow:hidden : il coupait des boutons en haut du header (ex. "Créer un snapshot" DUERP).
     Le dégradé reste clippé par border-radius de toute façon. */
}
body.glt-refonte .glt-modern-header.direction-theme,
body.glt-refonte .glt-modern-header.actions-theme{
  background:
    radial-gradient(120% 140% at 8% -20%, rgba(var(--charte-bleu-clair-rgb),.5), transparent 55%),
    radial-gradient(90% 120% at 100% 0%, rgba(var(--charte-ciel-rgb),.28), transparent 55%),
    linear-gradient(135deg, var(--glt-primary), var(--glt-primary-light)) !important;
}
body.glt-refonte .glt-modern-header-icon{background:rgba(255,255,255,.22) !important;box-shadow:0 6px 18px rgba(0,0,0,.18)}
/* tuiles stat dans le header : verre net + hover */
body.glt-refonte .glt-modern-stat{background:rgba(255,255,255,.16) !important;border:1px solid rgba(255,255,255,.18) !important;border-radius:16px !important;transition:transform .18s ease}
body.glt-refonte .glt-modern-stat:hover{transform:translateY(-2px)}
/* cartes "modern" : verre + soulèvement au survol */
body.glt-refonte .glt-modern-card{
  background:rgba(255,255,255,.72) !important;
  -webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);
  border:1px solid rgba(255,255,255,.7) !important;
  border-radius:18px !important;
  box-shadow:0 10px 30px rgba(20,40,80,.08) !important;
  transition:transform .2s ease, box-shadow .2s ease !important;
}
body.glt-refonte .glt-modern-card:hover{transform:translateY(-3px);box-shadow:0 20px 46px rgba(20,40,80,.14) !important}
/* barre de filtres + pills + recherche cohérents v2 */
body.glt-refonte .glt-modern-filters{background:rgba(255,255,255,.6) !important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid rgba(255,255,255,.6) !important}
body.glt-refonte .glt-modern-filter.active,
body.glt-refonte .glt-modern-btn.primary{background:linear-gradient(135deg,var(--glt-primary),var(--glt-primary-light)) !important}
body.glt-refonte .glt-modern-search-input{border-radius:12px !important}
body.glt-refonte .glt-modern-search-input:focus{border-color:var(--glt-primary) !important;box-shadow:0 0 0 3px rgba(var(--glt-primary-rgb),.18) !important}

/* ============================================================
   MODE SOMBRE — adapter les éléments v2 (fonds clairs → foncés)
   ============================================================ */
html[data-theme="dark"] body.glt-refonte .glt-header-search,
html[data-theme="dark"] body.glt-refonte .glt-year-selector{background:rgba(255,255,255,.07) !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] body.glt-refonte .glt-header-search input{color:#e8eef7 !important}
html[data-theme="dark"] body.glt-refonte .glt-stat-card,
html[data-theme="dark"] body.glt-refonte .glt-modern-card,
html[data-theme="dark"] body.glt-refonte .glt-messaging-container{background:rgba(22,32,52,.62) !important;border-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] body.glt-refonte .glt-message-input-area{background:rgba(22,32,52,.72) !important;border-top-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] body.glt-refonte .glt-message-bubble.glt-message-received{background:rgba(42,54,78,.92) !important;border-color:rgba(255,255,255,.08) !important;color:#e8eef7 !important}
html[data-theme="dark"] body.glt-refonte .glt-field input,
html[data-theme="dark"] body.glt-refonte .glt-field select,
html[data-theme="dark"] body.glt-refonte .glt-field textarea,
html[data-theme="dark"] body.glt-refonte .glt-search-box input,
html[data-theme="dark"] body.glt-refonte .glt-filters select{background:rgba(255,255,255,.06) !important;border-color:rgba(255,255,255,.12) !important;color:#e8eef7 !important}
/* modales en sombre : ne PAS forcer le blanc */
html[data-theme="dark"] body.glt-refonte .glt-modal-content,
html[data-theme="dark"] body.glt-refonte .glt-modal-container,
html[data-theme="dark"] body.glt-refonte .glt-modal .glt-card{background:#141c2e !important}
html[data-theme="dark"] body.glt-refonte .glt-table th{background:rgba(255,255,255,.04) !important}
html[data-theme="dark"] body.glt-refonte .glt-table tbody tr:hover{background:rgba(255,255,255,.04) !important}
/* texte foncé posé en INLINE dans les cellules (nom du local #0f172a, type #64748b) → lisible en sombre */
html[data-theme="dark"] body.glt-refonte .glt-table td strong,
html[data-theme="dark"] body.glt-refonte .glt-table td [style*="color:#0f172a"],
html[data-theme="dark"] body.glt-refonte .glt-table td [style*="color: #0f172a"]{color:#e8eef7 !important}
html[data-theme="dark"] body.glt-refonte .glt-table td [style*="64748b"]{color:#9aa7bd !important}
/* Messagerie : panneaux internes en sombre + texte lisible */
html[data-theme="dark"] body.glt-refonte .glt-conversations-list{background:rgba(15,22,38,.55) !important;border-color:rgba(255,255,255,.06) !important}
html[data-theme="dark"] body.glt-refonte .glt-conversation-view,
html[data-theme="dark"] body.glt-refonte .glt-conversation-placeholder,
html[data-theme="dark"] body.glt-refonte .glt-conversations-header,
html[data-theme="dark"] body.glt-refonte .glt-conversation-active,
html[data-theme="dark"] body.glt-refonte .glt-messages-container,
html[data-theme="dark"] body.glt-refonte .glt-conversation-header{background:transparent !important}
html[data-theme="dark"] body.glt-refonte .glt-conversation-header{border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] body.glt-refonte .glt-conversation-user-name,
html[data-theme="dark"] body.glt-refonte #glt-conversation-user-name{color:#e8eef7 !important}
html[data-theme="dark"] body.glt-refonte .glt-conversation-item:hover{background:rgba(255,255,255,.05) !important}
/* Filtres "modern" en sombre */
html[data-theme="dark"] body.glt-refonte .glt-modern-filters{background:rgba(22,32,52,.6) !important;border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] body.glt-refonte .glt-modern-filter:not(.active){background:rgba(255,255,255,.06) !important;color:#cbd5e1 !important}
/* Cascade (territoire/agence/secteur) en sombre */
html[data-theme="dark"] body.glt-refonte .glt-cf-step{background:rgba(22,32,52,.55) !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] body.glt-refonte .glt-cf-step.glt-cf-inactive{background:rgba(255,255,255,.03) !important}
html[data-theme="dark"] body.glt-refonte .glt-cf-case{background:rgba(255,255,255,.05) !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] body.glt-refonte .glt-cf-breadcrumb{background:rgba(255,255,255,.05) !important}
html[data-theme="dark"] body.glt-refonte .glt-cf-case-title,
html[data-theme="dark"] body.glt-refonte .glt-cf-title{color:#e8eef7 !important}
/* Tuiles Accueil en sombre */
html[data-theme="dark"] body.glt-refonte .glt-acc-qtile{background:rgba(22,32,52,.6) !important;border-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] body.glt-refonte .glt-acc-tile{background:rgba(255,255,255,.05) !important;border-color:rgba(255,255,255,.08) !important}
/* Bloc gestion locaux (territoire/agence/secteur headers) lisibles */
html[data-theme="dark"] body.glt-refonte .glt-territoire-header,
html[data-theme="dark"] body.glt-refonte .glt-agence-header,
html[data-theme="dark"] body.glt-refonte .glt-secteur-header{color:#cbd5e1 !important}
/* Contraste texte : labels KPI/stat lisibles */
html[data-theme="dark"] body.glt-refonte .glt-stat-label,
html[data-theme="dark"] body.glt-refonte .glt-modern-stat-label{color:rgba(255,255,255,.72) !important}
/* Boîtes "comparaison annuelle" (champs blancs) en sombre */
html[data-theme="dark"] body.glt-refonte .glt-comparison-stat,
html[data-theme="dark"] body.glt-refonte .glt-year-compare-item,
html[data-theme="dark"] body.glt-refonte .glt-modern-card .glt-modern-card-info-item{background:rgba(255,255,255,.05) !important;color:#e8eef7 !important}
/* Surfaces claires restantes (toutes pages) → sombres */
html[data-theme="dark"] body.glt-refonte .glt-table-wrapper,
html[data-theme="dark"] body.glt-refonte .glt-table-container,
html[data-theme="dark"] body.glt-refonte .glt-toolbar,
html[data-theme="dark"] body.glt-refonte .glt-search-box,
html[data-theme="dark"] body.glt-refonte .glt-modern-pill,
html[data-theme="dark"] body.glt-refonte .glt-modern-pills,
html[data-theme="dark"] body.glt-refonte .glt-modern-empty,
html[data-theme="dark"] body.glt-refonte .glt-modern-list{background:rgba(22,32,52,.45) !important;border-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] body.glt-refonte .glt-search-box input,
html[data-theme="dark"] body.glt-refonte .glt-modern-search-input,
html[data-theme="dark"] body.glt-refonte .glt-modern-select{background:rgba(255,255,255,.06) !important;color:#e8eef7 !important;border-color:rgba(255,255,255,.12) !important}
/* info-box (bandeau bleu clair) → sombre lisible */
html[data-theme="dark"] body.glt-refonte .glt-info-box{background:rgba(var(--charte-vif-sombre-rgb),.12) !important;border-color:rgba(var(--charte-vif-sombre-rgb),.3) !important}
/* sécurité : titres de cartes refonte lisibles en sombre */
html[data-theme="dark"] body.glt-refonte .glt-card-header h3,
html[data-theme="dark"] body.glt-refonte .glt-acc-card-title,
html[data-theme="dark"] body.glt-refonte .glt-modern-card-title{color:#e8eef7 !important}

/* ============================================================
   PHASE 12 — Correctifs audit 2026-06-21 (dark mode lisibilite)
   ============================================================ */
/* rank 5 : modale de confirmation lisible en dark (texte trop sombre sur fond sombre) */
html[data-theme="dark"] body.glt-refonte .glt-modal-container.glt-modal-confirm .glt-confirm-message{color:#cbd5e1 !important}
html[data-theme="dark"] body.glt-refonte .glt-modal-container.glt-modal-confirm .glt-confirm-detail{color:#94a3b8 !important}
html[data-theme="dark"] body.glt-refonte .glt-modal-container.glt-modal-confirm h2{color:#f1f5f9 !important}
/* rank 16 : boutons view/edit contrôles en dark (plus de pastilles blanches sur fond sombre) */
html[data-theme="dark"] body.glt-refonte .glt-view-controle-btn,
html[data-theme="dark"] body.glt-refonte .glt-edit-controle-btn{
  background:#161f33 !important;
  border-color:rgba(255,255,255,.14) !important;
  color:#cbd5e1 !important;
}
html[data-theme="dark"] body.glt-refonte .glt-view-controle-btn:hover,
html[data-theme="dark"] body.glt-refonte .glt-edit-controle-btn:hover{
  background:#1e2b45 !important;border-color:var(--charte-vif-sombre) !important;color:var(--charte-sur-sombre) !important;
}

/* ============================================================
   PHASE 13 — Prévisionnel / Planning (calendrier + onglets)
   ============================================================ */
/* onglets sous-section : actif plus net */
body.glt-refonte .glt-prev-tab{border-radius:10px}
body.glt-refonte .glt-prev-tab.active{background:#fff;color:var(--glt-primary);box-shadow:0 4px 14px rgba(20,40,80,.10)}
/* en-têtes jours */
body.glt-refonte .glt-cal-head{text-transform:uppercase;letter-spacing:.04em;font-weight:700}
/* jours : coins plus doux, survol qui lève */
body.glt-refonte .glt-cal-day{border-radius:10px;font-weight:600}
body.glt-refonte .glt-cal-day:hover{background:rgba(var(--glt-primary-rgb),.08);transform:translateY(-1px)}
/* aujourd'hui = anneau + teinte (les pastilles d'événements restent visibles) */
body.glt-refonte .glt-cal-day.today{
  background:rgba(var(--glt-primary-rgb),.14) !important;
  box-shadow:inset 0 0 0 1.5px var(--glt-primary);
  color:var(--glt-primary) !important;font-weight:800;
}
/* dark mode */
html[data-theme="dark"] body.glt-refonte .glt-prev-tab.active{background:#1e2b45;color:var(--charte-sur-sombre)}
html[data-theme="dark"] body.glt-refonte .glt-cal-day:hover{background:rgba(var(--charte-sur-sombre-rgb),.14)}
html[data-theme="dark"] body.glt-refonte .glt-cal-head{color:#7e8aa0}

/* ============================================================
   PHASE 14 — Boutons d'action des cartes Planning (Visites/Réunions)
   = carrés 34×34 sublimes, homogènes avec Contrôles/Actions
   ============================================================ */
body.glt-refonte .glt-plan-actions .glt-btn{
  width:34px !important;height:34px !important;min-width:34px !important;padding:0 !important;
  border-radius:10px !important;
  display:inline-flex !important;align-items:center;justify-content:center;
  transition:transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, border-color .2s, color .2s !important;
}
body.glt-refonte .glt-plan-actions .glt-btn .dashicons{font-size:17px !important;width:17px !important;height:17px !important;line-height:1}
body.glt-refonte .glt-plan-actions .glt-btn:hover{transform:translateY(-2px)}
/* Valider = vert plein */
body.glt-refonte .glt-plan-actions .glt-btn-success{
  background:linear-gradient(135deg,#22c55e,#15803d) !important;border:none !important;color:#fff !important;
  box-shadow:0 2px 8px rgba(34,197,94,.3) !important;
}
body.glt-refonte .glt-plan-actions .glt-btn-success:hover{box-shadow:0 8px 20px rgba(34,197,94,.45) !important}
/* Notifier = bleu contour */
body.glt-refonte .glt-plan-actions .glt-btn-outline-primary{
  background:#fff !important;border:1.5px solid rgba(var(--charte-bleu-clair-rgb),.4) !important;color:var(--charte-bleu-2) !important;
}
body.glt-refonte .glt-plan-actions .glt-btn-outline-primary:hover{
  background:var(--charte-bleu-2) !important;border-color:var(--charte-bleu-2) !important;color:#fff !important;box-shadow:0 8px 20px rgba(var(--charte-bleu-clair-rgb),.35) !important;
}
/* Modifier = neutre contour */
body.glt-refonte .glt-plan-actions .glt-btn-outline:not(.glt-btn-outline-primary):not(.glt-btn-outline-danger){
  background:#fff !important;border:1.5px solid rgba(20,40,80,.16) !important;color:#475569 !important;
}
body.glt-refonte .glt-plan-actions .glt-btn-outline:not(.glt-btn-outline-primary):not(.glt-btn-outline-danger):hover{
  background:var(--charte-pale) !important;border-color:var(--charte-bleu-clair) !important;color:var(--charte-bleu-2) !important;box-shadow:0 8px 20px rgba(var(--charte-bleu-clair-rgb),.22) !important;
}
/* Supprimer = rouge pastille -> plein + icône qui pivote */
body.glt-refonte .glt-plan-actions .glt-btn-outline-danger{
  background:rgba(var(--glt-danger-rgb),.1) !important;
  border:1.5px solid rgba(var(--glt-danger-rgb),.38) !important;color:var(--glt-danger) !important;
}
body.glt-refonte .glt-plan-actions .glt-btn-outline-danger:hover{
  background:var(--glt-danger) !important;border-color:var(--glt-danger) !important;color:#fff !important;
  transform:translateY(-2px) scale(1.08);box-shadow:0 8px 22px rgba(var(--glt-danger-rgb),.45) !important;
}
body.glt-refonte .glt-plan-actions .glt-btn-outline-danger:hover .dashicons{transform:rotate(-10deg)}
/* dark mode : contours sur fond sombre */
html[data-theme="dark"] body.glt-refonte .glt-plan-actions .glt-btn-outline-primary,
html[data-theme="dark"] body.glt-refonte .glt-plan-actions .glt-btn-outline:not(.glt-btn-outline-primary):not(.glt-btn-outline-danger){
  background:#161f33 !important;border-color:rgba(255,255,255,.14) !important;color:#cbd5e1 !important;
}

/* ============================================================
   PHASE 14b — Cartes Planning : le contenu remplit la hauteur
   (le badge date descend jusqu'en bas, plus de bande blanche)
   ============================================================ */
body.glt-refonte #glt-visites-list .glt-card,
body.glt-refonte #glt-reunions-list .glt-card{display:flex;flex-direction:column}
body.glt-refonte #glt-visites-list .glt-card > div,
body.glt-refonte #glt-reunions-list .glt-card > div{flex:1 1 auto}

/* ============================================================
   PHASE 15 — Modale HI-TECH de suppression visite (.glt-modal DOM-residente)
   Opaque (pas de verre), icône corbeille à anneau pulsant, barre d'accent animée
   ============================================================ */
@keyframes gltHtBar{0%{background-position:0% 0}100%{background-position:200% 0}}
@keyframes gltHtRing{0%{box-shadow:0 0 0 0 rgba(239,68,68,.45)}70%{box-shadow:0 0 0 18px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}
body.glt-refonte #glt-modal-hitech-delete .glt-modal-container.glt-htd-box{
  max-width:430px !important;text-align:center !important;padding:0 !important;overflow:hidden !important;border-radius:22px !important;
}
body.glt-refonte #glt-modal-hitech-delete .glt-htd-bar{
  height:5px;background:linear-gradient(90deg,#ef4444,#f97316,#ef4444);background-size:200% 100%;animation:gltHtBar 3s linear infinite;
}
body.glt-refonte #glt-modal-hitech-delete .glt-htd-icon{
  width:72px;height:72px;margin:30px auto 16px;border-radius:50%;
  background:linear-gradient(135deg,#ef4444,#dc2626);display:flex;align-items:center;justify-content:center;
  animation:gltHtRing 1.9s ease-out infinite;
}
body.glt-refonte #glt-modal-hitech-delete .glt-htd-icon .dashicons{color:#fff !important;font-size:34px;width:34px;height:34px}
body.glt-refonte #glt-modal-hitech-delete h2{font-size:20px;font-weight:800;color:#0f172a;margin:0 0 8px;padding:0 28px;text-align:center}
body.glt-refonte #glt-modal-hitech-delete p{font-size:14px;color:#64748b;margin:0 0 24px;padding:0 28px;line-height:1.5;text-align:center}
body.glt-refonte #glt-modal-hitech-delete .glt-htd-actions{display:flex;gap:12px;padding:0 28px 28px}
body.glt-refonte #glt-modal-hitech-delete .glt-htd-actions .glt-btn{flex:1;padding:12px !important;border-radius:12px !important;font-weight:700 !important;justify-content:center}
body.glt-refonte #glt-modal-hitech-delete .glt-htd-ok{background:linear-gradient(135deg,#ef4444,#dc2626) !important;color:#fff !important;border:none !important;box-shadow:0 6px 18px rgba(239,68,68,.35) !important}
body.glt-refonte #glt-modal-hitech-delete .glt-htd-ok:hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(239,68,68,.5) !important}
html[data-theme="dark"] body.glt-refonte #glt-modal-hitech-delete .glt-modal-container.glt-htd-box{background:#161f33 !important}
html[data-theme="dark"] body.glt-refonte #glt-modal-hitech-delete h2{color:#f1f5f9}
html[data-theme="dark"] body.glt-refonte #glt-modal-hitech-delete p{color:#94a3b8}

/* ============================================================
   PHASE 16 — Signalements (cartes + filtres)
   ============================================================ */
/* carte signalement = vraie carte v2 (fond plein, arrondi, ombre, lift) */
body.glt-refonte .glt-signal-card{
  background:#fff !important;border-radius:16px !important;overflow:hidden !important;
  box-shadow:0 10px 30px rgba(20,40,80,.14) !important;
  transition:transform .2s ease, box-shadow .2s ease !important;
}
body.glt-refonte .glt-signal-bubble{cursor:pointer}
body.glt-refonte .glt-signal-bubble:hover .glt-signal-card{transform:translateY(-3px);box-shadow:0 18px 44px rgba(20,40,80,.22) !important}
body.glt-refonte .glt-signal-head{padding:12px 16px !important;letter-spacing:.02em}
body.glt-refonte .glt-signal-urg-badge{background:rgba(255,255,255,.28) !important;padding:3px 11px;border-radius:20px;font-weight:800;font-size:11px}
body.glt-refonte .glt-signal-pb{font-size:15px !important}
/* filtres en pilules v2 */
body.glt-refonte .glt-signal-filter{border-width:1.5px !important;border-color:rgba(20,40,80,.12) !important;transition:all .18s ease !important}
body.glt-refonte .glt-signal-filter:hover{transform:translateY(-1px);border-color:rgba(20,40,80,.22) !important}
body.glt-refonte .glt-signal-filter.active{box-shadow:0 6px 18px rgba(20,40,80,.14)}
body.glt-refonte .glt-signal-filter-count{font-weight:800}
/* dark mode */
html[data-theme="dark"] body.glt-refonte .glt-signal-card{background:#161f33 !important}
html[data-theme="dark"] body.glt-refonte .glt-signal-pb{color:#e8eef7 !important}
html[data-theme="dark"] body.glt-refonte .glt-signal-filter{background:#161f33 !important;border-color:rgba(255,255,255,.12) !important;color:#cbd5e1 !important}

/* PHASE 16b — Modale « action corrective » ouverte depuis un signalement : AU-DESSUS
   (sinon même z-index 99999 que la modale signalement → elle passe derrière) */
body.glt-refonte #glt-modal-create-action-signalement{z-index:100010 !important}

/* PHASE 17 — Menu déroulant du compte (header) TOUJOURS au-dessus du contenu.
   Le header sticky est z-index:50, mais certaines cartes refonte ont un z-index
   supérieur (ex. sélecteur d'année à 200) → le dropdown passait derrière. */
body.glt-refonte .glt-header{z-index:500 !important}

/* PHASE 18 — Stats dark : en-têtes colorés (Top10 warning/success/danger) gardent un
   texte FONCÉ lisible sur leur fond pastel clair (sinon invisible en dark) */
html[data-theme="dark"] body.glt-refonte .glt-card-header-warning h3,
html[data-theme="dark"] body.glt-refonte .glt-card-header-warning h3 .dashicons{color:#92400e !important}
html[data-theme="dark"] body.glt-refonte .glt-card-header-success h3,
html[data-theme="dark"] body.glt-refonte .glt-card-header-success h3 .dashicons{color:#166534 !important}
html[data-theme="dark"] body.glt-refonte .glt-card-header-danger h3,
html[data-theme="dark"] body.glt-refonte .glt-card-header-danger h3 .dashicons{color:#991b1b !important}

/* PHASE 19 — Stats : « Année : » + liste déroulante sur la MÊME ligne que les boutons */
body.glt-refonte #glt-page-statistiques .glt-filter-group{flex-direction:row !important;align-items:center !important;gap:10px !important;min-width:0 !important}
body.glt-refonte #glt-page-statistiques .glt-filter-group label{white-space:nowrap;margin:0}

/* ============================================================
   PHASE 20 — Carte v2 + alignement filtres généralisé
   ============================================================ */
/* filtres « label : select » inline partout (toolbars stats, carte, etc.) */
body.glt-refonte .glt-toolbar .glt-filter-group{flex-direction:row !important;align-items:center !important;gap:10px !important;min-width:0 !important}
body.glt-refonte .glt-toolbar .glt-filter-group label{white-space:nowrap;margin:0}
/* conteneur carte : arrondi + ombre v2 */
body.glt-refonte #glt-page-carte #glt-map{border-radius:18px !important;overflow:hidden;box-shadow:0 16px 44px rgba(20,40,80,.14) !important}
/* contrôles/légende leaflet : carte verre */
body.glt-refonte #glt-page-carte .leaflet-control,
body.glt-refonte #glt-page-carte .glt-map-legend{border-radius:12px !important}

/* ============================================================
   PHASE 21 — Carte : popup soigné + dark mode panneau tournée
   ============================================================ */
/* popup Leaflet v2 (plus arrondi, ombré, propre) */
body.glt-refonte #glt-page-carte .leaflet-popup-content-wrapper{border-radius:16px !important;box-shadow:0 18px 46px rgba(15,31,57,.28) !important;padding:0 !important;overflow:hidden;border:1px solid rgba(20,40,80,.06)}
body.glt-refonte #glt-page-carte .leaflet-popup-content{margin:0 !important}
body.glt-refonte #glt-page-carte .glt-map-popup{padding:14px 15px 13px}
body.glt-refonte #glt-page-carte .glt-map-popup h4{font-size:14.5px;font-weight:800;color:#0f172a;line-height:1.25;margin:0}
body.glt-refonte #glt-page-carte .glt-map-popup-photo,
body.glt-refonte #glt-page-carte .glt-map-popup-photo-placeholder{border-radius:11px}
body.glt-refonte #glt-page-carte .glt-map-popup-score-bar{height:8px !important;border-radius:6px !important;background:#eef2f7 !important;overflow:hidden}
body.glt-refonte #glt-page-carte .glt-map-popup-score-bar-fill{border-radius:6px}
body.glt-refonte #glt-page-carte .glt-map-popup-actions{gap:8px}
body.glt-refonte #glt-page-carte .glt-map-popup .glt-btn{border-radius:10px !important}
/* dark : panneau « Configurer la tournée » — texte lisible (était foncé sur foncé) */
html[data-theme="dark"] body.glt-refonte #glt-tournee-config .glt-tournee-config-body,
html[data-theme="dark"] body.glt-refonte #glt-tournee-config .glt-tournee-config-body label,
html[data-theme="dark"] body.glt-refonte #glt-tournee-config .glt-radio-option span{color:#cbd5e1 !important}
html[data-theme="dark"] body.glt-refonte #glt-tournee-config .glt-input{background:#0f1626 !important;color:#e8eef7 !important;border-color:rgba(255,255,255,.14) !important}
html[data-theme="dark"] body.glt-refonte #glt-tournee-config .glt-input::placeholder{color:#7e8aa0 !important}

/* ============================================================
   PHASE 22 — Carte DARK MODE : popup / légende / badge en sombre
   (fini les fonds blancs + titre bleu illisible)
   ============================================================ */
html[data-theme="dark"] body.glt-refonte #glt-page-carte .leaflet-popup-content-wrapper{background:#161f33 !important;border-color:rgba(255,255,255,.10) !important}
html[data-theme="dark"] body.glt-refonte #glt-page-carte .leaflet-popup-tip{background:#161f33 !important;box-shadow:none !important}
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-popup h4,
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-popup-info h4{color:#e8eef7 !important}
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-popup-info p,
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-popup-date{color:#94a3b8 !important}
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-popup-score-bar{background:#0f1626 !important}
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-popup-photo-placeholder{background:#0f1626 !important;color:#7e8aa0 !important}
html[data-theme="dark"] body.glt-refonte #glt-page-carte .leaflet-popup-close-button{color:#94a3b8 !important}
/* légende + badge « locaux affichés » en sombre */
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-legend,
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-stats{background:#161f33 !important;border-color:rgba(255,255,255,.10) !important}
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-legend,
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-legend span,
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-stats,
html[data-theme="dark"] body.glt-refonte #glt-page-carte .glt-map-stats span{color:#cbd5e1 !important}

/* PHASE 23 — Carte dark : corps du panneau « Configurer la tournée » en SOMBRE
   (il restait blanc → mes labels clairs étaient invisibles dessus) */
html[data-theme="dark"] body.glt-refonte #glt-tournee-config,
html[data-theme="dark"] body.glt-refonte #glt-tournee-config .glt-tournee-config-body{background:#0f1626 !important}
html[data-theme="dark"] body.glt-refonte #glt-tournee-config .glt-radio-option{color:#cbd5e1 !important}

/* PHASE 24 — Carte dark : liste d'autocomplétion d'adresse en sombre (restait blanche) */
html[data-theme="dark"] body.glt-refonte .glt-autocomplete-results{background:#161f33 !important;border:1px solid rgba(255,255,255,.12) !important;box-shadow:0 16px 40px rgba(0,0,0,.5) !important}
html[data-theme="dark"] body.glt-refonte .glt-autocomplete-results .glt-autocomplete-item,
html[data-theme="dark"] body.glt-refonte .glt-autocomplete-results div,
html[data-theme="dark"] body.glt-refonte .glt-autocomplete-results span{color:#cbd5e1 !important}
html[data-theme="dark"] body.glt-refonte .glt-autocomplete-results .glt-autocomplete-item:hover,
html[data-theme="dark"] body.glt-refonte .glt-autocomplete-results .glt-autocomplete-item.active{background:#1e2b45 !important}

/* PHASE 25 — Carte dark : bannière de repositionnement (« Corriger la position ») en sombre */
html[data-theme="dark"] body.glt-refonte .glt-reposition-panel{background:#161f33 !important;border:1px solid rgba(255,255,255,.12) !important;box-shadow:0 16px 40px rgba(0,0,0,.5) !important}
html[data-theme="dark"] body.glt-refonte .glt-reposition-panel,
html[data-theme="dark"] body.glt-refonte .glt-reposition-panel span,
html[data-theme="dark"] body.glt-refonte .glt-reposition-panel strong{color:#e8eef7 !important}

/* PHASE 26 — A11y : amber lisible en dark (le #b45309 light serait trop sombre sur fond sombre) */
html[data-theme="dark"] body.glt-refonte .glt-at-deadline-soon,
html[data-theme="dark"] body.glt-refonte .glt-kc-soon,
html[data-theme="dark"] body.glt-refonte .glt-last-controle-pct.pct-warning{color:#fbbf24 !important}

/* ============================================================
   PHASE 27 — MOTION : boutons / icônes / listes déroulantes (app principale)
   ============================================================ */
@media (prefers-reduced-motion: no-preference){
  body.glt-refonte .glt-btn{transition:transform .16s cubic-bezier(.34,1.45,.55,1), box-shadow .22s ease, filter .2s ease, background-color .2s ease, border-color .2s ease}
  body.glt-refonte .glt-btn:hover:not(:disabled){transform:translateY(-2px);filter:brightness(1.07)}
  body.glt-refonte .glt-btn:active:not(:disabled){transform:translateY(0) scale(.96);filter:brightness(.97)}
  body.glt-refonte .glt-btn:disabled,body.glt-refonte .glt-btn[disabled]{transform:none !important;filter:none !important}
  body.glt-refonte .glt-btn .dashicons{transition:transform .18s cubic-bezier(.34,1.5,.5,1)}
  body.glt-refonte .glt-btn:hover:not(:disabled) .dashicons{transform:scale(1.15)}
  body.glt-refonte .glt-select,body.glt-refonte select{transition:border-color .16s ease, box-shadow .18s ease, background-color .2s ease}
  body.glt-refonte .glt-select:hover,body.glt-refonte select:hover{border-color:var(--glt-primary)}
  body.glt-refonte .glt-select:focus,body.glt-refonte select:focus{outline:none;box-shadow:0 0 0 3px rgba(var(--glt-primary-rgb),.22)}
}
