/* ==========================================================
   Nexoria Mobile — Console d'administration (design premium)
   ========================================================== */
:root{
  --ad-bg:#0d1013; --ad-bg2:#12161c;
  --ad-panel:#171b22; --ad-panel2:#1b212a; --ad-elev:#222932;
  --ad-line:#2a313b; --ad-line2:#373f4b;
  --ad-ink:#eef1f5; --ad-mut:#9aa3af; --ad-mut2:#6a7480;
  --ad-brand:#e8620f; --ad-brand2:#f5701f; --ad-brand3:#ff9d57;   /* accent ORANGE (comme la maquette) */
  --ad-ok:#2fa36b; --ad-warn:#d3a94e; --ad-bad:#dd6252;
  --ad-glow:rgba(245,112,31,.34);
  --ad-radius:14px;
}
*{ box-sizing:border-box; }
body.admin{ margin:0; font-family:"SF Pro Display","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,Arial,sans-serif; color:var(--ad-ink);
  background:
    radial-gradient(1200px 600px at 82% -8%, rgba(170,180,195,.10), transparent 60%),
    radial-gradient(900px 500px at -6% 108%, rgba(150,160,175,.08), transparent 55%),
    var(--ad-bg);
  -webkit-font-smoothing:antialiased; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; border:none; }
::selection{ background:rgba(245,112,31,.35); }
/* scrollbars */
*::-webkit-scrollbar{ width:10px; height:10px; }
*::-webkit-scrollbar-thumb{ background:#26333f; border-radius:8px; border:2px solid transparent; background-clip:content-box; }
*::-webkit-scrollbar-thumb:hover{ background:#42464b; background-clip:content-box; }

.demo-banner{ background:linear-gradient(90deg,#3a2c05,#2a2410); color:#e9d9a6; text-align:center; font-size:12px; font-weight:600; padding:6px 10px; letter-spacing:.2px; border-bottom:1px solid rgba(211,169,78,.25); }

/* ===================== LOGIN ===================== */
.ad-login{ min-height:100vh; display:grid; place-items:center; padding:24px; position:relative; }
.ad-login .box{ position:relative; background:linear-gradient(180deg,rgba(24,33,46,.92),rgba(18,25,35,.96));
  border:1px solid var(--ad-line2); border-radius:22px; padding:40px 38px 30px; width:100%; max-width:410px;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset; backdrop-filter:blur(8px); }
.ad-login-logo{ display:flex; justify-content:center; margin-bottom:24px; }
/* plaque claire pour le logo (fond du PNG clair) — rend premium sur le thème sombre */
.ad-logo-plate{ display:inline-flex; align-items:center; justify-content:center; background:linear-gradient(180deg,#ffffff,#eef1f6); border-radius:13px; padding:9px 15px; box-shadow:0 8px 22px -10px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.5) inset; }
.ad-logo-plate img{ height:26px; width:auto; display:block; }
.ad-logo-plate.lg{ padding:14px 22px; border-radius:16px; box-shadow:0 16px 40px -14px rgba(245,112,31,.5), 0 0 0 1px rgba(255,255,255,.55) inset; }
.ad-logo-plate.lg img{ height:38px; }
.ad-login h1{ font-size:21px; margin:0 0 5px; text-align:center; font-weight:800; letter-spacing:-.2px; }
.ad-login p.sub{ color:var(--ad-mut); font-size:13.5px; margin:0 0 24px; text-align:center; }
.ad-login .sec-note{ margin:20px 0 0; font-size:11.5px; line-height:1.6; text-align:left; background:rgba(255,255,255,.02); border:1px solid var(--ad-line); border-radius:10px; padding:11px 13px; }
.ad-login-foot{ position:absolute; bottom:22px; left:0; right:0; text-align:center; font-size:11.5px; color:var(--ad-mut2); }

/* ===================== FORM FIELDS ===================== */
.ad-field{ margin-bottom:15px; }
.ad-field label{ display:block; font-size:12px; color:var(--ad-mut); margin-bottom:6px; font-weight:600; }
.ad-field input,.ad-field select,.ad-field textarea{ width:100%; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:11px; padding:11px 13px; color:var(--ad-ink); font-family:inherit; font-size:14px; transition:border-color .14s, box-shadow .14s; }
.ad-field input::placeholder{ color:var(--ad-mut2); }
.ad-field input:focus,.ad-field select:focus,.ad-field textarea:focus{ outline:none; border-color:var(--ad-brand2); box-shadow:0 0 0 3px rgba(245,112,31,.16); }

/* ===================== BUTTONS ===================== */
.ad-btn{ background:linear-gradient(180deg,var(--ad-brand2),var(--ad-brand)); color:#fff; border-radius:11px; padding:11px 18px; font-weight:700; font-size:14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; transition:transform .1s, box-shadow .14s, filter .14s; box-shadow:0 6px 18px -6px var(--ad-glow); }
.ad-btn:hover{ filter:brightness(1.07); box-shadow:0 10px 26px -8px var(--ad-glow); }
.ad-btn:active{ transform:translateY(1px); }
.ad-btn.block{ width:100%; }
.ad-btn.ghost{ background:var(--ad-elev); border:1px solid var(--ad-line2); color:var(--ad-ink); box-shadow:none; }
.ad-btn.ghost:hover{ background:#22303f; filter:none; }
.ad-btn.sm{ padding:7px 12px; font-size:12.5px; border-radius:9px; }
.ad-btn.ok{ background:linear-gradient(180deg,#37b579,#2fa36b); }
.ad-btn.bad{ background:linear-gradient(180deg,#e5705f,#d8604f); }
.ad-err{ color:var(--ad-bad); font-size:13px; margin-top:10px; display:none; text-align:center; }

/* ===================== LAYOUT ===================== */
.ad-app{ display:grid; grid-template-columns:262px 1fr; min-height:100vh; }
.ad-side{ background:linear-gradient(180deg,var(--ad-panel2),var(--ad-panel)); border-right:1px solid var(--ad-line); padding:16px 14px 14px; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }

.ad-brand{ display:flex; flex-direction:column; align-items:flex-start; gap:11px; padding:4px 6px 16px; margin-bottom:12px; border-bottom:1px solid var(--ad-line); }
.ad-brand-sub{ font-weight:700; font-size:10px; color:var(--ad-mut); text-transform:uppercase; letter-spacing:1.2px; padding-left:3px; }

.ad-side-cta{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 4px 14px; padding:10px 13px;
  background:linear-gradient(120deg,rgba(232,98,15,.22),rgba(245,112,31,.10)); border:1px solid rgba(245,112,31,.28); border-radius:11px;
  font-weight:700; font-size:13px; color:#e1e3e4; transition:.14s; }
.ad-side-cta:hover{ background:linear-gradient(120deg,rgba(232,98,15,.34),rgba(245,112,31,.18)); border-color:var(--ad-brand2); }
.ad-side-cta span{ opacity:.7; font-size:12px; }

.ad-nav{ flex:1; overflow-y:auto; margin:0 -4px; padding:0 4px; }
.ad-navgrp{ font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.8px; color:var(--ad-mut2); padding:14px 12px 6px; }
.ad-navgrp:first-child{ padding-top:2px; }
.ad-nav a{ display:flex; align-items:center; gap:11px; padding:9px 12px; border-radius:10px; color:var(--ad-mut); font-weight:600; font-size:13.5px; margin-bottom:1px; position:relative; transition:background .12s, color .12s; }
.ad-nav a .ic{ font-size:15px; width:20px; text-align:center; flex-shrink:0; }
.ad-nav a .lbl{ flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ad-nav a .badge{ margin-left:auto; background:var(--ad-bad); color:#fff; font-size:10.5px; font-weight:800; border-radius:20px; padding:1px 7px; min-width:18px; text-align:center; }
.ad-nav a:hover{ background:rgba(255,255,255,.035); color:var(--ad-ink); }
.ad-nav a.active{ background:linear-gradient(120deg,var(--ad-brand),var(--ad-brand2)); color:#fff; box-shadow:0 8px 22px -10px var(--ad-glow); }
.ad-nav a.active .badge{ background:rgba(255,255,255,.25); }
.ad-nav a.active::before{ content:""; position:absolute; left:-4px; top:8px; bottom:8px; width:3px; border-radius:3px; background:var(--ad-brand3); box-shadow:0 0 10px var(--ad-brand3); }

.ad-userchip{ display:flex; align-items:center; gap:10px; margin-top:12px; padding:10px 11px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:12px; }
.ad-userchip .ava{ width:34px; height:34px; border-radius:9px; background:linear-gradient(135deg,var(--ad-brand2),var(--ad-brand)); display:grid; place-items:center; font-weight:800; font-size:15px; flex-shrink:0; }
.ad-userchip .ui{ display:flex; flex-direction:column; line-height:1.25; min-width:0; flex:1; }
.ad-userchip .un{ font-weight:700; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ad-userchip .ur{ font-size:11px; color:var(--ad-mut); }
.ad-userchip #ad-logout{ background:var(--ad-elev); color:var(--ad-mut); width:32px; height:32px; border-radius:9px; font-size:15px; display:grid; place-items:center; transition:.12s; }
.ad-userchip #ad-logout:hover{ background:rgba(221,98,82,.16); color:var(--ad-bad); }

/* ===================== MAIN ===================== */
.ad-main{ padding:30px 34px; overflow:auto; min-width:0; }
.ad-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; gap:16px; flex-wrap:wrap; }
.ad-head h1{ font-size:25px; margin:0; font-weight:800; letter-spacing:-.4px; }
.ad-head .who{ font-size:13px; color:var(--ad-mut); }

/* ===================== KPIs ===================== */
.kpis{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:26px; }
.kpi{ position:relative; background:linear-gradient(160deg,var(--ad-panel2),var(--ad-panel)); border:1px solid var(--ad-line); border-radius:16px; padding:18px 20px; overflow:hidden; transition:border-color .14s, transform .14s; }
.kpi::after{ content:""; position:absolute; inset:0 0 auto auto; width:120px; height:120px; background:radial-gradient(circle at 100% 0,rgba(245,112,31,.16),transparent 70%); pointer-events:none; }
.kpi:hover{ border-color:var(--ad-line2); transform:translateY(-2px); }
.kpi .v{ font-size:29px; font-weight:800; letter-spacing:-.6px; }
.kpi .l{ color:var(--ad-mut); font-size:12.5px; margin-top:3px; font-weight:500; }
.kpi .ic{ float:right; color:var(--ad-brand3); font-size:20px; opacity:.9; }

/* ===================== PANELS / TABLES ===================== */
.panel{ background:linear-gradient(180deg,var(--ad-panel2),var(--ad-panel)); border:1px solid var(--ad-line); border-radius:16px; overflow:hidden; box-shadow:0 20px 50px -40px rgba(0,0,0,.9); }
.panel h2{ font-size:15.5px; margin:0; padding:16px 20px; border-bottom:1px solid var(--ad-line); font-weight:700; }
.panel .m-body{ padding:20px; }
table.ad-table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.ad-table th{ text-align:left; color:var(--ad-mut); font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:.5px; padding:13px 18px; border-bottom:1px solid var(--ad-line); background:rgba(255,255,255,.015); }
.ad-table td{ padding:14px 18px; border-bottom:1px solid var(--ad-line); vertical-align:middle; }
.ad-table tr:last-child td{ border-bottom:none; }
.ad-table tbody tr{ transition:background .1s; }
.ad-table tbody tr:hover td{ background:rgba(255,255,255,.022); }

.tag{ display:inline-block; padding:3px 11px; border-radius:20px; font-size:11.5px; font-weight:700; letter-spacing:.2px; }
.tag.att{ background:rgba(211,169,78,.16); color:var(--ad-warn); }
.tag.prep{ background:rgba(245,112,31,.16); color:var(--ad-brand3); }
.tag.exp{ background:rgba(47,163,107,.16); color:var(--ad-ok); }
.tag.fin{ background:rgba(143,161,179,.14); color:var(--ad-mut); }
.tag.ok{ background:rgba(47,163,107,.16); color:var(--ad-ok); }
.tag.bad{ background:rgba(221,98,82,.16); color:var(--ad-bad); }
select.mini{ background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:8px; color:var(--ad-ink); padding:6px 9px; font-family:inherit; font-size:12.5px; }
.empty{ padding:48px; text-align:center; color:var(--ad-mut); }
.ov-stats{ display:grid; grid-template-columns:repeat(6,1fr); gap:10px; margin-top:16px; }
@media (max-width:900px){ .ov-stats{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:520px){ .ov-stats{ grid-template-columns:repeat(2,1fr); } }
.ov-stat{ background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:12px; padding:13px 14px; display:flex; flex-direction:column; gap:3px; }
.ov-stat .ov-n{ font-size:22px; font-weight:800; line-height:1; color:var(--ad-ink); }
.ov-stat .ov-l{ font-size:11.5px; font-weight:600; color:var(--ad-mut); }
.ov-stat.att{ border-color:rgba(211,169,78,.4); } .ov-stat.att .ov-n{ color:var(--ad-warn); }
.ov-stat.prep{ border-color:rgba(245,112,31,.4); } .ov-stat.prep .ov-n{ color:var(--ad-brand3); }
.ov-stat.exp{ border-color:rgba(47,163,107,.4); } .ov-stat.exp .ov-n{ color:var(--ad-ok); }
.ov-stat.done{ border-color:rgba(47,163,107,.5); background:rgba(47,163,107,.06); } .ov-stat.done .ov-n{ color:var(--ad-ok); }
.ov-stat.pre{ border-color:rgba(217,164,65,.5); } .ov-stat.pre .ov-n{ color:#d9a441; }
.ov-stat.prio{ border-color:rgba(210,60,60,.4); } .ov-stat.prio .ov-n{ color:#d84545; }
.row-actions{ display:flex; gap:6px; }
.toolbar{ display:flex; gap:10px; margin-bottom:18px; flex-wrap:wrap; }
.toolbar input,.toolbar select{ background:var(--ad-panel); border:1px solid var(--ad-line); border-radius:10px; padding:9px 13px; color:var(--ad-ink); font-family:inherit; font-size:13.5px; }
.toolbar input:focus,.toolbar select:focus{ outline:none; border-color:var(--ad-brand2); }

/* ===================== MODAL ===================== */
.ad-overlay{ position:fixed; inset:0; background:rgba(6,10,15,.66); backdrop-filter:blur(3px); display:none; place-items:center; z-index:50; padding:20px; }
.ad-overlay.open{ display:grid; }
.ad-modal{ background:linear-gradient(180deg,var(--ad-panel2),var(--ad-panel)); border:1px solid var(--ad-line2); border-radius:18px; width:100%; max-width:560px; max-height:88vh; overflow:auto; box-shadow:0 50px 100px -40px rgba(0,0,0,.85); }
.ad-modal .m-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid var(--ad-line); position:sticky; top:0; background:var(--ad-panel2); z-index:1; }
.ad-modal .m-head h3{ margin:0; font-size:17px; font-weight:800; }
.ad-modal .m-head .x{ color:var(--ad-mut); font-size:24px; background:none; transition:.12s; }
.ad-modal .m-head .x:hover{ color:var(--ad-ink); }
.ad-modal .m-body{ padding:22px; }
.thread{ display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.msg{ padding:11px 14px; border-radius:12px; font-size:13.5px; max-width:85%; }
.msg.client{ background:var(--ad-bg2); border:1px solid var(--ad-line); align-self:flex-start; }
.msg.staff{ background:linear-gradient(120deg,rgba(232,98,15,.28),rgba(245,112,31,.16)); align-self:flex-end; }
.msg .meta{ font-size:11px; color:var(--ad-mut); margin-top:4px; }
.mono{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }

.notice{ background:rgba(211,169,78,.10); border:1px solid rgba(211,169,78,.28); border-radius:12px; padding:13px 16px; font-size:13px; color:#e6d8ac; margin-bottom:22px; line-height:1.55; }
.notice strong{ color:var(--ad-warn); }

@media (max-width:920px){
  .ad-app{ grid-template-columns:1fr; }
  .ad-side{ position:static; height:auto; }
  .ad-nav{ display:flex; flex-wrap:wrap; gap:4px; }
  .ad-navgrp{ width:100%; padding:8px 12px 2px; }
  .kpis{ grid-template-columns:1fr 1fr; }
  .ad-main{ padding:22px 18px; }
}

/* Toast de notification live (relais humain) */
.ad-toast{position:fixed;right:20px;bottom:20px;z-index:9999;max-width:340px;background:linear-gradient(135deg,#62696f,#80888f);color:#fff;
  padding:13px 16px;border-radius:12px;font-size:13.5px;font-weight:600;line-height:1.4;cursor:pointer;
  box-shadow:0 18px 44px -14px rgba(232,98,15,.75);opacity:0;transform:translateY(14px);transition:opacity .3s,transform .3s}
.ad-toast.show{opacity:1;transform:translateY(0)}
.ad-toast:hover{filter:brightness(1.06)}

/* ===== Module Assistant IA (grande fenêtre + historique) ===== */
.asst{display:flex;gap:16px;height:calc(100vh - 160px);min-height:440px}
.asst-side{width:250px;flex-shrink:0;display:flex;flex-direction:column;background:var(--ad-panel);border:1px solid var(--ad-line);border-radius:14px;padding:12px}
.asst-list{overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:5px;margin-top:4px}
.asst-item{position:relative;padding:9px 30px 9px 11px;border-radius:9px;cursor:pointer}
.asst-item:hover{background:rgba(255,255,255,.04)}
.asst-item.on{background:rgba(232,98,15,.20)}
.asst-item .ti{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ad-ink)}
.asst-item .dt{font-size:11px;color:var(--ad-mut);margin-top:2px}
.asst-del{position:absolute;right:5px;top:7px;background:transparent;border:0;cursor:pointer;opacity:.45;font-size:14px}
.asst-del:hover{opacity:1}
.asst-main{flex:1;display:flex;flex-direction:column;background:var(--ad-panel);border:1px solid var(--ad-line);border-radius:14px;overflow:hidden;min-width:0}
.asst-msgs{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:10px}
.asst-empty{margin:auto;text-align:center;color:var(--ad-mut);font-size:14px;line-height:1.6;max-width:440px}
.asst-msg{max-width:80%;padding:11px 14px;border-radius:14px;font-size:14px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.asst-msg.me{align-self:flex-end;background:linear-gradient(135deg,var(--ad-brand2),var(--ad-brand));color:#fff;border-bottom-right-radius:4px}
.asst-msg.ai{align-self:flex-start;background:var(--ad-elev);color:var(--ad-ink);border:1px solid var(--ad-line2);border-bottom-left-radius:4px}
.asst-in{display:flex;gap:10px;padding:12px;border-top:1px solid var(--ad-line)}
.asst-in textarea{flex:1;background:var(--ad-bg2);border:1px solid var(--ad-line);border-radius:10px;color:var(--ad-ink);padding:11px 13px;font:14px Manrope,sans-serif;resize:none}
.asst-in textarea:focus{outline:none;border-color:var(--ad-brand2)}
.nx-typing-d2::after{content:'';animation:nx-dots 1.3s steps(4,end) infinite}
@media(max-width:720px){.asst{flex-direction:column;height:auto}.asst-side{width:auto;max-height:210px}.asst-msgs{min-height:320px}}

/* ===== Page d'accueil / présentation ===== */
.home-hero { position:relative; overflow:hidden; display:flex; align-items:center; gap:28px; padding:36px; border-radius:20px; margin-bottom:24px; background:linear-gradient(120deg,#17263f 0%,#0f1826 62%); border:1px solid var(--ad-line); }
.home-hero::before { content:""; position:absolute; top:-45%; right:-8%; width:440px; height:440px; background:radial-gradient(circle, rgba(245,112,31,.38), transparent 65%); pointer-events:none; }
.hh-plate { width:106px; height:106px; border-radius:24px; background:#fff; display:grid; place-items:center; flex-shrink:0; box-shadow:0 18px 44px -14px rgba(0,0,0,.65); position:relative; z-index:1; }
.hh-plate img { width:74px; }
.hh-txt { position:relative; z-index:1; }
.hh-eyebrow { font:800 11px Manrope,sans-serif; letter-spacing:1.5px; color:var(--ad-brand3); display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.home-hero h1 { font-size:30px; margin:0 0 9px; color:#fff; letter-spacing:-.5px; }
.home-hero p { color:var(--ad-mut); font-size:15px; max-width:660px; margin:0; line-height:1.65; }
.home-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:28px; }
.hstat { display:flex; align-items:center; gap:15px; background:var(--ad-panel); border:1px solid var(--ad-line); border-radius:16px; padding:18px 20px; transition:transform .16s, border-color .16s; }
.hstat:hover { transform:translateY(-2px); border-color:var(--ad-brand); }
.hs-ic { width:46px; height:46px; border-radius:13px; background:rgba(245,112,31,.15); color:var(--ad-brand3); display:grid; place-items:center; flex-shrink:0; }
.hs-ic svg { width:23px; height:23px; }
.hs-v { font:800 22px Manrope,sans-serif; color:var(--ad-ink); line-height:1.1; }
.hs-l { font-size:12.5px; color:var(--ad-mut); margin-top:4px; }
.home-sec { font-size:16px; color:var(--ad-ink); margin:0 0 15px; font-weight:800; }
.home-quick { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.qcard { position:relative; text-align:left; background:var(--ad-panel); border:1px solid var(--ad-line); border-radius:16px; padding:22px; cursor:pointer; transition:transform .16s, border-color .16s, box-shadow .16s; color:var(--ad-ink); font-family:inherit; }
.qcard:hover { transform:translateY(-2px); border-color:var(--ad-brand); box-shadow:0 16px 34px -20px rgba(245,112,31,.9); }
.qc-t { font:800 15px Manrope,sans-serif; margin-bottom:5px; }
.qc-d { font-size:13px; color:var(--ad-mut); }
.qc-arr { position:absolute; top:20px; right:20px; color:var(--ad-brand3); font-size:19px; transition:transform .16s; }
.qcard:hover .qc-arr { transform:translateX(4px); }
@keyframes adIn { from{opacity:0; transform:translateY(15px)} to{opacity:1; transform:none} }
.home-hero,.home-stats,.home-sec,.home-quick { animation:adIn .5s cubic-bezier(.2,.7,.25,1) both; }
.home-stats{animation-delay:.08s} .home-sec{animation-delay:.15s} .home-quick{animation-delay:.22s}
@media(max-width:900px){ .home-stats{grid-template-columns:1fr 1fr} .home-quick{grid-template-columns:1fr 1fr} .home-hero{flex-direction:column;text-align:center} .hh-eyebrow{justify-content:center} }
@media(max-width:560px){ .home-stats,.home-quick{grid-template-columns:1fr} }

/* Icônes SVG du menu & boutons latéraux (remplacent les emojis) */
.ad-nav a .ic{ font-size:0; width:20px; height:20px; display:grid; place-items:center; flex-shrink:0; }
.ad-nav a .ic svg{ width:19px; height:19px; display:block; }
.ad-side-cta .cta-l{ opacity:1; display:flex; align-items:center; gap:9px; }
.ad-side-cta .cta-l svg{ width:17px; height:17px; flex-shrink:0; }
.ad-side-cta .cta-x{ opacity:.6; font-size:12px; }

/* ===== Carte d'action proposée par l'IA (Assistant) ===== */
.asst-action { align-self:flex-start; max-width:86%; background:rgba(211,169,78,.09); border:1px solid #4a4127; border-radius:14px; padding:13px 15px; margin-top:2px; }
.asst-action .aa-h { font:800 10.5px Manrope,sans-serif; letter-spacing:.6px; text-transform:uppercase; color:#d3a94e; margin-bottom:5px; }
.asst-action .aa-s { font-size:14px; color:var(--ad-ink); margin-bottom:11px; line-height:1.4; }
.asst-action .aa-btns { display:flex; gap:8px; }
.asst-action .aa-res { font-size:13px; color:var(--ad-ok); margin-top:9px; font-weight:600; }
.asst-action .aa-res.err { color:var(--ad-bad); }

/* ==========================================================
   CHARTE MÉTALLISÉE — remplace tout le bleu par graphite/argent
   (aligne l'admin sur le nouveau design premium du site)
   ========================================================== */
.ad-btn{ background:linear-gradient(180deg,#f5701f,#e8620f); box-shadow:0 8px 20px -8px rgba(245,112,31,.5); }
.ad-btn:hover{ filter:brightness(1.08); }
.ad-btn.ghost{ background:var(--ad-elev); border:1px solid var(--ad-line2); color:var(--ad-ink); box-shadow:none; }
.ad-btn.ghost:hover{ background:#262d37; filter:none; }
.ad-nav a.active{ background:linear-gradient(120deg,#f5701f,#e8620f); box-shadow:0 8px 22px -10px rgba(245,112,31,.55); }
.ad-nav a.active::before{ background:#ffb877; box-shadow:0 0 10px rgba(255,157,87,.7); }
.ad-side-cta{ background:linear-gradient(120deg,rgba(255,255,255,.07),rgba(255,255,255,.02)); border-color:var(--ad-line2); color:var(--ad-ink); }
.ad-side-cta:hover{ background:linear-gradient(120deg,rgba(245,112,31,.16),rgba(245,112,31,.05)); border-color:var(--ad-brand2); }
.kpi::after{ background:radial-gradient(circle at 100% 0,rgba(245,112,31,.14),transparent 70%); }
.kpi .ic,.hh-eyebrow,.qc-arr,.hs-ic svg{ color:var(--ad-brand3); }
.ad-userchip .ava{ background:linear-gradient(135deg,#f5701f,#e8620f) !important; }
.asst-msg.me,.msg.staff{ background:linear-gradient(135deg,#f5701f,#e8620f) !important; }
.tag.prep{ background:rgba(245,112,31,.15); color:var(--ad-brand3); }
.ad-toast{ background:linear-gradient(135deg,#3a434e,#242b33); box-shadow:0 18px 44px -14px rgba(0,0,0,.7); }
.home-hero{ background:linear-gradient(120deg,#20262f 0%,#12161d 62%); }
.home-hero::before{ background:radial-gradient(circle, rgba(180,190,205,.20), transparent 65%); }
.hs-ic{ background:rgba(180,190,205,.12); }
.asst-item.on{ background:rgba(255,255,255,.06); }
.msg.staff{ border:1px solid var(--ad-line2); }
/* typo : aligne les éléments en "Manrope" sur la typo du site */
.hs-v,.qc-t,.hh-eyebrow,.aa-h,.asst-in textarea,.ad-modal .m-head h3{ font-family:inherit !important; }
/* derniers résidus bleus : sélection + halo focus + scrollbar */
::selection{ background:rgba(160,170,185,.35); }
.ad-field input:focus,.ad-field select:focus,.ad-field textarea:focus{ box-shadow:0 0 0 3px rgba(150,160,175,.16); }
*::-webkit-scrollbar-thumb{ background:#2c333d; background-clip:content-box; }
*::-webkit-scrollbar-thumb:hover{ background:#3a434e; background-clip:content-box; }
/* Bleus définis en inline (JS) : bouton flottant + avatars */
.nx-fab-btn{ background:linear-gradient(135deg,#4a5560,#2b333d) !important; box-shadow:0 12px 30px -10px rgba(0,0,0,.6) !important; }
.av{ background:linear-gradient(135deg,#4a5560,#2b333d) !important; }

/* ===== Module Clients PRO ===== */
.pro-mgrid{ display:grid; grid-template-columns:1fr 1fr; gap:14px 22px; }
.pml{ font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--ad-mut); margin-bottom:3px; font-weight:700; }
.pro-mgrid > div > div:last-child{ font-size:14px; color:var(--ad-ink); }
.pro-hr{ border:none; border-top:1px solid var(--ad-line); margin:18px 0; }
.pro-statusbtns{ display:flex; gap:8px; flex-wrap:wrap; }
.pro-docsec{ margin-top:14px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:12px; padding:12px 14px; }
.pro-docmut{ color:var(--ad-mut); font-size:12.5px; margin:5px 0 0; line-height:1.5; }
@media(max-width:600px){ .pro-mgrid{ grid-template-columns:1fr; } }

/* ===== Remises PRO (config) ===== */
.pro-disc-head{ display:grid; grid-template-columns:1fr 130px; gap:12px; font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--ad-mut); font-weight:700; margin-bottom:9px; }
.pro-disc-row{ display:grid; grid-template-columns:1fr 130px; gap:12px; margin-bottom:8px; }
.pro-lv-grid{ display:flex; gap:14px; flex-wrap:wrap; }
.pro-lv-grid > div{ display:flex; flex-direction:column; gap:5px; }
.pro-lv-grid label{ font-size:11px; color:var(--ad-mut); font-weight:600; }
.pro-lv-grid input{ width:96px; }
input.mini{ background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:8px; color:var(--ad-ink); padding:8px 11px; font-family:inherit; font-size:13.5px; }
input.mini:focus{ outline:none; border-color:var(--ad-brand2); }
.pro-prod-row{ display:flex; gap:10px; align-items:center; margin-bottom:8px; }
.pro-prod-row .pct{ width:90px; }
textarea.mini{ background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:8px; color:var(--ad-ink); padding:8px 11px; font-family:inherit; font-size:13.5px; }
textarea.mini:focus{ outline:none; border-color:var(--ad-brand2); }
.pack-block{ border:1px solid var(--ad-line); border-radius:12px; padding:14px; margin-bottom:12px; background:var(--ad-bg2); }
.pack-block-top{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.pack-items-edit{ margin-top:6px; }
.pack-item-row{ display:flex; gap:8px; align-items:center; margin-bottom:6px; flex-wrap:wrap; }
.disc-msg{ margin-left:10px; font-size:13px; font-weight:600; }

/* Documents légaux PRO (admin) */
.pro-docs { display:flex; flex-direction:column; gap:9px; }
.pd-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:10px; flex-wrap:wrap; }
.pd-lbl { font-weight:600; font-size:13.5px; }
.pd-act { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }

/* ==========================================================
   Diagnostic & Sécurité
   ========================================================== */
.sec-top{ display:flex; align-items:center; gap:26px; flex-wrap:wrap; }
.sec-ring{ --sc:0; width:120px; height:120px; border-radius:50%; flex-shrink:0;
  background:conic-gradient(var(--col) calc(var(--sc)*1%), var(--ad-line) 0); display:grid; place-items:center; }
.sec-ring-in{ width:92px; height:92px; border-radius:50%; background:var(--ad-bg2); display:grid; place-items:center; text-align:center; line-height:1; }
.sec-ring-in b{ font-size:30px; color:var(--ad-ink); font-weight:800; }
.sec-ring-in span{ font-size:12px; color:var(--ad-mut); }
.sec-summary{ flex:1; min-width:240px; }
.sec-counts{ display:flex; gap:10px; flex-wrap:wrap; }
.sc-pill{ font-size:12.5px; font-weight:700; padding:5px 12px; border-radius:999px; }
.sc-pill.ok{ background:rgba(47,163,107,.16); color:#57c98c; }
.sc-pill.warn{ background:rgba(211,169,78,.16); color:#e0be6e; }
.sc-pill.fail{ background:rgba(221,98,82,.16); color:#f0897b; }
.sec-list{ display:flex; flex-direction:column; gap:2px; }
.sec-item{ display:flex; gap:13px; align-items:flex-start; padding:13px 6px; border-bottom:1px solid var(--ad-line); }
.sec-item:last-child{ border-bottom:0; }
.sec-badge{ width:26px; height:26px; border-radius:50%; display:grid; place-items:center; font-weight:800; font-size:14px; flex-shrink:0; }
.sec-badge.ok{ background:rgba(47,163,107,.18); color:#57c98c; }
.sec-badge.warn{ background:rgba(211,169,78,.18); color:#e0be6e; }
.sec-badge.fail{ background:rgba(221,98,82,.18); color:#f0897b; }
.sec-txt{ flex:1; }
.sec-lbl{ font-weight:700; color:var(--ad-ink); font-size:14.5px; display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.sec-tag{ font-size:11px; font-weight:700; padding:2px 8px; border-radius:6px; }
.sec-tag.ok{ background:rgba(47,163,107,.16); color:#57c98c; }
.sec-tag.warn{ background:rgba(211,169,78,.16); color:#e0be6e; }
.sec-tag.fail{ background:rgba(221,98,82,.16); color:#f0897b; }
.sec-detail{ font-size:13px; color:var(--ad-mut); margin-top:3px; line-height:1.5; }
.sec-fix{ font-size:12.5px; color:var(--ad-brand3); margin-top:5px; background:rgba(255,255,255,.03); border-left:2px solid var(--ad-brand2); padding:6px 10px; border-radius:6px; line-height:1.5; }
.sec-ai-box .sec-ai-out{ font-size:14px; line-height:1.7; color:var(--ad-ink); }

/* ==========================================================
   Console (terminal à commandes fixes)
   ========================================================== */
.term-quick{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.term-quick .ad-btn{ font-family:"SF Mono",ui-monospace,Menlo,Consolas,monospace; }
.term{ background:#0a0d11; border:1px solid var(--ad-line2); border-radius:14px; padding:14px 16px; height:52vh; min-height:300px; display:flex; flex-direction:column;
  font-family:"SF Mono",ui-monospace,Menlo,Consolas,monospace; font-size:13px; box-shadow:inset 0 0 0 1px rgba(255,255,255,.02); }
.term-out{ flex:1; overflow-y:auto; white-space:pre-wrap; word-break:break-word; line-height:1.55; }
.term-line{ color:#c9d3de; padding:1px 0; }
.term-line.muted{ color:#6a7480; }
.term-line.cmd{ color:#c1c5c8; }
.term-line.ok{ color:#bfe6cf; }
.term-line.err{ color:#f0897b; }
.term-in{ display:flex; align-items:center; gap:8px; border-top:1px solid var(--ad-line); padding-top:10px; margin-top:8px; }
.term-ps{ color:#57c98c; font-weight:700; flex-shrink:0; }
.term-in input{ flex:1; background:transparent; border:0; outline:none; color:#eef1f5; font-family:inherit; font-size:13px; }
.term-in input::placeholder{ color:#5a6470; }

/* ==========================================================
   Accueil — Vue d'ensemble (refonte pro)
   ========================================================== */
.co-band{ display:flex; align-items:center; gap:20px; background:linear-gradient(120deg,var(--ad-panel2),var(--ad-panel)); border:1px solid var(--ad-line); border-radius:16px; padding:20px 22px; margin-bottom:20px; }
.co-logo{ width:66px; height:66px; border-radius:14px; background:linear-gradient(180deg,#fff,#eef1f6); display:grid; place-items:center; flex-shrink:0; box-shadow:0 10px 26px -12px rgba(0,0,0,.6); }
.co-logo img{ width:46px; }
.co-id{ flex:1; min-width:0; }
.co-name{ font:800 20px "SF Pro Display",Inter,sans-serif; color:var(--ad-ink); display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.co-form{ font-size:12px; font-weight:700; color:var(--ad-brand3); background:rgba(255,255,255,.05); border:1px solid var(--ad-line2); padding:2px 9px; border-radius:6px; letter-spacing:.3px; }
.co-act{ font-size:13.5px; color:var(--ad-mut); margin-top:5px; line-height:1.5; }
.co-meta{ display:flex; gap:8px; flex-wrap:wrap; margin-top:11px; }
.co-chip{ font-size:12px; color:var(--ad-mut); background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:999px; padding:4px 11px; }
.co-chip b{ color:var(--ad-ink); font-weight:700; }
.co-side{ display:flex; flex-direction:column; gap:8px; flex-shrink:0; }

.kpi-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:22px; }
.kpi-tile{ position:relative; background:var(--ad-panel); border:1px solid var(--ad-line); border-radius:16px; padding:18px 18px 14px; overflow:hidden; transition:border-color .15s, transform .08s; }
.kpi-tile:hover{ border-color:var(--ad-line2); transform:translateY(-2px); }
.kpi-tile .kt-ic{ display:inline-grid; place-items:center; width:38px; height:38px; border-radius:11px; background:rgba(245,112,31,.14); color:var(--ad-brand3); margin-bottom:14px; }
.kpi-tile .kt-ic svg{ width:19px; height:19px; }
.kpi-tile .kt-v{ font:800 26px "SF Pro Display",Inter,sans-serif; color:var(--ad-ink); letter-spacing:-.5px; }
.kpi-tile .kt-l{ font-size:12.5px; color:var(--ad-mut); margin-top:3px; }
/* Badge de tendance (comme la maquette) */
.kpi-tile .kt-badge{ position:absolute; top:16px; right:16px; display:inline-flex; align-items:center; gap:3px;
  font-size:12px; font-weight:800; padding:4px 10px; border-radius:999px; letter-spacing:.2px; }
.kpi-tile .kt-badge.up{ color:#57d59a; background:rgba(47,163,107,.16); }
.kpi-tile .kt-badge.down{ color:#f0897b; background:rgba(221,98,82,.16); }

.home-cols{ display:grid; grid-template-columns:1fr 1.2fr; gap:16px; align-items:start; }
.todo-list{ display:flex; flex-direction:column; gap:8px; }
.todo-item{ display:flex; align-items:center; gap:12px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:11px; padding:13px 15px; color:var(--ad-ink); font-family:inherit; font-size:14px; text-align:left; transition:border-color .14s, transform .06s; }
.todo-item:hover{ border-color:var(--ad-brand2); }
.todo-item .td-dot{ width:9px; height:9px; border-radius:50%; background:var(--ad-warn); box-shadow:0 0 0 4px rgba(211,169,78,.14); flex-shrink:0; }
.todo-item .td-l{ flex:1; }
.todo-item .td-arr{ color:var(--ad-mut); }
.home-cols .home-quick{ grid-template-columns:1fr 1fr; }
.home-cols .qcard{ padding:16px 18px; }
@media(max-width:1000px){ .kpi-grid{ grid-template-columns:1fr 1fr; } .home-cols{ grid-template-columns:1fr; } .home-cols .home-quick{ grid-template-columns:1fr 1fr; } }
@media(max-width:560px){ .co-band{ flex-direction:column; align-items:flex-start; } .co-side{ flex-direction:row; } .kpi-grid{ grid-template-columns:1fr 1fr; } }

/* ==========================================================
   Zone dangereuse — Réinitialisation
   ========================================================== */
.danger-panel{ border-color:rgba(221,98,82,.4) !important; background:linear-gradient(180deg,rgba(221,98,82,.06),transparent) !important; }
.danger-panel h2{ color:#f0897b; }
.rz{ display:flex; flex-direction:column; gap:10px; }
.rz-warn{ background:rgba(221,98,82,.12); border:1px solid rgba(221,98,82,.4); color:#f0a99e; border-radius:10px; padding:11px 13px; font-size:13px; line-height:1.5; }
.rz-lbl{ font-size:12px; color:var(--ad-mut); font-weight:700; margin-top:4px; }
.rz-radio{ display:flex; gap:10px; align-items:flex-start; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:10px; padding:10px 12px; font-size:13px; color:var(--ad-ink); cursor:pointer; line-height:1.45; }
.rz-radio input{ margin-top:3px; }
.rz-radio u{ color:var(--ad-brand3); text-decoration:none; font-style:normal; }
.rz-counts{ font-size:12px; color:var(--ad-mut); background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:8px; padding:8px 11px; }
.rz-check{ display:flex; gap:9px; align-items:flex-start; font-size:13px; color:var(--ad-ink); cursor:pointer; line-height:1.45; }
.rz-check input{ margin-top:2px; }

/* Indicateur "en direct" (sidebar) */
.ad-live{ display:inline-flex; align-items:center; gap:6px; font-size:10px; font-weight:700; color:var(--ad-mut); letter-spacing:.3px; margin-top:6px; text-transform:uppercase; }
.ad-live .live-dot{ width:7px; height:7px; border-radius:50%; background:#2fa36b; box-shadow:0 0 0 0 rgba(47,163,107,.55); animation:live-pulse 2s infinite; }
@keyframes live-pulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(47,163,107,.5); } 50%{ box-shadow:0 0 0 5px rgba(47,163,107,0); } }
.ad-live.off{ color:var(--ad-mut); }
.ad-live.off .live-dot{ background:#7a828d; box-shadow:none; animation:none; }
.ad-live.warn{ color:#e0a63b; }
.ad-live.warn .live-dot{ background:#e0a63b; box-shadow:none; animation:none; }

/* ==========================================================
   Test du site
   ========================================================== */
.ts-top{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.ts-list{ display:flex; flex-direction:column; }
.ts-item{ display:flex; align-items:center; gap:12px; padding:10px 4px; border-bottom:1px solid var(--ad-line); }
.ts-item:last-child{ border-bottom:0; }
.ts-badge{ width:24px; height:24px; border-radius:50%; display:grid; place-items:center; font-weight:800; font-size:13px; flex-shrink:0; }
.ts-badge.wait{ background:var(--ad-bg2); color:var(--ad-mut2); }
.ts-badge.run{ background:rgba(139,149,163,.2); color:var(--ad-brand3); animation:live-pulse 1s infinite; }
.ts-badge.ok{ background:rgba(47,163,107,.18); color:#57c98c; }
.ts-badge.fail{ background:rgba(221,98,82,.18); color:#f0897b; }
.ts-txt{ flex:1; min-width:0; }
.ts-l{ font-size:14px; color:var(--ad-ink); font-family:"SF Mono",ui-monospace,Menlo,monospace; }
.ts-d{ font-size:12px; color:var(--ad-mut); margin-top:1px; }
.ts-ms{ font-size:11.5px; color:var(--ad-mut2); flex-shrink:0; }
.ts-summary{ display:flex; align-items:center; gap:16px; }
.ts-summary .ts-sum-v{ font:800 28px "SF Pro Display",Inter,sans-serif; }
.ts-summary.ok .ts-sum-v{ color:#57c98c; } .ts-summary.warn .ts-sum-v{ color:#e0be6e; } .ts-summary.fail .ts-sum-v{ color:#f0897b; }
.ts-summary .ts-sum-l{ color:var(--ad-mut); font-size:14px; }

/* Chat IA — onglets À traiter / Toutes */
.chat-tabs{ display:flex; gap:8px; margin-bottom:14px; }
.chat-tab{ background:var(--ad-bg2); border:1px solid var(--ad-line); color:var(--ad-mut); border-radius:11px; padding:9px 15px; font-weight:700; font-size:13.5px; display:inline-flex; align-items:center; gap:8px; }
.chat-tab:hover{ color:var(--ad-ink); border-color:var(--ad-line2); }
.chat-tab.active{ background:linear-gradient(120deg,var(--ad-brand),var(--ad-brand2)); color:#fff; border-color:transparent; }
.chat-tab .ct-n{ background:rgba(255,255,255,.14); border-radius:20px; padding:1px 8px; font-size:12px; min-width:20px; text-align:center; }
.chat-tab:not(.active) .ct-n{ background:var(--ad-elev); }
.ad-table tr.chat-hot td{ background:rgba(221,98,82,.06); }

/* ---- Détail commande + expédition Sendcloud ---- */
.od-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-bottom:14px; }
.od-block{ background:var(--ad-elev); border:1px solid var(--ad-line); border-radius:12px; padding:14px; }
.od-t{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--ad-mut); font-weight:700; margin-bottom:10px; }
.od-row{ display:flex; justify-content:space-between; gap:12px; font-size:13.5px; padding:3px 0; }
.od-row span{ color:var(--ad-mut); }
.od-row b{ text-align:right; }
.od-addr{ font-size:14px; line-height:1.5; }
.od-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* ---- Accueil : bloc « À faire aujourd'hui » (prioritaire, en grand) ---- */
.todo-hero{ background:linear-gradient(120deg,var(--ad-brand),var(--ad-brand2)); color:#fff; border-radius:16px; padding:20px 22px; margin-bottom:18px; box-shadow:0 18px 40px -22px rgba(0,0,0,.6); }
.todo-hero.clear{ background:linear-gradient(120deg,#1f7a44,#2fa15f); }
.todo-hero .th-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
.todo-hero .th-title{ font-size:19px; font-weight:800; letter-spacing:-.2px; }
.todo-hero .th-count{ background:rgba(255,255,255,.2); min-width:34px; height:34px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; font-size:18px; font-weight:800; padding:0 8px; }
.todo-hero .th-list{ display:flex; flex-direction:column; gap:9px; margin-top:12px; }
.todo-hero .th-item{ display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; text-align:left; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.18); color:#fff; border-radius:11px; padding:13px 16px; font-size:15px; font-weight:600; cursor:pointer; transition:background .15s, transform .06s; }
.todo-hero .th-item:hover{ background:rgba(255,255,255,.22); transform:translateX(2px); }
.todo-hero .th-arr{ font-size:13px; font-weight:700; opacity:.9; white-space:nowrap; }
.todo-hero .th-empty{ margin:8px 0 0; font-size:14.5px; color:rgba(255,255,255,.92); line-height:1.6; }

/* ---- Menu : groupe « Avancé » repliable ---- */
.ad-navgrp-btn{ display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; background:none; border:0; cursor:pointer; font-family:inherit; }
.ad-navgrp-btn:hover{ color:var(--ad-ink); }
.ad-navgrp-btn .grp-caret{ font-size:9px; opacity:.7; transition:transform .15s; }
.grp-items{ overflow:hidden; }
.grp-hidden{ display:none; }

/* ---- Avis clients (modération) ---- */
.rev-item { border: 1px solid var(--ad-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--ad-surface, transparent); }
.rev-item.rev-pending { border-left: 3px solid #d3a94e; }
.rev-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.rev-stars { color: #f2b01e; letter-spacing: 1px; font-size: 14px; }
.rev-meta { color: var(--ad-mut); font-size: 12px; }
.rev-text { margin: 6px 0 10px; font-size: 13.5px; color: var(--ad-ink); line-height: 1.5; }

/* ===== FAQ (admin) ===== */
.faqad-form { display: flex; flex-direction: column; gap: 10px; }
.faqad-form input, .faqad-form textarea, .faqad-catsel { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line, #e5e8ec); border-radius: 10px; background: #fff; color: inherit; }
.faqad-form textarea { resize: vertical; line-height: 1.5; }
.faqad-form .ad-btn { align-self: flex-start; }
.faqad-grp { margin-bottom: 16px; }
.faqad-grp-h { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ad-muted, #7c868f); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.faqad-count { background: var(--ad-soft, #eef0f3); color: var(--ad-ink, #232a33); font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.faqad-item { border: 1px solid var(--line, #e5e8ec); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--ad-bg, #fff); }
.faqad-item.faqad-off { opacity: .55; }
.faqad-q { width: 100%; font: inherit; font-weight: 600; padding: 9px 11px; border: 1px solid var(--line, #e5e8ec); border-radius: 9px; margin-bottom: 8px; background: #fff; }
.faqad-a { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line, #e5e8ec); border-radius: 9px; resize: vertical; line-height: 1.5; background: #fff; }
.faqad-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
.faqad-visible { font-size: 13px; color: var(--ad-ink-2, #4d5560); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.faqad-actions .faqad-catsel { width: auto; padding: 7px 10px; }
.faqad-empty { color: var(--ad-muted, #7c868f); font-size: 13.5px; margin: 0; }

/* ==========================================================================
   REFONTE 2026 — Nexoria Admin premium (clair par défaut + bascule sombre)
   • Thème CLAIR par défaut (nacré / chromé / bleu glacé) ; [data-theme="dark"]
     restaure le sombre. • Barre latérale ANTHRACITE dans les deux thèmes.
   • Glassmorphism léger, ombres douces, accents bleu glacé, typo Manrope.
   Tout est piloté par variables → cascade sur tous les composants existants.
   ========================================================================== */
:root{
  /* Clair — blanc nacré, chrome, reflets bleus glacés (logo Nexoria) */
  --ad-bg:#e9edf3; --ad-bg2:#f3f6fb;
  --ad-panel:#ffffff; --ad-panel2:#f8fafd; --ad-elev:#eef2f8;
  --ad-line:#e2e7ef; --ad-line2:#d2d9e4;
  --ad-ink:#131a22; --ad-mut:#5b6672; --ad-mut2:#939daa;
  --ad-brand:#e8620f; --ad-brand2:#f5701f; --ad-brand3:#ff9d57;
  --ad-ok:#1f9d63; --ad-warn:#c79420; --ad-bad:#dd6252;
  --ad-accent:#f5701f; --ad-accent2:#ff9d57; --ad-accent-ink:#e8620f;
  --ad-accent-soft:rgba(245,112,31,.12);
  --ad-glow:rgba(245,112,31,.30);
  --ad-hover:rgba(20,34,52,.05);
  --ad-shadow:0 20px 48px -26px rgba(31,58,92,.34);
  --ad-glass:rgba(255,255,255,.72);
  --ad-radius:16px;
}
:root[data-theme="dark"]{
  --ad-bg:#0d1013; --ad-bg2:#12161c;
  --ad-panel:#171b22; --ad-panel2:#1b212a; --ad-elev:#222932;
  --ad-line:#2a313b; --ad-line2:#373f4b;
  --ad-ink:#eef1f5; --ad-mut:#9aa3af; --ad-mut2:#6a7480;
  --ad-brand:#e8620f; --ad-brand2:#f5701f; --ad-brand3:#ffb877;
  --ad-ok:#2fa36b; --ad-warn:#d3a94e; --ad-bad:#dd6252;
  --ad-accent:#ff8a3d; --ad-accent2:#ffb877; --ad-accent-ink:#ff9d57;
  --ad-accent-soft:rgba(255,138,61,.15);
  --ad-glow:rgba(255,138,61,.30);
  --ad-hover:rgba(255,255,255,.05);
  --ad-shadow:0 26px 64px -30px rgba(0,0,0,.9);
  --ad-glass:rgba(22,27,34,.62);
}

body.admin{
  font-family:"Manrope","SF Pro Display","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,Arial,sans-serif;
  background:
    radial-gradient(1100px 560px at 85% -10%, var(--ad-accent-soft), transparent 60%),
    radial-gradient(880px 520px at -6% 108%, rgba(150,170,196,.14), transparent 55%),
    var(--ad-bg);
}
:root[data-theme="dark"] body.admin{
  background:
    radial-gradient(1100px 560px at 85% -10%, rgba(90,169,239,.10), transparent 60%),
    radial-gradient(880px 520px at -6% 108%, rgba(70,92,124,.12), transparent 55%),
    var(--ad-bg);
}
::selection{ background:var(--ad-accent-soft); }
*::-webkit-scrollbar-thumb{ background:var(--ad-line2); background-clip:content-box; border-radius:8px; }
*::-webkit-scrollbar-thumb:hover{ background:var(--ad-brand3); background-clip:content-box; }

/* ---------- Barre latérale : ANTHRACITE dans les deux thèmes ---------- */
.ad-side{
  --ad-ink:#e9eef5; --ad-mut:#98a2ae; --ad-mut2:#727c88;
  --ad-panel:#161b22; --ad-panel2:#1b212a; --ad-elev:#242c36;
  --ad-line:#2a313b; --ad-line2:#3a424e; --ad-bg2:#12161c;
  --ad-hover:rgba(255,255,255,.055); --ad-brand3:#a4a9af;
  background:linear-gradient(185deg,#1a212a 0%,#11151b 100%);
  border-right:1px solid rgba(255,255,255,.05);
  box-shadow:1px 0 0 rgba(0,0,0,.14);
}
.ad-brand{ border-bottom-color:rgba(255,255,255,.07); }
.ad-side .ad-nav a{ color:#aab3bf; }
.ad-side .ad-nav a:hover{ background:rgba(255,255,255,.05); color:#fff; }
.ad-side .ad-nav a.active{ background:linear-gradient(120deg,rgba(61,143,214,.22),rgba(61,143,214,.07)); color:#eaf3fb; box-shadow:inset 0 0 0 1px rgba(110,180,236,.30); }
.ad-side .ad-nav a.active .ic svg{ color:#b5babe; }          /* icône bleue glacée à la sélection */
.ad-side .ad-nav a.active::before{ background:linear-gradient(#bfc4c7,#828a91); box-shadow:0 0 12px rgba(110,180,236,.85); }
.ad-side .ad-nav a.active .badge{ background:rgba(110,180,236,.32); }
.ad-side-cta{ background:linear-gradient(120deg,rgba(110,180,236,.14),rgba(255,255,255,.03)); border-color:rgba(110,180,236,.22); color:#dce9f6; }
.ad-side-cta:hover{ background:linear-gradient(120deg,rgba(110,180,236,.24),rgba(255,255,255,.06)); border-color:rgba(110,180,236,.45); }

/* ---------- Header de page translucide (glass, collant) ---------- */
.ad-head{
  position:sticky; top:10px; z-index:20;
  background:var(--ad-glass); -webkit-backdrop-filter:blur(16px) saturate(1.5); backdrop-filter:blur(16px) saturate(1.5);
  border:1px solid var(--ad-line); border-radius:16px; padding:15px 22px; box-shadow:var(--ad-shadow);
}
.ad-head h1{ background:linear-gradient(92deg,var(--ad-ink),var(--ad-brand2)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }

/* ---------- Cartes lumineuses (KPI, panels, tuiles) ---------- */
.kpi,.kpi-tile,.panel,.hstat,.qcard{ box-shadow:var(--ad-shadow); }
.kpi,.kpi-tile{ background:linear-gradient(158deg,var(--ad-panel),var(--ad-panel2)); }
.kpi::after{ background:radial-gradient(circle at 100% 0,var(--ad-accent-soft),transparent 70%); }
.kpi:hover,.kpi-tile:hover{ border-color:var(--ad-accent); transform:translateY(-3px); box-shadow:0 26px 54px -28px var(--ad-glow); }
.kpi .ic{ color:var(--ad-accent); }
.kpi-tile .kt-ic{ background:var(--ad-accent-soft); color:var(--ad-accent); }
.hstat:hover,.qcard:hover,.todo-item:hover{ border-color:var(--ad-accent); }
.hs-ic{ background:var(--ad-accent-soft); }
.hs-ic svg,.qc-arr{ color:var(--ad-accent); }

/* ---------- Tables & survols (adaptés au clair) ---------- */
.ad-table th{ background:var(--ad-hover); }
.ad-table tbody tr:hover td{ background:var(--ad-hover); }

/* ---------- Boutons chromés ---------- */
.ad-btn{ background:linear-gradient(180deg,var(--ad-brand2),var(--ad-brand)); box-shadow:0 10px 24px -10px var(--ad-glow); }
.ad-btn:hover{ filter:brightness(1.06); box-shadow:0 14px 30px -12px var(--ad-glow); }
.ad-btn.ghost{ background:var(--ad-elev); border:1px solid var(--ad-line2); color:var(--ad-ink); }
.ad-btn.ghost:hover{ background:var(--ad-elev); border-color:var(--ad-accent); filter:brightness(.98); }
.ad-btn.ok{ background:linear-gradient(180deg,#2bb375,#1f9d63); }

/* ---------- Champs : focus bleu glacé ---------- */
.ad-field input:focus,.ad-field select:focus,.ad-field textarea:focus,
input.mini:focus,textarea.mini:focus,.toolbar input:focus,.toolbar select:focus{
  border-color:var(--ad-accent); box-shadow:0 0 0 3px var(--ad-accent-soft);
}

/* ---------- Connexion : carte en verre clair ---------- */
.ad-login .box{ background:var(--ad-glass); border:1px solid var(--ad-line2); box-shadow:var(--ad-shadow); -webkit-backdrop-filter:blur(18px) saturate(1.4); backdrop-filter:blur(18px) saturate(1.4); }
.ad-login .sec-note{ background:var(--ad-hover); border-color:var(--ad-line); }

/* ---------- Bouton bascule thème (dans la carte utilisateur) ---------- */
.ad-userchip #ad-theme{ background:var(--ad-elev); color:var(--ad-mut); width:32px; height:32px; border-radius:9px; display:grid; place-items:center; transition:.14s; flex-shrink:0; }
.ad-userchip #ad-theme:hover{ color:#b5babe; background:rgba(110,180,236,.16); }
.ad-userchip #ad-theme svg{ width:17px; height:17px; }

/* ---------- Transitions douces globales ---------- */
.ad-nav a,.kpi,.kpi-tile,.panel,.hstat,.qcard,.ad-btn,.todo-item,.chat-tab,.ad-field input,.ad-field select{ transition:background .18s ease, color .18s ease, border-color .18s ease, box-shadow .2s ease, transform .16s ease, filter .16s ease; }
.ad-main > *{ animation:adIn .4s cubic-bezier(.2,.7,.25,1) both; }

/* ==========================================================================
   RESPONSIVE — PC (sidebar fixe) · Tablette & Mobile (menu tiroir hamburger)
   ========================================================================== */
/* Barre supérieure mobile + fond assombri : masqués sur PC */
.ad-topbar{ display:none; }
.ad-scrim{ display:none; }

/* --- Tablette large : sidebar un peu plus compacte --- */
@media(max-width:1180px){
  .ad-app{ grid-template-columns:230px 1fr; }
  .ad-main{ padding:26px 22px; }
}

/* --- Tablette portrait + Mobile : la sidebar devient un TIROIR --- */
@media(max-width:1024px){
  .ad-app{ grid-template-columns:1fr; }

  /* Barre supérieure translucide : hamburger + logo Nexoria */
  .ad-topbar{
    display:flex; align-items:center; gap:12px;
    position:sticky; top:0; z-index:150; padding:10px 14px;
    background:var(--ad-glass); -webkit-backdrop-filter:blur(16px) saturate(1.5); backdrop-filter:blur(16px) saturate(1.5);
    border-bottom:1px solid var(--ad-line);
  }
  .ad-burger{ width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:var(--ad-elev); border:1px solid var(--ad-line2); color:var(--ad-ink); flex-shrink:0; transition:.14s; }
  .ad-burger:hover{ border-color:var(--ad-accent); color:var(--ad-accent); }
  .ad-burger svg{ width:22px; height:22px; }
  .tb-plate{ display:inline-flex; align-items:center; background:linear-gradient(180deg,#fff,#eef1f6); border-radius:10px; padding:6px 12px; box-shadow:0 6px 16px -9px rgba(0,0,0,.35); }
  .tb-plate img{ height:22px; display:block; }
  .tb-spacer{ flex:1; }

  /* Sidebar → tiroir coulissant hors-écran */
  .ad-side{
    position:fixed; top:0; left:0; height:100dvh; width:286px; max-width:87vw;
    z-index:200; transform:translateX(-102%);
    transition:transform .28s cubic-bezier(.3,.72,.28,1);
    border-right:1px solid rgba(255,255,255,.06);
  }
  .ad-nav{ display:block; }               /* annule l'ancien empilement horizontal */
  .ad-navgrp{ width:auto; }
  .ad-side .ad-nav a.active::before{ display:none; }
  body.nav-open .ad-side{ transform:none; box-shadow:0 30px 90px -20px rgba(0,0,0,.6); }

  /* Fond assombri derrière le tiroir */
  .ad-scrim{
    display:block; position:fixed; inset:0; z-index:180; background:rgba(6,10,15,.5);
    opacity:0; visibility:hidden; transition:opacity .25s;
    -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
  }
  body.nav-open .ad-scrim{ opacity:1; visibility:visible; }
  body.nav-open{ overflow:hidden; }

  .ad-main{ padding:18px 16px; }
  .ad-head{ position:static; }
  .kpis,.kpi-grid,.home-stats,.home-quick,.home-cols .home-quick{ grid-template-columns:1fr 1fr; }
  .home-cols{ grid-template-columns:1fr; }
}

/* --- Mobile : tout en une colonne, tableaux défilables --- */
@media(max-width:560px){
  .ad-main{ padding:14px 12px; }
  .ad-head{ padding:13px 16px; }
  .ad-head h1{ font-size:20px; }
  .ad-btn{ padding:10px 15px; }
  .kpis,.kpi-grid,.home-stats,.home-quick,.home-cols .home-quick{ grid-template-columns:1fr; }
  .tb-title{ display:none; }
  /* les tableaux défilent horizontalement au lieu de déborder / être coupés */
  .panel{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  table.ad-table{ min-width:560px; }
  .toolbar{ gap:8px; }
  .toolbar input,.toolbar select{ flex:1; min-width:0; }
}

/* ==========================================================================
   MODE APPLI MOBILE (≤680px) — barre d'onglets en bas façon application
   Pilotage de la boutique depuis le téléphone : onglets rapides + "Menu".
   ========================================================================== */
.ad-tabbar{ display:none; }

@media(max-width:680px){
  /* Barre supérieure = titre de la section (le menu passe par l'onglet Menu) */
  .ad-topbar #ad-burger{ display:none; }
  .ad-topbar{ padding:9px 15px; }
  .tb-title{ display:block; font-weight:800; font-size:16.5px; color:var(--ad-ink); letter-spacing:-.2px; }

  /* De la place en bas pour la barre d'onglets */
  .ad-main{ padding:16px 14px calc(88px + env(safe-area-inset-bottom)); }
  .ad-head{ border-radius:14px; }

  /* Barre d'onglets fixe en bas */
  .ad-tabbar{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:190;
    background:var(--ad-glass); -webkit-backdrop-filter:blur(20px) saturate(1.6); backdrop-filter:blur(20px) saturate(1.6);
    border-top:1px solid var(--ad-line); box-shadow:0 -10px 30px -18px rgba(31,58,92,.4);
    padding:7px 6px calc(7px + env(safe-area-inset-bottom));
  }
  .ad-tab{
    position:relative; flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
    background:none; border:0; padding:6px 2px 4px; border-radius:13px; cursor:pointer;
    color:var(--ad-mut); font-family:inherit; font-size:10.5px; font-weight:700; letter-spacing:.1px;
    transition:color .16s, background .16s, transform .08s;
  }
  .ad-tab svg{ width:23px; height:23px; }
  .ad-tab .tl{ line-height:1; }
  .ad-tab:active{ transform:scale(.94); background:var(--ad-hover); }
  .ad-tab.active{ color:var(--ad-accent); }
  .ad-tab.active svg{ filter:drop-shadow(0 0 7px var(--ad-accent-soft)); }
  .ad-tab .tab-badge{
    position:absolute; top:2px; left:calc(50% + 7px);
    background:var(--ad-bad); color:#fff; font-size:9.5px; font-weight:800;
    min-width:16px; height:16px; line-height:16px; border-radius:20px; padding:0 4px; text-align:center;
    box-shadow:0 0 0 2px var(--ad-glass);
  }

  /* Onglet Menu ouvre le tiroir complet, plein écran par le bas ressenti appli */
  .ad-side{ width:308px; }

  /* La FAB Assistant IA remonte au-dessus de la barre d'onglets */
  .nx-fab{ bottom:calc(90px + env(safe-area-inset-bottom)) !important; right:16px !important; }
}

/* ==========================================================================
   Commandes — rendu en CARTES sur mobile (au lieu d'une table illisible)
   ========================================================================== */
.ord-cards{ display:flex; flex-direction:column; gap:12px; padding:14px; }
.ord-card{ background:linear-gradient(160deg,var(--ad-panel),var(--ad-panel2)); border:1px solid var(--ad-line); border-radius:14px; padding:15px; box-shadow:var(--ad-shadow); }
.ord-card.cancelled{ opacity:.6; }
.oc-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.oc-ref{ font-weight:800; font-size:13.5px; color:var(--ad-ink); }
.oc-cust{ display:flex; flex-direction:column; gap:2px; font-weight:700; font-size:15px; color:var(--ad-ink); }
.oc-mail{ font-weight:400; font-size:12.5px; color:var(--ad-mut); word-break:break-all; }
.oc-meta{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-top:9px; padding-top:9px; border-top:1px solid var(--ad-line); }
.oc-date{ font-size:13px; color:var(--ad-mut); }
.oc-total{ font-weight:800; font-size:17px; color:var(--ad-ink); letter-spacing:-.3px; }
.oc-statsel{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ad-mut); }
.oc-statsel select{ flex:1; max-width:62%; font-size:13.5px; padding:9px 11px; }
.oc-actions{ display:flex; gap:8px; margin-top:12px; }
.oc-actions .ad-btn{ flex:1; padding:11px 8px; }

/* ==========================================================================
   Nexoria 2026 — sparklines KPI, page "en préparation", logo chromé gravé
   ========================================================================== */
/* Cartes KPI : mini-graphe animé */
.kpi-tile{ position:relative; overflow:hidden; }
.kt-spark{ display:block; width:100%; height:34px; margin-top:12px; }
.kt-spark-line{ fill:none; stroke:var(--ad-accent); stroke-width:2; stroke-linecap:round; stroke-linejoin:round;
  filter:drop-shadow(0 2px 5px var(--ad-accent-soft)); stroke-dasharray:600; stroke-dashoffset:600;
  animation:sparkDraw 1.2s cubic-bezier(.35,.7,.3,1) .15s forwards; }
.kt-spark-fill{ fill:var(--ad-accent); opacity:0; animation:sparkFade .9s ease .55s forwards; }
@keyframes sparkDraw{ to{ stroke-dashoffset:0; } }
@keyframes sparkFade{ to{ opacity:.10; } }

/* Plaque logo : chrome / métal brossé "gravé" dans l'anthracite */
.ad-logo-plate{
  background:linear-gradient(157deg,#f6f8fb 0%,#dfe4ec 48%,#c6ccd6 62%,#eef1f6 100%);
  box-shadow:0 10px 24px -11px rgba(0,0,0,.55), 0 1px 0 rgba(255,255,255,.95) inset, 0 -1px 0 rgba(0,0,0,.10) inset;
  border:1px solid rgba(255,255,255,.55);
}
.ad-side .ad-brand{ position:relative; }
.ad-side .ad-brand::after{ content:""; position:absolute; left:6px; right:6px; bottom:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(168,216,255,.4),transparent); }
.tb-plate{ background:linear-gradient(157deg,#f6f8fb,#dfe4ec 55%,#eef1f6) !important; }

/* Page "module en préparation" (premium, centrée) */
.soon{ text-align:center; padding:52px 26px; max-width:560px; margin:0 auto; }
.soon-ic{ width:74px; height:74px; margin:0 auto 20px; border-radius:20px; display:grid; place-items:center;
  background:var(--ad-accent-soft); color:var(--ad-accent); box-shadow:0 14px 34px -16px var(--ad-glow); }
.soon-ic svg{ width:34px; height:34px; }
.soon h2{ font-size:20px; font-weight:800; margin:0 0 10px; color:var(--ad-ink); }
.soon p{ color:var(--ad-mut); font-size:14.5px; line-height:1.65; margin:0 auto; max-width:460px; }
.soon-tags{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top:18px; }

/* ==========================================================================
   Correctifs mobile & lisibilité — cartes de liste, contraste, graphique CA
   ========================================================================== */
/* Cartes de liste génériques (Produits, Clients…) sur mobile */
.lc-cards{ display:flex; flex-direction:column; gap:12px; padding:14px; }
.lc-card{ background:linear-gradient(160deg,var(--ad-panel),var(--ad-panel2)); border:1px solid var(--ad-line); border-radius:14px; padding:14px; box-shadow:var(--ad-shadow); }
.lc-top{ display:flex; align-items:center; gap:12px; }
.lc-img{ width:44px; height:44px; flex-shrink:0; object-fit:contain; border-radius:10px; background:var(--ad-elev); display:inline-block; }
.lc-main{ flex:1; min-width:0; }
.lc-name{ font-weight:800; font-size:15px; color:var(--ad-ink); }
.lc-sub{ font-size:12.5px; color:var(--ad-mut); margin-top:2px; word-break:break-word; }
.lc-rows{ display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:12px; padding-top:12px; border-top:1px solid var(--ad-line); }
.lc-rows span{ display:flex; flex-direction:column; font-size:10.5px; text-transform:uppercase; letter-spacing:.3px; color:var(--ad-mut); font-weight:700; }
.lc-rows b{ font-size:15px; color:var(--ad-ink); font-weight:800; margin-top:3px; }
.lc-actions{ display:flex; gap:8px; margin-top:12px; }
.lc-actions .ad-btn{ flex:1; padding:11px 8px; }

/* Lisibilité : plus de texte jaune clair sur fond blanc */
.notice{ background:rgba(199,148,32,.10); border:1px solid rgba(199,148,32,.30); color:#755809; }
.notice strong{ color:#664c07; }
:root[data-theme="dark"] .notice{ background:rgba(211,169,78,.10); border-color:rgba(211,169,78,.28); color:#e6d8ac; }
:root[data-theme="dark"] .notice strong{ color:var(--ad-warn); }
.tag.att{ color:#875f0a; background:rgba(199,148,32,.16); }
:root[data-theme="dark"] .tag.att{ color:var(--ad-warn); background:rgba(211,169,78,.16); }

/* Dashboard : grille analytique responsive */
.dash-2col{ display:grid; grid-template-columns:1fr 2fr; gap:16px; }

/* Graphique du chiffre d'affaires (aire animée) */
.rc-panel{ padding:18px 20px; margin-bottom:20px; }
.rc-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:6px; }
.rc-sub{ font-size:12.5px; color:var(--ad-mut); margin-top:4px; }
.rc-total{ font-size:24px; font-weight:800; color:var(--ad-ink); letter-spacing:-.5px; white-space:nowrap; }
.rc-chart{ width:100%; height:auto; display:block; overflow:visible; }
.rc-g0{ stop-color:var(--ad-accent); stop-opacity:.30; }
.rc-g1{ stop-color:var(--ad-accent); stop-opacity:0; }
.rc-area{ fill:url(#rcg); opacity:0; animation:rcIn .9s ease .45s forwards; }
.rc-line{ fill:none; stroke:var(--ad-accent); stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 3px 6px var(--ad-accent-soft)); stroke-dasharray:1600; stroke-dashoffset:1600; animation:sparkDraw 1.4s cubic-bezier(.35,.7,.3,1) .1s forwards; }
.rc-dot{ fill:var(--ad-panel); stroke:var(--ad-accent); stroke-width:2; opacity:0; animation:rcIn .5s ease .95s forwards; }
.rc-xl{ fill:var(--ad-mut); font-size:12px; font-family:"Manrope",sans-serif; }
@keyframes rcIn{ to{ opacity:1; } }

@media(max-width:680px){
  .dash-2col{ grid-template-columns:1fr; }
  .rc-panel{ padding:15px 15px; }
  .rc-total{ font-size:19px; }
  .rc-xl{ font-size:16px; }
  .rc-head h2{ font-size:15px; }
}

/* ===== Support › Sinistres ===== */
.claims-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 16px; }
.clm-card { background: linear-gradient(160deg, var(--ad-panel), var(--ad-panel2)); border: 1px solid var(--ad-line); border-radius: 14px; padding: 15px; box-shadow: var(--ad-shadow); display: flex; flex-direction: column; gap: 9px; }
.clm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.clm-ref { font-weight: 800; font-size: 13.5px; color: var(--ad-ink); }
.clm-who { font-weight: 700; font-size: 14px; color: var(--ad-ink); line-height: 1.35; }
.clm-mut { color: var(--ad-mut); font-weight: 400; font-size: 12px; }
.clm-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ad-mut); }
.clm-meta b { color: var(--ad-ink); font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }
.clm-desc { font-size: 13.5px; color: var(--ad-ink); line-height: 1.5; background: var(--ad-bg2); border: 1px solid var(--ad-line); border-radius: 10px; padding: 10px 12px; max-height: 130px; overflow: auto; }
.clm-photos { display: flex; gap: 7px; flex-wrap: wrap; }
.clm-photos img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid var(--ad-line2); }
.clm-foot { font-size: 11.5px; color: var(--ad-mut2); }
.clm-actions { display: flex; align-items: center; gap: 10px; margin-top: 3px; padding-top: 10px; border-top: 1px solid var(--ad-line); }
.clm-actions select { flex: 1; max-width: 160px; }
.clm-msg { font-size: 12.5px; font-weight: 700; }
@media (max-width: 680px) { .claims-grid { grid-template-columns: 1fr; } }
.clm-imei { font-size: 12.5px; color: var(--ad-mut); }
.clm-imei b { color: var(--ad-ink); font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* ==========================================================================
   TABLEAU DE BORD — maquette "dashboard" (dark + orange)
   ========================================================================== */
.dash{ display:grid; grid-template-columns:minmax(0,1fr) 322px; gap:18px; align-items:start; }
.dash-main{ display:flex; flex-direction:column; gap:16px; min-width:0; }
.dcard{ background:var(--ad-panel); border:1px solid var(--ad-line); border-radius:16px; }

/* Barre haute */
.dash-top{ display:flex; align-items:flex-end; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:2px; }
.dash-title{ margin:0; font:800 26px "SF Pro Display",Inter,sans-serif; letter-spacing:-.6px; color:var(--ad-ink); }
.dash-sub{ font-size:12.5px; color:var(--ad-mut); margin-top:3px; }
.dash-actions{ display:flex; gap:9px; flex-wrap:wrap; }
.dbtn{ border-radius:11px; padding:10px 16px; font-weight:700; font-size:13.5px; display:inline-flex; align-items:center; gap:7px; transition:filter .12s, transform .08s, background .12s; }
.dbtn.ghost{ background:var(--ad-elev); border:1px solid var(--ad-line2); color:var(--ad-ink); }
.dbtn.ghost:hover{ background:var(--ad-panel2); }
.dbtn.hot{ background:linear-gradient(180deg,#f5701f,#e8620f); color:#fff; box-shadow:0 8px 20px -8px rgba(245,112,31,.6); }
.dbtn.hot:hover{ filter:brightness(1.07); }
.dbtn.sm{ padding:8px 13px; font-size:13px; }

/* 3 cartes KPI */
.dash-kpis{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.dcard.k3{ padding:18px 18px 20px; }
.k3-l{ font-size:12.5px; color:var(--ad-mut); margin-bottom:12px; }
.k3-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.k3-v{ font:800 25px "SF Pro Display",Inter,sans-serif; color:var(--ad-ink); letter-spacing:-.5px; }
.k3-row .kt-badge{ position:static; font-size:12px; font-weight:800; padding:4px 10px; border-radius:999px; }
.k3-row .kt-badge.up{ color:#57d59a; background:rgba(47,163,107,.16); }
.k3-row .kt-badge.down{ color:#f0897b; background:rgba(221,98,82,.16); }

/* Graphique cash-flow */
.cashflow{ padding:18px; }
.cf-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.cf-l{ font-size:12.5px; color:var(--ad-mut); }
.cf-v{ font:800 24px "SF Pro Display",Inter,sans-serif; color:var(--ad-ink); letter-spacing:-.5px; margin-top:2px; }
.cf-per{ font-size:12.5px; font-weight:700; color:var(--ad-ink); background:var(--ad-elev); border:1px solid var(--ad-line2); border-radius:9px; padding:7px 12px; }
.cf-tabs{ display:inline-flex; gap:4px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:10px; padding:4px; margin:14px 0 6px; }
.cf-tab{ font-size:12.5px; font-weight:700; color:var(--ad-mut); background:transparent; border-radius:7px; padding:6px 14px; }
.cf-tab.on{ background:var(--ad-elev); color:var(--ad-ink); }
.cf-chart{ display:flex; align-items:flex-end; gap:2.2%; height:170px; padding-top:16px; }
.cf-bar{ flex:1; min-width:0; background:linear-gradient(180deg,#39424e,#2a313b); border-radius:6px 6px 3px 3px; transition:height .5s cubic-bezier(.2,.8,.3,1); }
.cf-bar.hot{ background:linear-gradient(180deg,#ff8a3d,#f5701f); box-shadow:0 0 20px -4px rgba(245,112,31,.7); position:relative; }
.cf-bar.hot::after{ content:""; position:absolute; top:-9px; left:50%; transform:translateX(-50%); width:8px; height:8px; border-radius:2px; background:#ff8a3d; box-shadow:0 0 10px rgba(245,112,31,.9); }

/* Tableau commandes */
.orders-card{ padding:16px 18px 6px; }
.oc-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.oc-search{ display:inline-flex; align-items:center; gap:8px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:10px; padding:8px 12px; flex:1; max-width:320px; color:var(--ad-mut); }
.oc-search svg{ width:15px; height:15px; flex-shrink:0; }
.oc-search input{ background:transparent; border:0; outline:none; color:var(--ad-ink); font-size:13.5px; width:100%; }
.oc-scroll{ overflow-x:auto; }
.oc-table{ width:100%; border-collapse:collapse; font-size:13.5px; min-width:560px; }
.oc-table th{ text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--ad-mut2); padding:10px 10px; border-bottom:1px solid var(--ad-line); }
.oc-table td{ padding:13px 10px; border-bottom:1px solid var(--ad-line); color:var(--ad-ink); vertical-align:middle; }
.oc-table tr:last-child td{ border-bottom:0; }
.oc-ck{ width:24px; }
.oc-box{ display:inline-block; width:16px; height:16px; border:1.5px solid var(--ad-line2); border-radius:5px; }
.oc-id{ font-family:"SF Mono",ui-monospace,Menlo,monospace; font-size:12.5px; color:var(--ad-mut); }
.oc-user{ display:inline-flex; align-items:center; gap:9px; font-weight:600; }
.oc-ava{ width:28px; height:28px; border-radius:50%; background:linear-gradient(135deg,#f5701f,#e8620f); color:#fff; display:grid; place-items:center; font-size:12px; font-weight:800; flex-shrink:0; }
.oc-mut{ color:var(--ad-mut); }
.oc-empty{ text-align:center; color:var(--ad-mut); padding:34px 10px !important; }

/* Rail droite */
.dash-rail{ display:flex; flex-direction:column; gap:16px; }
.rail-card{ padding:16px 17px; }
.rc-title{ font-size:13.5px; font-weight:800; color:var(--ad-ink); margin-bottom:13px; display:flex; align-items:center; gap:8px; }
.rc-badge{ background:var(--ad-accent-soft); color:var(--ad-accent2); font-size:11px; font-weight:800; padding:2px 8px; border-radius:999px; }

/* Carte "entreprise" (à la place de la carte bancaire) */
.paycard{ position:relative; overflow:hidden; border-radius:18px; padding:18px 18px 16px; min-height:172px; display:flex; flex-direction:column; justify-content:space-between;
  background:linear-gradient(135deg,#232c38 0%,#161b23 60%,#10141b 100%); border:1px solid var(--ad-line2);
  box-shadow:0 22px 46px -26px rgba(0,0,0,.8); }
.paycard .pc-shine{ position:absolute; inset:0; background:radial-gradient(120% 90% at 85% -10%, rgba(245,112,31,.22), transparent 55%); pointer-events:none; }
.pc-top{ display:flex; align-items:center; justify-content:space-between; position:relative; }
.pc-nfc{ width:22px; height:22px; border-radius:50%; border:2px solid rgba(255,255,255,.35); position:relative; }
.pc-nfc::after{ content:""; position:absolute; inset:4px; border-radius:50%; border:2px solid rgba(255,255,255,.22); }
.pc-logo{ height:22px; background:#fff; padding:4px 8px; border-radius:7px; }
.pc-num{ position:relative; font:600 15px "SF Mono",ui-monospace,monospace; letter-spacing:1.5px; color:#e7ecf3; }
.pc-bottom{ position:relative; display:flex; align-items:flex-end; justify-content:space-between; }
.pc-cl{ font-size:10px; text-transform:uppercase; letter-spacing:.6px; color:var(--ad-mut); }
.pc-name{ font-size:14px; font-weight:700; color:#fff; margin-top:2px; }
.pc-brand{ font-size:12px; font-weight:800; letter-spacing:1px; color:#ff9d57; }

/* Actions rapides */
.qa-row{ display:flex; gap:8px; }
.qa{ flex:1; text-align:center; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:11px; padding:11px 6px; font-size:12.5px; font-weight:700; color:var(--ad-ink); transition:border-color .14s, background .14s; }
.qa:hover{ border-color:var(--ad-accent); background:var(--ad-accent-soft); }

/* Objectif */
.obj-v{ font:800 20px "SF Pro Display",Inter,sans-serif; color:var(--ad-ink); }
.obj-v span{ font-size:13px; font-weight:600; color:var(--ad-mut); }
.obj-bar{ height:9px; border-radius:999px; background:var(--ad-bg2); overflow:hidden; margin-top:10px; }
.obj-bar span{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#f5701f,#ff9d57); transition:width .6s ease; }

/* Répartition (segmented) */
.sl-bar{ display:flex; height:12px; border-radius:999px; overflow:hidden; background:var(--ad-bg2); gap:2px; }
.sl-bar span{ height:100%; }
.sl-leg{ display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:12px; }
.sl-item{ font-size:12px; color:var(--ad-mut); display:inline-flex; align-items:center; gap:6px; }
.sl-item b{ color:var(--ad-ink); }
.sl-dot{ width:9px; height:9px; border-radius:3px; }

/* À traiter */
.bill-list{ display:flex; flex-direction:column; gap:8px; }
.bill{ display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:11px; padding:11px 13px; color:var(--ad-ink); font-size:13px; text-align:left; transition:border-color .14s; }
.bill:hover{ border-color:var(--ad-accent); }
.bill-arr{ color:var(--ad-accent2); font-weight:800; }
.bill-empty{ font-size:13px; color:var(--ad-mut); }

@media(max-width:1120px){ .dash{ grid-template-columns:1fr; } .dash-rail{ display:grid; grid-template-columns:1fr 1fr; } .paycard{ grid-column:1/-1; } }
@media(max-width:680px){ .dash-kpis{ grid-template-columns:1fr; } .dash-rail{ grid-template-columns:1fr; } .cf-chart{ height:140px; } }
.cf-demo{ font-size:10px; font-weight:800; letter-spacing:.3px; text-transform:uppercase; color:var(--ad-warn); background:rgba(211,169,78,.16); padding:2px 7px; border-radius:6px; margin-left:6px; vertical-align:middle; }
.cf-bar{ cursor:pointer; }
.cf-bar:hover{ filter:brightness(1.35); }
.cf-bar.sel{ background:linear-gradient(180deg,#ff8a3d,#f5701f); box-shadow:0 0 22px -3px rgba(245,112,31,.8); }
.cf-tab{ cursor:pointer; }
.cf-foot{ margin-top:12px; min-height:22px; }
.cf-hint{ font-size:12px; color:var(--ad-mut); }
.cf-detail{ display:inline-flex; align-items:center; gap:8px; font-size:13px; color:var(--ad-ink); background:var(--ad-accent-soft,rgba(245,112,31,.12)); border:1px solid var(--ad-accent,#f5701f); border-radius:9px; padding:6px 12px; }
.cf-detail b{ color:var(--ad-accent2,#ff8a3d); }
.cf-x{ background:transparent; border:0; color:var(--ad-mut); cursor:pointer; font-size:13px; padding:0 2px; }
.cf-x:hover{ color:var(--ad-ink); }
.dcard.k3.clk{ cursor:pointer; transition:transform .12s ease, border-color .12s ease; }
.dcard.k3.clk:hover{ transform:translateY(-2px); border-color:var(--ad-accent,#f5701f); }

/* ---- Impression du tableau de bord (🖨) ---- */
@media print{
  body.printing-dash .ad-topbar,
  body.printing-dash .ad-tabbar,
  body.printing-dash .ad-scrim,
  body.printing-dash .dash-top .dash-actions,
  body.printing-dash .oc-search,
  body.printing-dash .cf-nav,
  body.printing-dash .cf-tabs,
  body.printing-dash .qa-row,
  body.printing-dash .cf-hint{ display:none !important; }
  body.printing-dash{ background:#fff !important; }
  body.printing-dash .ad-main{ display:block !important; padding:0 !important; overflow:visible !important; }
  body.printing-dash .dash{ display:block !important; }
  body.printing-dash .dcard,
  body.printing-dash .rail-card,
  body.printing-dash .orders-card{ background:#fff !important; color:#111 !important; border:1px solid #d8d8d8 !important; box-shadow:none !important; break-inside:avoid; margin-bottom:12px; }
  body.printing-dash .dash-title,
  body.printing-dash .k3-v,
  body.printing-dash .cf-v,
  body.printing-dash .rc-title{ color:#111 !important; }
  body.printing-dash .cf-bar{ background:#555 !important; box-shadow:none !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  body.printing-dash .cf-bar.hot,
  body.printing-dash .cf-bar.sel{ background:#f5701f !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
.obj-edit{ background:transparent; border:0; font-size:12px; opacity:.55; cursor:pointer; margin-left:4px; padding:0; }
.obj-edit:hover{ opacity:1; }
/* Contrôles de période du graphique cash-flow */
.cf-nav{ display:flex; align-items:center; gap:8px; }
.cf-lbl{ font-size:12.5px; font-weight:700; color:var(--ad-ink); min-width:92px; text-align:center; }
.cf-arrow{ background:var(--ad-elev); border:1px solid var(--ad-line2); color:var(--ad-ink); border-radius:8px; width:26px; height:26px; font-size:16px; line-height:1; display:grid; place-items:center; }
.cf-arrow:hover{ border-color:var(--ad-accent); color:var(--ad-accent2); }
.cf-mode{ background:var(--ad-elev); border:1px solid var(--ad-line2); color:var(--ad-ink); border-radius:9px; padding:6px 10px; font-size:12.5px; font-weight:700; font-family:inherit; cursor:pointer; }
.cf-mode:focus{ outline:none; border-color:var(--ad-accent); }
.cf-chart{ gap:2px; }   /* fonctionne de 12 (mois) à 31 (jours) barres */
@media(max-width:560px){ .cf-nav{ flex-wrap:wrap; } }

/* ============ EMPLOYÉS · AUTH · MESSAGERIE (comptes & permissions) ============ */
/* Liens texte & séparateur sur l'écran de connexion */
.ad-link{ display:block; width:100%; background:none; border:0; color:var(--ad-mut); font-size:12.5px; margin-top:12px; cursor:pointer; text-align:center; }
.ad-link:hover{ color:var(--ad-accent,#f5701f); text-decoration:underline; }
.ad-or{ display:flex; align-items:center; gap:12px; margin:16px 0 12px; color:var(--ad-mut); font-size:12px; }
.ad-or::before,.ad-or::after{ content:""; flex:1; height:1px; background:var(--ad-line); }
.g-btn-wrap{ display:flex; justify-content:center; min-height:8px; }
.tfa-qr{ display:flex; justify-content:center; margin:14px 0; }
.tfa-qr img{ border-radius:12px; background:#fff; padding:8px; }

/* Puce utilisateur cliquable (accès au profil) */
.ad-userchip .chip-id{ display:flex; align-items:center; gap:10px; flex:1; min-width:0; background:none; border:0; padding:0; cursor:pointer; text-align:left; color:inherit; }
.ad-userchip .chip-id:hover .un{ color:var(--ad-accent,#f5701f); }

/* Accès refusé */
.ad-denied{ max-width:440px; margin:8vh auto; text-align:center; padding:24px; }
.ad-denied .dn-ic{ width:64px; height:64px; margin:0 auto 18px; color:var(--ad-bad,#e5484d); }
.ad-denied .dn-ic svg{ width:100%; height:100%; }
.ad-denied h1{ margin:0 0 8px; }
.ad-denied p{ color:var(--ad-mut); margin:0 0 20px; line-height:1.5; }

/* Cases à cocher de permissions */
.perm-chk{ display:flex; gap:10px; align-items:flex-start; padding:10px; border:1px solid var(--ad-line); border-radius:10px; cursor:pointer; }
.perm-chk:hover{ border-color:var(--ad-accent,#f5701f); }
.perm-chk input{ margin-top:2px; }

/* Bloc identifiants temporaires */
.cred-box{ display:grid; gap:10px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:12px; padding:14px; margin:12px 0; }
.cred-box > div{ display:flex; justify-content:space-between; align-items:center; gap:12px; }
.cb-l{ font-size:12px; color:var(--ad-mut); }
.cb-v{ font-family:ui-monospace,monospace; font-weight:800; font-size:15px; color:var(--ad-ink); user-select:all; }

/* Profil */
.prof-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; }
.prof-grid .pf-l{ display:block; font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--ad-mut); font-weight:700; margin-bottom:4px; }
.prof-grid .pf-v{ font-size:15px; font-weight:600; color:var(--ad-ink); }
.pf-note{ font-size:13.5px; color:var(--ad-ink); line-height:1.5; margin:0 0 12px; }
.pf-msg{ margin-left:12px; font-size:13px; }
.pf-msg.ok{ color:var(--ad-ok,#2fa36b); } .pf-msg.bad{ color:var(--ad-bad,#e5484d); }

/* Messagerie interne */
.msg-wrap{ display:grid; grid-template-columns:260px 1fr; gap:16px; height:calc(100vh - 190px); min-height:420px; }
.msg-side{ background:var(--ad-elev,#fff); border:1px solid var(--ad-line); border-radius:14px; overflow-y:auto; padding:8px; }
.msg-peer{ display:flex; align-items:center; gap:10px; width:100%; background:none; border:0; padding:10px; border-radius:10px; cursor:pointer; color:inherit; text-align:left; }
.msg-peer:hover{ background:var(--ad-bg2); }
.msg-peer.on{ background:var(--ad-accent-soft,rgba(245,112,31,.12)); }
.mp-av{ width:34px; height:34px; border-radius:50%; display:grid; place-items:center; font-weight:800; color:#fff; background:linear-gradient(135deg,#f5701f,#e8620f); flex:none; }
.mp-n{ flex:1; font-size:13.5px; font-weight:600; }
.mp-badge{ background:var(--ad-bad,#e5484d); color:#fff; font-size:11px; font-weight:800; border-radius:20px; padding:1px 7px; }
.msg-main{ display:flex; flex-direction:column; background:var(--ad-elev,#fff); border:1px solid var(--ad-line); border-radius:14px; overflow:hidden; }
.msg-top{ padding:14px 16px; border-bottom:1px solid var(--ad-line); font-weight:700; }
.msg-scroll{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.msg-b{ max-width:70%; }
.msg-b.me{ align-self:flex-end; }
.msg-b.them{ align-self:flex-start; }
.mb-x{ padding:9px 13px; border-radius:14px; font-size:14px; line-height:1.45; }
.msg-b.me .mb-x{ background:linear-gradient(135deg,#f5701f,#e8620f); color:#fff; border-bottom-right-radius:4px; }
.msg-b.them .mb-x{ background:var(--ad-bg2); color:var(--ad-ink); border-bottom-left-radius:4px; }
.mb-meta{ font-size:10.5px; color:var(--ad-mut); margin-top:3px; padding:0 4px; }
.msg-b.me .mb-meta{ text-align:right; }
.msg-compose{ display:flex; gap:10px; padding:12px; border-top:1px solid var(--ad-line); align-items:flex-end; }
.msg-compose textarea{ flex:1; resize:none; border:1px solid var(--ad-line); border-radius:10px; padding:10px; font-family:inherit; font-size:14px; background:var(--ad-bg2); color:var(--ad-ink); }
.msg-compose textarea:focus{ outline:none; border-color:var(--ad-accent,#f5701f); }
@media(max-width:760px){ .msg-wrap{ grid-template-columns:1fr; height:auto; } .msg-side{ max-height:160px; } .msg-main{ min-height:420px; } .msg-b{ max-width:86%; } }

/* ============ FICHE EMPLOYÉ IMPRIMABLE ============ */
#emp-print{ display:none; }
@media print{
  body.printing-emp{ background:#fff !important; }
  body.printing-emp > *:not(#emp-print){ display:none !important; }
  body.printing-emp #emp-print{ display:block !important; }
  #emp-print{ color:#111; font-family:Arial,Helvetica,sans-serif; }
  .ef-card{ max-width:640px; margin:24px auto; border:1.5px solid #222; border-radius:14px; padding:28px 32px; }
  .ef-head{ display:flex; align-items:center; gap:14px; border-bottom:2px solid #f5701f; padding-bottom:14px; margin-bottom:18px; }
  .ef-logo{ height:34px; width:auto; }
  .ef-t{ font-size:15px; font-weight:800; color:#111; margin-left:auto; }
  .ef-name{ font-size:24px; font-weight:800; margin-bottom:16px; }
  .ef-tbl{ width:100%; border-collapse:collapse; margin-bottom:20px; }
  .ef-tbl th{ text-align:left; padding:9px 10px; width:42%; background:#f4f4f4; border:1px solid #ddd; font-size:13px; }
  .ef-tbl td{ padding:9px 12px; border:1px solid #ddd; font-size:14px; font-weight:600; }
  .ef-tbl td.ef-pw{ font-family:"Courier New",monospace; font-size:18px; font-weight:800; letter-spacing:1px; }
  .ef-steps{ background:#fff7f0; border:1px solid #f5701f; border-radius:10px; padding:14px 16px; font-size:13px; line-height:1.6; }
  .ef-steps ol{ margin:8px 0 0; padding-left:20px; }
  .ef-foot{ margin-top:20px; font-size:11px; color:#666; text-align:center; line-height:1.5; }
}

/* Bouton Paramètres (engrenage) dans le pied du menu */
.ad-userchip .chip-ic[data-r="settings"]{ background:var(--ad-elev); color:var(--ad-mut); width:32px; height:32px; border-radius:9px; font-size:15px; display:grid; place-items:center; transition:.14s; flex-shrink:0; }
.ad-userchip .chip-ic[data-r="settings"]:hover{ color:var(--ad-accent,#f5701f); background:var(--ad-accent-soft,rgba(245,112,31,.16)); }

/* Affichage des 5 codes de destruction générés */
.codes-box{ display:grid; gap:8px; background:var(--ad-bg2); border:1px solid var(--ad-line); border-radius:12px; padding:14px; margin:0 0 14px; }
.code-row{ display:flex; align-items:center; gap:12px; }
.code-row .cr-n{ width:22px; height:22px; border-radius:50%; background:var(--ad-accent,#f5701f); color:#fff; font-size:12px; font-weight:800; display:grid; place-items:center; flex:none; }
.code-row .cr-v{ font-family:ui-monospace,"Courier New",monospace; font-size:19px; font-weight:800; letter-spacing:2px; color:var(--ad-ink); user-select:all; }

/* ============ RENDU MOBILE — écrans employés / messagerie / profil / modales ============ */
@media (max-width: 560px){
  /* Toute grille 2 colonnes dans une modale passe en 1 colonne */
  .m-body [style*="grid-template-columns:1fr 1fr"]{ grid-template-columns:1fr !important; }
  .perm-chk{ padding:9px 10px; }
  .cred-box > div{ flex-direction:column; align-items:flex-start; gap:2px; }
  .code-row .cr-v{ font-size:17px; letter-spacing:1px; }
  .dash-actions{ flex-wrap:wrap; }
  .prof-grid{ grid-template-columns:1fr 1fr; }
  .pf-msg{ display:block; margin:10px 0 0; }
}
@media (max-width: 760px){
  /* Tableau employés : défilement horizontal propre au lieu de déborder */
  .table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .table-wrap .ad-table{ min-width:640px; }
  .row-actions{ display:flex; gap:6px; flex-wrap:wrap; }
}

/* ============ GLOBE TERRESTRE — visiteurs en direct ============ */
.globe-panel{ padding:0; overflow:hidden; }
.globe-wrap{ position:relative; width:100%; height:480px; background:radial-gradient(120% 120% at 50% 30%, #0e2233 0%, #060d15 70%); }
#globe-cv{ width:100%; height:100%; display:block; cursor:grab; touch-action:none; }
#globe-cv:active{ cursor:grabbing; }
.globe-hud{ position:absolute; top:16px; left:18px; pointer-events:none; }
.gh-count{ display:flex; align-items:baseline; gap:8px; background:rgba(8,18,28,.55); border:1px solid rgba(120,180,230,.2); backdrop-filter:blur(6px); padding:8px 14px; border-radius:12px; }
.gh-count b{ font-size:26px; font-weight:800; color:#ff8a3d; line-height:1; }
.gh-count span{ font-size:12px; color:#cde0ef; text-transform:uppercase; letter-spacing:.5px; }
.globe-zoom{ position:absolute; top:16px; right:16px; display:flex; flex-direction:column; gap:8px; }
.globe-zoom button{ width:38px; height:38px; border-radius:10px; border:1px solid rgba(120,180,230,.25); background:rgba(8,18,28,.6); color:#e8f2fb; font-size:19px; font-weight:700; cursor:pointer; backdrop-filter:blur(6px); display:grid; place-items:center; transition:.14s; }
.globe-zoom button:hover{ border-color:#f5701f; color:#ff8a3d; }
.globe-hint{ position:absolute; bottom:14px; left:0; right:0; text-align:center; font-size:12px; color:rgba(205,224,239,.6); pointer-events:none; }
.globe-empty{ position:absolute; bottom:44px; left:0; right:0; text-align:center; font-size:13px; color:rgba(205,224,239,.75); pointer-events:none; }
@media (max-width:680px){ .globe-wrap{ height:360px; } .gh-count b{ font-size:22px; } }

/* Prixtel — interrupteurs de mise en avant */
.px-toggles{ display:grid; gap:11px; margin-top:6px; }
.px-tog{ display:flex; align-items:center; gap:10px; font-size:14px; color:var(--ad-ink); cursor:pointer; }
.px-tog input{ width:18px; height:18px; }
