:root{
  --blue:#2563eb;
  --green:#16a34a;
  --orange:#ea580c;
  --red:#dc2626;
  --bg:#f4f7fb;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#dbe3ef;
  --card:#fff;
  --soft:#eef4ff;
  --shadow:0 10px 28px rgba(15,23,42,.08);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg);font-size:13px}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button{border:1px solid var(--line);background:#fff;color:#1e293b;border-radius:8px;padding:8px 10px;display:inline-flex;align-items:center;justify-content:center;gap:6px;cursor:pointer;font-weight:750;min-height:34px}
button:hover{box-shadow:0 8px 18px rgba(15,23,42,.08)}
svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.btn-primary{background:var(--blue);border-color:var(--blue);color:#fff}
.btn-green{background:var(--green);border-color:var(--green);color:#fff}
.btn-orange{background:var(--orange);border-color:var(--orange);color:#fff}
.btn-red{background:var(--red);border-color:var(--red);color:#fff}
.btn-ghost{background:#f8fafc}
.icon-btn{width:36px;padding:0}
.app{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;background:#fff;border-right:1px solid var(--line);padding:14px 12px;display:flex;flex-direction:column;gap:12px;z-index:10}
.brand{display:flex;align-items:center;gap:10px;padding:4px 5px}
.brand img{width:45px;height:34px;object-fit:contain}
.brand h1{font-size:15px;margin:0;line-height:1.05}
.brand p{font-size:11px;color:var(--muted);margin:2px 0 0}
.menu{display:grid;gap:5px}
.menu a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;color:#334155;font-weight:800;min-height:36px}
.menu a.active,.menu a:hover{background:var(--soft);color:var(--blue)}
.side-note{margin-top:auto;border:1px solid var(--line);background:#f8fafc;border-radius:8px;padding:10px;color:#475569;line-height:1.35}
.side-note b{display:block;color:var(--ink);margin-bottom:3px}
.main{min-width:0;padding:14px}
.topbar{height:54px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);padding:9px 12px;display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.menu-toggle{display:none}
.title h2{margin:0;font-size:19px;line-height:1}
.title p{margin:3px 0 0;color:var(--muted)}
.top-actions,.tools,.row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.grid{display:grid;gap:10px}
.kpis{grid-template-columns:repeat(6,minmax(120px,1fr));margin-bottom:10px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:8px;padding:10px;box-shadow:0 6px 16px rgba(15,23,42,.04)}
.kpi span{display:block;color:var(--muted);font-weight:800;font-size:11px;text-transform:uppercase}
.kpi strong{display:block;font-size:21px;margin-top:2px}
.card{background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);overflow:hidden;margin-bottom:12px}
.card-head{padding:10px 12px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:10px}
.card-head h3{margin:0;font-size:14px}
.input,.select,textarea{border:1px solid var(--line);border-radius:8px;background:#fff;padding:8px 9px;min-height:34px;outline:none;max-width:100%}
.input:focus,.select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.12)}
textarea{resize:vertical;min-height:72px}
.table-wrap{overflow:auto;max-height:calc(100vh - 235px)}
table{width:100%;border-collapse:separate;border-spacing:0;min-width:1060px}
th,td{padding:8px 9px;border-bottom:1px solid #edf2f7;text-align:left;vertical-align:middle;white-space:nowrap}
th{position:sticky;top:0;background:#f8fafc;color:#475569;font-size:11px;text-transform:uppercase;z-index:1}
td{font-size:12.2px}
.main-name{font-weight:850;color:var(--ink)}
.sub{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.link{color:var(--blue);font-weight:850}
.badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-weight:850;font-size:11px;border:1px solid transparent}
.s-repondeur{background:#eff6ff;color:#1d4ed8}
.s-occupe{background:#fff7ed;color:#c2410c}
.s-a-rappeler,.s-rappel-programme{background:#fef3c7;color:#b45309}
.s-pas-interesse,.s-non-conforme,.s-probleme-audio,.s-a-corriger{background:#fee2e2;color:#b91c1c}
.s-demo-envoyee,.s-facture-envoyee,.s-site-termine{background:#e0f2fe;color:#0369a1}
.s-en-attente-decision,.s-demo-a-faire,.s-site-a-creer,.s-site-a-modifier{background:#f5f3ff;color:#6d28d9}
.s-en-attente-paiement,.s-a-payer,.s-relance,.s-paiement-partiel{background:#ffedd5;color:#c2410c}
.s-paye,.s-client,.s-conforme,.s-valide-qualite{background:#dcfce7;color:#15803d}
.drawer{position:fixed;right:-620px;top:0;width:600px;max-width:96vw;height:100vh;background:#fff;border-left:1px solid var(--line);box-shadow:-18px 0 50px rgba(15,23,42,.18);z-index:30;transition:.22s;display:flex;flex-direction:column}
.drawer.open{right:0}
.drawer-head{padding:14px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px}
.drawer-head h3{margin:0;font-size:18px}
.drawer-head p{margin:3px 0 0;color:var(--muted)}
.drawer-body{padding:12px;overflow:auto}
.section{border:1px solid var(--line);border-radius:8px;padding:10px;margin-bottom:10px}
.section h4{font-size:13px;margin:0 0 8px}
.edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.field label{display:block;font-size:11px;text-transform:uppercase;color:#64748b;font-weight:850;margin-bottom:4px}
.field input,.field select,.field textarea{width:100%}
.field.wide{grid-column:1/-1}
.history{display:grid;gap:7px}
.event{border-left:3px solid var(--blue);background:#f8fafc;padding:7px 8px;border-radius:7px;color:#475569}
.event b{display:block;color:var(--ink)}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.38);display:none;align-items:center;justify-content:center;z-index:40;padding:14px}
.modal.open{display:flex}
.modal-card{width:460px;max-width:100%;background:#fff;border-radius:8px;box-shadow:0 24px 60px rgba(15,23,42,.22);border:1px solid var(--line);overflow:hidden}
.modal-head,.modal-foot{padding:12px 14px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:8px}
.modal-foot{border-bottom:0;border-top:1px solid var(--line);justify-content:flex-end}
.modal-body{padding:14px}
.alerts{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px}
.alert{border:1px solid #fecaca;background:#fff1f2;border-left:4px solid var(--red);border-radius:8px;padding:9px}
.alert.orange{border-color:#fed7aa;background:#fff7ed;border-left-color:var(--orange)}
.tabs{display:flex;gap:6px;flex-wrap:wrap}
.tabs button.active{background:var(--blue);border-color:var(--blue);color:#fff}
.login-body{min-height:100vh;display:grid;place-items:center;background:#eaf0fb;padding:18px}
.login-card{width:390px;max-width:100%;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);padding:22px}
.login-brand{text-align:center;margin-bottom:16px}
.login-brand img{width:86px;height:62px;object-fit:contain}
.login-card h1{font-size:21px;margin:0}
.login-card p{color:var(--muted);margin:6px 0 0}
.login-card button{width:100%;margin-top:8px}
.toast{position:fixed;right:18px;bottom:18px;background:#0f172a;color:#fff;padding:10px 13px;border-radius:8px;z-index:60;box-shadow:var(--shadow)}
.mobile-bottom{display:none}
@media(max-width:1180px){
  .app{grid-template-columns:72px 1fr}
  .brand h1,.brand p,.menu span,.side-note{display:none}
  .brand,.menu a{justify-content:center}
  .kpis{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
  .app{display:block}
  .sidebar{position:fixed;left:-250px;width:230px;transition:.2s}
  body.nav-open .sidebar{left:0}
  .menu-toggle{display:inline-flex}
  .main{padding:10px 10px 70px}
  .topbar{height:auto;align-items:flex-start}
  .title h2{font-size:18px}
  .kpis{grid-template-columns:repeat(2,1fr)}
  .table-wrap{max-height:calc(100vh - 310px)}
  .top-actions{justify-content:flex-end}
  .edit-grid{grid-template-columns:1fr}
  .mobile-bottom{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);z-index:20}
  .mobile-bottom a{padding:8px 3px;text-align:center;font-size:11px;color:#475569}
  .mobile-bottom a.active{color:var(--blue);font-weight:900}
}
@media(max-width:520px){
  .kpis{grid-template-columns:1fr}
  .card-head,.topbar{flex-direction:column;align-items:stretch}
  .tools .input,.tools .select{width:100%}
}

/* Extensions cahier des charges complet */
.pipeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;padding:10px}
.pipeline-step{border:1px solid var(--line);border-radius:8px;background:#f8fafc;padding:10px}
.pipeline-step b{display:block;margin-bottom:4px}.pipeline-step span{color:var(--muted);font-size:11px}
.split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.client-profile{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px}.client-profile .section{margin-bottom:0}
@media(max-width:900px){.split,.client-profile{grid-template-columns:1fr}}

/* =========================================================
   MOBILE PRO - corrections isolées mobile uniquement
   La version PC reste basée sur le design original.
   ========================================================= */
@media (max-width: 760px){
  html,body{
    width:100%;
    min-height:100%;
    height:auto !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch;
  }
  body.nav-open{overflow-y:auto !important;}
  .app{
    display:block !important;
    min-height:auto !important;
    width:100%;
  }
  .main{
    display:block;
    width:100%;
    min-height:auto !important;
    padding:10px 10px 86px !important;
    overflow:visible !important;
  }
  .sidebar{
    position:fixed !important;
    top:0;
    left:-86%;
    width:82%;
    max-width:310px;
    height:100dvh !important;
    overflow-y:auto;
    padding:16px 12px 22px;
    z-index:1000;
    box-shadow:18px 0 44px rgba(15,23,42,.22);
  }
  body.nav-open .sidebar{left:0;}
  .brand h1,.brand p,.menu span,.side-note{display:block;}
  .brand,.menu a{justify-content:flex-start;}
  .brand{padding:8px 6px 12px;}
  .brand img{width:48px;height:38px;}
  .menu{gap:7px;}
  .menu a{min-height:44px;padding:11px 12px;border-radius:12px;}
  body.nav-open:before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.42);
    z-index:999;
  }
  .topbar{
    position:sticky;
    top:0;
    z-index:100;
    min-height:58px;
    height:auto !important;
    padding:10px;
    margin:0 -2px 12px;
    border-radius:14px;
    align-items:center !important;
    flex-direction:row !important;
    gap:9px;
  }
  .menu-toggle{display:inline-flex !important;flex:0 0 42px;width:42px;height:42px;border-radius:12px;}
  .title{min-width:0;flex:1;}
  .title h2{font-size:17px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .title p{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .top-actions{display:none !important;}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:9px;margin-bottom:12px;}
  .kpi{border-radius:14px;padding:12px;min-height:78px;}
  .kpi span{font-size:10px;line-height:1.2;}
  .kpi strong{font-size:22px;}
  .card{border-radius:14px;margin-bottom:12px;overflow:visible;}
  .card-head{padding:12px;align-items:flex-start;gap:8px;}
  .card-head h3{font-size:15px;line-height:1.2;}
  .tools,.row-actions{gap:8px;width:100%;}
  .tools .input,.tools .select,.tools button,.row-actions button,.top-actions button{
    min-height:42px;
    border-radius:12px;
  }
  button{min-height:42px;border-radius:12px;padding:9px 11px;}
  .icon-btn{width:42px;height:42px;padding:0;}
  .input,.select,textarea{min-height:42px;border-radius:12px;font-size:14px;}

  /* Tous les grids inline du dashboard et des pages passent proprement en 1 colonne */
  .grid[style*="grid-template-columns"],
  div[style*="grid-template-columns"],
  section[style*="grid-template-columns"]{
    grid-template-columns:1fr !important;
  }
  .split,.client-profile,.edit-grid{grid-template-columns:1fr !important;}
  .alerts,.pipeline{grid-template-columns:1fr !important;}

  /* Tables transformées en cartes lisibles */
  .table-wrap{
    max-height:none !important;
    overflow:visible !important;
    padding:10px;
  }
  table,thead,tbody,tr,th,td{display:block;width:100% !important;min-width:0 !important;}
  table{border-collapse:separate !important;border-spacing:0 !important;min-width:0 !important;}
  thead{display:none !important;}
  tbody{display:grid;gap:10px;}
  tr{
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    box-shadow:0 8px 20px rgba(15,23,42,.06);
    padding:8px;
  }
  td{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    white-space:normal !important;
    border-bottom:1px solid #edf2f7;
    padding:9px 6px;
    font-size:13px;
    line-height:1.35;
    text-align:right;
  }
  td:last-child{border-bottom:0;}
  td:before{
    content:attr(data-label);
    flex:0 0 42%;
    max-width:42%;
    text-align:left;
    color:var(--muted);
    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.02em;
  }
  td:empty{display:none;}
  td .sub{text-align:right;}
  td .row-actions,td .tools{justify-content:flex-end;width:auto;}

  .drawer{
    inset:auto 0 0 0 !important;
    right:0 !important;
    left:0 !important;
    top:auto !important;
    width:100% !important;
    max-width:100% !important;
    height:92dvh !important;
    border-left:0;
    border-radius:18px 18px 0 0;
    transform:translateY(105%);
    transition:transform .22s ease;
  }
  .drawer.open{transform:translateY(0);}
  .drawer-head{padding:14px;align-items:flex-start;}
  .drawer-head h3{font-size:18px;}
  .drawer-body{padding:12px 10px 96px;overflow-y:auto;-webkit-overflow-scrolling:touch;}
  .section{border-radius:14px;padding:12px;}

  .modal{align-items:flex-end;padding:0;}
  .modal-card{width:100%;max-width:100%;border-radius:18px 18px 0 0;}
  .modal-body{max-height:70dvh;overflow:auto;}
  .modal-foot button{flex:1;}

  .mobile-bottom{
    display:grid !important;
    grid-template-columns:repeat(5,1fr);
    left:8px;
    right:8px;
    bottom:8px;
    border:1px solid var(--line);
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 12px 28px rgba(15,23,42,.16);
    z-index:900;
  }
  .mobile-bottom a{
    padding:9px 2px 8px;
    min-height:50px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    line-height:1.1;
    background:#fff;
  }
  .mobile-bottom a.active{background:var(--soft);}
  .mobile-fab{
    position:fixed;
    right:14px;
    bottom:72px;
    z-index:901;
    width:54px;
    height:54px;
    border-radius:999px;
    background:var(--blue);
    color:#fff;
    border-color:var(--blue);
    box-shadow:0 14px 30px rgba(37,99,235,.35);
    font-size:0;
  }
  .mobile-fab:before{content:"+";font-size:28px;font-weight:800;line-height:1;}
  .toast{left:12px;right:12px;bottom:76px;text-align:center;}
}

@media (max-width: 390px){
  .kpis{grid-template-columns:1fr !important;}
  .title h2{font-size:16px;}
  td{display:block;text-align:left;}
  td:before{display:block;max-width:100%;margin-bottom:4px;}
  td .sub{text-align:left;}
}

/* Reporting / filtres avancés */
.report-filter .card-head{background:#f8fafc}
.filter-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px;padding:12px}
.report-bars{display:grid;gap:9px;padding:12px}
.report-bar{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px 12px;display:flex;justify-content:space-between;gap:10px;align-items:center;min-height:54px}
.report-bar div,.report-bar strong{position:relative;z-index:1}.report-bar b{display:block}.report-bar span{display:block;color:var(--muted);font-size:11px;margin-top:2px}.report-bar strong{font-size:15px}.report-bar i{position:absolute;left:0;bottom:0;top:auto;height:4px;background:var(--blue);border-radius:999px;opacity:.85}
@media(max-width:1180px){.filter-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}}
@media(max-width:760px){.filter-grid{grid-template-columns:1fr 1fr;padding:10px}.filter-grid .field:last-child{grid-column:1/-1}.report-bar{border-radius:13px}.split{grid-template-columns:1fr!important}}
@media(max-width:520px){.filter-grid{grid-template-columns:1fr}.filter-grid .field{grid-column:auto!important}}


/* Alertes RDV en retard */
.alert-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:14px}
.alert-step{border:1px solid var(--line);border-radius:16px;background:#fff;padding:13px;box-shadow:0 10px 24px rgba(15,23,42,.06)}
.alert-step b{display:block;font-size:18px}.alert-step span{color:var(--muted);font-size:12px}.alert-step.critique{border-color:#fecaca;background:#fff5f5}.alert-step.urgent{border-color:#fed7aa;background:#fff7ed}.alert-step.warning{border-color:#fde68a;background:#fffbeb}.alert-step.normal{border-color:#bfdbfe;background:#eff6ff}.alert-step.ok{border-color:#bbf7d0;background:#f0fdf4}
.late-dot{display:inline-flex;align-items:center;gap:6px;font-weight:800}.late-dot:before{content:"";width:9px;height:9px;border-radius:50%;background:#2563eb}.late-dot.critique:before{background:#dc2626}.late-dot.urgent:before{background:#f97316}.late-dot.warning:before{background:#d97706}.late-dot.normal:before{background:#2563eb}
.alert-actions{display:flex;gap:6px;flex-wrap:wrap}.alert-actions button{padding:8px 10px}
@media(max-width:900px){.alert-strip{grid-template-columns:1fr 1fr}.alert-actions button{flex:1}}
@media(max-width:520px){.alert-strip{grid-template-columns:1fr}.alert-step{border-radius:14px}}

/* Popups retards télévendeurs */
.danger-soft{background:#fff1f2;border-color:#fecdd3;color:#be123c;font-weight:800}
.tv-delay-popup{position:fixed;inset:0;z-index:3000;display:flex;align-items:center;justify-content:center;padding:18px}
.tv-delay-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(3px)}
.tv-delay-card{position:relative;width:min(620px,100%);background:#fff;border-radius:24px;box-shadow:0 28px 70px rgba(15,23,42,.35);overflow:hidden;border:1px solid rgba(255,255,255,.5);animation:tvPopupIn .18s ease-out}
.tv-delay-head{display:flex;justify-content:space-between;gap:14px;padding:20px 20px 14px;background:linear-gradient(135deg,#fff1f2,#eff6ff)}
.tv-delay-head h3{margin:4px 0 4px;font-size:22px;color:#0f172a}.tv-delay-head p{margin:0;color:#475569;line-height:1.45}.tv-alert-pulse{width:14px;height:14px;border-radius:999px;background:#dc2626;display:inline-block;box-shadow:0 0 0 0 rgba(220,38,38,.55);animation:tvPulse 1.2s infinite}
.tv-delay-list{display:grid;gap:10px;padding:14px 16px;max-height:310px;overflow:auto}.tv-delay-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);border-radius:16px;padding:12px;background:#fff}.tv-delay-row b{display:block}.tv-delay-row span{display:block;color:var(--muted);font-size:12px;margin-top:3px}.tv-delay-row strong{white-space:nowrap;border-radius:999px;padding:7px 10px;background:#fee2e2;color:#b91c1c}.tv-delay-row.urgent strong{background:#ffedd5;color:#c2410c}.tv-delay-row.warning strong{background:#fef3c7;color:#92400e}.tv-delay-row.normal strong{background:#dbeafe;color:#1d4ed8}
.tv-delay-actions{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:10px;padding:14px 16px 18px;border-top:1px solid var(--line);background:#f8fafc}.tv-delay-actions button{min-height:44px}
@keyframes tvPulse{70%{box-shadow:0 0 0 13px rgba(220,38,38,0)}}
@keyframes tvPopupIn{from{transform:translateY(10px) scale(.98);opacity:.4}to{transform:translateY(0) scale(1);opacity:1}}
@media(max-width:720px){.tv-delay-popup{align-items:flex-end;padding:0}.tv-delay-card{border-radius:22px 22px 0 0;width:100%;max-height:90dvh;display:flex;flex-direction:column}.tv-delay-head{padding:16px}.tv-delay-head h3{font-size:18px}.tv-delay-list{max-height:48dvh}.tv-delay-actions{grid-template-columns:1fr 1fr;padding-bottom:calc(18px + env(safe-area-inset-bottom))}.tv-delay-actions .btn-primary{grid-column:1/-1}.tv-delay-row{align-items:flex-start}.tv-delay-row strong{font-size:12px}}

/* =========================================================
   PATCH FINAL CSS - RDV CONTROL SKYWEBIS
   Objectif : harmoniser toutes les pages sans casser le PC,
   corriger desktop/tablette/mobile, tableaux, formulaires,
   popups, plannings, affectations, alertes et fiche client.
   ========================================================= */

/* Base stable */
html{scroll-behavior:smooth;}
body{overflow-y:auto;overflow-x:hidden;}
#page{min-width:0;}
.main{min-width:0;}
.card,.kpi,.topbar,.sidebar,.drawer,.modal-card,.tv-delay-card{border-color:var(--line);}
.card{overflow:hidden;}
.card > .table-wrap{border-radius:0 0 8px 8px;}
.card-head{min-height:48px;}
.card-head .sub{margin:0;}
.tools .field{min-width:140px;}
.tools .field .select,.tools .field .input{width:100%;}

/* Formulaires et select coherents sur toutes les pages */
select.select,select,input.input,input,textarea{color:#0f172a;}
select.select{appearance:auto;}
.field select,.field input,.field textarea{border:1px solid var(--line);border-radius:8px;background:#fff;padding:8px 9px;min-height:34px;outline:none;max-width:100%;}
.field select:focus,.field input:focus,.field textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.12);}

/* Tableaux desktop : lisibles, pas de debordement de page */
.table-wrap{width:100%;overflow:auto;-webkit-overflow-scrolling:touch;}
.table-wrap table{background:#fff;}
.table-wrap th{box-shadow:0 1px 0 #edf2f7;}
.table-wrap td .select,.table-wrap td .input{min-width:120px;}
.table-wrap td .row-actions{min-width:max-content;}
.row-actions button,.alert-actions button{white-space:nowrap;}

/* Badges et etats supplementaires */
.s-actif,.s-oui,.s-definitive{background:#dcfce7;color:#15803d;}
.s-inactif,.s-non,.s-suspendu{background:#fee2e2;color:#b91c1c;}
.s-temporaire-absence{background:#e0f2fe;color:#0369a1;}
.s-manuel{background:#f1f5f9;color:#334155;}

/* Reporting / affectations / planning */
.filter-grid .field label{min-height:14px;}
.report-filter .filter-grid{align-items:end;}
.report-bar{box-shadow:0 6px 16px rgba(15,23,42,.04);}
.alert-strip{align-items:stretch;}
.alert-step{min-height:88px;}
.pipeline-step{min-height:78px;}

/* Drawer fiche client : meilleur desktop */
.drawer{will-change:right,transform;}
.drawer-body .tools button{white-space:normal;}
.drawer-body .section:last-child{margin-bottom:24px;}

/* Popups : toujours au-dessus, clics propres */
.modal,.tv-delay-popup{isolation:isolate;}
.tv-delay-card button{white-space:normal;}

/* Tablette : version propre sans casser PC */
@media (max-width:1180px) and (min-width:761px){
  .app{grid-template-columns:82px minmax(0,1fr);} 
  .main{padding:12px;}
  .topbar{border-radius:12px;}
  .card{border-radius:12px;}
  .kpis{grid-template-columns:repeat(3,minmax(0,1fr));}
  .filter-grid{grid-template-columns:repeat(3,minmax(160px,1fr));}
  .table-wrap{max-height:none;}
  .drawer{width:560px;}
}

/* Mobile final propre */
@media (max-width:760px){
  :root{--shadow:0 8px 22px rgba(15,23,42,.08);} 
  html,body{min-height:100%;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important;}
  body{font-size:13px;background:#f3f6fb;padding:0;margin:0;}
  body.nav-open{overflow-y:auto!important;}
  .app{display:block!important;width:100%;min-height:auto!important;}
  .main{width:100%;min-height:auto!important;padding:10px 10px 96px!important;overflow:visible!important;}
  #page{display:block;width:100%;min-width:0;}

  /* Sidebar mobile */
  .sidebar{position:fixed!important;top:0;left:-86%;width:82%;max-width:320px;height:100dvh!important;display:flex!important;overflow-y:auto!important;padding:16px 12px 24px;z-index:1000;border-right:1px solid var(--line);border-radius:0 18px 18px 0;box-shadow:18px 0 44px rgba(15,23,42,.22);transition:left .22s ease;}
  body.nav-open .sidebar{left:0;}
  body.nav-open:before{content:"";position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:999;}
  .brand h1,.brand p,.menu span,.side-note{display:block!important;}
  .brand,.menu a{justify-content:flex-start!important;}
  .brand{padding:8px 6px 12px;}
  .brand img{width:50px;height:40px;}
  .brand h1{font-size:16px;}
  .menu{gap:7px;}
  .menu a{min-height:44px;padding:11px 12px;border-radius:12px;font-size:13px;}
  .side-note{font-size:12px;border-radius:12px;}

  /* Header mobile */
  .topbar{position:sticky;top:0;z-index:100;display:flex!important;flex-direction:row!important;align-items:center!important;min-height:60px;height:auto!important;padding:10px;margin:0 -2px 12px;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-radius:14px;box-shadow:0 8px 22px rgba(15,23,42,.08);}
  .menu-toggle{display:inline-flex!important;flex:0 0 42px;width:42px;height:42px;border-radius:12px;}
  .title{min-width:0;flex:1;}
  .title h2{font-size:17px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .title p{font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .top-actions{display:none!important;}

  /* KPI et cartes */
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px;margin-bottom:12px;}
  .kpi{border-radius:14px;padding:12px;min-height:78px;}
  .kpi span{font-size:10px;line-height:1.2;}
  .kpi strong{font-size:22px;}
  .card{border-radius:14px;margin-bottom:12px;overflow:hidden;box-shadow:0 8px 22px rgba(15,23,42,.06);}
  .card-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:9px;padding:12px;min-height:auto;}
  .card-head h3{font-size:15px;line-height:1.25;margin:0;}
  .card-head > div,.card-head > .tools{width:100%;}
  .section{border-radius:14px;padding:12px;}
  .alert,.alert-step,.pipeline-step,.report-bar{border-radius:14px;}

  /* Grilles et blocs */
  .split,.client-profile,.edit-grid,.alerts,.pipeline{grid-template-columns:1fr!important;}
  .grid[style*="grid-template-columns"],div[style*="grid-template-columns"],section[style*="grid-template-columns"]{grid-template-columns:1fr!important;}
  .filter-grid{grid-template-columns:1fr!important;padding:10px;gap:9px;}
  .filter-grid .field{grid-column:auto!important;}
  .alert-strip{grid-template-columns:1fr!important;gap:8px;}

  /* Formulaires tactiles */
  button,.input,.select,textarea,.field select,.field input,.field textarea{min-height:42px;border-radius:12px;font-size:14px;}
  button{padding:9px 11px;}
  .icon-btn{width:42px;height:42px;padding:0;}
  .tools,.row-actions,.alert-actions{display:flex;flex-wrap:wrap;gap:8px;width:100%;}
  .tools .input,.tools .select,.tools button,.row-actions button,.alert-actions button{flex:1 1 auto;min-width:0;}
  .tools .field{width:100%;min-width:0;}

  /* Tableaux en cartes mobile */
  .table-wrap{max-height:none!important;overflow:visible!important;padding:10px;background:#fff;}
  .table-wrap table,.table-wrap thead,.table-wrap tbody,.table-wrap tr,.table-wrap th,.table-wrap td{display:block;width:100%!important;min-width:0!important;}
  .table-wrap table{border-collapse:separate!important;border-spacing:0!important;background:transparent!important;}
  .table-wrap thead{display:none!important;}
  .table-wrap tbody{display:grid;gap:10px;}
  .table-wrap tr{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 18px rgba(15,23,42,.055);padding:8px;overflow:hidden;}
  .table-wrap td{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;white-space:normal!important;border-bottom:1px solid #edf2f7;padding:9px 6px;font-size:13px;line-height:1.35;text-align:right;}
  .table-wrap td:last-child{border-bottom:0;}
  .table-wrap td:before{content:attr(data-label);flex:0 0 42%;max-width:42%;text-align:left;color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.02em;}
  .table-wrap td:empty{display:none;}
  .table-wrap td .sub{text-align:right;}
  .table-wrap td .row-actions,.table-wrap td .tools,.table-wrap td .alert-actions{justify-content:flex-end;width:auto;}
  .table-wrap td .select,.table-wrap td .input{width:100%;min-width:0;}

  /* Drawer fiche client mobile */
  .drawer{position:fixed!important;inset:auto 0 0 0!important;width:100%!important;max-width:100%!important;height:92dvh!important;border-left:0;border-radius:18px 18px 0 0;transform:translateY(105%);transition:transform .22s ease;z-index:1200;}
  .drawer.open{right:0!important;transform:translateY(0);}
  .drawer-head{padding:14px;align-items:flex-start;}
  .drawer-head h3{font-size:18px;}
  .drawer-head p{font-size:12px;line-height:1.35;}
  .drawer-body{padding:12px 10px 96px;overflow-y:auto;-webkit-overflow-scrolling:touch;}

  /* Modales et popups mobile */
  .modal{align-items:flex-end;padding:0;z-index:1300;}
  .modal-card{width:100%;max-width:100%;border-radius:18px 18px 0 0;}
  .modal-body{max-height:70dvh;overflow:auto;}
  .modal-foot{gap:8px;}
  .modal-foot button{flex:1;}
  .tv-delay-popup{align-items:flex-end;padding:0;}
  .tv-delay-card{width:100%;max-height:90dvh;border-radius:22px 22px 0 0;display:flex;flex-direction:column;}
  .tv-delay-list{max-height:48dvh;}
  .tv-delay-actions{grid-template-columns:1fr 1fr;padding-bottom:calc(18px + env(safe-area-inset-bottom));}
  .tv-delay-actions .btn-primary{grid-column:1/-1;}

  /* Navigation basse + bouton flottant */
  .mobile-bottom{display:grid!important;grid-template-columns:repeat(5,1fr);position:fixed;left:8px;right:8px;bottom:8px;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 12px 28px rgba(15,23,42,.16);z-index:900;}
  .mobile-bottom a{min-height:50px;padding:9px 2px 8px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:10px;line-height:1.1;background:#fff;color:#475569;}
  .mobile-bottom a.active{background:var(--soft);color:var(--blue);font-weight:900;}
  .mobile-fab{position:fixed;right:14px;bottom:72px;z-index:901;width:54px;height:54px;border-radius:999px;background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:0 14px 30px rgba(37,99,235,.35);font-size:0;}
  .mobile-fab:before{content:"+";font-size:28px;font-weight:800;line-height:1;}
  .toast{left:12px;right:12px;bottom:76px;text-align:center;border-radius:14px;}
}

@media (max-width:390px){
  .kpis{grid-template-columns:1fr!important;}
  .title h2{font-size:16px;}
  .table-wrap td{display:block;text-align:left;}
  .table-wrap td:before{display:block;max-width:100%;margin-bottom:4px;}
  .table-wrap td .sub{text-align:left;}
  .row-actions button,.tools button,.alert-actions button{width:100%;}
}

/* Navigation finale propre : masquable desktop + petits écrans */
.nav-collapse{margin-left:auto;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#f8fafc;display:inline-flex}
.sidebar .menu{overflow-y:auto;overflow-x:hidden;padding-right:2px;scrollbar-width:thin}
.sidebar .menu a svg{flex:0 0 16px}
.sidebar .menu a span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.sidebar-collapsed .app{grid-template-columns:78px minmax(0,1fr)}
body.sidebar-collapsed .sidebar{padding:14px 10px;align-items:center}
body.sidebar-collapsed .brand{width:100%;justify-content:center;gap:0;padding:4px 0 8px;flex-wrap:wrap}
body.sidebar-collapsed .brand img{width:46px;height:36px}
body.sidebar-collapsed .brand h1,body.sidebar-collapsed .brand p,body.sidebar-collapsed .menu a span,body.sidebar-collapsed .side-note{display:none!important}
body.sidebar-collapsed .nav-collapse{margin:8px auto 0;width:42px;height:36px}
body.sidebar-collapsed .menu{width:100%;gap:8px;overflow:visible}
body.sidebar-collapsed .menu a{justify-content:center;padding:10px 0;width:48px;min-height:42px;margin:0 auto;border-radius:14px}
body.sidebar-collapsed .menu a svg{width:18px;height:18px}
body.sidebar-collapsed .main{min-width:0}

@media (max-width: 760px){
  body.sidebar-collapsed .app{display:block!important}
  body.sidebar-collapsed .sidebar{align-items:stretch;padding:16px 12px 24px}
  body.sidebar-collapsed .brand{justify-content:flex-start;gap:10px;flex-wrap:nowrap;padding:8px 6px 12px}
  body.sidebar-collapsed .brand h1,body.sidebar-collapsed .brand p,body.sidebar-collapsed .menu a span,body.sidebar-collapsed .side-note{display:block!important}
  body.sidebar-collapsed .nav-collapse{margin-left:auto;margin-top:0;width:42px;height:42px}
  body.sidebar-collapsed .menu{width:auto;gap:7px;overflow-y:auto}
  body.sidebar-collapsed .menu a{justify-content:flex-start;width:auto;margin:0;min-height:44px;padding:11px 12px;border-radius:12px}
  .nav-collapse{display:inline-flex!important;width:42px;height:42px;border-radius:12px}
  .sidebar{left:-88%!important;width:86%!important;max-width:340px!important;height:100dvh!important;max-height:100dvh!important;overscroll-behavior:contain}
  body.nav-open .sidebar{left:0!important}
  .menu a{font-size:13px;line-height:1.15}
  .topbar{gap:8px!important}
  .menu-toggle{display:inline-flex!important}
}

@media (max-width: 430px){
  .main{padding:8px 8px 92px!important}
  .topbar{min-height:56px;padding:8px;border-radius:12px;margin-bottom:10px}
  .menu-toggle,.nav-collapse,.icon-btn{width:40px;height:40px;min-height:40px;border-radius:11px}
  .title h2{font-size:15px!important;max-width:calc(100vw - 112px)}
  .title p{font-size:10.5px!important;max-width:calc(100vw - 112px)}
  .sidebar{width:90%!important;left:-92%!important;max-width:310px!important;padding:12px 10px 20px!important}
  .brand img{width:44px!important;height:34px!important}
  .brand h1{font-size:14px!important}
  .brand p{font-size:10px!important}
  .menu{gap:5px!important}
  .menu a{min-height:40px!important;padding:9px 10px!important;border-radius:11px!important;font-size:12px!important}
  .side-note{font-size:11px!important;padding:9px!important}
  .mobile-bottom{left:6px!important;right:6px!important;bottom:6px!important;border-radius:16px!important;grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .mobile-bottom a{min-height:46px!important;font-size:9px!important;padding:7px 1px!important;word-break:normal;overflow:hidden}
  .mobile-fab{right:10px!important;bottom:64px!important;width:50px!important;height:50px!important}
  .kpi{padding:10px!important;min-height:70px!important}
  .kpi strong{font-size:20px!important}
  .card-head{padding:10px!important}
  .filter-grid{padding:8px!important}
  .table-wrap{padding:8px!important}
  .table-wrap tr{padding:7px!important;border-radius:13px!important}
  .table-wrap td{font-size:12px!important;gap:8px!important;padding:8px 4px!important}
  .table-wrap td:before{font-size:9px!important;flex-basis:40%!important;max-width:40%!important}
  button,.input,.select,textarea,.field select,.field input,.field textarea{font-size:13px!important;min-height:40px!important}
}

@media (max-width: 340px){
  .main{padding-left:6px!important;padding-right:6px!important}
  .title h2{font-size:14px!important;max-width:calc(100vw - 104px)}
  .title p{display:none!important}
  .kpis{grid-template-columns:1fr!important}
  .mobile-bottom a{font-size:8.5px!important;min-height:44px!important}
  .sidebar{width:94%!important;left:-96%!important}
  .table-wrap td{display:block!important;text-align:left!important}
  .table-wrap td:before{display:block!important;max-width:100%!important;margin-bottom:3px!important}
  .table-wrap td .sub{text-align:left!important}
}

/* =========================================================
   SKYWEBIS VISUAL PRO FINAL - 2026
   Passe finale visuelle globale : desktop stable, sidebar
   masquable, mobile propre, petits écrans, popups, tableaux.
   ========================================================= */
:root{
  --radius:14px;
  --radius-sm:10px;
  --radius-lg:22px;
  --shadow-soft:0 10px 30px rgba(15,23,42,.07);
  --shadow-strong:0 20px 55px rgba(15,23,42,.18);
  --focus:0 0 0 4px rgba(37,99,235,.14);
}
html{font-size:14px;}
body{background:linear-gradient(180deg,#f7faff 0%,#eef4fb 100%);}
button,.input,.select,textarea{transition:border-color .16s ease,box-shadow .16s ease,background .16s ease,transform .12s ease;}
button:active{transform:translateY(1px)}
button:focus-visible,a:focus-visible,.input:focus-visible,.select:focus-visible,textarea:focus-visible{outline:none;box-shadow:var(--focus)}
.app{grid-template-columns:250px minmax(0,1fr);}
.sidebar{padding:16px 14px;background:rgba(255,255,255,.96);box-shadow:8px 0 24px rgba(15,23,42,.03);}
.brand{padding:6px 6px 12px;border-bottom:1px solid #edf2f7;margin-bottom:2px;}
.brand img{width:50px;height:38px;}
.brand h1{font-size:16px;letter-spacing:-.02em;}
.brand p{font-size:11px;}
.nav-collapse{border:1px solid var(--line)!important;background:#f8fafc!important;color:#334155!important;}
.menu{gap:6px;max-height:calc(100vh - 170px);}
.menu a{border:1px solid transparent;border-radius:12px;min-height:39px;}
.menu a.active{background:linear-gradient(135deg,#eff6ff,#eef4ff);border-color:#dbeafe;box-shadow:0 8px 20px rgba(37,99,235,.08)}
.menu a:hover{background:#f8fbff;border-color:#e2e8f0;}
.side-note{border-radius:14px;background:linear-gradient(135deg,#f8fbff,#f1f5f9);}
.main{padding:18px;}
.topbar{height:auto;min-height:60px;border-radius:16px;padding:12px 14px;box-shadow:var(--shadow-soft);position:sticky;top:12px;z-index:8;backdrop-filter:blur(8px);background:rgba(255,255,255,.94);}
.title h2{font-size:21px;letter-spacing:-.03em;}
.title p{font-size:12px;line-height:1.25;}
.card,.kpi{border-radius:var(--radius);box-shadow:var(--shadow-soft);}
.card{margin-bottom:14px;background:rgba(255,255,255,.98);}
.card-head{padding:13px 14px;background:linear-gradient(180deg,#fff,#fbfdff);}
.card-head h3{font-size:15px;letter-spacing:-.01em;}
.kpis{gap:12px;margin-bottom:12px;}
.kpi{padding:14px;min-height:92px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden;}
.kpi:after{content:"";position:absolute;right:-24px;top:-26px;width:70px;height:70px;border-radius:999px;background:rgba(37,99,235,.06)}
.kpi span{font-size:11px;line-height:1.25;position:relative;z-index:1;}
.kpi strong{font-size:25px;letter-spacing:-.04em;position:relative;z-index:1;}
.input,.select,textarea,.field select,.field input,.field textarea{border-radius:11px;border-color:#d9e2ef;background:#fff;}
.input:hover,.select:hover,textarea:hover,.field select:hover,.field input:hover,.field textarea:hover{border-color:#c7d2e3;}
.input:focus,.select:focus,textarea:focus,.field select:focus,.field input:focus,.field textarea:focus{border-color:var(--blue);box-shadow:var(--focus);}
button{border-radius:11px;font-weight:800;}
.btn-primary,.btn-green,.btn-orange,.btn-red{box-shadow:0 8px 18px rgba(15,23,42,.10)}
.table-wrap{border-radius:0 0 var(--radius) var(--radius);}
table{min-width:1080px;}
th{height:42px;background:#f8fafc;color:#475569;font-size:11px;letter-spacing:.02em;}
td{height:42px;}
tbody tr:hover td{background:#fbfdff;}
.badge{border-radius:999px;padding:5px 9px;line-height:1;}
.filter-grid{gap:12px;}
.report-bar,.alert-step,.pipeline-step,.alert{border-radius:14px;}
.drawer{border-radius:0;box-shadow:var(--shadow-strong);}
.drawer-head{background:linear-gradient(135deg,#fff,#eff6ff);}
.modal-card,.tv-delay-card{border-radius:22px;}
.mobile-fab{display:none;}
.nav-backdrop{display:none;}
body.sidebar-collapsed .app{grid-template-columns:84px minmax(0,1fr)!important;}
body.sidebar-collapsed .sidebar{padding:16px 10px!important;}
body.sidebar-collapsed .brand{border-bottom:0;margin-bottom:6px;}
body.sidebar-collapsed .menu a{width:50px;min-height:44px;border-radius:15px;}
body.sidebar-collapsed .topbar{top:12px;}

@media(max-width:1180px){
  .app{grid-template-columns:84px minmax(0,1fr);}
  .sidebar{padding:16px 10px;align-items:center;}
  .brand{justify-content:center;border-bottom:0;flex-wrap:wrap;gap:4px;}
  .brand h1,.brand p,.menu a span,.side-note{display:none!important;}
  .menu{width:100%;}
  .menu a{justify-content:center;width:50px;margin:0 auto;padding:10px 0;}
  .nav-collapse{margin:6px auto 0!important;width:42px!important;height:38px!important;}
  .kpis{grid-template-columns:repeat(3,minmax(0,1fr));}
}

@media(max-width:760px){
  html{font-size:14px;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important;}
  body{height:auto!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;background:#f4f7fb;}
  body.nav-open{overflow:hidden!important;}
  .app{display:block!important;min-height:auto!important;width:100%!important;}
  .nav-backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:899;backdrop-filter:blur(2px);}
  body.nav-open .nav-backdrop{display:block;}
  .sidebar,body.sidebar-collapsed .sidebar{
    position:fixed!important;left:-92%!important;top:0!important;width:88%!important;max-width:340px!important;height:100dvh!important;max-height:100dvh!important;
    z-index:950!important;padding:14px 12px 22px!important;display:flex!important;align-items:stretch!important;border-radius:0 22px 22px 0;box-shadow:18px 0 55px rgba(15,23,42,.24);
    transition:left .22s ease!important;overflow:hidden!important;
  }
  body.nav-open .sidebar,body.nav-open.sidebar-collapsed .sidebar{left:0!important;}
  .brand,body.sidebar-collapsed .brand{justify-content:flex-start!important;gap:10px!important;flex-wrap:nowrap!important;border-bottom:1px solid #edf2f7!important;padding:8px 6px 13px!important;margin-bottom:4px!important;}
  .brand h1,.brand p,.menu a span,.side-note,body.sidebar-collapsed .brand h1,body.sidebar-collapsed .brand p,body.sidebar-collapsed .menu a span,body.sidebar-collapsed .side-note{display:block!important;}
  .brand img{width:48px!important;height:36px!important;}
  .nav-collapse,body.sidebar-collapsed .nav-collapse{margin-left:auto!important;margin-top:0!important;width:42px!important;height:42px!important;flex:0 0 42px!important;}
  .menu,body.sidebar-collapsed .menu{width:auto!important;max-height:none!important;overflow-y:auto!important;gap:7px!important;padding:4px 2px 8px!important;}
  .menu a,body.sidebar-collapsed .menu a{width:auto!important;margin:0!important;justify-content:flex-start!important;min-height:44px!important;padding:11px 12px!important;border-radius:13px!important;}
  .side-note{margin-top:auto!important;font-size:12px!important;}
  .main{width:100%!important;max-width:100%!important;padding:10px 10px calc(88px + env(safe-area-inset-bottom))!important;}
  .topbar{position:sticky!important;top:8px!important;z-index:700!important;min-height:58px!important;border-radius:16px!important;padding:9px!important;margin-bottom:12px!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;}
  .menu-toggle{display:inline-flex!important;width:42px!important;height:42px!important;padding:0!important;grid-column:1;grid-row:1;}
  .title{min-width:0;grid-column:2;grid-row:1;}
  .title h2{font-size:17px!important;line-height:1.12;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
  .title p{font-size:11px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
  .top-actions{grid-column:1/-1;grid-row:2;width:100%;justify-content:stretch!important;display:flex!important;gap:8px!important;}
  .top-actions:empty{display:none!important;}
  .top-actions button{flex:1 1 auto;min-width:0;}
  .grid[style*="grid-template-columns"],div[style*="grid-template-columns"],section[style*="grid-template-columns"],.split,.client-profile,.edit-grid,.alerts,.pipeline{grid-template-columns:1fr!important;}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;}
  .kpi{min-height:82px!important;padding:12px!important;border-radius:16px!important;}
  .kpi strong{font-size:22px!important;}
  .card{border-radius:16px!important;margin-bottom:12px!important;box-shadow:0 8px 22px rgba(15,23,42,.06)!important;}
  .card-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:9px!important;padding:12px!important;min-height:auto!important;}
  .card-head h3{font-size:15px!important;}
  .filter-grid{grid-template-columns:1fr!important;padding:10px!important;gap:9px!important;}
  .field{min-width:0!important;}
  button,.input,.select,textarea,.field select,.field input,.field textarea{min-height:43px!important;border-radius:13px!important;font-size:14px!important;}
  .tools,.row-actions,.alert-actions{width:100%!important;gap:8px!important;display:flex!important;flex-wrap:wrap!important;}
  .tools button,.row-actions button,.alert-actions button,.tools .input,.tools .select{flex:1 1 auto;min-width:0!important;}
  .table-wrap{max-height:none!important;overflow:visible!important;padding:10px!important;background:#fff!important;}
  .table-wrap table,.table-wrap thead,.table-wrap tbody,.table-wrap tr,.table-wrap th,.table-wrap td{display:block!important;width:100%!important;min-width:0!important;}
  .table-wrap table{border-spacing:0!important;background:transparent!important;}
  .table-wrap thead{display:none!important;}
  .table-wrap tbody{display:grid!important;gap:10px!important;}
  .table-wrap tr{background:#fff!important;border:1px solid var(--line)!important;border-radius:16px!important;box-shadow:0 8px 18px rgba(15,23,42,.055)!important;padding:8px!important;overflow:hidden!important;}
  .table-wrap td{height:auto!important;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;white-space:normal!important;border-bottom:1px solid #edf2f7!important;padding:9px 6px!important;font-size:13px!important;line-height:1.35!important;text-align:right!important;}
  .table-wrap td:last-child{border-bottom:0!important;}
  .table-wrap td:before{content:attr(data-label);flex:0 0 42%;max-width:42%;text-align:left;color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.02em;}
  .table-wrap td:empty{display:none!important;}
  .drawer{inset:auto 0 0 0!important;width:100%!important;max-width:100%!important;height:92dvh!important;border-left:0!important;border-radius:22px 22px 0 0!important;transform:translateY(105%)!important;transition:transform .22s ease!important;z-index:1200!important;}
  .drawer.open{transform:translateY(0)!important;}
  .drawer-body{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important;}
  .modal{align-items:flex-end!important;padding:0!important;z-index:1300!important;}
  .modal-card{width:100%!important;max-width:100%!important;border-radius:22px 22px 0 0!important;}
  .mobile-bottom{display:grid!important;position:fixed!important;left:8px!important;right:8px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;background:#fff!important;border:1px solid var(--line)!important;border-radius:20px!important;overflow:hidden!important;box-shadow:0 14px 32px rgba(15,23,42,.18)!important;z-index:900!important;}
  .mobile-bottom a{min-height:52px!important;padding:8px 2px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;font-size:10px!important;line-height:1.05!important;color:#475569!important;background:#fff!important;}
  .mobile-bottom a.active{background:#eff6ff!important;color:var(--blue)!important;font-weight:900!important;}
  .mobile-fab{display:inline-flex!important;position:fixed!important;right:14px!important;bottom:calc(72px + env(safe-area-inset-bottom))!important;z-index:901!important;width:56px!important;height:56px!important;border-radius:999px!important;background:var(--blue)!important;color:#fff!important;border-color:var(--blue)!important;box-shadow:0 16px 34px rgba(37,99,235,.36)!important;font-size:0!important;}
  .mobile-fab:before{content:"+";font-size:30px;font-weight:900;line-height:1;}
  .toast{left:12px!important;right:12px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;text-align:center;border-radius:15px!important;}
}

@media(max-width:430px){
  .main{padding:8px 8px calc(84px + env(safe-area-inset-bottom))!important;}
  .topbar{top:6px!important;border-radius:14px!important;}
  .title h2{font-size:15.5px!important;}
  .title p{font-size:10.5px!important;}
  .kpis{grid-template-columns:1fr!important;}
  .kpi{min-height:72px!important;}
  .mobile-bottom{left:6px!important;right:6px!important;border-radius:17px!important;}
  .mobile-bottom a{min-height:47px!important;font-size:9px!important;padding:6px 1px!important;}
  .mobile-fab{width:50px!important;height:50px!important;bottom:calc(64px + env(safe-area-inset-bottom))!important;right:10px!important;}
  .table-wrap td{font-size:12px!important;gap:8px!important;}
  .table-wrap td:before{font-size:9px!important;flex-basis:40%!important;max-width:40%!important;}
}

@media(max-width:340px){
  .main{padding-left:6px!important;padding-right:6px!important;}
  .title p{display:none!important;}
  .table-wrap td{display:block!important;text-align:left!important;}
  .table-wrap td:before{display:block!important;max-width:100%!important;margin-bottom:4px!important;}
  .mobile-bottom a{font-size:8px!important;}
}

@media(min-width:761px){
  .menu-toggle,.mobile-bottom,.mobile-fab,.nav-backdrop{display:none!important;}
  .top-actions:empty{display:none!important;}
}

/* =========================================================
   UI VIVANTE SKYWEBIS - palette propre et cohérente
   Objectif : plus d'énergie visuelle sans casser la structure.
   ========================================================= */
:root{
  --sky-navy:#07111f;
  --sky-navy-2:#0b1730;
  --sky-blue:#2563eb;
  --sky-cyan:#08c8f6;
  --sky-violet:#7c3aed;
  --sky-pink:#ec3fd5;
  --sky-soft:#eef7ff;
  --sky-glow:rgba(8,200,246,.22);
  --blue:#2563eb;
  --green:#10b981;
  --orange:#f59e0b;
  --red:#ef4444;
  --bg:#f3f7ff;
  --ink:#0b1220;
  --muted:#667085;
  --line:#dce6f4;
  --card:#ffffff;
  --soft:#eef6ff;
  --shadow:0 16px 42px rgba(15,23,42,.08);
}
html,body{
  background:
    radial-gradient(circle at top left, rgba(8,200,246,.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(236,63,213,.10), transparent 28%),
    var(--bg);
  color:var(--ink);
}
button,.btn-primary,.btn-green,.btn-orange,.btn-red,.btn-ghost,.input,.select,textarea,.card,.topbar,.kpi,.alert,.pipeline-step,.section,.modal-card,.drawer,.login-card{
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease,color .18s ease;
}
button{border-radius:12px;border-color:#d7e2f2;background:linear-gradient(180deg,#fff,#f8fbff);font-weight:800;color:#152238}
button:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(37,99,235,.12);border-color:#bcd4ff}
.btn-primary{background:linear-gradient(135deg,var(--sky-cyan),var(--sky-blue) 48%,var(--sky-violet));border:0;color:#fff;box-shadow:0 12px 24px rgba(37,99,235,.24)}
.btn-green{background:linear-gradient(135deg,#13c296,#059669);border:0;color:#fff}
.btn-orange{background:linear-gradient(135deg,#ffb020,#f97316);border:0;color:#fff}
.btn-red{background:linear-gradient(135deg,#ff5470,#dc2626);border:0;color:#fff}
.btn-ghost{background:#f7faff;border-color:#dce8f7;color:#31435f}
.app{grid-template-columns:252px minmax(0,1fr)}
.sidebar{
  background:linear-gradient(180deg,var(--sky-navy),var(--sky-navy-2) 54%,#101247);
  border-right:0;
  color:#e9f4ff;
  box-shadow:18px 0 46px rgba(7,17,31,.18);
}
.sidebar:before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(circle at 32px 28px,rgba(8,200,246,.24),transparent 28%),radial-gradient(circle at 90% 18%,rgba(236,63,213,.14),transparent 24%);
}
.sidebar>*{position:relative;z-index:1}
.brand{padding:10px 8px 14px;border-bottom:1px solid rgba(255,255,255,.10);margin-bottom:4px}
.brand img{width:58px;height:42px;filter:drop-shadow(0 8px 16px rgba(8,200,246,.26))}
.brand h1{font-size:16px;color:#fff;letter-spacing:.2px}.brand p{color:#9bd9ff}
.nav-collapse{margin-left:auto;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.12);color:#dff6ff}
.menu{gap:6px;padding:2px}
.menu a{color:#b8c7dc;border:1px solid transparent;border-radius:13px;min-height:42px;padding:10px 12px;position:relative;overflow:hidden}
.menu a svg{width:18px;height:18px;opacity:.95;color:#6fe6ff}
.menu a:hover{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.08)}
.menu a.active{background:linear-gradient(135deg,rgba(8,200,246,.22),rgba(124,58,237,.26));color:#fff;border-color:rgba(111,230,255,.28);box-shadow:inset 3px 0 0 var(--sky-cyan),0 12px 26px rgba(8,200,246,.10)}
.menu a.active svg{color:#fff;filter:drop-shadow(0 0 8px rgba(8,200,246,.55))}
.side-note{background:linear-gradient(135deg,rgba(8,200,246,.13),rgba(236,63,213,.13));border:1px solid rgba(255,255,255,.12);color:#cfe5ff;border-radius:16px}.side-note b{color:#fff}
.main{padding:18px;position:relative}
.topbar{height:auto;min-height:66px;border:0;border-radius:18px;background:rgba(255,255,255,.86);backdrop-filter:blur(12px);box-shadow:0 18px 48px rgba(15,23,42,.08);padding:12px 16px;margin-bottom:16px}
.title h2{font-size:22px;letter-spacing:-.02em}.title p{color:#667085;font-weight:600}
.card{border:1px solid rgba(211,224,242,.88);border-radius:18px;background:rgba(255,255,255,.94);box-shadow:var(--shadow);overflow:hidden}
.card:hover{box-shadow:0 20px 52px rgba(15,23,42,.10)}
.card-head{padding:13px 16px;background:linear-gradient(180deg,#fff,#f8fbff);border-bottom:1px solid #e8eef8}.card-head h3{font-size:15px;color:#101828}
.kpis{gap:12px}.kpi{border:1px solid #e3ecf8;border-radius:18px;background:linear-gradient(180deg,#fff,#f9fbff);padding:14px;position:relative;overflow:hidden;min-height:88px}.kpi:before{content:"";position:absolute;right:-18px;top:-20px;width:72px;height:72px;border-radius:24px;background:linear-gradient(135deg,rgba(8,200,246,.18),rgba(236,63,213,.16));transform:rotate(18deg)}.kpi span{position:relative;color:#667085;letter-spacing:.04em}.kpi strong{position:relative;font-size:26px;background:linear-gradient(135deg,var(--sky-blue),var(--sky-violet),var(--sky-pink));-webkit-background-clip:text;background-clip:text;color:transparent}
.input,.select,textarea{border-radius:12px;border-color:#d8e4f4;background:#fbfdff}.input:focus,.select:focus,textarea:focus{border-color:var(--sky-cyan);box-shadow:0 0 0 4px rgba(8,200,246,.14)}
.table-wrap{border-radius:0 0 18px 18px}table{border-spacing:0}th{background:#f3f7ff;color:#52637a;font-size:11px;letter-spacing:.03em}td{background:#fff}tr:hover td{background:#fbfdff}.main-name{color:#0f172a}.link{color:var(--sky-blue)}
.badge{border-radius:999px;padding:5px 9px;font-size:11px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.42)}
.alert{border-radius:16px;background:#fff7f8}.alert.orange{background:#fff8ed}.pipeline{gap:10px;padding:14px}.pipeline-step{border-radius:16px;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 8px 20px rgba(15,23,42,.04)}.pipeline-step:hover{transform:translateY(-2px);border-color:#bdd7ff;box-shadow:0 14px 30px rgba(37,99,235,.10)}
.section{border-radius:16px;background:#fbfdff}.event{border-left-color:var(--sky-cyan);border-radius:12px;background:#f6faff}.drawer{border-left:0;box-shadow:-22px 0 60px rgba(7,17,31,.18)}.drawer-head,.modal-head{background:linear-gradient(135deg,#f8fcff,#fff)}.modal-card{border-radius:20px}.toast{border-radius:14px;background:linear-gradient(135deg,var(--sky-navy),var(--sky-violet));box-shadow:0 18px 40px rgba(37,99,235,.28)}
.login-body{background:radial-gradient(circle at top left,rgba(8,200,246,.24),transparent 32%),radial-gradient(circle at bottom right,rgba(236,63,213,.20),transparent 30%),#edf4ff}.login-card{border-radius:22px;padding:26px}.login-brand img{width:126px;height:78px}
.mobile-bottom{box-shadow:0 -16px 42px rgba(15,23,42,.10)}
.mobile-bottom a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-weight:800}.mobile-bottom a svg{width:17px;height:17px}.mobile-bottom a.active{background:linear-gradient(180deg,rgba(8,200,246,.10),rgba(124,58,237,.08));color:var(--sky-blue)}
@media(max-width:1180px){.app{grid-template-columns:82px 1fr}.brand img{width:48px}.nav-collapse{display:none}.menu a{padding:10px}.menu a svg{width:20px;height:20px}}
@media(max-width:760px){
  .main{padding:12px 12px 82px}.sidebar{width:270px;left:-292px}.topbar{border-radius:16px;gap:10px}.menu-toggle{display:inline-flex;background:linear-gradient(135deg,var(--sky-cyan),var(--sky-blue));border:0;color:#fff}.kpis{gap:10px}.kpi{min-height:82px}.card{border-radius:16px}.card-head{padding:12px}.mobile-bottom{background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border-top:1px solid #dfe8f5}.mobile-bottom a{font-size:10px;min-height:58px}.drawer{width:100vw;max-width:100vw}.table-wrap{max-height:none;overflow:visible}table,thead,tbody,tr,th,td{display:block;min-width:0}thead{display:none}tr{margin:10px;border:1px solid #e4edf8;border-radius:16px;overflow:hidden;box-shadow:0 8px 20px rgba(15,23,42,.04)}td{white-space:normal;border-bottom:1px solid #eef3fa;display:flex;justify-content:space-between;gap:12px;align-items:flex-start}td:before{content:attr(data-label);font-weight:900;color:#667085;text-transform:uppercase;font-size:10px;letter-spacing:.04em;min-width:92px}.row-actions,.tools{width:100%}.row-actions button,.tools button{flex:1}.top-actions button{flex:1}}
@media(max-width:430px){.main{padding-left:9px;padding-right:9px}.title h2{font-size:18px}.title p{font-size:12px}.topbar,.card{border-radius:14px}.kpi strong{font-size:23px}button{min-height:40px;padding:9px 10px}.mobile-bottom a span{font-size:9.5px}.card-head{gap:8px}.tools,.top-actions{gap:6px}.input,.select,textarea{min-height:40px}}
body.sidebar-collapsed .app{grid-template-columns:82px minmax(0,1fr)}
body.sidebar-collapsed .brand h1,body.sidebar-collapsed .brand p,body.sidebar-collapsed .menu span,body.sidebar-collapsed .side-note{display:none}
body.sidebar-collapsed .brand,body.sidebar-collapsed .menu a{justify-content:center}

/* =========================================================
   RDV CONTROL - REFONTE PREMIUM SKYWEBIS
   ========================================================= */
:root{
  --blue:#2563eb;
  --blue2:#1d4ed8;
  --cyan:#06b6d4;
  --green:#10b981;
  --orange:#f59e0b;
  --red:#ef4444;
  --purple:#8b5cf6;
  --dark:#0f172a;
  --bg:#f3f7ff;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#d9e3f2;
  --card:#ffffff;
  --soft:#eef5ff;
  --shadow:0 18px 45px rgba(15,23,42,.10);
}
html,body{font-size:14px;background:radial-gradient(circle at top left,#e0edff 0,#f7faff 32%,#f3f7ff 100%);}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 85% 8%,rgba(37,99,235,.12),transparent 30%),radial-gradient(circle at 12% 88%,rgba(16,185,129,.10),transparent 28%);z-index:-1}
.app{grid-template-columns:262px minmax(0,1fr)}
.sidebar{background:linear-gradient(180deg,#07111f 0%,#0f172a 55%,#111827 100%);border-right:0;color:#fff;padding:18px 14px;box-shadow:10px 0 35px rgba(15,23,42,.18)}
.brand{padding:9px 8px 14px;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:4px}
.brand img{width:52px;height:42px;background:#fff;border-radius:14px;padding:5px;box-shadow:0 12px 30px rgba(0,0,0,.22)}
.brand h1{font-size:18px;color:#fff;letter-spacing:-.02em}.brand p{color:#94a3b8}.nav-collapse{margin-left:auto;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.12);color:#fff}
.menu{gap:6px}.menu a{color:#cbd5e1;border:1px solid transparent;border-radius:14px;min-height:42px;padding:10px 12px;font-weight:850}.menu a svg{color:#93c5fd}.menu a.active,.menu a:hover{background:linear-gradient(135deg,rgba(37,99,235,.95),rgba(14,165,233,.85));color:#fff;border-color:rgba(255,255,255,.16);box-shadow:0 12px 30px rgba(37,99,235,.26)}.menu a.active svg,.menu a:hover svg{color:#fff}
.side-note{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.10);color:#cbd5e1;border-radius:16px}.side-note b{color:#fff}
.main{padding:22px}.topbar{height:auto;min-height:72px;border-radius:22px;border:1px solid rgba(255,255,255,.75);background:rgba(255,255,255,.88);backdrop-filter:blur(18px);box-shadow:var(--shadow);padding:14px 16px;margin-bottom:18px}.title h2{font-size:24px;letter-spacing:-.03em}.title p{font-size:13px}.top-actions button,button{border-radius:12px;border-color:#dbe7f5;transition:.18s ease}.btn-primary{background:linear-gradient(135deg,var(--blue),#0ea5e9);border-color:transparent;box-shadow:0 12px 26px rgba(37,99,235,.22)}button:hover{transform:translateY(-1px);box-shadow:0 14px 26px rgba(15,23,42,.12)}
.card{border-radius:22px;border:1px solid rgba(219,231,245,.95);box-shadow:var(--shadow);background:rgba(255,255,255,.94);overflow:hidden}.card-head{padding:15px 17px;background:linear-gradient(180deg,#fff,rgba(248,250,252,.7));}.card-head h3{font-size:16px;letter-spacing:-.02em}.sub{color:#64748b}.table-wrap{max-height:none}th{background:#f8fbff;color:#64748b}th,td{padding:11px 12px;border-bottom:1px solid #edf3fb}.main-name{font-size:13px}.badge{border-radius:999px;padding:5px 9px}
.kpis{grid-template-columns:repeat(6,minmax(145px,1fr));gap:12px;margin-bottom:16px}.kpi{position:relative;border-radius:20px;padding:16px;border:1px solid rgba(219,231,245,.95);box-shadow:0 14px 34px rgba(15,23,42,.07);overflow:hidden}.kpi:after{content:"";position:absolute;right:-24px;top:-24px;width:84px;height:84px;border-radius:50%;background:rgba(37,99,235,.10)}.kpi span{font-size:11px;letter-spacing:.04em}.kpi strong{font-size:28px;letter-spacing:-.04em}.kpi em{display:block;color:#64748b;font-style:normal;font-size:12px;margin-top:5px}.kpi-blue:after{background:rgba(37,99,235,.13)}.kpi-green:after{background:rgba(16,185,129,.15)}.kpi-orange:after{background:rgba(245,158,11,.16)}.kpi-purple:after{background:rgba(139,92,246,.16)}.kpi-red:after{background:rgba(239,68,68,.14)}.kpi-dark{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff}.kpi-dark span,.kpi-dark em{color:#cbd5e1}.kpi-dark:after{background:rgba(255,255,255,.08)}
.hero-dashboard{display:grid;grid-template-columns:minmax(0,1.35fr) 360px;gap:16px;align-items:stretch;margin-bottom:16px}.hero-dashboard>div{border-radius:26px;padding:24px;border:1px solid rgba(255,255,255,.7);box-shadow:var(--shadow)}.hero-dashboard>div:first-child{background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 58%,#0ea5e9 100%);color:#fff;position:relative;overflow:hidden}.hero-dashboard>div:first-child:after{content:"";position:absolute;right:-80px;top:-80px;width:260px;height:260px;border-radius:50%;background:rgba(255,255,255,.12)}.eyebrow{display:inline-flex;padding:7px 11px;border-radius:999px;background:rgba(255,255,255,.14);font-weight:850;font-size:12px}.hero-dashboard h1{margin:14px 0 8px;font-size:34px;letter-spacing:-.05em}.hero-dashboard p{max-width:720px;color:#dbeafe;margin:0;line-height:1.6}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.hero-actions button:not(.btn-primary){background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.18);color:#fff}.hero-score{background:linear-gradient(180deg,#fff,#f8fbff)}.hero-score span{color:#64748b;font-weight:850;text-transform:uppercase;font-size:12px}.hero-score strong{display:block;font-size:34px;letter-spacing:-.05em;margin:10px 0}.progress,.mini-progress{height:10px;background:#e5eef9;border-radius:999px;overflow:hidden}.progress i,.mini-progress i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2563eb,#10b981)}.hero-score small{display:block;margin-top:10px;color:#64748b}.dashboard-layout{display:grid;grid-template-columns:minmax(0,1.3fr) 360px;gap:14px;margin-bottom:14px}.pipeline-kanban{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:10px;padding:14px}.kanban-col{background:#f8fbff;border:1px solid #e3edf9;border-radius:18px;padding:13px;min-height:118px}.kanban-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.kanban-top b{font-size:13px}.kanban-top strong{font-size:22px;color:#2563eb}.kanban-col span{display:block;color:#64748b;font-size:12px;line-height:1.35;margin:8px 0 12px}.mini-progress{height:7px}.command-list{display:grid;gap:9px;padding:14px}.command-list a{display:block;border:1px solid #e3edf9;background:#f8fbff;border-radius:18px;padding:13px}.command-list a:hover{background:#eef6ff;border-color:#bfdbfe;transform:translateY(-1px)}.command-list b{display:block}.command-list span{display:block;color:#64748b;font-size:12px;margin-top:3px}.premium-split{gap:14px}.split{gap:14px}.premium-alerts .alert,.alert{border-radius:18px}.event{border-radius:14px}.field label{font-size:11px;letter-spacing:.04em}.input,.select,textarea,.field input,.field select,.field textarea{border-radius:13px;background:#fbfdff;border-color:#dbe7f5}.drawer{border-left:0;box-shadow:-24px 0 70px rgba(15,23,42,.24)}.drawer-head{background:linear-gradient(135deg,#0f172a,#1d4ed8);color:#fff}.drawer-head p{color:#dbeafe}.section{border-radius:18px;background:#fff}.mobile-fab{background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;color:#fff!important}
@media(max-width:1280px){.kpis{grid-template-columns:repeat(3,1fr)}.hero-dashboard,.dashboard-layout{grid-template-columns:1fr}.pipeline-kanban{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1180px){.app{grid-template-columns:86px 1fr}.brand img{width:46px;height:38px}.kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.main{padding:12px 12px 74px}.sidebar{width:270px;left:-290px}.topbar{border-radius:18px}.hero-dashboard h1{font-size:26px}.hero-dashboard>div{padding:18px}.kpis{grid-template-columns:1fr}.pipeline-kanban{grid-template-columns:1fr}.dashboard-layout{grid-template-columns:1fr}.split{display:grid;grid-template-columns:1fr}.table-wrap table,.table-wrap thead,.table-wrap tbody,.table-wrap th,.table-wrap td,.table-wrap tr{display:block;min-width:0!important}.table-wrap thead{display:none}.table-wrap tr{border:1px solid #e3edf9;border-radius:16px;margin:10px;background:#fff;overflow:hidden}.table-wrap td{white-space:normal;display:flex;justify-content:space-between;gap:14px}.table-wrap td:before{content:attr(data-label);font-weight:850;color:#64748b}.top-actions{width:100%;justify-content:flex-start}.hero-actions button{width:100%}}

/* =========================================================
   CORRECTION ERGONOMIE - Interface pratique, sobre, sans emoji
   ========================================================= */
:root{
  --primary:#2563eb;
  --primary-dark:#1e40af;
  --primary-soft:#eff6ff;
  --navy:#0f172a;
  --navy-2:#111827;
  --success:#16a34a;
  --warning:#d97706;
  --danger:#dc2626;
  --violet:#7c3aed;
  --page:#f6f8fb;
  --surface:#ffffff;
  --text:#111827;
  --text-soft:#64748b;
  --border:#e2e8f0;
  --border-strong:#cbd5e1;
  --radius:14px;
  --shadow-soft:0 8px 22px rgba(15,23,42,.06);
}
html,body{background:var(--page)!important;color:var(--text)!important;font-size:14px!important;}
body:before{display:none!important;}
.app{grid-template-columns:250px minmax(0,1fr)!important;}
.sidebar{background:var(--navy)!important;color:#fff!important;border-right:0!important;padding:16px 12px!important;box-shadow:none!important;}
.sidebar:before{display:none!important;}
.brand{border-bottom:1px solid rgba(255,255,255,.09)!important;padding:8px 8px 14px!important;}
.brand img{width:48px!important;height:38px!important;background:#fff!important;border-radius:10px!important;padding:4px!important;box-shadow:none!important;filter:none!important;}
.brand h1{font-size:17px!important;color:#fff!important;}
.brand p{color:#94a3b8!important;}
.menu{gap:4px!important;}
.menu a{min-height:40px!important;border-radius:10px!important;color:#cbd5e1!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;padding:9px 10px!important;}
.menu a svg{width:17px!important;height:17px!important;color:#94a3b8!important;filter:none!important;}
.menu a:hover{background:rgba(255,255,255,.07)!important;color:#fff!important;transform:none!important;}
.menu a.active{background:var(--primary)!important;color:#fff!important;border-color:rgba(255,255,255,.12)!important;box-shadow:none!important;}
.menu a.active svg,.menu a:hover svg{color:#fff!important;}
.side-note{background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.10)!important;color:#cbd5e1!important;border-radius:12px!important;}
.main{padding:18px!important;}
.topbar{min-height:64px!important;border-radius:var(--radius)!important;border:1px solid var(--border)!important;background:var(--surface)!important;box-shadow:var(--shadow-soft)!important;backdrop-filter:none!important;padding:12px 14px!important;margin-bottom:14px!important;}
.title h2{font-size:22px!important;color:var(--text)!important;letter-spacing:-.02em!important;}
.title p{font-size:13px!important;color:var(--text-soft)!important;font-weight:500!important;}
button{border-radius:10px!important;border:1px solid var(--border-strong)!important;background:#fff!important;color:#1f2937!important;box-shadow:none!important;transform:none!important;min-height:38px!important;padding:8px 11px!important;gap:7px!important;}
button:hover{background:#f8fafc!important;border-color:#94a3b8!important;box-shadow:none!important;transform:none!important;}
.btn-primary{background:var(--primary)!important;border-color:var(--primary)!important;color:#fff!important;box-shadow:none!important;}
.btn-primary:hover{background:var(--primary-dark)!important;border-color:var(--primary-dark)!important;color:#fff!important;}
.btn-green{background:var(--success)!important;border-color:var(--success)!important;color:#fff!important;}
.btn-orange{background:var(--warning)!important;border-color:var(--warning)!important;color:#fff!important;}
.btn-red{background:var(--danger)!important;border-color:var(--danger)!important;color:#fff!important;}
.card{background:var(--surface)!important;border:1px solid var(--border)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow-soft)!important;overflow:hidden!important;}
.card:hover{box-shadow:var(--shadow-soft)!important;}
.card-head{padding:13px 14px!important;background:#fff!important;border-bottom:1px solid var(--border)!important;}
.card-head h3{font-size:15px!important;color:var(--text)!important;}
.home-hero.clean-hero{display:grid;grid-template-columns:minmax(0,1.5fr) 340px;gap:14px;margin-bottom:14px;}
.clean-hero .hero-copy,.priority-panel{border:1px solid var(--border);border-radius:18px;background:#fff;box-shadow:var(--shadow-soft);padding:22px;}
.clean-hero .hero-copy{background:linear-gradient(135deg,#0f172a,#1e40af)!important;color:#fff!important;}
.clean-hero .hero-copy h1{margin:12px 0 8px!important;font-size:30px!important;line-height:1.1!important;letter-spacing:-.04em!important;color:#fff!important;}
.clean-hero .hero-copy p{max-width:760px!important;color:#dbeafe!important;line-height:1.55!important;margin:0!important;}
.eyebrow{display:inline-flex!important;background:rgba(255,255,255,.12)!important;color:#dbeafe!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:999px!important;padding:6px 10px!important;font-size:12px!important;font-weight:800!important;}
.hero-actions{display:flex!important;gap:9px!important;flex-wrap:wrap!important;margin-top:18px!important;}
.hero-actions button:not(.btn-primary){background:rgba(255,255,255,.10)!important;border-color:rgba(255,255,255,.20)!important;color:#fff!important;}
.priority-panel .panel-head{display:flex;align-items:center;gap:9px;color:var(--text-soft);font-size:13px;text-transform:uppercase;letter-spacing:.04em;}
.priority-panel .panel-head span{width:34px;height:34px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;background:var(--primary-soft);color:var(--primary);}
.priority-panel strong{display:block;font-size:32px;margin:14px 0 12px;letter-spacing:-.04em;}
.progress,.mini-progress{height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden;}
.progress i,.mini-progress i{display:block;height:100%;background:var(--primary)!important;border-radius:999px;}
.priority-panel small{display:block;margin-top:9px;color:var(--text-soft);}
.mini-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px;}
.mini-stats span{border:1px solid var(--border);border-radius:12px;padding:10px;color:var(--text-soft);font-size:12px;}
.mini-stats b{display:block;color:var(--text);font-size:18px;}
.kpis.clean-kpis{grid-template-columns:repeat(6,minmax(145px,1fr))!important;gap:10px!important;margin-bottom:14px!important;}
.kpi{border-radius:14px!important;border:1px solid var(--border)!important;background:#fff!important;box-shadow:var(--shadow-soft)!important;padding:13px!important;min-height:112px!important;}
.kpi:before,.kpi:after{display:none!important;}
.kpi-icon,.cmd-icon,.step-icon{width:34px;height:34px;border-radius:10px;background:var(--primary-soft);color:var(--primary);display:inline-flex;align-items:center;justify-content:center;margin-bottom:10px;}
.kpi-icon.green{background:#ecfdf5;color:var(--success);}.kpi-icon.orange{background:#fff7ed;color:var(--warning);}.kpi-icon.purple{background:#f5f3ff;color:var(--violet);}.kpi-icon.red{background:#fef2f2;color:var(--danger);}.kpi-icon.dark{background:rgba(255,255,255,.13);color:#fff;}
.kpi span{font-size:11px!important;color:var(--text-soft)!important;text-transform:uppercase!important;letter-spacing:.04em!important;}
.kpi strong{font-size:25px!important;color:var(--text)!important;background:none!important;-webkit-background-clip:initial!important;background-clip:initial!important;letter-spacing:-.04em!important;}
.kpi em{display:block!important;color:var(--text-soft)!important;font-style:normal!important;font-size:12px!important;margin-top:5px!important;}
.dark-kpi{background:var(--navy)!important;color:#fff!important;}
.dark-kpi span,.dark-kpi em{color:#cbd5e1!important;}.dark-kpi strong{color:#fff!important;}
.practical-layout{display:grid!important;grid-template-columns:minmax(0,1.35fr) 340px!important;gap:14px!important;margin-bottom:14px!important;}
.compact-pipeline{display:grid!important;grid-template-columns:repeat(6,minmax(130px,1fr))!important;gap:9px!important;padding:12px!important;}
.kanban-col{background:#f8fafc!important;border:1px solid var(--border)!important;border-radius:13px!important;padding:12px!important;min-height:124px!important;}
.kanban-top{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;}
.kanban-top .step-icon{margin:0!important;width:30px!important;height:30px!important;}
.kanban-top b{font-size:13px!important;color:var(--text)!important;}
.kanban-top strong{font-size:20px!important;color:var(--primary)!important;}
.kanban-col>span{display:block!important;color:var(--text-soft)!important;font-size:12px!important;margin:9px 0 12px!important;}
.clean-command-list{display:grid!important;gap:8px!important;padding:12px!important;}
.clean-command-list a{display:grid!important;grid-template-columns:40px 1fr!important;grid-template-rows:auto auto!important;column-gap:10px!important;align-items:center!important;background:#fff!important;border:1px solid var(--border)!important;border-radius:13px!important;padding:11px!important;transform:none!important;}
.clean-command-list a:hover{background:#f8fafc!important;border-color:#bfdbfe!important;transform:none!important;}
.clean-command-list .cmd-icon{grid-row:1/3;margin:0!important;}
.clean-command-list b{font-size:13px!important;color:var(--text)!important;}
.clean-command-list small{font-size:12px!important;color:var(--text-soft)!important;margin-top:2px!important;}
.split{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px!important;}
.table-wrap{max-height:none!important;}
th{background:#f8fafc!important;color:#64748b!important;font-size:11px!important;letter-spacing:.03em!important;}
th,td{padding:10px 11px!important;border-bottom:1px solid #edf2f7!important;}
tr:hover td{background:#f8fafc!important;}
.badge{box-shadow:none!important;border-radius:999px!important;padding:5px 8px!important;font-size:11px!important;}
.input,.select,textarea,.field input,.field select,.field textarea{border-radius:10px!important;border:1px solid var(--border-strong)!important;background:#fff!important;}
.alert{border-radius:12px!important;border-left-width:4px!important;}
.mobile-fab{font-size:0!important;background:var(--primary)!important;border-color:var(--primary)!important;color:#fff!important;box-shadow:0 14px 28px rgba(37,99,235,.28)!important;}
.mobile-fab:before{display:none!important;}
.mobile-fab svg{width:24px!important;height:24px!important;color:#fff!important;}
@media(max-width:1280px){.kpis.clean-kpis{grid-template-columns:repeat(3,1fr)!important}.home-hero.clean-hero,.practical-layout{grid-template-columns:1fr!important}.compact-pipeline{grid-template-columns:repeat(3,1fr)!important}}
@media(max-width:1180px){.app{grid-template-columns:82px 1fr!important}.brand h1,.brand p,.menu span,.side-note{display:none!important}.brand,.menu a{justify-content:center!important}.kpis.clean-kpis{grid-template-columns:repeat(3,1fr)!important}}
@media(max-width:760px){.app{display:block!important}.sidebar{position:fixed!important;left:-280px!important;width:260px!important;transition:.2s!important}.main{padding:10px 10px 82px!important}.topbar{border-radius:13px!important;align-items:flex-start!important}.menu-toggle{display:inline-flex!important;background:var(--primary)!important;border-color:var(--primary)!important;color:#fff!important}.clean-hero .hero-copy h1{font-size:24px!important}.clean-hero .hero-copy,.priority-panel{padding:16px!important;border-radius:14px!important}.kpis.clean-kpis{grid-template-columns:1fr!important}.compact-pipeline{grid-template-columns:1fr!important}.split{grid-template-columns:1fr!important}.clean-command-list a{grid-template-columns:36px 1fr!important}.mobile-bottom{display:grid!important;background:#fff!important;border:1px solid var(--border)!important;box-shadow:0 -10px 24px rgba(15,23,42,.10)!important}.mobile-bottom a{color:#475569!important}.mobile-bottom a.active{color:var(--primary)!important;background:var(--primary-soft)!important}.hero-actions button{width:100%!important}.top-actions{width:100%!important}.top-actions button{flex:1!important}}
@media(max-width:430px){.title h2{font-size:17px!important}.title p{font-size:12px!important}.priority-panel strong{font-size:26px!important}.mini-stats{grid-template-columns:1fr!important}.kpi{min-height:100px!important}.kpi strong{font-size:22px!important}}


/* =========================================================
   PATCH LOGO + NAVIGATION COMPACTE SKYWEBIS
   Objectif : logo affiche comme la reference, sidebar sombre,
   navigation reduite et pratique sur petit ecran.
   ========================================================= */
:root{
  --nav-bg:#0f172a;
  --nav-bg-2:#111827;
  --nav-line:rgba(148,163,184,.18);
  --nav-text:#e5eefb;
  --nav-muted:#38bdf8;
}
.sidebar{
  background:linear-gradient(180deg,var(--nav-bg),var(--nav-bg-2));
  border-right:1px solid rgba(148,163,184,.16);
  color:var(--nav-text);
  padding:14px 10px;
}
.brand{
  display:grid;
  grid-template-columns:minmax(0,1fr) 42px;
  align-items:end;
  gap:8px;
  padding:0 0 12px;
  margin-bottom:6px;
  border-bottom:1px solid var(--nav-line);
}
.brand img{
  grid-column:1/-1;
  width:160px;
  height:auto;
  max-height:78px;
  object-fit:contain;
  justify-self:center;
  display:block;
}
.brand .brand-text{min-width:0;padding-left:2px;}
.brand h1{
  color:#fff;
  font-family:Georgia,"Times New Roman",serif;
  font-size:14px;
  font-weight:900;
  line-height:1.05;
  letter-spacing:.01em;
  margin:0;
}
.brand p{
  color:#7dd3fc;
  font-size:10.5px;
  font-weight:800;
  line-height:1.15;
  margin:3px 0 0;
}
.nav-collapse{
  background:rgba(255,255,255,.08)!important;
  border-color:rgba(148,163,184,.32)!important;
  color:#e2e8f0!important;
}
.nav-collapse:hover{background:rgba(255,255,255,.14)!important;box-shadow:none;}
.menu a{
  color:#cbd5e1;
  border:1px solid transparent;
}
.menu a.active,.menu a:hover{
  background:rgba(37,99,235,.18);
  color:#fff;
  border-color:rgba(59,130,246,.22);
}
.menu a svg{color:#93c5fd;}
.menu a.active svg,.menu a:hover svg{color:#60a5fa;}
.side-note{
  background:rgba(255,255,255,.06);
  border-color:var(--nav-line);
  color:#cbd5e1;
}
.side-note b{color:#fff;}
body.sidebar-collapsed .sidebar{background:linear-gradient(180deg,var(--nav-bg),var(--nav-bg-2));}
body.sidebar-collapsed .brand{
  display:flex;
  justify-content:center;
  align-items:center;
  border-bottom:1px solid var(--nav-line);
  padding:0 0 10px;
  margin-bottom:8px;
}
body.sidebar-collapsed .brand img{
  width:46px!important;
  height:46px!important;
  object-fit:cover;
  object-position:left center;
  border-radius:12px;
}
body.sidebar-collapsed .nav-collapse{display:none!important;}
body.sidebar-collapsed .menu a{background:rgba(255,255,255,.04);}
body.sidebar-collapsed .menu a.active{background:rgba(37,99,235,.24);}

/* Petit ecran : la navigation reste cachee, compacte, et le logo garde le rendu de la reference */
@media (max-width:760px){
  .sidebar{
    width:210px!important;
    max-width:210px!important;
    left:-225px!important;
    padding:12px 9px 18px!important;
  }
  body.nav-open .sidebar{left:0!important;}
  .brand{
    grid-template-columns:minmax(0,1fr) 40px!important;
    gap:7px!important;
    padding:0 0 11px!important;
    margin-bottom:8px!important;
  }
  .brand img{
    width:158px!important;
    max-height:76px!important;
    height:auto!important;
    justify-self:center!important;
  }
  .brand h1{font-size:14px!important;display:block!important;}
  .brand p{font-size:10px!important;display:block!important;color:#7dd3fc!important;}
  .brand .brand-text{display:block!important;}
  .nav-collapse{width:38px!important;height:38px!important;min-height:38px!important;border-radius:12px!important;display:inline-flex!important;}
  .menu{gap:5px!important;}
  .menu a{
    min-height:38px!important;
    padding:8px 9px!important;
    border-radius:10px!important;
    font-size:12px!important;
  }
  .menu a svg{width:15px!important;height:15px!important;}
  .side-note{font-size:10.5px!important;padding:8px!important;border-radius:10px!important;}
  .topbar{min-height:52px!important;padding:7px 8px!important;border-radius:12px!important;}
  .menu-toggle{width:38px!important;height:38px!important;min-height:38px!important;border-radius:11px!important;}
  .title h2{font-size:15px!important;}
  .title p{font-size:10.5px!important;}
  .mobile-bottom{height:52px!important;}
  .mobile-bottom a{min-height:50px!important;font-size:9.5px!important;padding:6px 1px!important;}
  .mobile-bottom a svg{width:15px;height:15px;display:block;margin:0 auto 2px;}
}
@media (max-width:430px){
  .sidebar{width:190px!important;max-width:190px!important;left:-205px!important;padding:10px 8px 16px!important;}
  body.nav-open .sidebar{left:0!important;}
  .brand img{width:148px!important;max-height:72px!important;}
  .brand h1{font-size:13px!important;}
  .brand p{font-size:9.5px!important;}
  .nav-collapse,.menu-toggle{width:36px!important;height:36px!important;min-height:36px!important;}
  .menu a{min-height:36px!important;padding:7px 8px!important;font-size:11.5px!important;gap:8px!important;}
}

/* =========================================================
   CORRECTION FINALE NAVIGATION + TABLEAUX
   - 1 seule navigation (sidebar)
   - bouton menu toujours disponible
   - sidebar pleine / reduite / masquee selon largeur
   - scroll horizontal aussi en haut des tableaux
   ========================================================= */
.mobile-bottom{display:none!important}
body{overflow-x:hidden}
.menu-toggle{display:inline-flex!important;flex:0 0 38px;width:38px;height:38px;border-radius:12px;background:#fff;color:#0f172a}
.nav-backdrop{display:none}
.topbar{position:sticky;top:0;z-index:80;background:rgba(255,255,255,.96);backdrop-filter:blur(10px)}
.sidebar{overflow:hidden;background:linear-gradient(180deg,#0f172a,#111827)!important;color:#e5e7eb;border-right:1px solid rgba(148,163,184,.18)}
.sidebar .menu{overflow-y:auto;overflow-x:hidden;min-height:0;padding-right:2px;scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.45) transparent}
.sidebar .menu::-webkit-scrollbar{width:6px}.sidebar .menu::-webkit-scrollbar-thumb{background:rgba(148,163,184,.45);border-radius:999px}
.brand{display:grid!important;grid-template-columns:minmax(0,1fr) 40px;align-items:center;gap:8px;border-bottom:1px solid rgba(148,163,184,.2);padding:0 0 12px!important;margin-bottom:4px}
.brand img{grid-column:1/-1;width:160px!important;height:auto!important;max-height:78px!important;object-fit:contain!important;object-position:center!important;justify-self:center;display:block;border-radius:0!important;background:transparent!important}
.brand .brand-text{display:block!important;min-width:0}.brand h1{display:block!important;color:#fff!important}.brand p{display:block!important;color:#7dd3fc!important}
.nav-collapse{grid-column:2;grid-row:2;display:inline-flex!important;margin:0!important;background:rgba(255,255,255,.08)!important;border-color:rgba(148,163,184,.32)!important;color:#e2e8f0!important}
.menu a{color:#cbd5e1!important;border:1px solid transparent}.menu a.active,.menu a:hover{background:rgba(37,99,235,.20)!important;color:#fff!important;border-color:rgba(59,130,246,.25)}
.side-note{background:rgba(255,255,255,.06)!important;border-color:rgba(148,163,184,.22)!important;color:#cbd5e1!important}.side-note b{color:#fff!important}

/* Tableaux : scrollbar haute synchronisee + entete fixe */
.table-zone{position:relative;background:#fff}
.table-scroll-top{height:16px;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid #eef2f7;background:#f8fafc;scrollbar-width:thin}
.table-scroll-top>div{height:1px}
.table-wrap{overflow:auto;max-height:calc(100vh - 245px);scrollbar-width:thin}
.table-wrap thead th, th{position:sticky;top:0;z-index:3;background:#f8fafc;box-shadow:0 1px 0 #e5e7eb}

/* Grand ecran : sidebar complete */
@media (min-width:1400px){
  body:not(.sidebar-collapsed) .app{grid-template-columns:230px minmax(0,1fr)!important}
  body:not(.sidebar-collapsed) .brand img{width:160px!important;max-height:78px!important}
  body:not(.sidebar-collapsed) .menu a span,body:not(.sidebar-collapsed) .brand .brand-text,body:not(.sidebar-collapsed) .side-note{display:block!important}
  body.sidebar-collapsed .app{grid-template-columns:78px minmax(0,1fr)!important}
  body.sidebar-collapsed .brand{display:flex!important;justify-content:center!important;padding:0 0 10px!important}
  body.sidebar-collapsed .brand img{width:46px!important;height:46px!important;object-fit:contain!important;object-position:center!important;border-radius:0!important}
  body.sidebar-collapsed .brand .brand-text,body.sidebar-collapsed .menu a span,body.sidebar-collapsed .side-note{display:none!important}
  body.sidebar-collapsed .nav-collapse{display:inline-flex!important;margin:8px auto 0!important;width:42px;height:38px}
  body.sidebar-collapsed .menu a{justify-content:center;width:48px;margin:0 auto;padding:10px 0}
}

/* Ecran moyen PC : sidebar reduite automatiquement, mais reouvrable */
@media (min-width:1000px) and (max-width:1399px){
  body:not(.sidebar-expanded-medium) .app{grid-template-columns:78px minmax(0,1fr)!important}
  body:not(.sidebar-expanded-medium) .sidebar{padding:14px 10px!important;align-items:center}
  body:not(.sidebar-expanded-medium) .brand{display:flex!important;justify-content:center!important;width:100%;padding:0 0 10px!important;margin-bottom:8px!important}
  body:not(.sidebar-expanded-medium) .brand img{width:46px!important;height:46px!important;object-fit:contain!important;object-position:center!important;border-radius:0!important}
  body:not(.sidebar-expanded-medium) .brand .brand-text,body:not(.sidebar-expanded-medium) .menu a span,body:not(.sidebar-expanded-medium) .side-note{display:none!important}
  body:not(.sidebar-expanded-medium) .nav-collapse{display:inline-flex!important;margin:8px auto 0!important;width:42px;height:38px}
  body:not(.sidebar-expanded-medium) .menu{width:100%;gap:8px;overflow-y:auto}
  body:not(.sidebar-expanded-medium) .menu a{justify-content:center;width:48px;min-height:42px;margin:0 auto;padding:10px 0;border-radius:14px}
  body.sidebar-expanded-medium .app{grid-template-columns:230px minmax(0,1fr)!important}
  body.sidebar-expanded-medium .brand img{width:160px!important;max-height:78px!important;height:auto!important}
  body.sidebar-expanded-medium .brand .brand-text,body.sidebar-expanded-medium .menu a span,body.sidebar-expanded-medium .side-note{display:block!important}
}

/* Petit ecran et petit PC : sidebar cachee, bouton topbar pour afficher */
@media (max-width:999px){
  .app{display:block!important;min-height:100vh!important}
  .main{padding:10px 10px 22px!important;width:100%;min-width:0;overflow:visible!important}
  .topbar{min-height:58px!important;height:auto!important;margin:0 0 12px!important;border-radius:14px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:9px!important}
  .top-actions{display:none!important}
  .sidebar{position:fixed!important;top:0!important;left:0!important;width:260px!important;max-width:86vw!important;height:100dvh!important;max-height:100dvh!important;transform:translateX(-108%)!important;transition:transform .22s ease!important;z-index:1000!important;padding:12px 10px 18px!important;box-shadow:18px 0 44px rgba(15,23,42,.28)}
  body.nav-open .sidebar{transform:translateX(0)!important}
  body.nav-open .nav-backdrop{display:block;position:fixed;inset:0;background:rgba(15,23,42,.46);z-index:990}
  .brand{grid-template-columns:minmax(0,1fr) 40px!important;gap:7px!important;padding:0 0 11px!important;margin-bottom:8px!important}
  .brand img{width:158px!important;max-height:76px!important;height:auto!important;justify-self:center!important}
  .brand .brand-text,.brand h1,.brand p,.menu a span,.side-note{display:block!important}
  .nav-collapse{width:38px!important;height:38px!important;min-height:38px!important;border-radius:12px!important;display:inline-flex!important}
  .menu{gap:5px!important;overflow-y:auto!important}
  .menu a{justify-content:flex-start!important;width:auto!important;margin:0!important;min-height:40px!important;padding:8px 9px!important;border-radius:10px!important;font-size:12px!important}
  .menu a svg{width:15px!important;height:15px!important}
  .side-note{font-size:10.5px!important;padding:8px!important;border-radius:10px!important}
  .title{min-width:0;flex:1}.title h2{font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.title p{font-size:11px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-fab{display:none!important}
  .table-scroll-top{display:none!important}
}

@media (max-width:430px){
  .main{padding:8px 8px 18px!important}
  .sidebar{width:224px!important;max-width:88vw!important;padding:10px 8px 16px!important}
  .brand img{width:148px!important;max-height:72px!important}
  .brand h1{font-size:13px!important}.brand p{font-size:9.5px!important}
  .menu-toggle,.nav-collapse{width:36px!important;height:36px!important;min-height:36px!important}
  .menu a{min-height:36px!important;padding:7px 8px!important;font-size:11.5px!important;gap:8px!important}
}

/* =========================================================
   CORRECTION DEMANDEE - MENU UNIQUE + TABLEAUX MANIABLES
   - un seul bouton menu dans la barre du haut
   - le bouton permet d'ouvrir/fermer la sidebar sur tous les formats
   - la sidebar reduite peut etre rouverte
   - les tableaux larges gardent un scroll horizontal visible en haut
   - l'entete du tableau reste fixe pendant le scroll vertical
   ========================================================= */
.nav-collapse{display:none!important}
.brand{grid-template-columns:1fr!important}
.brand img{grid-column:1!important}
.brand .brand-text{grid-column:1!important;text-align:left}
.menu-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;z-index:120!important}

@media (min-width:1400px){
  body:not(.sidebar-collapsed) .app{grid-template-columns:230px minmax(0,1fr)!important}
  body.sidebar-collapsed .app{grid-template-columns:78px minmax(0,1fr)!important}
  body.sidebar-collapsed .brand{display:flex!important;justify-content:center!important;padding-bottom:12px!important}
  body.sidebar-collapsed .brand img{width:46px!important;height:46px!important;max-height:46px!important;object-fit:contain!important}
  body.sidebar-collapsed .brand .brand-text,
  body.sidebar-collapsed .menu a span,
  body.sidebar-collapsed .side-note{display:none!important}
  body.sidebar-collapsed .menu a{justify-content:center!important;width:48px!important;margin:0 auto!important;padding:10px 0!important}
}

@media (min-width:1000px) and (max-width:1399px){
  body:not(.sidebar-expanded-medium) .app{grid-template-columns:78px minmax(0,1fr)!important}
  body.sidebar-expanded-medium .app{grid-template-columns:230px minmax(0,1fr)!important}
  body:not(.sidebar-expanded-medium) .brand{display:flex!important;justify-content:center!important;padding-bottom:12px!important}
  body:not(.sidebar-expanded-medium) .brand img{width:46px!important;height:46px!important;max-height:46px!important;object-fit:contain!important}
  body:not(.sidebar-expanded-medium) .brand .brand-text,
  body:not(.sidebar-expanded-medium) .menu a span,
  body:not(.sidebar-expanded-medium) .side-note{display:none!important}
  body:not(.sidebar-expanded-medium) .menu a{justify-content:center!important;width:48px!important;margin:0 auto!important;padding:10px 0!important}
}

@media (max-width:999px){
  .menu-toggle{display:inline-flex!important;background:#fff!important;color:#0f172a!important;border-color:#d8e1ee!important}
  .sidebar{transform:translateX(-108%)!important}
  body.nav-open .sidebar{transform:translateX(0)!important}
}

/* Scroll horizontal utile au milieu des grands tableaux */
.table-zone{position:relative!important;overflow:visible!important}
.table-scroll-top{
  display:block!important;
  position:sticky!important;
  top:62px!important;
  z-index:70!important;
  height:20px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  background:#f8fafc!important;
  border-top:1px solid #e5e7eb!important;
  border-bottom:1px solid #dfe7f1!important;
  scrollbar-width:thin!important;
}
.table-scroll-top::-webkit-scrollbar{height:12px!important}
.table-scroll-top::-webkit-scrollbar-track{background:#edf2f7!important;border-radius:999px!important}
.table-scroll-top::-webkit-scrollbar-thumb{background:#94a3b8!important;border-radius:999px!important;border:2px solid #edf2f7!important}
.table-scroll-top>div{height:1px!important}
.table-wrap{
  overflow:auto!important;
  max-height:calc(100vh - 255px)!important;
  scrollbar-width:thin!important;
}
.table-wrap::-webkit-scrollbar{height:12px;width:10px}
.table-wrap::-webkit-scrollbar-track{background:#edf2f7;border-radius:999px}
.table-wrap::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:999px;border:2px solid #edf2f7}
.table-wrap thead th,
.table-wrap th{
  position:sticky!important;
  top:0!important;
  z-index:5!important;
  background:#f8fafc!important;
  box-shadow:0 1px 0 #e5e7eb!important;
}

@media (max-width:760px){
  .table-scroll-top{display:none!important}
  .table-wrap{max-height:none!important;overflow:visible!important}
}

/* =========================================================
   CORRECTION FINALE UTILISATEUR - 15/06/2026
   Tableaux propres : plus de double barre horizontale en haut/bas,
   navigation integree au design avec boutons gauche/droite,
   entete lisible et sticky, menu unique, actions televente compactes.
   ========================================================= */
.nav-collapse,
.table-scroll-top{display:none!important;}
.menu-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;}

.table-zone{
  position:relative!important;
  overflow:visible!important;
  background:#fff!important;
  border-radius:0 0 18px 18px!important;
}
.table-navigation{
  position:sticky!important;
  top:82px!important;
  z-index:85!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:9px 14px!important;
  border-top:1px solid #e7edf6!important;
  border-bottom:1px solid #e7edf6!important;
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.98))!important;
  backdrop-filter:blur(10px)!important;
}
.table-zone:not(.has-horizontal-scroll) .table-navigation{display:none!important;}
.table-nav-btn{
  width:34px!important;
  height:32px!important;
  min-height:32px!important;
  flex:0 0 34px!important;
  padding:0!important;
  border-radius:10px!important;
  border:1px solid #d9e3f0!important;
  background:#fff!important;
  color:#0f172a!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-shadow:0 4px 12px rgba(15,23,42,.05)!important;
}
.table-nav-btn:hover:not(:disabled){background:#eff6ff!important;border-color:#bfdbfe!important;color:#2563eb!important;}
.table-nav-btn:disabled{opacity:.38!important;cursor:not-allowed!important;box-shadow:none!important;}
.table-nav-btn svg{width:17px!important;height:17px!important;stroke-width:2.4!important;}
.table-nav-track{
  position:relative!important;
  height:8px!important;
  flex:1 1 auto!important;
  min-width:80px!important;
  border-radius:999px!important;
  background:#e8eef7!important;
  overflow:hidden!important;
}
.table-nav-track span{
  position:absolute!important;
  left:0;
  top:0;
  height:100%!important;
  min-width:28px!important;
  border-radius:999px!important;
  background:linear-gradient(90deg,#2563eb,#0ea5e9)!important;
  transition:left .08s linear,width .12s ease!important;
}
.table-wrap{
  overflow-x:auto!important;
  overflow-y:visible!important;
  max-height:none!important;
  border-radius:0 0 18px 18px!important;
  scrollbar-width:thin!important;
  cursor:default!important;
}
.table-wrap.is-dragging{cursor:grabbing!important;user-select:none!important;}
.table-wrap::-webkit-scrollbar{height:9px!important;width:0!important;}
.table-wrap::-webkit-scrollbar-track{background:#eef2f7!important;border-radius:999px!important;}
.table-wrap::-webkit-scrollbar-thumb{background:#b6c2d2!important;border-radius:999px!important;border:2px solid #eef2f7!important;}
.table-wrap table{border-collapse:separate!important;border-spacing:0!important;}
.table-wrap thead th,
.table-wrap th{
  position:sticky!important;
  top:124px!important;
  z-index:60!important;
  background:#f8fafc!important;
  box-shadow:0 1px 0 #e5e7eb,0 8px 14px rgba(15,23,42,.035)!important;
}
.table-wrap td,.table-wrap th{white-space:nowrap!important;}
.table-wrap td:last-child,.table-wrap th:last-child{padding-right:16px!important;}
.row-actions{display:flex!important;align-items:center!important;gap:8px!important;white-space:nowrap!important;}
.row-actions button{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:12px!important;
}
.row-actions button svg{width:18px!important;height:18px!important;}
.row-actions button.icon-only{font-size:0!important;}
.row-actions button.icon-only svg{margin:0!important;}

@media (max-width:760px){
  .table-navigation{display:none!important;}
  .table-wrap{overflow:visible!important;max-height:none!important;cursor:default!important;}
  .table-wrap thead th,.table-wrap th{position:static!important;top:auto!important;}
  .row-actions button{flex:1 1 auto!important;width:auto!important;min-width:0!important;font-size:13px!important;}
  .row-actions button.icon-only{font-size:0!important;flex:0 0 44px!important;}
}


/* =========================================================
   VERIFICATION ET CORRECTION PROPRE - NAVIGATION + TABLEAUX
   Objectif : un seul bouton menu, tableaux propres, commandes
   horizontales integrees, entete fixe, actions compactes.
   ========================================================= */
.nav-collapse,
.table-navigation,
.table-scroll-top,
.table-nav-track{display:none!important;}
.menu-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;}

/* Le menu reduit garde le bouton de reouverture dans la topbar */
@media (min-width:1400px){
  body:not(.sidebar-collapsed) .app{grid-template-columns:230px minmax(0,1fr)!important;}
  body.sidebar-collapsed .app{grid-template-columns:78px minmax(0,1fr)!important;}
}
@media (min-width:1000px) and (max-width:1399px){
  body:not(.sidebar-expanded-medium) .app{grid-template-columns:78px minmax(0,1fr)!important;}
  body.sidebar-expanded-medium .app{grid-template-columns:230px minmax(0,1fr)!important;}
}

/* Tables : design sans double grosse barre */
.table-zone{
  position:relative!important;
  overflow:visible!important;
  background:#fff!important;
  border-radius:0 0 18px 18px!important;
}
.table-tools{
  position:sticky!important;
  top:82px!important;
  z-index:90!important;
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:6px!important;
  padding:8px 12px 6px!important;
  min-height:44px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.96))!important;
  border-top:1px solid #eef2f7!important;
  border-bottom:1px solid #eef2f7!important;
  backdrop-filter:blur(8px)!important;
}
.table-zone:not(.has-horizontal-scroll) .table-tools{display:none!important;}
.table-nav-btn{
  width:36px!important;
  height:34px!important;
  min-width:36px!important;
  min-height:34px!important;
  padding:0!important;
  border-radius:11px!important;
  border:1px solid #d7e2ef!important;
  background:#fff!important;
  color:#0f172a!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-shadow:0 6px 14px rgba(15,23,42,.06)!important;
}
.table-nav-btn:hover:not(:disabled){background:#eff6ff!important;border-color:#bfdbfe!important;color:#2563eb!important;}
.table-nav-btn:disabled{opacity:.32!important;cursor:not-allowed!important;box-shadow:none!important;}
.table-nav-btn svg{width:18px!important;height:18px!important;stroke-width:2.4!important;}
.table-wrap{
  overflow:auto!important;
  max-height:430px!important;
  border-radius:0 0 18px 18px!important;
  scrollbar-width:thin!important;
  scrollbar-color:#aab7c8 #edf2f7!important;
  cursor:default!important;
}
.table-wrap.is-dragging{cursor:grabbing!important;user-select:none!important;}
.table-wrap::-webkit-scrollbar{height:10px!important;width:10px!important;}
.table-wrap::-webkit-scrollbar-track{background:#edf2f7!important;border-radius:999px!important;}
.table-wrap::-webkit-scrollbar-thumb{background:#aab7c8!important;border-radius:999px!important;border:2px solid #edf2f7!important;}
.table-wrap table{border-collapse:separate!important;border-spacing:0!important;}
.table-wrap thead th,
.table-wrap th{
  position:sticky!important;
  top:0!important;
  z-index:40!important;
  background:#f8fafc!important;
  box-shadow:0 1px 0 #e5e7eb,0 8px 14px rgba(15,23,42,.035)!important;
}
.table-wrap td,.table-wrap th{white-space:nowrap!important;}
.table-wrap td:last-child,.table-wrap th:last-child{padding-right:16px!important;}
.row-actions{display:flex!important;align-items:center!important;gap:8px!important;white-space:nowrap!important;}
.row-actions button{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:12px!important;
}
.row-actions button svg{width:18px!important;height:18px!important;}
.row-actions button.icon-only{font-size:0!important;}
.row-actions button.icon-only svg{margin:0!important;}

@media (max-width:760px){
  .table-tools{display:none!important;}
  .table-wrap{max-height:none!important;overflow:visible!important;border-radius:0 0 16px 16px!important;}
  .table-wrap thead th,.table-wrap th{position:static!important;top:auto!important;}
  .row-actions button{flex:0 0 42px!important;width:42px!important;min-width:42px!important;font-size:0!important;}
}

/* =========================================================
   CORRECTION FINALE CONTROLEE - TABLEAUX ET PAGE TELEVENTE
   - RDV a traiter visible en largeur sans scroll horizontal PC
   - entetes de tableaux propres et fixes dans le conteneur
   - boutons d'action compacts et integres
   ========================================================= */
.table-zone{position:relative!important;background:#fff!important;border-radius:0 0 18px 18px!important;overflow:hidden!important;}
.table-zone-fit .table-tools{display:none!important;}
.table-tools{position:sticky!important;top:0!important;z-index:25!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:6px!important;padding:8px 12px!important;background:#f8fafc!important;border-top:1px solid #e5edf7!important;border-bottom:1px solid #e5edf7!important;}
.table-zone:not(.has-horizontal-scroll) .table-tools{display:none!important;}
.table-nav-btn{width:34px!important;height:32px!important;min-width:34px!important;min-height:32px!important;border-radius:10px!important;padding:0!important;background:#fff!important;border:1px solid #d7e2ef!important;color:#0f172a!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-shadow:none!important;}
.table-nav-btn svg{width:16px!important;height:16px!important;stroke-width:2.4!important;}
.table-wrap{width:100%!important;overflow:auto!important;max-height:520px!important;border-radius:0 0 18px 18px!important;scrollbar-width:thin!important;scrollbar-color:#aab7c8 #edf2f7!important;}
.table-wrap::-webkit-scrollbar{height:10px!important;width:10px!important;}
.table-wrap::-webkit-scrollbar-track{background:#edf2f7!important;border-radius:999px!important;}
.table-wrap::-webkit-scrollbar-thumb{background:#aab7c8!important;border-radius:999px!important;border:2px solid #edf2f7!important;}
.table-wrap table{border-collapse:separate!important;border-spacing:0!important;background:#fff!important;}
.table-wrap th{position:sticky!important;top:0!important;z-index:8!important;background:#f8fafc!important;color:#52637a!important;font-size:11px!important;line-height:1.2!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.02em!important;box-shadow:0 1px 0 #e5e7eb!important;}
.table-wrap th,.table-wrap td{padding:10px 12px!important;border-bottom:1px solid #edf2f7!important;vertical-align:middle!important;white-space:nowrap!important;}
.table-wrap td{font-size:13px!important;background:#fff!important;}
.table-wrap tr:hover td{background:#fbfdff!important;}
.row-actions{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;white-space:nowrap!important;}
.row-actions button{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:0!important;border-radius:11px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
.row-actions button svg{width:17px!important;height:17px!important;}
.row-actions button.icon-only{font-size:0!important;}

/* Televente : le tableau RDV a traiter doit rentrer directement dans l'ecran PC */
.tv-card{overflow:hidden!important;}
.tv-card .card-head{gap:12px!important;align-items:center!important;}
.tv-card .tools{flex:0 0 auto!important;display:flex!important;gap:8px!important;align-items:center!important;}
.tv-card .tools .input{width:245px!important;min-width:0!important;}
.tv-card .tools .select{width:170px!important;min-width:0!important;}
.tv-card .table-wrap{overflow-x:hidden!important;overflow-y:auto!important;max-height:calc(100vh - 345px)!important;min-height:330px!important;}
.tv-card .table-wrap::-webkit-scrollbar:horizontal{display:none!important;height:0!important;}
.tv-card .table-wrap table.table-fit{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;}
.tv-card .table-wrap th,.tv-card .table-wrap td{padding:8px 9px!important;font-size:12px!important;line-height:1.25!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.tv-card .table-wrap th{font-size:10.5px!important;}
.tv-card .table-wrap td .sub{font-size:10.5px!important;line-height:1.15!important;}
.tv-card .table-wrap .main-name{font-size:12px!important;}
.tv-card .table-wrap .link{font-size:12px!important;}
.tv-card .table-wrap .select{width:100%!important;min-width:0!important;height:34px!important;min-height:34px!important;padding:6px 26px 6px 9px!important;border-radius:11px!important;font-size:12px!important;}
.tv-card .row-actions{justify-content:center!important;gap:5px!important;}
.tv-card .row-actions button{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;border-radius:10px!important;}
.tv-card .row-actions button svg{width:16px!important;height:16px!important;}
.tv-card .table-wrap th:nth-child(1),.tv-card .table-wrap td:nth-child(1){width:8.5%;}
.tv-card .table-wrap th:nth-child(2),.tv-card .table-wrap td:nth-child(2){width:13%;}
.tv-card .table-wrap th:nth-child(3),.tv-card .table-wrap td:nth-child(3){width:10%;}
.tv-card .table-wrap th:nth-child(4),.tv-card .table-wrap td:nth-child(4){width:7%;}
.tv-card .table-wrap th:nth-child(5),.tv-card .table-wrap td:nth-child(5){width:11%;}
.tv-card .table-wrap th:nth-child(6),.tv-card .table-wrap td:nth-child(6){width:15%;}
.tv-card .table-wrap th:nth-child(7),.tv-card .table-wrap td:nth-child(7){width:11%;}
.tv-card .table-wrap th:nth-child(8),.tv-card .table-wrap td:nth-child(8){width:7%;}
.tv-card .table-wrap th:nth-child(9),.tv-card .table-wrap td:nth-child(9){width:7.5%;}
.tv-card .table-wrap th:nth-child(10),.tv-card .table-wrap td:nth-child(10){width:10%;}

@media (min-width:1000px) and (max-width:1399px){
  .tv-card .tools .input{width:220px!important;}
  .tv-card .tools .select{width:150px!important;}
  .tv-card .table-wrap th,.tv-card .table-wrap td{padding:7px 7px!important;font-size:11.5px!important;}
  .tv-card .table-wrap th{font-size:9.8px!important;}
  .tv-card .row-actions button{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;}
}
@media (max-width:760px){
  .table-tools{display:none!important;}
  .table-wrap{max-height:none!important;overflow:visible!important;}
  .table-wrap th{position:static!important;}
  .tv-card .table-wrap{overflow:visible!important;max-height:none!important;min-height:0!important;}
  .tv-card .tools{width:100%!important;flex-direction:column!important;align-items:stretch!important;}
  .tv-card .tools .input,.tv-card .tools .select{width:100%!important;}
}


/* === CORRECTION FINALE CRM - TABLEAUX, TELEVENTE, POPUPS === */
body{overflow-x:hidden;}
.main{min-width:0;}
.menu-toggle{display:inline-flex!important;}
.topbar{position:sticky;top:0;z-index:80;background:rgba(255,255,255,.98);backdrop-filter:blur(8px);}
.table-tools,.table-nav-btn{display:none!important;}
.table-zone{position:relative;min-width:0;}
.table-wrap{width:100%;overflow:auto;scrollbar-width:thin;}
.table-wrap table{border-collapse:separate;border-spacing:0;}
.table-wrap thead th{position:sticky;top:0;z-index:5;background:#f8fafc;border-bottom:1px solid var(--line);box-shadow:0 1px 0 #edf2f7;}

.drawer{right:0!important;transform:translateX(105%);width:min(560px,94vw)!important;z-index:1200!important;border-radius:18px 0 0 18px;}
.drawer.open{transform:translateX(0);}
.drawer-head{background:#fff;position:sticky;top:0;z-index:2;align-items:flex-start;}
.drawer-body{max-height:calc(100dvh - 70px);overflow:auto;}
.modal{z-index:1300!important;}
.modal-card{border-radius:16px!important;box-shadow:0 24px 80px rgba(15,23,42,.24)!important;}
.modal-head{background:#f8fafc;align-items:center;}
.modal-foot{background:#fff;}

.tv-clean-card{overflow:hidden;}
.tv-card-head{align-items:center;}
.card-subtitle{margin:4px 0 0;color:var(--muted);font-size:12px;}
.tv-filters{flex-wrap:nowrap;}
.tv-filters .input{width:180px;min-width:0;}
.tv-filters .select{width:150px;min-width:0;}
.tv-table-wrap{width:100%;max-height:calc(100dvh - 330px);overflow:auto;background:#fff;scrollbar-width:thin;}
.tv-table{width:100%;min-width:0!important;table-layout:fixed;border-collapse:separate;border-spacing:0;}
.tv-table th,.tv-table td{padding:10px 9px;border-bottom:1px solid #edf2f7;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tv-table th{position:sticky;top:0;z-index:8;background:#f8fafc;color:#52637a;font-size:11px;text-transform:uppercase;letter-spacing:.01em;box-shadow:0 1px 0 var(--line);}
.tv-table td{font-size:12px;}
.tv-table .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tv-table .c-rdv{width:8%;}.tv-table .c-gerant{width:15%;}.tv-table .c-societe{width:13%;}.tv-table .c-ville{width:10%;}.tv-table .c-phone{width:13%;}.tv-table .c-status{width:17%;}.tv-table .c-rappel{width:12%;}.tv-table .c-actions{width:12%;}
.tv-table .tv-status{width:100%;min-width:0;height:36px;padding:6px 8px;}
.tv-actions{justify-content:flex-start;gap:6px;flex-wrap:nowrap;}
.tv-actions .icon-btn{width:34px;height:34px;min-height:34px;padding:0;border-radius:10px;}
.tv-actions .btn-call{background:#eff6ff;color:var(--blue);border-color:#bfdbfe;}
.tv-phone{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;}
.empty-state{text-align:center!important;color:var(--muted);padding:28px!important;}

.tv-delay-popup{position:fixed;inset:0;z-index:1400;display:flex;align-items:center;justify-content:center;padding:18px;}
.tv-delay-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(3px);}
.tv-delay-card{position:relative;width:min(560px,96vw);max-height:90dvh;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 28px 90px rgba(15,23,42,.30);}
.tv-delay-head{padding:16px 16px 12px;display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);background:#f8fafc;}
.tv-delay-head h3{margin:0;font-size:18px;}
.tv-delay-head p{margin:5px 0 0;color:var(--muted);line-height:1.35;}
.tv-alert-pulse{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--red);box-shadow:0 0 0 6px rgba(220,38,38,.12);margin-right:8px;}
.tv-delay-list{display:grid;gap:8px;padding:14px 16px;}
.tv-delay-row{display:flex;justify-content:space-between;gap:12px;border:1px solid var(--line);border-left:4px solid var(--orange);border-radius:12px;padding:10px;background:#fff;}
.tv-delay-row.critical{border-left-color:var(--red);background:#fff7f7;}
.tv-delay-row b{display:block;margin-bottom:3px;}
.tv-delay-row span{display:block;color:var(--muted);font-size:12px;}
.tv-delay-actions{display:flex;gap:8px;flex-wrap:wrap;padding:14px 16px;border-top:1px solid var(--line);background:#fff;}
.tv-delay-actions button{flex:1;min-width:130px;}

@media(max-width:1360px){
  body:not(.nav-open) .app{grid-template-columns:78px minmax(0,1fr)!important;}
  body:not(.nav-open) .brand h1,body:not(.nav-open) .brand p,body:not(.nav-open) .menu a span,body:not(.nav-open) .side-note{display:none!important;}
  body:not(.nav-open) .brand,body:not(.nav-open) .menu a{justify-content:center!important;}
  body:not(.nav-open) .sidebar{padding:14px 10px!important;}
}
@media(max-width:1180px){
  .tv-table th,.tv-table td{padding:8px 6px;font-size:11.3px;}
  .tv-table th{font-size:10px;}
  .tv-table .c-rdv{width:9%;}.tv-table .c-gerant{width:14%;}.tv-table .c-societe{width:12%;}.tv-table .c-ville{width:9%;}.tv-table .c-phone{width:13%;}.tv-table .c-status{width:18%;}.tv-table .c-rappel{width:12%;}.tv-table .c-actions{width:13%;}
  .tv-actions .icon-btn{width:30px;height:30px;min-height:30px;}
  .tv-table .tv-status{height:32px;font-size:11px;}
}
@media(max-width:900px){
  .tv-table-wrap{max-height:none;overflow:visible;}
  .tv-table,.tv-table thead,.tv-table tbody,.tv-table tr,.tv-table th,.tv-table td{display:block;width:100%!important;min-width:0!important;}
  .tv-table thead{display:none;}
  .tv-table tbody{display:grid;gap:10px;padding:10px;background:#f8fafc;}
  .tv-table tr{border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 8px 18px rgba(15,23,42,.06);overflow:hidden;}
  .tv-table td{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #edf2f7;white-space:normal;overflow:visible;text-overflow:clip;text-align:right;}
  .tv-table td:last-child{border-bottom:0;}
  .tv-table td:before{content:attr(data-label);text-align:left;color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.02em;flex:0 0 36%;}
  .tv-table .tv-status{width:100%;max-width:240px;}
  .tv-actions{justify-content:flex-end;}
  .tv-filters{width:100%;}.tv-filters .input{flex:1;width:auto;}.tv-filters .select{width:120px;}
}
@media(max-width:760px){
  .drawer{inset:auto 0 0 0!important;width:100%!important;max-width:100%!important;height:92dvh!important;border-radius:18px 18px 0 0!important;transform:translateY(105%);}
  .drawer.open{transform:translateY(0);}
  .tv-delay-popup{align-items:flex-end;padding:0;}
  .tv-delay-card{width:100%;border-radius:18px 18px 0 0;max-height:86dvh;}
  .tv-delay-actions button{min-width:46%;}
}


/* =========================================================
   CORRECTION FINALE ERGONOMIE TABLEAUX ET POPUPS
   ========================================================= */
body{background:#f3f6fb;color:#0f172a;}
.card{background:#fff;}
button{white-space:nowrap;color:#0f172a;}
.btn-primary,.btn-green,.btn-orange,.btn-red{color:#fff!important;}
.icon-btn{flex:0 0 auto;width:36px;height:36px;min-height:36px;padding:0;border-radius:10px;}
.row-actions.action-icons{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:max-content;}
.row-actions.action-icons .icon-btn{width:34px;height:34px;min-height:34px;}

/* Barre haute propre */
.topbar{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.97);backdrop-filter:blur(8px);}

/* Panneau client : uniquement au clic, au-dessus sans casser la page */
.drawer-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.36);z-index:29;opacity:0;pointer-events:none;transition:.18s;}
body.drawer-open .drawer-backdrop{opacity:1;pointer-events:auto;}
.drawer{z-index:30;background:#fff;color:#0f172a;}
.drawer-head{background:#fff;border-bottom:1px solid var(--line);color:#0f172a;position:sticky;top:0;z-index:2;}
.drawer-head h3,.drawer-head p{color:#0f172a!important;opacity:1!important;}
.drawer-head p{color:#64748b!important;}
.drawer-body{background:#fff;}
.drawer .section{background:#fff;}

/* Popup / modales : pas de texte blanc sur fond blanc */
.modal-card,.tv-delay-card{background:#fff;color:#0f172a;}
.modal-head,.tv-delay-head{background:#f8fafc;color:#0f172a;}
.modal-head *,.tv-delay-head *{color:#0f172a;}
.tv-delay-head p{color:#475569;}
.tv-delay-card .icon-btn{background:#fff;color:#0f172a;border-color:var(--line);}

/* Tables générales : scroll horizontal propre, entête stable */
.table-zone{position:relative;width:100%;min-width:0;background:#fff;}
.table-zone .table-tools{position:absolute;right:12px;top:-47px;z-index:5;display:flex;gap:6px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:4px;box-shadow:0 8px 20px rgba(15,23,42,.08);}
.table-zone .table-nav-btn{width:32px;height:32px;min-height:32px;padding:0;border-radius:9px;background:#f8fafc;color:#0f172a;}
.table-zone .table-nav-btn:disabled{opacity:.35;cursor:not-allowed;box-shadow:none;}
.table-wrap{width:100%;overflow:auto;max-height:calc(100vh - 295px);background:#fff;scrollbar-width:thin;scrollbar-color:#94a3b8 #edf2f7;}
.table-wrap::-webkit-scrollbar{height:10px;width:10px;}
.table-wrap::-webkit-scrollbar-track{background:#edf2f7;border-radius:999px;}
.table-wrap::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:999px;border:2px solid #edf2f7;}
.table-wrap table{border-collapse:separate;border-spacing:0;background:#fff;}
.table-wrap th{position:sticky;top:0;z-index:4;background:#f8fafc;color:#475569;border-bottom:1px solid #dbe3ef;box-shadow:0 1px 0 #dbe3ef;}
.table-wrap td{background:#fff;color:#0f172a;}
.table-wrap tr:hover td{background:#f8fbff;}
.table-wrap.is-dragging{cursor:grabbing;user-select:none;}
.table-fit{min-width:0!important;width:100%!important;table-layout:fixed;}
.table-zone-fit .table-tools{display:none!important;}
.table-zone-fit .table-wrap{overflow:visible;max-height:none;}

/* Page Televente : tableau pleine largeur, sans scroll horizontal */
.tv-clean-card{overflow:hidden;}
.tv-card-head{min-height:52px;}
.tv-filters{margin-left:auto;display:flex;gap:8px;flex-wrap:nowrap;}
.tv-filters .input{width:180px;}
.tv-filters .select{width:150px;}
.tv-table-wrap{width:100%;overflow:visible;background:#fff;}
.tv-table{width:100%;min-width:0!important;table-layout:fixed;border-collapse:separate;border-spacing:0;background:#fff;}
.tv-table th{position:sticky;top:0;z-index:3;background:#f8fafc;color:#475569;font-size:10.5px;letter-spacing:.01em;padding:8px 7px;border-bottom:1px solid #dbe3ef;}
.tv-table td{font-size:11.5px;line-height:1.2;padding:7px 7px;border-bottom:1px solid #edf2f7;white-space:normal;background:#fff;color:#0f172a;vertical-align:middle;}
.tv-table tr:hover td{background:#f8fbff;}
.tv-table .sub{font-size:10.5px;line-height:1.15;margin-top:2px;}
.tv-table .main-name{font-size:12px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tv-table .tv-phone{font-size:11.5px;white-space:nowrap;}
.tv-table .tv-status{width:100%;min-width:0;height:34px;min-height:34px;padding:6px 7px;font-size:11.5px;border-radius:9px;}
.tv-table .tv-reminder{font-size:11px;}
.tv-actions{justify-content:flex-end;gap:5px;flex-wrap:nowrap;}
.tv-actions .icon-btn{width:32px;height:32px;min-height:32px;border-radius:9px;}
.tv-actions .btn-call{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe;}
.tv-table .c-rdv{width:8.5%;}
.tv-table .c-gerant{width:15%;}
.tv-table .c-societe{width:13%;}
.tv-table .c-ville{width:9%;}
.tv-table .c-phone{width:13%;}
.tv-table .c-status{width:17%;}
.tv-table .c-rappel{width:13%;}
.tv-table .c-actions{width:11.5%;}
@media (min-width:1000px){
  .tv-card .tv-table-wrap{max-height:calc(100vh - 330px);overflow-y:auto;}
  .tv-card .tv-table th{top:0;}
}
@media (min-width:1000px) and (max-width:1280px){
  .main{padding:12px;}
  .kpis{grid-template-columns:repeat(6,minmax(86px,1fr));gap:8px;}
  .kpi{padding:8px;}
  .kpi span{font-size:10px;}
  .kpi strong{font-size:19px;}
  .tv-table th,.tv-table td{padding-left:5px;padding-right:5px;font-size:10.8px;}
  .tv-table .tv-status{font-size:10.8px;padding-left:4px;padding-right:4px;}
  .tv-actions .icon-btn{width:30px;height:30px;min-height:30px;}
  .tv-table .c-rdv{width:8%;}.tv-table .c-gerant{width:14.5%;}.tv-table .c-societe{width:12.5%;}.tv-table .c-ville{width:8%;}.tv-table .c-phone{width:12.5%;}.tv-table .c-status{width:17%;}.tv-table .c-rappel{width:13%;}.tv-table .c-actions{width:14.5%;}
}

/* Qualite / Billing : actions lisibles et compactes */
.billing-actions .icon-btn{width:32px;height:32px;min-height:32px;}
.table-wrap td .select,.table-wrap td .input{color:#0f172a;background:#fff;}

/* Menu auto reduit : garder bouton de retour visible */
body.sidebar-auto-collapsed .app{grid-template-columns:78px minmax(0,1fr);}
body.sidebar-auto-collapsed:not(.sidebar-expanded-medium) .brand h1,
body.sidebar-auto-collapsed:not(.sidebar-expanded-medium) .brand p,
body.sidebar-auto-collapsed:not(.sidebar-expanded-medium) .menu span,
body.sidebar-auto-collapsed:not(.sidebar-expanded-medium) .side-note{display:none!important;}
body.sidebar-auto-collapsed:not(.sidebar-expanded-medium) .sidebar{align-items:center;padding:14px 10px;}
body.sidebar-auto-collapsed:not(.sidebar-expanded-medium) .brand{justify-content:center;}
body.sidebar-auto-collapsed:not(.sidebar-expanded-medium) .menu a{justify-content:center;width:48px;margin:0 auto;padding:10px 0;}

@media(max-width:760px){
  .table-zone .table-tools{display:none!important;}
  .table-wrap{max-height:none;}
  .tv-table-wrap{overflow:visible!important;max-height:none!important;}
  .tv-table,.tv-table thead,.tv-table tbody,.tv-table tr,.tv-table th,.tv-table td{display:block;width:100%!important;min-width:0!important;}
  .tv-table thead{display:none!important;}
  .tv-table tbody{display:grid;gap:10px;}
  .tv-table tr{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 18px rgba(15,23,42,.055);padding:8px;}
  .tv-table td{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #edf2f7;text-align:right;font-size:13px;white-space:normal!important;}
  .tv-table td:before{content:attr(data-label);flex:0 0 42%;max-width:42%;text-align:left;color:#64748b;font-size:10px;font-weight:900;text-transform:uppercase;}
  .tv-table td:last-child{border-bottom:0;}
  .tv-filters{width:100%;flex-wrap:wrap;}
  .tv-filters .input,.tv-filters .select{width:100%;}
  .drawer{height:92dvh!important;}
}


/* =========================================================
   CORRECTION PROPRE FINALE - NAVIGATION + TABLEAUX + ACTIONS
   ========================================================= */
:root{--nav-width:230px;--nav-mini:78px;}
body{background:#f3f6fb!important;color:#0f172a!important;}
button,.input,.select,textarea{color:#0f172a;background:#fff;}
.btn-primary,.btn-green,.btn-orange,.btn-red{color:#fff!important;}
.app{min-width:0;}
.main{min-width:0;}
.topbar{position:sticky!important;top:0!important;z-index:120!important;background:rgba(255,255,255,.98)!important;backdrop-filter:blur(10px);}
.menu-toggle{display:inline-flex!important;flex:0 0 42px;width:42px;height:42px;min-height:42px;border-radius:12px;background:#fff!important;color:#0f172a!important;border:1px solid #dbe3ef!important;}
.sidebar{transition:transform .22s ease,width .22s ease,left .22s ease;overflow:hidden;}
.sidebar .menu{min-height:0;overflow-y:auto!important;overflow-x:hidden!important;}

/* Desktop large: menu normal, bouton disponible pour réduire */
@media (min-width:1400px){
  body:not(.sidebar-collapsed) .app{grid-template-columns:var(--nav-width) minmax(0,1fr)!important;}
  body.sidebar-collapsed .app{grid-template-columns:var(--nav-mini) minmax(0,1fr)!important;}
  body.sidebar-collapsed .brand img{width:46px!important;height:46px!important;max-height:46px!important;}
  body.sidebar-collapsed .brand .brand-text,body.sidebar-collapsed .menu a span,body.sidebar-collapsed .side-note{display:none!important;}
  body.sidebar-collapsed .sidebar{align-items:center!important;padding:14px 10px!important;}
  body.sidebar-collapsed .brand,body.sidebar-collapsed .menu a{justify-content:center!important;}
  body.sidebar-collapsed .menu a{width:48px!important;margin:0 auto!important;padding:10px 0!important;}
}

/* Petit écran PC / laptop: réduit par défaut, réouvrable via bouton */
@media (min-width:1000px) and (max-width:1399px){
  body:not(.sidebar-expanded-medium) .app{grid-template-columns:var(--nav-mini) minmax(0,1fr)!important;}
  body.sidebar-expanded-medium .app{grid-template-columns:var(--nav-width) minmax(0,1fr)!important;}
  body:not(.sidebar-expanded-medium) .brand img{width:46px!important;height:46px!important;max-height:46px!important;}
  body:not(.sidebar-expanded-medium) .brand .brand-text,body:not(.sidebar-expanded-medium) .menu a span,body:not(.sidebar-expanded-medium) .side-note{display:none!important;}
  body:not(.sidebar-expanded-medium) .sidebar{align-items:center!important;padding:14px 10px!important;}
  body:not(.sidebar-expanded-medium) .brand,body:not(.sidebar-expanded-medium) .menu a{justify-content:center!important;}
  body:not(.sidebar-expanded-medium) .menu a{width:48px!important;margin:0 auto!important;padding:10px 0!important;}
  body.sidebar-expanded-medium .sidebar{align-items:stretch!important;padding:14px 12px!important;}
  body.sidebar-expanded-medium .brand{justify-content:flex-start!important;gap:10px!important;}
  body.sidebar-expanded-medium .brand .brand-text,body.sidebar-expanded-medium .menu a span,body.sidebar-expanded-medium .side-note{display:block!important;}
  body.sidebar-expanded-medium .menu a{justify-content:flex-start!important;width:auto!important;margin:0!important;padding:9px 10px!important;}
}

/* Mobile: sidebar en panneau superpose, bouton toujours visible */
@media (max-width:999px){
  .app{display:block!important;}
  .sidebar{position:fixed!important;z-index:1000!important;top:0!important;left:0!important;width:min(86vw,330px)!important;height:100dvh!important;transform:translateX(-105%)!important;background:#0f172a!important;border-right:1px solid rgba(255,255,255,.08)!important;box-shadow:18px 0 45px rgba(15,23,42,.22)!important;align-items:stretch!important;padding:14px 12px 18px!important;}
  body.nav-open .sidebar{transform:translateX(0)!important;}
  .nav-backdrop{display:none!important;position:fixed!important;inset:0!important;background:rgba(15,23,42,.48)!important;z-index:990!important;}
  body.nav-open .nav-backdrop{display:block!important;}
  .brand{justify-content:flex-start!important;gap:10px!important;}
  .brand .brand-text,.menu a span,.side-note{display:block!important;}
  .menu a{justify-content:flex-start!important;width:auto!important;margin:0!important;padding:11px 12px!important;}
  .main{padding:10px 10px 72px!important;}
}

/* Tables: entetes fixes, lisibles, sans chevauchement */
.table-zone{position:relative;width:100%;min-width:0;background:#fff;border-radius:0 0 16px 16px;}
.table-wrap{width:100%!important;overflow:auto!important;background:#fff!important;scrollbar-width:thin!important;scrollbar-color:#94a3b8 #edf2f7!important;}
.table-wrap::-webkit-scrollbar{height:11px!important;width:10px!important;}
.table-wrap::-webkit-scrollbar-track{background:#edf2f7!important;border-radius:999px!important;}
.table-wrap::-webkit-scrollbar-thumb{background:#94a3b8!important;border-radius:999px!important;border:2px solid #edf2f7!important;}
.table-wrap table{border-collapse:separate!important;border-spacing:0!important;background:#fff!important;}
.table-wrap thead th{position:sticky!important;top:0!important;z-index:20!important;background:#f8fafc!important;color:#475569!important;border-bottom:1px solid #dbe3ef!important;box-shadow:0 1px 0 #dbe3ef!important;}
.table-wrap td{background:#fff!important;color:#0f172a!important;}
.table-wrap tr:hover td{background:#f8fbff!important;}
.table-tools{position:absolute!important;right:12px!important;top:-48px!important;z-index:25!important;display:flex!important;gap:6px!important;background:#fff!important;border:1px solid #dbe3ef!important;border-radius:12px!important;padding:4px!important;box-shadow:0 8px 22px rgba(15,23,42,.08)!important;}
.table-nav-btn{width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;border-radius:9px!important;background:#f8fafc!important;color:#0f172a!important;}
.table-nav-btn:disabled{opacity:.32!important;cursor:not-allowed!important;}
.table-zone-fit .table-tools{display:none!important;}

/* Actions avec icone + texte pour Billing/Qualite */
.row-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;}
.action-text-btn{height:34px!important;min-height:34px!important;width:auto!important;min-width:auto!important;padding:0 10px!important;border-radius:10px!important;border:1px solid #dbe3ef!important;background:#fff!important;color:#0f172a!important;font-size:12px!important;font-weight:850!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;white-space:nowrap!important;}
.action-text-btn svg{width:15px!important;height:15px!important;}
.action-text-btn.btn-green{background:#16a34a!important;border-color:#16a34a!important;color:#fff!important;}
.action-text-btn.btn-red{background:#dc2626!important;border-color:#dc2626!important;color:#fff!important;}
.action-text-btn.btn-blue{background:#2563eb!important;border-color:#2563eb!important;color:#fff!important;}
.billing-actions,.quality-actions{min-width:max-content!important;}
.billing-actions .action-text-btn{padding:0 9px!important;}

/* Page Billing: les actions restent lisibles et scrollables proprement */
body.page-billing .table-wrap{max-height:calc(100vh - 280px)!important;}
body.page-billing table{min-width:1680px!important;}
body.page-billing th:last-child,body.page-billing td:last-child{min-width:700px!important;}

/* Page Qualite: actions lisibles, panneau client sans texte invisible */
body.page-qualite .drawer-head, body.page-qualite .drawer-head *{color:#0f172a!important;opacity:1!important;}
body.page-qualite .drawer-head p{color:#64748b!important;}
body.page-qualite table{min-width:1480px!important;}
body.page-qualite th:last-child,body.page-qualite td:last-child{min-width:330px!important;}

/* Mobile: tables en cartes, actions en wrap lisible */
@media(max-width:760px){
  .table-tools{display:none!important;}
  .table-wrap{max-height:none!important;overflow:visible!important;}
  .table-wrap table,.table-wrap thead,.table-wrap tbody,.table-wrap tr,.table-wrap th,.table-wrap td{display:block!important;width:100%!important;min-width:0!important;}
  .table-wrap thead{display:none!important;}
  .table-wrap tbody{display:grid!important;gap:10px!important;}
  .table-wrap tr{background:#fff!important;border:1px solid #dbe3ef!important;border-radius:14px!important;padding:8px!important;box-shadow:0 8px 18px rgba(15,23,42,.055)!important;}
  .table-wrap td{display:flex!important;justify-content:space-between!important;gap:12px!important;text-align:right!important;border-bottom:1px solid #edf2f7!important;white-space:normal!important;}
  .table-wrap td:before{content:attr(data-label);flex:0 0 42%;max-width:42%;text-align:left;color:#64748b;font-size:10px;font-weight:900;text-transform:uppercase;}
  .table-wrap td:last-child{border-bottom:0!important;}
  .row-actions{flex-wrap:wrap!important;justify-content:flex-end!important;}
  .action-text-btn{height:32px!important;min-height:32px!important;font-size:11px!important;padding:0 8px!important;}
}


/* =========================================================
   CORRECTION UTILISATEUR - NAV, TELEVENTE, BILLING, TABLEAUX
   ========================================================= */
body{overflow-x:hidden!important;}
.topbar{z-index:700!important;}
.menu-toggle{position:relative!important;z-index:750!important;}
@media(max-width:999px){
  .app{display:block!important;grid-template-columns:none!important;}
  .main{margin-left:0!important;width:100%!important;}
  .sidebar{position:fixed!important;top:0!important;left:0!important;width:min(86vw,330px)!important;height:100dvh!important;transform:translateX(-110%)!important;transition:transform .22s ease!important;z-index:1200!important;display:flex!important;}
  body.nav-open .sidebar{transform:translateX(0)!important;}
  .nav-backdrop{position:fixed!important;inset:0!important;background:rgba(15,23,42,.46)!important;z-index:1100!important;display:none!important;}
  body.nav-open .nav-backdrop{display:block!important;}
  .sidebar .brand .brand-text,.sidebar .menu span,.sidebar .side-note{display:block!important;}
  .sidebar .brand,.sidebar .menu a{justify-content:flex-start!important;}
}

/* Televente : liste dense, tout visible sur PC, colonnes Devis/Demo remises */
body.page-televente .kpis{grid-template-columns:repeat(6,minmax(88px,1fr))!important;gap:8px!important;margin-bottom:10px!important;}
body.page-televente .kpi{padding:8px 10px!important;min-height:68px!important;}
body.page-televente .kpi span{font-size:10px!important;}
body.page-televente .kpi strong{font-size:20px!important;}
body.page-televente .tv-card{overflow:hidden!important;}
body.page-televente .tv-card-head{min-height:46px!important;padding:9px 12px!important;}
body.page-televente .tv-card-head h3{font-size:14px!important;}
body.page-televente .tv-filters{width:auto!important;gap:8px!important;}
body.page-televente .tv-filters .input{width:210px!important;min-height:34px!important;}
body.page-televente .tv-filters .select{width:150px!important;min-height:34px!important;}
body.page-televente .tv-table-wrap{overflow-y:auto!important;overflow-x:hidden!important;max-height:calc(100vh - 250px)!important;background:#fff!important;}
body.page-televente .tv-table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:separate!important;border-spacing:0!important;}
body.page-televente .tv-table th{position:sticky!important;top:0!important;z-index:30!important;background:#f8fafc!important;color:#475569!important;box-shadow:0 1px 0 #dbe3ef!important;font-size:10.5px!important;padding:7px 6px!important;white-space:nowrap!important;}
body.page-televente .tv-table td{font-size:11.2px!important;padding:6px 6px!important;line-height:1.18!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;height:42px!important;vertical-align:middle!important;}
body.page-televente .tv-table .sub{font-size:10px!important;margin-top:1px!important;}
body.page-televente .tv-table .main-name{font-size:11.5px!important;display:block;overflow:hidden;text-overflow:ellipsis;}
body.page-televente .tv-status{width:100%!important;min-width:0!important;min-height:30px!important;height:30px!important;padding:4px 7px!important;font-size:11px!important;border-radius:9px!important;}
body.page-televente .tv-actions{gap:5px!important;justify-content:flex-end!important;flex-wrap:nowrap!important;}
body.page-televente .tv-actions .icon-btn{width:30px!important;height:30px!important;min-height:30px!important;border-radius:9px!important;}
body.page-televente .tv-actions .btn-call{background:#eff6ff!important;color:#2563eb!important;border-color:#bfdbfe!important;}
body.page-televente .c-rdv{width:7.2%;}
body.page-televente .c-gerant{width:12.3%;}
body.page-televente .c-societe{width:10.8%;}
body.page-televente .c-ville{width:7.6%;}
body.page-televente .c-phone{width:12.2%;}
body.page-televente .c-status{width:15.2%;}
body.page-televente .c-rappel{width:10.8%;}
body.page-televente .c-devis{width:6.2%;}
body.page-televente .c-demo{width:7.6%;}
body.page-televente .c-actions{width:10.1%;}
@media(max-width:1280px) and (min-width:1000px){
  body.page-televente .main{padding:10px!important;}
  body.page-televente .topbar{height:50px!important;min-height:50px!important;margin-bottom:9px!important;}
  body.page-televente .title h2{font-size:17px!important;}
  body.page-televente .title p{font-size:12px!important;}
  body.page-televente .tv-table td{font-size:10.5px!important;padding-left:4px!important;padding-right:4px!important;}
  body.page-televente .tv-table th{font-size:9.8px!important;padding-left:4px!important;padding-right:4px!important;}
  body.page-televente .tv-phone{letter-spacing:-.2px;}
}

/* Billing : actions avec icone + texte lisibles, pas de chevauchement */
body.page-billing .table-wrap{max-height:calc(100vh - 282px)!important;overflow:auto!important;}
body.page-billing table{min-width:1900px!important;table-layout:auto!important;}
body.page-billing th:last-child,body.page-billing td:last-child{min-width:860px!important;width:860px!important;}
body.page-billing .billing-actions{display:grid!important;grid-template-columns:repeat(5,max-content)!important;gap:6px!important;align-items:center!important;justify-content:start!important;min-width:820px!important;}
body.page-billing .billing-actions .action-text-btn{height:32px!important;min-height:32px!important;padding:0 9px!important;min-width:88px!important;font-size:11.3px!important;gap:5px!important;flex:0 0 auto!important;}
body.page-billing .billing-actions .action-text-btn svg{width:14px!important;height:14px!important;}
body.page-billing .billing-actions .btn-green{min-width:76px!important;}

/* Qualite : actions propres et texte lisible */
body.page-qualite table{min-width:1500px!important;}
body.page-qualite th:last-child,body.page-qualite td:last-child{min-width:420px!important;width:420px!important;}
body.page-qualite .quality-actions{display:grid!important;grid-template-columns:repeat(2,max-content)!important;gap:6px!important;justify-content:start!important;min-width:390px!important;}
body.page-qualite .quality-actions .action-text-btn{height:32px!important;min-height:32px!important;min-width:126px!important;font-size:11.5px!important;}
body.page-qualite .drawer-head,body.page-qualite .drawer-head *{color:#0f172a!important;opacity:1!important;}
body.page-qualite .drawer-head p{color:#64748b!important;}

/* Tableaux generaux : scroll horizontal naturel et entetes stables */
.table-wrap{overscroll-behavior:contain!important;}
.table-wrap th{position:sticky!important;top:0!important;z-index:40!important;background:#f8fafc!important;color:#475569!important;}
.table-wrap td{color:#0f172a!important;background:#fff!important;}
.table-zone .table-tools{top:-44px!important;right:10px!important;}
.table-zone-fit .table-tools,body.page-televente .table-tools{display:none!important;}

@media(max-width:760px){
  body.page-televente .tv-table-wrap{max-height:none!important;overflow:visible!important;}
  body.page-televente .tv-table,body.page-televente .tv-table thead,body.page-televente .tv-table tbody,body.page-televente .tv-table tr,body.page-televente .tv-table th,body.page-televente .tv-table td{display:block!important;width:100%!important;min-width:0!important;height:auto!important;}
  body.page-televente .tv-table thead{display:none!important;}
  body.page-televente .tv-table tbody{display:grid!important;gap:10px!important;}
  body.page-televente .tv-table tr{border:1px solid #dbe3ef!important;border-radius:14px!important;padding:8px!important;box-shadow:0 8px 18px rgba(15,23,42,.055)!important;}
  body.page-televente .tv-table td{display:flex!important;justify-content:space-between!important;gap:12px!important;text-align:right!important;white-space:normal!important;border-bottom:1px solid #edf2f7!important;font-size:13px!important;padding:9px 6px!important;overflow:visible!important;text-overflow:clip!important;}
  body.page-televente .tv-table td:before{content:attr(data-label);flex:0 0 42%;max-width:42%;text-align:left;color:#64748b;font-size:10px;font-weight:900;text-transform:uppercase;}
  body.page-televente .tv-table td:last-child{border-bottom:0!important;}
  body.page-televente .tv-filters .input,body.page-televente .tv-filters .select{width:100%!important;}
  body.page-billing .billing-actions,body.page-qualite .quality-actions{display:flex!important;flex-wrap:wrap!important;min-width:0!important;justify-content:flex-end!important;}
  body.page-billing .billing-actions .action-text-btn,body.page-qualite .quality-actions .action-text-btn{min-width:110px!important;}
}


/* =========================================================
   CORRECTION FINALE DEMANDEE - TABLEAUX + TELEVENTE
   - commandes de deplacement en haut, integrees au design
   - plus de barre horizontale visible en bas
   - Billing avec icones + textes lisibles
   - Televente : plus de RDV visibles sans texte minuscule
   ========================================================= */

/* Zone tableau : la commande de déplacement est en haut, pas en bas */
.table-zone{
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  background:#fff!important;
  overflow:hidden!important;
}
.table-tools{display:none!important;}
.table-pan{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px 12px!important;
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
  border-bottom:1px solid #dbe3ef!important;
  min-height:46px!important;
}
.table-zone-fit .table-pan,
.table-zone:not(.has-horizontal-scroll) .table-pan{
  display:none!important;
}
.table-pan-label{
  color:#64748b!important;
  font-size:11px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.03em!important;
  white-space:nowrap!important;
}
.table-pan .table-nav-btn{
  width:34px!important;
  height:34px!important;
  min-height:34px!important;
  flex:0 0 34px!important;
  padding:0!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#0f172a!important;
  border:1px solid #cbd5e1!important;
  box-shadow:0 4px 10px rgba(15,23,42,.05)!important;
}
.table-pan .table-nav-btn:disabled{opacity:.38!important;cursor:not-allowed!important;box-shadow:none!important;}
.table-top-scroll{
  flex:1 1 auto!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  height:18px!important;
  border:1px solid #dbe3ef!important;
  border-radius:999px!important;
  background:#eef4ff!important;
  scrollbar-width:thin!important;
  scrollbar-color:#94a3b8 #eaf1fb!important;
}
.table-top-scroll>div{height:1px!important;}
.table-top-scroll::-webkit-scrollbar{height:10px!important;}
.table-top-scroll::-webkit-scrollbar-track{background:#eaf1fb!important;border-radius:999px!important;}
.table-top-scroll::-webkit-scrollbar-thumb{background:#94a3b8!important;border-radius:999px!important;border:2px solid #eaf1fb!important;}
.table-wrap{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  width:100%!important;
  -webkit-overflow-scrolling:touch!important;
}
.table-wrap.is-dragging{cursor:grabbing!important;user-select:none!important;}
.table-wrap table{border-collapse:separate!important;border-spacing:0!important;background:#fff!important;}
.table-wrap th{
  position:sticky!important;
  top:0!important;
  z-index:12!important;
  background:#f8fafc!important;
  color:#475569!important;
  box-shadow:0 1px 0 #dbe3ef!important;
}

/* Billing : les actions restent avec icone + texte et ne se chevauchent plus */
body.page-billing .table-wrap{max-height:calc(100vh - 315px)!important;}
body.page-billing table{min-width:2100px!important;}
body.page-billing th,body.page-billing td{padding:8px 10px!important;font-size:12px!important;}
body.page-billing .billing-actions{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:7px!important;
  min-width:980px!important;
  width:max-content!important;
}
body.page-billing .billing-actions .action-text-btn{
  height:34px!important;
  min-height:34px!important;
  min-width:86px!important;
  padding:0 9px!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#0f172a!important;
  border:1px solid #cbd5e1!important;
  font-size:11.5px!important;
  font-weight:850!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  white-space:nowrap!important;
  line-height:1!important;
}
body.page-billing .billing-actions .action-text-btn svg{width:14px!important;height:14px!important;}
body.page-billing .billing-actions .btn-green{background:#16a34a!important;color:#fff!important;border-color:#16a34a!important;}

/* Televente : tout tient sans retirer Devis/Demo, et on voit plus de RDV */
body.page-televente .main{padding-top:10px!important;}
body.page-televente .topbar{height:50px!important;min-height:50px!important;margin-bottom:8px!important;padding:8px 12px!important;}
body.page-televente .title h2{font-size:18px!important;}
body.page-televente .title p{font-size:12px!important;}
body.page-televente .kpis{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important;margin-bottom:8px!important;}
body.page-televente .kpi{min-height:58px!important;padding:8px 10px!important;border-radius:10px!important;}
body.page-televente .kpi span{font-size:10px!important;line-height:1.1!important;}
body.page-televente .kpi strong{font-size:19px!important;margin-top:2px!important;}
body.page-televente .card-head{min-height:46px!important;padding:8px 12px!important;}
body.page-televente .tv-filters .input{width:210px!important;min-height:34px!important;}
body.page-televente .tv-filters .select{width:150px!important;min-height:34px!important;}
body.page-televente .tv-table-wrap{
  max-height:calc(100vh - 205px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:#fff!important;
}
body.page-televente .tv-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
body.page-televente .tv-table th{
  position:sticky!important;
  top:0!important;
  z-index:20!important;
  background:#f8fafc!important;
  color:#475569!important;
  box-shadow:0 1px 0 #dbe3ef!important;
  font-size:10.5px!important;
  padding:7px 6px!important;
  white-space:nowrap!important;
}
body.page-televente .tv-table td{
  height:40px!important;
  padding:5px 6px!important;
  font-size:11.8px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  color:#0f172a!important;
  background:#fff!important;
}
body.page-televente .tv-table .main-name{font-size:12.1px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.page-televente .tv-table .sub{font-size:10.3px!important;line-height:1.1!important;margin-top:1px!important;}
body.page-televente .tv-phone{font-size:11.6px!important;}
body.page-televente .tv-status{height:32px!important;min-height:32px!important;font-size:11.4px!important;padding:5px 6px!important;border-radius:8px!important;}
body.page-televente .tv-actions{gap:5px!important;flex-wrap:nowrap!important;justify-content:flex-end!important;}
body.page-televente .tv-actions .icon-btn{width:32px!important;height:32px!important;min-height:32px!important;border-radius:9px!important;}
body.page-televente .tv-table .c-rdv{width:8.5%!important;}
body.page-televente .tv-table .c-gerant{width:14.5%!important;}
body.page-televente .tv-table .c-societe{width:12%!important;}
body.page-televente .tv-table .c-ville{width:8%!important;}
body.page-televente .tv-table .c-phone{width:12.5%!important;}
body.page-televente .tv-table .c-status{width:16%!important;}
body.page-televente .tv-table .c-rappel{width:12%!important;}
body.page-televente .tv-table .c-devis{width:6.5%!important;}
body.page-televente .tv-table .c-demo{width:5.5%!important;}
body.page-televente .tv-table .c-actions{width:4.5%!important;}
body.page-televente .tv-demo .link{font-size:11px!important;}

/* Navigation petit écran : un bouton suffit et il ouvre bien le menu */
@media(max-width:999px){
  .app{display:block!important;}
  .sidebar{position:fixed!important;top:0!important;left:-88%!important;width:86%!important;max-width:340px!important;height:100dvh!important;z-index:1000!important;transition:left .22s ease!important;overflow-y:auto!important;background:#0f172a!important;}
  body.nav-open .sidebar{left:0!important;}
  .nav-backdrop{display:none;}
  body.nav-open .nav-backdrop{display:block!important;position:fixed!important;inset:0!important;background:rgba(15,23,42,.45)!important;z-index:999!important;}
  .menu-toggle{display:inline-flex!important;}
  body.sidebar-collapsed .sidebar{left:-88%!important;}
  body.sidebar-collapsed.nav-open .sidebar{left:0!important;}
}

@media(max-width:760px){
  .table-pan{display:none!important;}
  .table-wrap{overflow:visible!important;max-height:none!important;}
  body.page-televente .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.page-televente .tv-table-wrap{max-height:none!important;overflow:visible!important;}
  body.page-televente .tv-table,body.page-televente .tv-table thead,body.page-televente .tv-table tbody,body.page-televente .tv-table tr,body.page-televente .tv-table th,body.page-televente .tv-table td{display:block!important;width:100%!important;min-width:0!important;height:auto!important;}
  body.page-televente .tv-table thead{display:none!important;}
  body.page-televente .tv-table tbody{display:grid!important;gap:10px!important;padding:10px!important;background:#f8fafc!important;}
  body.page-televente .tv-table tr{border:1px solid #dbe3ef!important;border-radius:14px!important;padding:8px!important;background:#fff!important;box-shadow:0 8px 18px rgba(15,23,42,.055)!important;}
  body.page-televente .tv-table td{display:flex!important;justify-content:space-between!important;gap:12px!important;text-align:right!important;white-space:normal!important;border-bottom:1px solid #edf2f7!important;font-size:13px!important;padding:9px 6px!important;overflow:visible!important;text-overflow:clip!important;}
  body.page-televente .tv-table td:before{content:attr(data-label);flex:0 0 42%;max-width:42%;text-align:left;color:#64748b;font-size:10px;font-weight:900;text-transform:uppercase;}
  body.page-televente .tv-table td:last-child{border-bottom:0!important;}
}


/* =========================================================
   CORRECTION DEFINITIVE - TABLEAUX, TV, BILLING, NAV
   ========================================================= */
/* General: la barre de deplacement est en haut; la barre horizontale native du bas est masquee sur Chrome */
.table-zone{position:relative!important;min-width:0!important;width:100%!important;overflow:hidden!important;background:#fff!important;border-radius:16px!important;}
.table-pan{display:flex!important;align-items:center!important;gap:8px!important;padding:8px 12px!important;background:linear-gradient(180deg,#ffffff,#f8fafc)!important;border-bottom:1px solid #dbe3ef!important;min-height:44px!important;}
.table-zone-fit .table-pan,.table-zone:not(.has-horizontal-scroll) .table-pan{display:none!important;}
.table-pan-label{font-size:11px!important;font-weight:900!important;color:#64748b!important;text-transform:uppercase!important;letter-spacing:.04em!important;white-space:nowrap!important;}
.table-top-scroll{flex:1 1 auto!important;overflow-x:auto!important;overflow-y:hidden!important;height:18px!important;border:1px solid #d7e2f0!important;border-radius:999px!important;background:#edf4ff!important;scrollbar-width:thin!important;scrollbar-color:#94a3b8 #edf4ff!important;}
.table-top-scroll>div{height:1px!important;}
.table-pan .table-nav-btn{width:34px!important;height:34px!important;min-height:34px!important;flex:0 0 34px!important;padding:0!important;border-radius:10px!important;background:#fff!important;border:1px solid #cbd5e1!important;color:#0f172a!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
.table-pan .table-nav-btn svg{width:16px!important;height:16px!important;}
.table-wrap{overflow:auto!important;background:#fff!important;scrollbar-width:thin!important;scrollbar-color:#94a3b8 #edf2f7!important;}
.table-wrap::-webkit-scrollbar:horizontal{height:0!important;display:none!important;}
.table-wrap::-webkit-scrollbar:vertical{width:10px!important;}
.table-wrap::-webkit-scrollbar-track{background:#edf2f7!important;border-radius:999px!important;}
.table-wrap::-webkit-scrollbar-thumb{background:#94a3b8!important;border-radius:999px!important;border:2px solid #edf2f7!important;}
.table-wrap th{position:sticky!important;top:0!important;z-index:6!important;background:#f8fafc!important;color:#475569!important;border-bottom:1px solid #dbe3ef!important;box-shadow:0 1px 0 #dbe3ef!important;}
.table-wrap td{background:#fff!important;color:#0f172a!important;}

/* Navigation petit ecran : le bouton topbar ouvre toujours le menu */
@media(max-width:999px){
  .app{display:block!important;}
  .sidebar{position:fixed!important;top:0!important;left:0!important;width:86vw!important;max-width:340px!important;height:100dvh!important;max-height:100dvh!important;transform:translateX(-108%)!important;transition:transform .22s ease!important;z-index:1000!important;overflow-y:auto!important;background:#0f172a!important;box-shadow:18px 0 44px rgba(15,23,42,.28)!important;}
  body.nav-open .sidebar{transform:translateX(0)!important;}
  body.sidebar-collapsed .sidebar{transform:translateX(-108%)!important;}
  body.sidebar-collapsed.nav-open .sidebar{transform:translateX(0)!important;}
  .nav-backdrop{display:none!important;}
  body.nav-open .nav-backdrop{display:block!important;position:fixed!important;inset:0!important;background:rgba(15,23,42,.45)!important;z-index:999!important;}
  .menu-toggle{display:inline-flex!important;}
}

/* TELEVENTE : tout rentre a l'ecran, textes lisibles, 2 actions visibles */
body.page-televente .main{padding-top:14px!important;}
body.page-televente .kpis{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important;margin-bottom:10px!important;}
body.page-televente .kpi{min-height:74px!important;padding:9px 10px!important;border-radius:13px!important;}
body.page-televente .kpi span{font-size:10.5px!important;line-height:1.1!important;}
body.page-televente .kpi strong{font-size:22px!important;line-height:1!important;}
body.page-televente .tv-clean-card{overflow:hidden!important;border-radius:16px!important;}
body.page-televente .tv-card-head{min-height:50px!important;padding:10px 12px!important;align-items:center!important;}
body.page-televente .tv-card-head h3{font-size:16px!important;margin:0!important;}
body.page-televente .tv-filters{margin-left:auto!important;display:flex!important;gap:8px!important;flex-wrap:nowrap!important;width:auto!important;}
body.page-televente .tv-filters .input{width:210px!important;height:38px!important;}
body.page-televente .tv-filters .select{width:145px!important;height:38px!important;}
body.page-televente .tv-table-wrap{width:100%!important;max-height:calc(100dvh - 295px)!important;overflow-y:auto!important;overflow-x:hidden!important;background:#fff!important;}
body.page-televente .tv-table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:separate!important;border-spacing:0!important;background:#fff!important;}
body.page-televente .tv-table th,body.page-televente .tv-table td{box-sizing:border-box!important;}
body.page-televente .tv-table th{position:sticky!important;top:0!important;z-index:7!important;background:#f8fafc!important;color:#475569!important;font-size:10.5px!important;line-height:1.1!important;text-transform:uppercase!important;letter-spacing:.01em!important;padding:8px 5px!important;border-bottom:1px solid #dbe3ef!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.page-televente .tv-table td{font-size:12px!important;line-height:1.18!important;padding:6px 5px!important;border-bottom:1px solid #edf2f7!important;background:#fff!important;color:#0f172a!important;vertical-align:middle!important;white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.page-televente .tv-table tr:hover td{background:#f8fbff!important;}
body.page-televente .tv-table .main-name{font-size:12.2px!important;line-height:1.15!important;display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.page-televente .tv-table .sub{font-size:10.5px!important;line-height:1.1!important;margin-top:2px!important;color:#64748b!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.page-televente .tv-table .tv-phone{font-size:11.6px!important;white-space:nowrap!important;}
body.page-televente .tv-table .tv-status{width:100%!important;min-width:0!important;height:33px!important;min-height:33px!important;padding:5px 6px!important;font-size:11.5px!important;border-radius:9px!important;}
body.page-televente .tv-table .tv-reminder{font-size:11px!important;white-space:normal!important;}
body.page-televente .tv-table .tv-devis{font-size:12px!important;text-align:left!important;white-space:nowrap!important;}
body.page-televente .tv-table .tv-demo{font-size:11.4px!important;white-space:nowrap!important;}
body.page-televente .tv-table .tv-demo .link{font-size:11.4px!important;}
body.page-televente .tv-actions{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;flex-wrap:nowrap!important;width:100%!important;min-width:0!important;}
body.page-televente .tv-actions .icon-btn{width:31px!important;height:31px!important;min-width:31px!important;min-height:31px!important;padding:0!important;border-radius:9px!important;flex:0 0 31px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
body.page-televente .tv-actions .icon-btn svg{width:15.5px!important;height:15.5px!important;}
body.page-televente .tv-actions .btn-call{background:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important;}
body.page-televente .tv-table .c-rdv{width:7.4%!important;}
body.page-televente .tv-table .c-gerant{width:13.6%!important;}
body.page-televente .tv-table .c-societe{width:11.5%!important;}
body.page-televente .tv-table .c-ville{width:7.4%!important;}
body.page-televente .tv-table .c-phone{width:11.8%!important;}
body.page-televente .tv-table .c-status{width:16.2%!important;}
body.page-televente .tv-table .c-rappel{width:10.4%!important;}
body.page-televente .tv-table .c-devis{width:5.2%!important;}
body.page-televente .tv-table .c-demo{width:5.4%!important;}
body.page-televente .tv-table .c-actions{width:11.1%!important;}
body.page-televente .tv-table th:last-child{font-size:10px!important;text-align:center!important;}
body.page-televente .tv-table td:last-child{overflow:visible!important;}

@media(min-width:1000px) and (max-width:1360px){
  body.page-televente .main{padding:12px!important;}
  body.page-televente .topbar{margin-bottom:8px!important;}
  body.page-televente .tv-table-wrap{max-height:calc(100dvh - 280px)!important;}
  body.page-televente .tv-table th{font-size:10px!important;padding:7px 4px!important;}
  body.page-televente .tv-table td{font-size:11.6px!important;padding:5.5px 4px!important;}
  body.page-televente .tv-table .tv-status{font-size:11.2px!important;height:31px!important;}
  body.page-televente .tv-actions .icon-btn{width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important;}
}
@media(max-width:900px){
  body.page-televente .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.page-televente .tv-table-wrap{max-height:none!important;overflow:visible!important;}
  body.page-televente .tv-table,body.page-televente .tv-table thead,body.page-televente .tv-table tbody,body.page-televente .tv-table tr,body.page-televente .tv-table th,body.page-televente .tv-table td{display:block!important;width:100%!important;min-width:0!important;}
  body.page-televente .tv-table thead{display:none!important;}
  body.page-televente .tv-table tbody{display:grid!important;gap:10px!important;padding:10px!important;background:#f8fafc!important;}
  body.page-televente .tv-table tr{border:1px solid #dbe3ef!important;border-radius:14px!important;overflow:hidden!important;background:#fff!important;}
  body.page-televente .tv-table td{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;text-align:right!important;white-space:normal!important;overflow:visible!important;}
  body.page-televente .tv-table td:before{content:attr(data-label)!important;text-align:left!important;color:#64748b!important;font-size:10px!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.02em!important;flex:0 0 35%!important;}
  body.page-televente .tv-actions{justify-content:flex-end!important;}
}

/* Billing : actions avec icone + texte, lisibles dans une zone scrollable */
body.page-billing .table-wrap{max-height:calc(100vh - 300px)!important;}
body.page-billing .billing-actions{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:nowrap!important;min-width:max-content!important;white-space:nowrap!important;}
body.page-billing .billing-actions .action-text-btn{width:auto!important;min-width:auto!important;height:34px!important;min-height:34px!important;padding:0 10px!important;border-radius:10px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;font-size:12px!important;font-weight:800!important;background:#fff!important;color:#0f172a!important;border:1px solid #cbd5e1!important;line-height:1!important;flex:0 0 auto!important;}
body.page-billing .billing-actions .action-text-btn svg{width:15px!important;height:15px!important;flex:0 0 15px!important;}
body.page-billing .billing-actions .btn-green{background:#16a34a!important;color:#fff!important;border-color:#16a34a!important;}
body.page-billing .billing-actions .btn-green *{color:#fff!important;}

/* Qualite : actions compactes mais lisibles */
body.page-qualite .row-actions{flex-wrap:nowrap!important;gap:7px!important;min-width:max-content!important;}
body.page-qualite .action-text-btn{width:auto!important;min-width:auto!important;height:34px!important;padding:0 10px!important;display:inline-flex!important;align-items:center!important;gap:6px!important;font-size:12px!important;font-weight:800!important;}
body.page-qualite .action-text-btn svg{width:15px!important;height:15px!important;}
body.page-qualite .btn-green{color:#fff!important;}

@media(max-width:760px){
  .table-pan{display:none!important;}
  .table-wrap::-webkit-scrollbar:horizontal{height:8px!important;display:block!important;}
  body.page-billing .billing-actions,body.page-qualite .row-actions{flex-wrap:wrap!important;min-width:0!important;}
  body.page-billing .billing-actions .action-text-btn,body.page-qualite .action-text-btn{flex:1 1 auto!important;}
}

/* =========================================================
   CORRECTION FINALE PROPRE - 15/06
   Objectif: TV plus de RDV visibles, actions completes,
   scroll horizontal pilote en haut, tableaux stables.
   ========================================================= */

/* Commande de déplacement horizontale intégrée en haut des grands tableaux */
.table-zone{position:relative;width:100%;min-width:0;overflow:hidden;background:#fff;}
.table-pan{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:8px 12px!important;
  background:#f8fafc!important;
  border-bottom:1px solid #dbe3ef!important;
  min-height:42px!important;
}
.table-zone-fit .table-pan,
.table-zone:not(.has-horizontal-scroll) .table-pan{display:none!important;}
.table-pan-label{font-size:11px!important;font-weight:900!important;color:#64748b!important;text-transform:uppercase!important;letter-spacing:.04em!important;white-space:nowrap!important;}
.table-top-scroll{flex:1 1 auto!important;min-width:120px!important;height:12px!important;overflow-x:auto!important;overflow-y:hidden!important;border-radius:999px!important;background:#eaf1fb!important;scrollbar-width:thin!important;scrollbar-color:#94a3b8 #eaf1fb!important;}
.table-top-scroll>div{height:1px!important;}
.table-pan .table-nav-btn{width:34px!important;height:34px!important;min-height:34px!important;flex:0 0 34px!important;padding:0!important;border-radius:10px!important;background:#fff!important;border:1px solid #cbd5e1!important;color:#0f172a!important;}
.table-pan .table-nav-btn:disabled{opacity:.35!important;cursor:not-allowed!important;}
.table-zone .table-wrap{overflow:auto!important;max-height:calc(100vh - 260px);}
.table-zone .table-wrap::-webkit-scrollbar:horizontal{height:0!important;display:none!important;}
.table-zone .table-wrap{scrollbar-width:thin;}
.table-zone table th{position:sticky!important;top:0!important;z-index:10!important;background:#f8fafc!important;color:#475569!important;box-shadow:0 1px 0 #dbe3ef!important;}
.table-zone table td{background:#fff;color:#0f172a;}

/* Télévente: pleine largeur, plus de lignes visibles, sans casser la lisibilité */
body.page-televente .main{padding-top:12px!important;}
body.page-televente .topbar{height:56px!important;min-height:56px!important;margin-bottom:8px!important;padding:8px 12px!important;}
body.page-televente .kpis{grid-template-columns:repeat(6,minmax(110px,1fr))!important;gap:8px!important;margin-bottom:8px!important;}
body.page-televente .kpi{min-height:58px!important;padding:8px 10px!important;border-radius:10px!important;}
body.page-televente .kpi span{font-size:10.5px!important;line-height:1.1!important;}
body.page-televente .kpi strong{font-size:20px!important;margin-top:4px!important;}
body.page-televente .tv-clean-card{margin-bottom:0!important;border-radius:10px!important;}
body.page-televente .tv-card-head{min-height:52px!important;padding:8px 12px!important;}
body.page-televente .tv-card-head h3{font-size:15px!important;}
body.page-televente .tv-filters{gap:8px!important;}
body.page-televente .tv-filters .input{width:230px!important;min-height:36px!important;}
body.page-televente .tv-filters .select{width:170px!important;min-height:36px!important;}
body.page-televente .tv-table-wrap{width:100%!important;max-height:calc(100dvh - 222px)!important;overflow-y:auto!important;overflow-x:hidden!important;background:#fff!important;}
body.page-televente .tv-table{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:separate!important;border-spacing:0!important;background:#fff!important;}
body.page-televente .tv-table th,
body.page-televente .tv-table td{box-sizing:border-box!important;}
body.page-televente .tv-table th{position:sticky!important;top:0!important;z-index:12!important;background:#f8fafc!important;color:#475569!important;font-size:10.5px!important;line-height:1!important;text-transform:uppercase!important;letter-spacing:.01em!important;padding:8px 5px!important;border-bottom:1px solid #dbe3ef!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.page-televente .tv-table td{font-size:12px!important;line-height:1.12!important;padding:5px 5px!important;border-bottom:1px solid #edf2f7!important;background:#fff!important;color:#0f172a!important;vertical-align:middle!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;height:38px!important;}
body.page-televente .tv-table tr:hover td{background:#f8fbff!important;}
body.page-televente .tv-table .main-name{font-size:12.2px!important;line-height:1.05!important;display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.page-televente .tv-table .sub{font-size:10.4px!important;line-height:1.05!important;margin-top:1px!important;color:#64748b!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.page-televente .tv-table .tv-phone{font-size:11.7px!important;white-space:nowrap!important;}
body.page-televente .tv-table .tv-status{width:100%!important;min-width:0!important;height:31px!important;min-height:31px!important;padding:4px 6px!important;font-size:11.6px!important;border-radius:9px!important;}
body.page-televente .tv-table .tv-reminder{font-size:11px!important;white-space:normal!important;line-height:1.05!important;}
body.page-televente .tv-table .tv-devis{font-size:12px!important;text-align:left!important;white-space:nowrap!important;}
body.page-televente .tv-table .tv-demo{font-size:11.4px!important;white-space:nowrap!important;}
body.page-televente .tv-table .tv-demo .link{font-size:11.4px!important;}
body.page-televente .tv-actions{display:flex!important;gap:6px!important;flex-wrap:nowrap!important;justify-content:center!important;min-width:74px!important;}
body.page-televente .tv-actions .icon-btn{width:32px!important;height:32px!important;min-height:32px!important;border-radius:9px!important;padding:0!important;flex:0 0 32px!important;}
body.page-televente .tv-actions .icon-btn svg{width:15px!important;height:15px!important;}
body.page-televente .tv-actions .btn-call{background:#eff6ff!important;border-color:#bfdbfe!important;color:#2563eb!important;}
body.page-televente .tv-table .c-rdv{width:7.4%!important;}
body.page-televente .tv-table .c-gerant{width:13.6%!important;}
body.page-televente .tv-table .c-societe{width:11.4%!important;}
body.page-televente .tv-table .c-ville{width:7.4%!important;}
body.page-televente .tv-table .c-phone{width:11.7%!important;}
body.page-televente .tv-table .c-status{width:16.2%!important;}
body.page-televente .tv-table .c-rappel{width:10.1%!important;}
body.page-televente .tv-table .c-devis{width:5.1%!important;}
body.page-televente .tv-table .c-demo{width:5.0%!important;}
body.page-televente .tv-table .c-actions{width:12.1%!important;}
body.page-televente .tv-table th:last-child{text-align:center!important;font-size:10px!important;}
body.page-televente .tv-table td:last-child{overflow:visible!important;}

@media (max-width:1400px) and (min-width:761px){
  body.page-televente .topbar{height:54px!important;min-height:54px!important;}
  body.page-televente .kpi{min-height:54px!important;padding:7px 9px!important;}
  body.page-televente .kpi strong{font-size:19px!important;}
  body.page-televente .tv-card-head{min-height:48px!important;padding:7px 10px!important;}
  body.page-televente .tv-table-wrap{max-height:calc(100dvh - 205px)!important;}
  body.page-televente .tv-table th{font-size:10px!important;padding:7px 4px!important;}
  body.page-televente .tv-table td{font-size:11.8px!important;padding:4px 4px!important;height:35px!important;}
  body.page-televente .tv-table .tv-status{height:29px!important;min-height:29px!important;font-size:11.3px!important;}
  body.page-televente .tv-actions .icon-btn{width:30px!important;height:30px!important;min-height:30px!important;flex-basis:30px!important;}
}

/* Billing / grands tableaux: actions texte + icônes, lisibles avec scroll haut */
body.page-billing .table-zone table{min-width:2050px!important;}
body.page-billing .table-zone .table-wrap{max-height:calc(100vh - 300px)!important;}
body.page-billing .billing-actions{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:nowrap!important;white-space:nowrap!important;min-width:max-content!important;}
body.page-billing .billing-actions .action-text-btn{width:auto!important;min-width:auto!important;height:34px!important;min-height:34px!important;padding:0 10px!important;border-radius:10px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;font-size:12px!important;font-weight:850!important;background:#fff!important;color:#0f172a!important;border:1px solid #cbd5e1!important;line-height:1!important;flex:0 0 auto!important;}
body.page-billing .billing-actions .action-text-btn svg{width:15px!important;height:15px!important;flex:0 0 15px!important;}
body.page-billing .billing-actions .btn-green{background:#16a34a!important;color:#fff!important;border-color:#16a34a!important;}
body.page-billing .billing-actions .btn-green *{color:#fff!important;}

/* Développeur / Qualité: boutons d'action non coupés, scroll haut utile */
body.page-developpeur .table-zone table{min-width:1350px!important;}
body.page-developpeur .table-zone .table-wrap,
body.page-qualite .table-zone .table-wrap{max-height:calc(100vh - 285px)!important;}
body.page-developpeur .row-actions{display:flex!important;gap:7px!important;flex-wrap:nowrap!important;min-width:max-content!important;}
body.page-developpeur .row-actions .btn-primary{min-width:104px!important;padding:0 12px!important;height:34px!important;min-height:34px!important;border-radius:10px!important;}
body.page-developpeur .row-actions .icon-btn,
body.page-developpeur .row-actions button:not(.btn-primary){width:34px!important;height:34px!important;min-height:34px!important;border-radius:10px!important;padding:0!important;}
body.page-qualite .quality-actions,
body.page-qualite .row-actions{display:flex!important;gap:7px!important;flex-wrap:nowrap!important;min-width:max-content!important;}
body.page-qualite .action-text-btn{height:34px!important;min-height:34px!important;border-radius:10px!important;padding:0 10px!important;display:inline-flex!important;gap:6px!important;align-items:center!important;white-space:nowrap!important;color:#0f172a!important;background:#fff!important;border:1px solid #cbd5e1!important;}
body.page-qualite .btn-green{background:#16a34a!important;color:#fff!important;border-color:#16a34a!important;}
body.page-qualite .btn-red{background:#dc2626!important;color:#fff!important;border-color:#dc2626!important;}

/* Navigation: bouton menu fiable sur petit écran/tablette */
.menu-toggle{display:inline-flex!important;}
body.nav-open .sidebar{left:0!important;}
@media (min-width:1000px){
  .menu-toggle{display:inline-flex!important;}
}
@media (max-width:760px){
  .table-pan{display:none!important;}
  body.page-televente .tv-table-wrap{max-height:none!important;overflow:visible!important;}
  body.page-televente .tv-table,body.page-televente .tv-table thead,body.page-televente .tv-table tbody,body.page-televente .tv-table tr,body.page-televente .tv-table th,body.page-televente .tv-table td{display:block!important;width:100%!important;min-width:0!important;height:auto!important;}
  body.page-televente .tv-table thead{display:none!important;}
  body.page-televente .tv-table tbody{display:grid!important;gap:10px!important;padding:10px!important;background:#f8fafc!important;}
  body.page-televente .tv-table tr{border:1px solid #dbe3ef!important;border-radius:14px!important;overflow:hidden!important;background:#fff!important;}
  body.page-televente .tv-table td{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;text-align:right!important;white-space:normal!important;overflow:visible!important;font-size:13px!important;padding:9px 6px!important;}
  body.page-televente .tv-table td:before{content:attr(data-label)!important;text-align:left!important;color:#64748b!important;font-size:10px!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.02em!important;flex:0 0 35%!important;}
  body.page-billing .billing-actions,body.page-qualite .quality-actions,body.page-qualite .row-actions{flex-wrap:wrap!important;min-width:0!important;justify-content:flex-end!important;}
}

/* =========================================================
   DERNIERE CORRECTION DENSITE + TABLEAUX - 15/06
   Objectif : afficher plus de RDV/lignes, garder les textes lisibles,
   mettre le deplacement horizontal en haut et masquer la barre du bas.
   ========================================================= */
@media (min-width:761px){
  body.page-televente .main,
  body.page-billing .main,
  body.page-qualite .main,
  body.page-developpeur .main{padding:10px 12px 8px!important;}

  body.page-televente .topbar,
  body.page-billing .topbar,
  body.page-qualite .topbar,
  body.page-developpeur .topbar{min-height:50px!important;height:50px!important;padding:7px 10px!important;margin-bottom:8px!important;border-radius:15px!important;}

  body.page-televente .title h2,
  body.page-billing .title h2,
  body.page-qualite .title h2,
  body.page-developpeur .title h2{font-size:20px!important;line-height:1!important;color:#0f172a!important;}
  body.page-televente .title p,
  body.page-billing .title p,
  body.page-qualite .title p,
  body.page-developpeur .title p{font-size:12.5px!important;margin-top:2px!important;color:#64748b!important;}

  body.page-televente .kpis,
  body.page-billing .kpis,
  body.page-qualite .kpis,
  body.page-developpeur .kpis{gap:7px!important;margin-bottom:8px!important;}

  body.page-televente .kpi,
  body.page-billing .kpi,
  body.page-qualite .kpi,
  body.page-developpeur .kpi{min-height:54px!important;height:54px!important;padding:7px 10px!important;border-radius:13px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;}
  body.page-televente .kpi span,
  body.page-billing .kpi span,
  body.page-qualite .kpi span,
  body.page-developpeur .kpi span{font-size:10px!important;line-height:1!important;color:#64748b!important;opacity:1!important;}
  body.page-televente .kpi strong,
  body.page-billing .kpi strong,
  body.page-qualite .kpi strong,
  body.page-developpeur .kpi strong{font-size:20px!important;line-height:1.05!important;margin-top:4px!important;color:#0f172a!important;}

  body.page-televente .card,
  body.page-billing .card,
  body.page-qualite .card,
  body.page-developpeur .card{margin-bottom:8px!important;border-radius:15px!important;}

  body.page-televente .card-head,
  body.page-billing .card-head,
  body.page-qualite .card-head,
  body.page-developpeur .card-head{min-height:42px!important;padding:8px 11px!important;}
  body.page-televente .card-head h3,
  body.page-billing .card-head h3,
  body.page-qualite .card-head h3,
  body.page-developpeur .card-head h3{font-size:15px!important;}

  body.page-televente .input,
  body.page-televente .select,
  body.page-billing .input,
  body.page-billing .select,
  body.page-qualite .input,
  body.page-qualite .select,
  body.page-developpeur .input,
  body.page-developpeur .select{min-height:32px!important;height:32px!important;padding:5px 8px!important;border-radius:9px!important;}
}

/* Televente : tableau plein ecran, toutes les colonnes et les 2 actions visibles */
@media (min-width:901px){
  body.page-televente .tv-card-head{min-height:42px!important;padding:7px 10px!important;}
  body.page-televente .tv-filters .input{width:190px!important;height:32px!important;min-height:32px!important;}
  body.page-televente .tv-filters .select{width:130px!important;height:32px!important;min-height:32px!important;}
  body.page-televente .tv-table-wrap{max-height:calc(100dvh - 178px)!important;overflow-y:auto!important;overflow-x:hidden!important;}
  body.page-televente .tv-table th{font-size:10px!important;line-height:1!important;padding:6px 4px!important;height:30px!important;}
  body.page-televente .tv-table td{font-size:12px!important;line-height:1.05!important;padding:3px 4px!important;height:34px!important;min-height:34px!important;white-space:nowrap!important;}
  body.page-televente .tv-table .main-name{font-size:12px!important;line-height:1.02!important;}
  body.page-televente .tv-table .sub{font-size:9.8px!important;line-height:1!important;margin-top:1px!important;}
  body.page-televente .tv-table .tv-status{height:27px!important;min-height:27px!important;font-size:11.2px!important;padding:3px 6px!important;}
  body.page-televente .tv-table .tv-phone{font-size:11.5px!important;}
  body.page-televente .tv-actions{gap:4px!important;min-width:64px!important;justify-content:center!important;}
  body.page-televente .tv-actions .icon-btn{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;flex:0 0 28px!important;border-radius:8px!important;}
  body.page-televente .tv-actions .icon-btn svg{width:14px!important;height:14px!important;}
  body.page-televente .tv-table .c-rdv{width:7.2%!important;}
  body.page-televente .tv-table .c-gerant{width:13.5%!important;}
  body.page-televente .tv-table .c-societe{width:11.2%!important;}
  body.page-televente .tv-table .c-ville{width:7.2%!important;}
  body.page-televente .tv-table .c-phone{width:11.4%!important;}
  body.page-televente .tv-table .c-status{width:15.7%!important;}
  body.page-televente .tv-table .c-rappel{width:9.6%!important;}
  body.page-televente .tv-table .c-devis{width:5.0%!important;}
  body.page-televente .tv-table .c-demo{width:5.2%!important;}
  body.page-televente .tv-table .c-actions{width:14.0%!important;}
}

/* Grands tableaux : commande de deplacement en haut, barre du bas masquee, plus de lignes visibles */
@media (min-width:761px){
  body.page-billing .table-wrap,
  body.page-qualite .table-wrap,
  body.page-developpeur .table-wrap{max-height:calc(100dvh - 238px)!important;overflow:auto!important;}

  body.page-billing .table-pan,
  body.page-qualite .table-pan,
  body.page-developpeur .table-pan{height:34px!important;padding:5px 10px!important;background:#f7fbff!important;border-bottom:1px solid #dbe3ef!important;gap:7px!important;}
  body.page-billing .table-pan-label,
  body.page-qualite .table-pan-label,
  body.page-developpeur .table-pan-label{font-size:10px!important;color:#64748b!important;}
  body.page-billing .table-top-scroll,
  body.page-qualite .table-top-scroll,
  body.page-developpeur .table-top-scroll{height:12px!important;border-radius:999px!important;background:#e8eef8!important;}
  body.page-billing .table-nav-btn,
  body.page-qualite .table-nav-btn,
  body.page-developpeur .table-nav-btn{width:30px!important;height:30px!important;min-height:30px!important;border-radius:9px!important;}

  body.page-billing .table-wrap::-webkit-scrollbar:horizontal,
  body.page-qualite .table-wrap::-webkit-scrollbar:horizontal,
  body.page-developpeur .table-wrap::-webkit-scrollbar:horizontal{height:0!important;display:none!important;}

  body.page-billing .table-wrap th,
  body.page-billing .table-wrap td,
  body.page-qualite .table-wrap th,
  body.page-qualite .table-wrap td,
  body.page-developpeur .table-wrap th,
  body.page-developpeur .table-wrap td{padding:7px 9px!important;font-size:12.5px!important;line-height:1.15!important;}
  body.page-billing .table-wrap th,
  body.page-qualite .table-wrap th,
  body.page-developpeur .table-wrap th{font-size:10.5px!important;height:34px!important;}
  body.page-billing .table-wrap td,
  body.page-qualite .table-wrap td,
  body.page-developpeur .table-wrap td{height:42px!important;}

  body.page-billing .table-wrap .select,
  body.page-qualite .table-wrap .select,
  body.page-developpeur .table-wrap .select,
  body.page-billing .table-wrap .input,
  body.page-qualite .table-wrap .input,
  body.page-developpeur .table-wrap .input{height:30px!important;min-height:30px!important;padding:4px 8px!important;font-size:12.2px!important;}

  body.page-billing .billing-actions .action-text-btn{height:30px!important;min-height:30px!important;padding:0 8px!important;font-size:11.5px!important;border-radius:9px!important;}
  body.page-billing .billing-actions .action-text-btn svg{width:14px!important;height:14px!important;}

  body.page-developpeur .row-actions .btn-primary{height:30px!important;min-height:30px!important;min-width:96px!important;padding:0 9px!important;font-size:12px!important;}
  body.page-developpeur .row-actions .icon-btn,
  body.page-developpeur .row-actions button:not(.btn-primary){height:30px!important;width:30px!important;min-height:30px!important;}

  body.page-qualite .action-text-btn{height:30px!important;min-height:30px!important;padding:0 8px!important;font-size:11.5px!important;}
}

/* Evite le texte blanc sur fond blanc dans les cartes KPI et entetes */
.kpi:not(.dark-kpi) span,
.kpi:not(.dark-kpi) strong,
.card-head h3,
.title h2{color:#0f172a!important;opacity:1!important;}
.kpi:not(.dark-kpi) span,.title p{color:#64748b!important;}

/* =========================================================
   CORRECTION FINALE ESPACE ECRAN - 15/06
   Les tableaux utilisent toute la hauteur disponible.
   Plus de grand vide sous Billing/Qualite/Developpeur/Televente.
   ========================================================= */
@media (min-width: 901px){
  body.page-televente,
  body.page-billing,
  body.page-qualite,
  body.page-developpeur,
  body.page-chef-rdv,
  body.page-chef-televente{
    overflow:hidden!important;
  }

  body.page-televente .main,
  body.page-billing .main,
  body.page-qualite .main,
  body.page-developpeur .main,
  body.page-chef-rdv .main,
  body.page-chef-televente .main{
    height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    padding:10px 12px 8px!important;
  }

  body.page-televente #page,
  body.page-billing #page,
  body.page-qualite #page,
  body.page-developpeur #page,
  body.page-chef-rdv #page,
  body.page-chef-televente #page{
    flex:1 1 auto!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  body.page-televente .topbar,
  body.page-billing .topbar,
  body.page-qualite .topbar,
  body.page-developpeur .topbar,
  body.page-chef-rdv .topbar,
  body.page-chef-televente .topbar{
    flex:0 0 auto!important;
    height:52px!important;
    min-height:52px!important;
    padding:7px 10px!important;
    margin:0 0 8px!important;
  }

  body.page-televente .kpis,
  body.page-billing .kpis,
  body.page-qualite .kpis,
  body.page-developpeur .kpis,
  body.page-chef-rdv .kpis,
  body.page-chef-televente .kpis{
    flex:0 0 auto!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:8px!important;
    margin:0 0 8px!important;
  }

  body.page-televente .kpi,
  body.page-billing .kpi,
  body.page-qualite .kpi,
  body.page-developpeur .kpi,
  body.page-chef-rdv .kpi,
  body.page-chef-televente .kpi{
    min-height:48px!important;
    height:48px!important;
    padding:6px 10px!important;
    border-radius:13px!important;
    justify-content:center!important;
  }

  body.page-televente .kpi span,
  body.page-billing .kpi span,
  body.page-qualite .kpi span,
  body.page-developpeur .kpi span,
  body.page-chef-rdv .kpi span,
  body.page-chef-televente .kpi span{
    font-size:9.8px!important;
    line-height:1.05!important;
    color:#64748b!important;
  }

  body.page-televente .kpi strong,
  body.page-billing .kpi strong,
  body.page-qualite .kpi strong,
  body.page-developpeur .kpi strong,
  body.page-chef-rdv .kpi strong,
  body.page-chef-televente .kpi strong{
    font-size:19px!important;
    line-height:1!important;
    margin-top:3px!important;
    color:#0f172a!important;
  }

  body.page-televente .card,
  body.page-billing .card,
  body.page-qualite .card,
  body.page-developpeur .card,
  body.page-chef-rdv .card,
  body.page-chef-televente .card{
    flex:1 1 auto!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    margin:0!important;
  }

  body.page-televente .card-head,
  body.page-billing .card-head,
  body.page-qualite .card-head,
  body.page-developpeur .card-head,
  body.page-chef-rdv .card-head,
  body.page-chef-televente .card-head{
    flex:0 0 auto!important;
    min-height:42px!important;
    padding:8px 12px!important;
  }

  body.page-billing .table-zone,
  body.page-qualite .table-zone,
  body.page-developpeur .table-zone,
  body.page-chef-rdv .table-zone,
  body.page-chef-televente .table-zone{
    flex:1 1 auto!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  body.page-billing .table-pan,
  body.page-qualite .table-pan,
  body.page-developpeur .table-pan,
  body.page-chef-rdv .table-pan,
  body.page-chef-televente .table-pan{
    flex:0 0 34px!important;
    height:34px!important;
    min-height:34px!important;
    padding:5px 10px!important;
    background:#f7fbff!important;
    border-top:1px solid #edf2f7!important;
    border-bottom:1px solid #dbe3ef!important;
  }

  body.page-billing .table-wrap,
  body.page-qualite .table-wrap,
  body.page-developpeur .table-wrap,
  body.page-chef-rdv .table-wrap,
  body.page-chef-televente .table-wrap{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:auto!important;
    border-radius:0 0 16px 16px!important;
  }

  body.page-billing .table-wrap th,
  body.page-qualite .table-wrap th,
  body.page-developpeur .table-wrap th,
  body.page-chef-rdv .table-wrap th,
  body.page-chef-televente .table-wrap th{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    background:#f8fbff!important;
    color:#475569!important;
    height:34px!important;
    padding:7px 9px!important;
    font-size:10.5px!important;
    line-height:1.1!important;
  }

  body.page-billing .table-wrap td,
  body.page-qualite .table-wrap td,
  body.page-developpeur .table-wrap td,
  body.page-chef-rdv .table-wrap td,
  body.page-chef-televente .table-wrap td{
    height:38px!important;
    padding:6px 9px!important;
    font-size:12.4px!important;
    line-height:1.12!important;
  }

  body.page-billing .table-wrap .select,
  body.page-qualite .table-wrap .select,
  body.page-developpeur .table-wrap .select,
  body.page-chef-rdv .table-wrap .select,
  body.page-chef-televente .table-wrap .select,
  body.page-billing .table-wrap .input,
  body.page-qualite .table-wrap .input,
  body.page-developpeur .table-wrap .input,
  body.page-chef-rdv .table-wrap .input,
  body.page-chef-televente .table-wrap .input{
    height:29px!important;
    min-height:29px!important;
    padding:3px 8px!important;
    font-size:12px!important;
  }

  body.page-billing .table-wrap::-webkit-scrollbar:horizontal,
  body.page-qualite .table-wrap::-webkit-scrollbar:horizontal,
  body.page-developpeur .table-wrap::-webkit-scrollbar:horizontal,
  body.page-chef-rdv .table-wrap::-webkit-scrollbar:horizontal,
  body.page-chef-televente .table-wrap::-webkit-scrollbar:horizontal{
    height:0!important;
    display:none!important;
  }

  body.page-televente .tv-card{
    flex:1 1 auto!important;
    min-height:0!important;
  }
  body.page-televente .tv-table-wrap{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  body.page-televente .tv-table th{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    height:30px!important;
    padding:6px 4px!important;
    font-size:10px!important;
    background:#f8fbff!important;
  }
  body.page-televente .tv-table td{
    height:32px!important;
    min-height:32px!important;
    padding:3px 4px!important;
    font-size:11.8px!important;
    line-height:1.05!important;
  }
  body.page-televente .tv-table .main-name{font-size:12px!important;line-height:1.02!important;}
  body.page-televente .tv-table .sub{font-size:9.7px!important;line-height:1!important;}
  body.page-televente .tv-table .tv-status{height:26px!important;min-height:26px!important;font-size:11px!important;padding:2px 6px!important;}
  body.page-televente .tv-actions{gap:4px!important;justify-content:center!important;min-width:62px!important;}
  body.page-televente .tv-actions .icon-btn{width:27px!important;height:27px!important;min-width:27px!important;min-height:27px!important;border-radius:8px!important;}
  body.page-televente .tv-table .c-rdv{width:7.2%!important;}
  body.page-televente .tv-table .c-gerant{width:13.2%!important;}
  body.page-televente .tv-table .c-societe{width:11.0%!important;}
  body.page-televente .tv-table .c-ville{width:7.1%!important;}
  body.page-televente .tv-table .c-phone{width:11.2%!important;}
  body.page-televente .tv-table .c-status{width:15.5%!important;}
  body.page-televente .tv-table .c-rappel{width:9.5%!important;}
  body.page-televente .tv-table .c-devis{width:5.1%!important;}
  body.page-televente .tv-table .c-demo{width:5.1%!important;}
  body.page-televente .tv-table .c-actions{width:15.1%!important;}
}

@media (min-width:901px) and (max-height:820px){
  body.page-televente .kpi,
  body.page-billing .kpi,
  body.page-qualite .kpi,
  body.page-developpeur .kpi,
  body.page-chef-rdv .kpi,
  body.page-chef-televente .kpi{height:44px!important;min-height:44px!important;padding:5px 9px!important;}
  body.page-televente .kpi strong,
  body.page-billing .kpi strong,
  body.page-qualite .kpi strong,
  body.page-developpeur .kpi strong,
  body.page-chef-rdv .kpi strong,
  body.page-chef-televente .kpi strong{font-size:18px!important;}
  body.page-televente .topbar,
  body.page-billing .topbar,
  body.page-qualite .topbar,
  body.page-developpeur .topbar,
  body.page-chef-rdv .topbar,
  body.page-chef-televente .topbar{height:48px!important;min-height:48px!important;margin-bottom:6px!important;}
  body.page-televente .kpis,
  body.page-billing .kpis,
  body.page-qualite .kpis,
  body.page-developpeur .kpis,
  body.page-chef-rdv .kpis,
  body.page-chef-televente .kpis{margin-bottom:6px!important;}
  body.page-televente .tv-table td{height:30px!important;min-height:30px!important;}
  body.page-billing .table-wrap td,
  body.page-qualite .table-wrap td,
  body.page-developpeur .table-wrap td,
  body.page-chef-rdv .table-wrap td,
  body.page-chef-televente .table-wrap td{height:36px!important;}
}

/* =========================================================
   CORRECTION DEFINITIVE AFFICHAGE METIER - 15/06
   Objectif : comme Televente, utiliser toute la hauteur utile
   et supprimer les grands vides dans Billing, Qualite, Developpeur.
   ========================================================= */
@media (min-width: 901px){
  body.page-billing,
  body.page-qualite,
  body.page-developpeur,
  body.page-televente{overflow:hidden!important;}

  body.page-billing .main,
  body.page-qualite .main,
  body.page-developpeur .main,
  body.page-televente .main{
    height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    padding:10px 12px 8px!important;
  }
  body.page-billing #page,
  body.page-qualite #page,
  body.page-developpeur #page,
  body.page-televente #page{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }

  body.page-billing .topbar,
  body.page-qualite .topbar,
  body.page-developpeur .topbar,
  body.page-televente .topbar{
    flex:0 0 50px!important;
    height:50px!important;
    min-height:50px!important;
    margin:0 0 7px!important;
    padding:7px 10px!important;
    border-radius:14px!important;
  }
  body.page-billing .title h2,
  body.page-qualite .title h2,
  body.page-developpeur .title h2,
  body.page-televente .title h2{font-size:18px!important;}
  body.page-billing .title p,
  body.page-qualite .title p,
  body.page-developpeur .title p,
  body.page-televente .title p{font-size:12px!important;}

  body.page-billing .kpis,
  body.page-qualite .kpis,
  body.page-developpeur .kpis,
  body.page-televente .kpis{
    flex:0 0 44px!important;
    height:44px!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:7px!important;
    margin:0 0 7px!important;
  }
  body.page-billing .kpi,
  body.page-qualite .kpi,
  body.page-developpeur .kpi,
  body.page-televente .kpi{
    height:44px!important;
    min-height:44px!important;
    padding:5px 9px!important;
    border-radius:12px!important;
    display:block!important;
  }
  body.page-billing .kpi span,
  body.page-qualite .kpi span,
  body.page-developpeur .kpi span,
  body.page-televente .kpi span{
    font-size:9.5px!important;
    line-height:1!important;
    color:#64748b!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.page-billing .kpi strong,
  body.page-qualite .kpi strong,
  body.page-developpeur .kpi strong,
  body.page-televente .kpi strong{
    font-size:18px!important;
    line-height:1!important;
    margin-top:3px!important;
    color:#0f172a!important;
  }

  body.page-billing #page > .card,
  body.page-qualite #page > .card,
  body.page-developpeur #page > .card,
  body.page-televente #page > .card{
    flex:1 1 auto!important;
    min-height:0!important;
    margin:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    border-radius:14px!important;
  }
  body.page-qualite #page > .card:not(:first-of-type){
    display:none!important;
  }

  body.page-billing .card-head,
  body.page-qualite .card-head,
  body.page-developpeur .card-head,
  body.page-televente .card-head{
    flex:0 0 40px!important;
    min-height:40px!important;
    padding:7px 10px!important;
    gap:8px!important;
  }
  body.page-billing .card-head h3,
  body.page-qualite .card-head h3,
  body.page-developpeur .card-head h3,
  body.page-televente .card-head h3{font-size:14px!important;}
  body.page-billing .tools .input,
  body.page-qualite .tools .input,
  body.page-developpeur .tools .input,
  body.page-televente .tools .input{height:32px!important;min-height:32px!important;padding:5px 9px!important;}
  body.page-billing .tools .select,
  body.page-qualite .tools .select,
  body.page-developpeur .tools .select,
  body.page-televente .tools .select{height:32px!important;min-height:32px!important;padding:5px 9px!important;}

  body.page-billing .table-zone,
  body.page-qualite .table-zone,
  body.page-developpeur .table-zone{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }
  body.page-billing .table-pan,
  body.page-qualite .table-pan,
  body.page-developpeur .table-pan{
    flex:0 0 31px!important;
    height:31px!important;
    min-height:31px!important;
    padding:4px 10px!important;
    background:#f8fbff!important;
    border-top:1px solid #edf2f7!important;
    border-bottom:1px solid #dbe3ef!important;
    gap:7px!important;
  }
  body.page-billing .table-pan-label,
  body.page-qualite .table-pan-label,
  body.page-developpeur .table-pan-label{font-size:10px!important;}
  body.page-billing .table-pan .table-nav-btn,
  body.page-qualite .table-pan .table-nav-btn,
  body.page-developpeur .table-pan .table-nav-btn{width:28px!important;height:28px!important;min-height:28px!important;border-radius:9px!important;}
  body.page-billing .table-top-scroll,
  body.page-qualite .table-top-scroll,
  body.page-developpeur .table-top-scroll{height:11px!important;background:#e8eef8!important;}

  body.page-billing .table-wrap,
  body.page-qualite .table-wrap,
  body.page-developpeur .table-wrap{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:auto!important;
    border-radius:0 0 14px 14px!important;
  }
  body.page-billing .table-wrap::-webkit-scrollbar:horizontal,
  body.page-qualite .table-wrap::-webkit-scrollbar:horizontal,
  body.page-developpeur .table-wrap::-webkit-scrollbar:horizontal{height:0!important;display:none!important;}
  body.page-billing .table-wrap th,
  body.page-qualite .table-wrap th,
  body.page-developpeur .table-wrap th{
    position:sticky!important;
    top:0!important;
    z-index:30!important;
    height:31px!important;
    padding:6px 8px!important;
    font-size:10.5px!important;
    line-height:1!important;
    background:#f8fbff!important;
    color:#475569!important;
    box-shadow:0 1px 0 #dbe3ef!important;
  }
  body.page-billing .table-wrap td,
  body.page-qualite .table-wrap td,
  body.page-developpeur .table-wrap td{
    height:36px!important;
    padding:5px 8px!important;
    font-size:12.2px!important;
    line-height:1.1!important;
    background:#fff!important;
    color:#0f172a!important;
  }
  body.page-billing .table-wrap .select,
  body.page-qualite .table-wrap .select,
  body.page-developpeur .table-wrap .select,
  body.page-billing .table-wrap .input,
  body.page-qualite .table-wrap .input,
  body.page-developpeur .table-wrap .input{
    height:28px!important;
    min-height:28px!important;
    padding:3px 8px!important;
    font-size:12px!important;
    border-radius:9px!important;
  }

  body.page-billing .billing-actions{gap:6px!important;flex-wrap:nowrap!important;min-width:max-content!important;}
  body.page-billing .billing-actions .action-text-btn{
    height:28px!important;
    min-height:28px!important;
    padding:0 8px!important;
    font-size:11.3px!important;
    border-radius:8px!important;
    gap:5px!important;
    background:#fff!important;
    color:#0f172a!important;
    border-color:#cbd5e1!important;
  }
  body.page-billing .billing-actions .action-text-btn svg{width:13px!important;height:13px!important;}
  body.page-billing .billing-actions .btn-green{background:#16a34a!important;border-color:#16a34a!important;color:#fff!important;}
  body.page-billing .billing-actions .btn-green svg{color:#fff!important;}

  body.page-developpeur .row-actions{gap:5px!important;flex-wrap:nowrap!important;}
  body.page-developpeur .row-actions .btn-primary{height:28px!important;min-height:28px!important;padding:0 8px!important;font-size:11.5px!important;}
  body.page-developpeur .row-actions .icon-btn{width:28px!important;height:28px!important;min-height:28px!important;}

  body.page-qualite .row-actions{gap:6px!important;flex-wrap:nowrap!important;min-width:max-content!important;}
  body.page-qualite .action-text-btn{height:28px!important;min-height:28px!important;padding:0 8px!important;font-size:11.2px!important;border-radius:8px!important;}
  body.page-qualite .btn-green, body.page-qualite .btn-red{color:#fff!important;}

  body.page-televente .tv-card{flex:1 1 auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;}
  body.page-televente .tv-card-head{flex:0 0 40px!important;min-height:40px!important;padding:7px 10px!important;}
  body.page-televente .tv-table-wrap{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;background:#fff!important;}
  body.page-televente .tv-table th{height:28px!important;padding:5px 5px!important;font-size:10.2px!important;line-height:1!important;position:sticky!important;top:0!important;z-index:30!important;background:#f8fbff!important;}
  body.page-televente .tv-table td{height:31px!important;min-height:31px!important;padding:3px 5px!important;font-size:11.7px!important;line-height:1.05!important;}
  body.page-televente .tv-table .main-name{font-size:11.9px!important;line-height:1.02!important;}
  body.page-televente .tv-table .sub{font-size:9.5px!important;line-height:1!important;margin-top:1px!important;}
  body.page-televente .tv-table .tv-status{height:25px!important;min-height:25px!important;font-size:10.9px!important;padding:2px 6px!important;border-radius:8px!important;}
  body.page-televente .tv-actions{gap:4px!important;min-width:64px!important;}
  body.page-televente .tv-actions .icon-btn{width:27px!important;height:27px!important;min-width:27px!important;min-height:27px!important;flex:0 0 27px!important;}
  body.page-televente .tv-table .c-actions{width:14.6%!important;}
}

/* =========================================================
   CORRECTION DEFINITIVE - HAUTEUR TABLEAUX COMME TELEVENTE
   Objectif : supprimer le vide en bas sur Billing, Qualite et Developpeur
   en faisant occuper aux tableaux toute la hauteur disponible.
   ========================================================= */
@media (min-width: 761px){
  body.page-billing,
  body.page-qualite,
  body.page-developpeur,
  body.page-televente{
    height:100vh!important;
    overflow:hidden!important;
  }

  body.page-billing .app,
  body.page-qualite .app,
  body.page-developpeur .app,
  body.page-televente .app{
    height:100vh!important;
    min-height:100vh!important;
  }

  body.page-billing .main,
  body.page-qualite .main,
  body.page-developpeur .main,
  body.page-televente .main{
    height:100vh!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    padding:12px!important;
  }

  body.page-billing .topbar,
  body.page-qualite .topbar,
  body.page-developpeur .topbar,
  body.page-televente .topbar{
    flex:0 0 56px!important;
    height:56px!important;
    min-height:56px!important;
    margin:0 0 8px!important;
    padding:7px 10px!important;
    border-radius:14px!important;
  }

  body.page-billing #page,
  body.page-qualite #page,
  body.page-developpeur #page,
  body.page-televente #page{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
  }

  body.page-billing .kpis,
  body.page-qualite .kpis,
  body.page-developpeur .kpis,
  body.page-televente .kpis{
    flex:0 0 58px!important;
    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:8px!important;
    margin:0!important;
  }

  body.page-billing .kpi,
  body.page-qualite .kpi,
  body.page-developpeur .kpi,
  body.page-televente .kpi{
    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;
    padding:8px 10px!important;
    border-radius:12px!important;
    display:block!important;
    overflow:hidden!important;
  }

  body.page-billing .kpi span,
  body.page-qualite .kpi span,
  body.page-developpeur .kpi span,
  body.page-televente .kpi span{
    display:block!important;
    font-size:10px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    color:#64748b!important;
  }

  body.page-billing .kpi strong,
  body.page-qualite .kpi strong,
  body.page-developpeur .kpi strong,
  body.page-televente .kpi strong{
    display:block!important;
    font-size:19px!important;
    line-height:1!important;
    margin-top:5px!important;
    color:#0f172a!important;
  }

  body.page-billing #page > .card,
  body.page-qualite #page > .card,
  body.page-developpeur #page > .card,
  body.page-televente #page > .card,
  body.page-televente .tv-clean-card{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    margin:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    border-radius:14px!important;
  }

  /* Sur Qualite, l'historique ne doit plus voler la hauteur du tableau. */
  body.page-qualite #page > .card:nth-of-type(n+2){
    display:none!important;
  }

  body.page-billing .card-head,
  body.page-qualite .card-head,
  body.page-developpeur .card-head,
  body.page-televente .card-head,
  body.page-televente .tv-card-head{
    flex:0 0 44px!important;
    height:44px!important;
    min-height:44px!important;
    padding:7px 10px!important;
    gap:8px!important;
    align-items:center!important;
  }

  body.page-billing .card-head h3,
  body.page-qualite .card-head h3,
  body.page-developpeur .card-head h3,
  body.page-televente .card-head h3{
    font-size:15px!important;
    line-height:1!important;
  }

  body.page-billing .tools .input,
  body.page-qualite .tools .input,
  body.page-developpeur .tools .input,
  body.page-televente .tools .input,
  body.page-billing .tools .select,
  body.page-qualite .tools .select,
  body.page-developpeur .tools .select,
  body.page-televente .tools .select{
    height:32px!important;
    min-height:32px!important;
    padding:5px 9px!important;
    border-radius:10px!important;
    font-size:12.5px!important;
  }

  body.page-billing .table-zone,
  body.page-qualite .table-zone,
  body.page-developpeur .table-zone{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    border-radius:0 0 14px 14px!important;
  }

  body.page-billing .table-pan,
  body.page-qualite .table-pan,
  body.page-developpeur .table-pan{
    flex:0 0 32px!important;
    height:32px!important;
    min-height:32px!important;
    padding:4px 10px!important;
    background:#f8fbff!important;
    border-top:1px solid #edf2f7!important;
    border-bottom:1px solid #dbe3ef!important;
  }

  body.page-billing .table-pan-label,
  body.page-qualite .table-pan-label,
  body.page-developpeur .table-pan-label{
    font-size:10px!important;
    font-weight:900!important;
    color:#64748b!important;
  }

  body.page-billing .table-nav-btn,
  body.page-qualite .table-nav-btn,
  body.page-developpeur .table-nav-btn{
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    min-height:28px!important;
    padding:0!important;
    border-radius:9px!important;
  }

  body.page-billing .table-top-scroll,
  body.page-qualite .table-top-scroll,
  body.page-developpeur .table-top-scroll{
    height:10px!important;
    background:#e8eef8!important;
  }

  body.page-billing .table-wrap,
  body.page-qualite .table-wrap,
  body.page-developpeur .table-wrap{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:auto!important;
    background:#fff!important;
    border-radius:0 0 14px 14px!important;
  }

  body.page-billing .table-wrap th,
  body.page-qualite .table-wrap th,
  body.page-developpeur .table-wrap th{
    position:sticky!important;
    top:0!important;
    z-index:35!important;
    height:32px!important;
    padding:6px 8px!important;
    font-size:10.5px!important;
    line-height:1!important;
    background:#f8fbff!important;
    color:#475569!important;
    box-shadow:0 1px 0 #dbe3ef!important;
  }

  body.page-billing .table-wrap td,
  body.page-qualite .table-wrap td,
  body.page-developpeur .table-wrap td{
    height:38px!important;
    padding:6px 8px!important;
    font-size:12.4px!important;
    line-height:1.08!important;
    background:#fff!important;
    color:#0f172a!important;
  }

  body.page-billing .table-wrap .select,
  body.page-qualite .table-wrap .select,
  body.page-developpeur .table-wrap .select,
  body.page-billing .table-wrap .input,
  body.page-qualite .table-wrap .input,
  body.page-developpeur .table-wrap .input{
    height:29px!important;
    min-height:29px!important;
    padding:4px 8px!important;
    border-radius:9px!important;
    font-size:12px!important;
  }

  /* Televente garde le rendu qui te convient : beaucoup de RDV visibles, pas de vide. */
  body.page-televente .tv-clean-card,
  body.page-televente .tv-card{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.page-televente .tv-table-wrap{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    background:#fff!important;
  }
  body.page-televente .tv-table th{
    position:sticky!important;
    top:0!important;
    z-index:35!important;
    height:28px!important;
    padding:5px 6px!important;
    font-size:10.2px!important;
    line-height:1!important;
    background:#f8fbff!important;
  }
  body.page-televente .tv-table td{
    height:31px!important;
    min-height:31px!important;
    padding:3px 6px!important;
    font-size:11.8px!important;
    line-height:1.05!important;
  }
}

/* =========================================================
   CORRECTION DEFINITIVE HAUTEUR TABLEAUX DESKTOP
   Objectif: Billing, Qualite et Developpeur doivent utiliser
   toute la hauteur disponible, comme la page Televente.
   ========================================================= */
@media (min-width: 761px){
  body.page-billing,
  body.page-qualite,
  body.page-developpeur{
    height:100vh!important;
    min-height:100vh!important;
    overflow:hidden!important;
  }

  body.page-billing .app,
  body.page-qualite .app,
  body.page-developpeur .app{
    height:100vh!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  body.page-billing .main,
  body.page-qualite .main,
  body.page-developpeur .main{
    height:100vh!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    padding:12px 14px 10px!important;
  }

  body.page-billing .topbar,
  body.page-qualite .topbar,
  body.page-developpeur .topbar{
    flex:0 0 52px!important;
    height:52px!important;
    min-height:52px!important;
    margin:0 0 8px!important;
    padding:8px 12px!important;
    border-radius:14px!important;
  }

  body.page-billing .title h2,
  body.page-qualite .title h2,
  body.page-developpeur .title h2{
    font-size:19px!important;
    line-height:1!important;
  }

  body.page-billing .title p,
  body.page-qualite .title p,
  body.page-developpeur .title p{
    font-size:12px!important;
    line-height:1.15!important;
    margin-top:3px!important;
  }

  body.page-billing #page,
  body.page-qualite #page,
  body.page-developpeur #page{
    flex:1 1 auto!important;
    min-height:0!important;
    height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
  }

  body.page-billing .kpis,
  body.page-qualite .kpis,
  body.page-developpeur .kpis{
    flex:0 0 58px!important;
    height:58px!important;
    min-height:58px!important;
    margin:0!important;
    gap:8px!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(110px,1fr))!important;
  }

  body.page-billing .kpi,
  body.page-qualite .kpi,
  body.page-developpeur .kpi{
    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;
    padding:8px 10px!important;
    border-radius:12px!important;
    overflow:hidden!important;
  }

  body.page-billing .kpi span,
  body.page-qualite .kpi span,
  body.page-developpeur .kpi span{
    font-size:10px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body.page-billing .kpi strong,
  body.page-qualite .kpi strong,
  body.page-developpeur .kpi strong{
    font-size:20px!important;
    line-height:1!important;
    margin-top:5px!important;
  }

  body.page-billing #page > .card,
  body.page-qualite #page > .card,
  body.page-developpeur #page > .card{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    border-radius:14px!important;
  }

  /* Sur Qualite, l'historique bas ne doit pas reduire la zone tableau. */
  body.page-qualite #page > .card:nth-of-type(n+2){
    display:none!important;
  }

  body.page-billing .card-head,
  body.page-qualite .card-head,
  body.page-developpeur .card-head{
    flex:0 0 46px!important;
    height:46px!important;
    min-height:46px!important;
    padding:8px 12px!important;
    gap:10px!important;
    align-items:center!important;
  }

  body.page-billing .card-head h3,
  body.page-qualite .card-head h3,
  body.page-developpeur .card-head h3{
    font-size:15px!important;
    line-height:1!important;
  }

  body.page-billing .tools .input,
  body.page-qualite .tools .input,
  body.page-developpeur .tools .input,
  body.page-billing .tools .select,
  body.page-qualite .tools .select,
  body.page-developpeur .tools .select{
    height:34px!important;
    min-height:34px!important;
    padding:6px 9px!important;
    border-radius:10px!important;
    font-size:12.5px!important;
  }

  body.page-billing .table-zone,
  body.page-qualite .table-zone,
  body.page-developpeur .table-zone{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }

  body.page-billing .table-pan,
  body.page-qualite .table-pan,
  body.page-developpeur .table-pan{
    flex:0 0 34px!important;
    height:34px!important;
    min-height:34px!important;
    padding:4px 10px!important;
    background:#f8fbff!important;
    border-top:1px solid #edf2f7!important;
    border-bottom:1px solid #dbe3ef!important;
  }

  body.page-billing .table-top-scroll,
  body.page-qualite .table-top-scroll,
  body.page-developpeur .table-top-scroll{
    height:10px!important;
    background:#e8eef8!important;
    border-radius:999px!important;
  }

  body.page-billing .table-wrap,
  body.page-qualite .table-wrap,
  body.page-developpeur .table-wrap{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;
    max-height:none!important;
    overflow:auto!important;
    background:#fff!important;
    scrollbar-width:thin!important;
  }

  /* Le deplacement horizontal se fait en haut: on evite la grosse barre basse. */
  body.page-billing .table-wrap::-webkit-scrollbar:horizontal,
  body.page-qualite .table-wrap::-webkit-scrollbar:horizontal,
  body.page-developpeur .table-wrap::-webkit-scrollbar:horizontal{
    height:0!important;
  }

  body.page-billing .table-wrap table,
  body.page-qualite .table-wrap table,
  body.page-developpeur .table-wrap table{
    border-collapse:separate!important;
    border-spacing:0!important;
  }

  body.page-billing .table-wrap th,
  body.page-qualite .table-wrap th,
  body.page-developpeur .table-wrap th{
    position:sticky!important;
    top:0!important;
    z-index:40!important;
    height:34px!important;
    padding:7px 8px!important;
    font-size:10.5px!important;
    line-height:1!important;
    background:#f8fbff!important;
    color:#475569!important;
    box-shadow:0 1px 0 #dbe3ef!important;
  }

  body.page-billing .table-wrap td,
  body.page-qualite .table-wrap td,
  body.page-developpeur .table-wrap td{
    height:39px!important;
    min-height:39px!important;
    padding:6px 8px!important;
    font-size:12.4px!important;
    line-height:1.1!important;
    background:#fff!important;
    color:#0f172a!important;
  }

  body.page-billing .table-wrap .select,
  body.page-qualite .table-wrap .select,
  body.page-developpeur .table-wrap .select,
  body.page-billing .table-wrap .input,
  body.page-qualite .table-wrap .input,
  body.page-developpeur .table-wrap .input{
    height:30px!important;
    min-height:30px!important;
    padding:4px 8px!important;
    border-radius:9px!important;
    font-size:12px!important;
  }

  body.page-billing .row-actions,
  body.page-qualite .row-actions,
  body.page-developpeur .row-actions{
    flex-wrap:nowrap!important;
    gap:5px!important;
  }

  body.page-billing .action-text-btn,
  body.page-qualite .action-text-btn,
  body.page-developpeur .action-text-btn{
    min-height:30px!important;
    height:30px!important;
    padding:5px 8px!important;
    border-radius:9px!important;
    font-size:11.5px!important;
    white-space:nowrap!important;
  }

  body.page-billing .action-text-btn svg,
  body.page-qualite .action-text-btn svg,
  body.page-developpeur .action-text-btn svg{
    width:14px!important;
    height:14px!important;
  }
}

/* =========================================================
   CORRECTION DEFINITIVE - ESPACE ECRAN ET TABLEAUX METIER
   Objectif : les pages Billing, Qualite et Developpeur utilisent
   exactement la logique de la page Televente : pas de vide perdu,
   tableau plein hauteur, texte lisible, entete stable.
   ========================================================= */
@media (min-width: 761px){
  html, body{
    height:100%;
  }

  body.page-billing,
  body.page-qualite,
  body.page-developpeur,
  body.page-televente{
    overflow:hidden!important;
    background:#eef3f9!important;
  }

  body.page-billing .app,
  body.page-qualite .app,
  body.page-developpeur .app,
  body.page-televente .app{
    height:100vh!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  body.page-billing .main,
  body.page-qualite .main,
  body.page-developpeur .main,
  body.page-televente .main{
    height:100vh!important;
    min-height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    padding:14px 14px 10px!important;
  }

  body.page-billing .topbar,
  body.page-qualite .topbar,
  body.page-developpeur .topbar,
  body.page-televente .topbar{
    flex:0 0 58px!important;
    min-height:58px!important;
    height:58px!important;
    margin:0 0 8px!important;
    padding:8px 12px!important;
    border-radius:16px!important;
  }

  body.page-billing .title h2,
  body.page-qualite .title h2,
  body.page-developpeur .title h2,
  body.page-televente .title h2{
    font-size:20px!important;
    line-height:1.05!important;
  }

  body.page-billing .title p,
  body.page-qualite .title p,
  body.page-developpeur .title p,
  body.page-televente .title p{
    font-size:13px!important;
    line-height:1.15!important;
    margin-top:3px!important;
  }

  body.page-billing #page,
  body.page-qualite #page,
  body.page-developpeur #page,
  body.page-televente #page{
    flex:1 1 auto!important;
    min-height:0!important;
    height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
  }

  body.page-billing .kpis,
  body.page-qualite .kpis,
  body.page-developpeur .kpis,
  body.page-televente .kpis{
    flex:0 0 58px!important;
    height:58px!important;
    min-height:58px!important;
    margin:0!important;
    gap:8px!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(110px,1fr))!important;
  }

  body.page-billing .kpi,
  body.page-qualite .kpi,
  body.page-developpeur .kpi,
  body.page-televente .kpi{
    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;
    padding:8px 10px!important;
    border-radius:14px!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
  }

  body.page-billing .kpi span,
  body.page-qualite .kpi span,
  body.page-developpeur .kpi span,
  body.page-televente .kpi span{
    font-size:11px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body.page-billing .kpi strong,
  body.page-qualite .kpi strong,
  body.page-developpeur .kpi strong,
  body.page-televente .kpi strong{
    font-size:22px!important;
    line-height:1!important;
    margin-top:5px!important;
  }

  body.page-billing #page > .card,
  body.page-qualite #page > .card,
  body.page-developpeur #page > .card,
  body.page-televente #page > .card{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    border-radius:18px!important;
    background:#fff!important;
  }

  body.page-qualite #page > .card:nth-of-type(n+2){
    display:none!important;
  }

  body.page-billing .card-head,
  body.page-qualite .card-head,
  body.page-developpeur .card-head,
  body.page-televente .card-head{
    flex:0 0 48px!important;
    min-height:48px!important;
    height:48px!important;
    padding:8px 12px!important;
    margin:0!important;
    gap:10px!important;
    align-items:center!important;
  }

  body.page-billing .card-head h3,
  body.page-qualite .card-head h3,
  body.page-developpeur .card-head h3,
  body.page-televente .card-head h3{
    font-size:16px!important;
    line-height:1!important;
  }

  body.page-billing .tools .input,
  body.page-qualite .tools .input,
  body.page-developpeur .tools .input,
  body.page-televente .tools .input,
  body.page-billing .tools .select,
  body.page-qualite .tools .select,
  body.page-developpeur .tools .select,
  body.page-televente .tools .select{
    height:36px!important;
    min-height:36px!important;
    padding:6px 10px!important;
    border-radius:11px!important;
    font-size:14px!important;
  }

  body.page-billing .table-zone,
  body.page-qualite .table-zone,
  body.page-developpeur .table-zone{
    flex:1 1 auto!important;
    min-height:0!important;
    height:0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    background:#fff!important;
    border-radius:0 0 18px 18px!important;
  }

  body.page-billing .table-pan,
  body.page-qualite .table-pan,
  body.page-developpeur .table-pan{
    flex:0 0 34px!important;
    min-height:34px!important;
    height:34px!important;
    padding:4px 10px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    background:#f8fbff!important;
    border-top:1px solid #edf2f7!important;
    border-bottom:1px solid #dbe3ef!important;
  }

  body.page-billing .table-pan-label,
  body.page-qualite .table-pan-label,
  body.page-developpeur .table-pan-label{
    font-size:11px!important;
    font-weight:900!important;
    color:#64748b!important;
    text-transform:uppercase!important;
    letter-spacing:.035em!important;
  }

  body.page-billing .table-top-scroll,
  body.page-qualite .table-top-scroll,
  body.page-developpeur .table-top-scroll{
    display:block!important;
    flex:1 1 auto!important;
    height:10px!important;
    min-height:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    border:0!important;
    border-radius:999px!important;
    background:#e7edf6!important;
  }

  body.page-billing .table-nav-btn,
  body.page-qualite .table-nav-btn,
  body.page-developpeur .table-nav-btn{
    width:32px!important;
    height:30px!important;
    min-width:32px!important;
    min-height:30px!important;
    border-radius:10px!important;
  }

  body.page-billing .table-wrap,
  body.page-qualite .table-wrap,
  body.page-developpeur .table-wrap{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;
    max-height:none!important;
    overflow:auto!important;
    background:#fff!important;
    border-radius:0 0 18px 18px!important;
    scrollbar-width:thin!important;
  }

  body.page-billing .table-wrap::-webkit-scrollbar:horizontal,
  body.page-qualite .table-wrap::-webkit-scrollbar:horizontal,
  body.page-developpeur .table-wrap::-webkit-scrollbar:horizontal{
    height:0!important;
  }

  body.page-billing .table-wrap table,
  body.page-qualite .table-wrap table,
  body.page-developpeur .table-wrap table{
    border-collapse:separate!important;
    border-spacing:0!important;
    background:#fff!important;
  }

  body.page-billing .table-wrap th,
  body.page-qualite .table-wrap th,
  body.page-developpeur .table-wrap th{
    position:sticky!important;
    top:0!important;
    z-index:40!important;
    height:36px!important;
    padding:8px 9px!important;
    font-size:12px!important;
    line-height:1!important;
    background:#f8fbff!important;
    color:#475569!important;
    box-shadow:0 1px 0 #dbe3ef!important;
    white-space:nowrap!important;
  }

  body.page-billing .table-wrap td,
  body.page-qualite .table-wrap td,
  body.page-developpeur .table-wrap td{
    height:44px!important;
    min-height:44px!important;
    padding:7px 9px!important;
    font-size:14px!important;
    line-height:1.18!important;
    background:#fff!important;
    color:#0f172a!important;
    white-space:nowrap!important;
  }

  body.page-billing .table-wrap .select,
  body.page-qualite .table-wrap .select,
  body.page-developpeur .table-wrap .select,
  body.page-billing .table-wrap .input,
  body.page-qualite .table-wrap .input,
  body.page-developpeur .table-wrap .input{
    height:34px!important;
    min-height:34px!important;
    padding:5px 9px!important;
    border-radius:10px!important;
    font-size:14px!important;
  }

  body.page-billing .row-actions,
  body.page-qualite .row-actions,
  body.page-developpeur .row-actions{
    flex-wrap:nowrap!important;
    gap:6px!important;
    min-width:max-content!important;
  }

  body.page-billing .action-text-btn,
  body.page-qualite .action-text-btn,
  body.page-developpeur .action-text-btn{
    height:34px!important;
    min-height:34px!important;
    padding:6px 9px!important;
    border-radius:10px!important;
    font-size:12.5px!important;
    white-space:nowrap!important;
    gap:5px!important;
  }

  body.page-billing .action-text-btn svg,
  body.page-qualite .action-text-btn svg,
  body.page-developpeur .action-text-btn svg{
    width:14px!important;
    height:14px!important;
  }

  /* Televente : garder la bonne structure, mais rendre le texte aussi lisible que Developpeur. */
  body.page-televente .tv-table-wrap{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;
    max-height:none!important;
    overflow:auto!important;
    border-radius:0 0 18px 18px!important;
  }

  body.page-televente .tv-table th{
    height:34px!important;
    padding:7px 8px!important;
    font-size:12px!important;
    line-height:1!important;
    position:sticky!important;
    top:0!important;
    z-index:30!important;
    background:#f8fbff!important;
  }

  body.page-televente .tv-table td{
    height:38px!important;
    min-height:38px!important;
    padding:5px 8px!important;
    font-size:14px!important;
    line-height:1.08!important;
  }

  body.page-televente .tv-table .sub{
    font-size:11px!important;
    line-height:1.05!important;
  }

  body.page-televente .tv-table .select{
    height:32px!important;
    min-height:32px!important;
    font-size:13px!important;
    padding:4px 8px!important;
    border-radius:10px!important;
  }

  body.page-televente .tv-actions button{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
    border-radius:10px!important;
  }
}

/* =========================================================
   FIX DEFINITIF - AFFICHAGE TABLEAUX PLEINE HAUTEUR
   Objectif: Billing, Qualite et Developpeur doivent se comporter
   comme Televente: pas de vide blanc inutile, plus de lignes visibles.
   ========================================================= */
@media (min-width: 761px){
  body.page-billing #page,
  body.page-qualite #page,
  body.page-developpeur #page,
  body.page-televente #page{
    display:flex!important;
    flex-direction:column!important;
    min-height:0!important;
    height:auto!important;
  }

  body.page-billing .main,
  body.page-qualite .main,
  body.page-developpeur .main,
  body.page-televente .main{
    min-height:100vh!important;
    overflow:hidden!important;
  }

  body.page-billing .kpis,
  body.page-qualite .kpis,
  body.page-developpeur .kpis,
  body.page-televente .kpis{
    flex:0 0 auto!important;
    gap:8px!important;
    margin-bottom:8px!important;
  }

  body.page-billing .kpi,
  body.page-qualite .kpi,
  body.page-developpeur .kpi,
  body.page-televente .kpi{
    min-height:58px!important;
    height:58px!important;
    padding:9px 12px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
  }

  body.page-billing .kpi span,
  body.page-qualite .kpi span,
  body.page-developpeur .kpi span,
  body.page-televente .kpi span{
    font-size:11px!important;
    line-height:1!important;
    margin:0!important;
    color:#52637a!important;
  }

  body.page-billing .kpi strong,
  body.page-qualite .kpi strong,
  body.page-developpeur .kpi strong,
  body.page-televente .kpi strong{
    font-size:22px!important;
    line-height:1.05!important;
    margin-top:4px!important;
  }

  body.page-billing .data-fill-card,
  body.page-qualite .data-fill-card,
  body.page-developpeur .data-fill-card,
  body.page-televente .tv-card{
    display:flex!important;
    flex-direction:column!important;
    margin-bottom:0!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  body.page-billing .data-fill-card > .card-head,
  body.page-qualite .data-fill-card > .card-head,
  body.page-developpeur .data-fill-card > .card-head,
  body.page-televente .tv-card > .card-head{
    flex:0 0 auto!important;
    min-height:52px!important;
    padding:10px 14px!important;
  }

  body.page-billing .data-fill-card .table-zone,
  body.page-qualite .data-fill-card .table-zone,
  body.page-developpeur .data-fill-card .table-zone,
  body.page-televente .tv-table-wrap{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
    background:#fff!important;
  }

  body.page-billing .data-fill-card .table-zone,
  body.page-qualite .data-fill-card .table-zone,
  body.page-developpeur .data-fill-card .table-zone{
    display:flex!important;
    flex-direction:column!important;
  }

  body.page-billing .data-fill-card .table-pan,
  body.page-qualite .data-fill-card .table-pan,
  body.page-developpeur .data-fill-card .table-pan{
    flex:0 0 auto!important;
    height:42px!important;
    min-height:42px!important;
    padding:6px 10px!important;
  }

  body.page-billing .data-fill-card .table-wrap,
  body.page-qualite .data-fill-card .table-wrap,
  body.page-developpeur .data-fill-card .table-wrap{
    flex:1 1 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:auto!important;
  }

  body.page-billing .data-fill-card .table-wrap th,
  body.page-qualite .data-fill-card .table-wrap th,
  body.page-developpeur .data-fill-card .table-wrap th,
  body.page-televente .tv-table th{
    font-size:12px!important;
    line-height:1.1!important;
    height:35px!important;
    padding:7px 9px!important;
    position:sticky!important;
    top:0!important;
    z-index:50!important;
    background:#f8fbff!important;
  }

  body.page-billing .data-fill-card .table-wrap td,
  body.page-qualite .data-fill-card .table-wrap td,
  body.page-developpeur .data-fill-card .table-wrap td,
  body.page-televente .tv-table td{
    font-size:14px!important;
    line-height:1.12!important;
    height:39px!important;
    min-height:39px!important;
    padding:5px 9px!important;
    white-space:nowrap!important;
  }

  body.page-televente .tv-table td:first-child,
  body.page-televente .tv-table th:first-child{
    overflow:visible!important;
    text-overflow:clip!important;
  }
  body.page-televente .tv-table .c-rdv{width:8.9%!important;}
  body.page-televente .tv-table .c-gerant{width:12.8%!important;}
  body.page-televente .tv-table .c-societe{width:10.5%!important;}
  body.page-televente .tv-table .c-ville{width:7.0%!important;}
  body.page-televente .tv-table .c-phone{width:11.0%!important;}
  body.page-televente .tv-table .c-status{width:15.4%!important;}
  body.page-televente .tv-table .c-rappel{width:9.6%!important;}
  body.page-televente .tv-table .c-devis{width:5.0%!important;}
  body.page-televente .tv-table .c-demo{width:5.0%!important;}
  body.page-televente .tv-table .c-actions{width:14.8%!important;}

  body.page-billing .data-fill-card .select,
  body.page-qualite .data-fill-card .select,
  body.page-developpeur .data-fill-card .select,
  body.page-televente .tv-card .select,
  body.page-billing .data-fill-card .input,
  body.page-qualite .data-fill-card .input,
  body.page-developpeur .data-fill-card .input{
    min-height:31px!important;
    height:31px!important;
    font-size:13.5px!important;
    padding:4px 8px!important;
    border-radius:9px!important;
  }

  body.page-billing .action-text-btn,
  body.page-qualite .action-text-btn,
  body.page-developpeur .row-actions button{
    min-height:31px!important;
    height:31px!important;
    padding:5px 8px!important;
    border-radius:9px!important;
    font-size:12px!important;
  }

  body.page-qualite .history-card{display:none!important;}
}


/* Livraison V2 - sécurité design textes longs/tableaux */
.table-wrap th,.table-wrap td{max-width:260px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;}
.table-wrap td .main-name,.table-wrap td .sub,.table-wrap td a,.table-wrap td b{max-width:100%;overflow:hidden;text-overflow:ellipsis;}
.table-wrap td .main-name,.table-wrap td .sub{display:block;}
.badge{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.select,.input,button,.btn-primary{max-width:100%;} 
.card-head h3,.title h2,.title p{overflow:hidden;text-overflow:ellipsis;}
.tools,.row-actions{flex-wrap:wrap;gap:6px;}
@media(min-width:901px){.table-wrap table{table-layout:fixed}.table-wrap td,.table-wrap th{white-space:nowrap}}


/* V3.23 - correctif final TV/Billing : tableaux en ligne + scroll horizontal */
body.page-televente .tv-table-wrap{
  width:100%!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  max-height:calc(100dvh - 320px)!important;
  background:#fff!important;
}
body.page-televente .tv-table,
body.page-televente .tv-table thead,
body.page-televente .tv-table tbody,
body.page-televente .tv-table tr{
  display:table!important;
}
body.page-televente .tv-table{
  min-width:1450px!important;
  width:1450px!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
body.page-televente .tv-table thead{display:table-header-group!important;}
body.page-televente .tv-table tbody{display:table-row-group!important;}
body.page-televente .tv-table tr{display:table-row!important;}
body.page-televente .tv-table th,
body.page-televente .tv-table td{
  display:table-cell!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  vertical-align:middle!important;
  height:42px!important;
  max-height:42px!important;
  padding:7px 8px!important;
}
body.page-televente .tv-table td:before,
body.page-televente .tv-table th:before{display:none!important;content:none!important;}
body.page-televente .tv-table th:nth-child(1),body.page-televente .tv-table td:nth-child(1){width:105px!important;}
body.page-televente .tv-table th:nth-child(2),body.page-televente .tv-table td:nth-child(2){width:170px!important;}
body.page-televente .tv-table th:nth-child(3),body.page-televente .tv-table td:nth-child(3){width:180px!important;}
body.page-televente .tv-table th:nth-child(4),body.page-televente .tv-table td:nth-child(4){width:140px!important;}
body.page-televente .tv-table th:nth-child(5),body.page-televente .tv-table td:nth-child(5){width:105px!important;}
body.page-televente .tv-table th:nth-child(6),body.page-televente .tv-table td:nth-child(6){width:170px!important;}
body.page-televente .tv-table th:nth-child(7),body.page-televente .tv-table td:nth-child(7){width:145px!important;}
body.page-televente .tv-table th:nth-child(8),body.page-televente .tv-table td:nth-child(8){width:95px!important;}
body.page-televente .tv-table th:nth-child(9),body.page-televente .tv-table td:nth-child(9){width:85px!important;}
body.page-televente .tv-table th:nth-child(10),body.page-televente .tv-table td:nth-child(10){width:255px!important;overflow:visible!important;}
body.page-televente .tv-actions{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  width:max-content!important;
  min-width:220px!important;
}
body.page-televente .tv-actions .icon-btn{
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  flex:0 0 38px!important;
  padding:0!important;
}
body.page-televente .tv-status{min-width:150px!important;}
body.page-televente .tv-scroll-note:after{content:'  ← glisse horizontalement →';font-weight:900;color:#2563eb;}

body.page-billing .wrap{
  overflow-x:auto!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
body.page-billing .tab{
  min-width:1680px!important;
  width:1680px!important;
  table-layout:fixed!important;
}
body.page-billing .tab th:last-child,
body.page-billing .tab td:last-child{
  width:510px!important;
  min-width:510px!important;
  overflow:visible!important;
}
body.page-billing .actions{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:8px!important;
  min-width:470px!important;
  width:max-content!important;
}
body.page-billing .actions button{
  white-space:nowrap!important;
  flex:0 0 auto!important;
  min-width:auto!important;
  height:36px!important;
  padding:0 10px!important;
  font-size:12px!important;
}
@media(max-width:900px){
  body.page-televente .tv-table-wrap{overflow-x:auto!important;overflow-y:auto!important;max-height:none!important;}
  body.page-televente .tv-table{min-width:1450px!important;width:1450px!important;}
  body.page-televente .tv-table,body.page-televente .tv-table thead,body.page-televente .tv-table tbody,body.page-televente .tv-table tr{display:table!important;}
  body.page-televente .tv-table thead{display:table-header-group!important;}
  body.page-televente .tv-table tbody{display:table-row-group!important;}
  body.page-televente .tv-table tr{display:table-row!important;}
  body.page-televente .tv-table th,body.page-televente .tv-table td{display:table-cell!important;width:auto!important;}
  body.page-billing .tab{min-width:1680px!important;width:1680px!important;}
}

/* V3.43 - Tables CRM en une seule ligne + visuel TV stable avec Ringover/mobile */
.crm-single-line-wrap,
.wrap,
.table-wrap,
.tv-table-wrap{
  overflow:auto!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
  scrollbar-color:#94a3b8 #edf2f7!important;
}
.crm-single-line-wrap::-webkit-scrollbar,
.wrap::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.tv-table-wrap::-webkit-scrollbar{
  height:10px!important;width:10px!important;
}
.crm-single-line-wrap::-webkit-scrollbar-track,
.wrap::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.tv-table-wrap::-webkit-scrollbar-track{
  background:#edf2f7!important;border-radius:999px!important;
}
.crm-single-line-wrap::-webkit-scrollbar-thumb,
.wrap::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.tv-table-wrap::-webkit-scrollbar-thumb{
  background:#94a3b8!important;border-radius:999px!important;border:2px solid #edf2f7!important;
}
.crm-single-line-table th,
.crm-single-line-table td,
.tab th,.tab td,.tv-table th,.tv-table td{
  white-space:nowrap!important;
}
body.page-televente .tv-table-wrap{
  overflow:auto!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  max-height:calc(100vh - 250px)!important;
  min-height:420px!important;
  background:#fff!important;
}
body.page-televente .tv-table{
  min-width:1500px!important;
  width:1500px!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
body.page-televente .tv-table th,
body.page-televente .tv-table td{
  height:44px!important;
  padding:7px 8px!important;
  font-size:12px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  vertical-align:middle!important;
}
body.page-televente .tv-table th{position:sticky!important;top:0!important;z-index:15!important;background:#f8fafc!important;}
body.page-televente .tv-actions{display:flex!important;gap:6px!important;flex-wrap:nowrap!important;justify-content:flex-start!important;min-width:max-content!important;}
body.page-televente .tv-actions .icon-btn{flex:0 0 38px!important;width:38px!important;height:38px!important;min-height:38px!important;}
body.page-televente .tv-status{height:34px!important;min-height:34px!important;font-size:12px!important;}
body.page-televente .tv-scroll-top{display:block!important;overflow-x:auto!important;overflow-y:hidden!important;height:18px!important;}
@media(max-width:900px){
  body.page-televente .tv-table{min-width:1500px!important;width:1500px!important;}
  body.page-televente .tv-table-wrap{overflow-x:auto!important;overflow-y:auto!important;}
  body.page-televente .card-head{min-width:0!important;}
  body.page-televente .tools{display:flex!important;flex-wrap:nowrap!important;overflow:auto!important;}
}

/* V3.44 - grands tableaux: une seule ligne + scroll horizontal */
.crm-single-line-wrap,.table-wrap,.wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch;max-width:100%;}
.crm-single-line-table,.tab{min-width:1250px;table-layout:fixed;}
.crm-single-line-table th,.crm-single-line-table td,.tab th,.tab td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.table-scroll-note{padding:9px 14px;border-top:1px solid #e5eaf3;border-bottom:1px solid #e5eaf3;background:#f8fafc;color:#64748b;font-size:12px;font-weight:900;}
@media(max-width:900px){.main{overflow-x:hidden}.crm-single-line-table,.tab{min-width:1250px!important}.topbar{min-width:980px}.card-head{min-width:980px}.tv-fixed-visual{min-width:1100px!important}.tv-fixed-visual .tab{min-width:1500px!important}}

/* V3.50 - grands tableaux stables + scroll horizontal haut */
.crm-scroll-shell{overflow:hidden;background:#fff}
.crm-scroll-top{height:18px;overflow-x:auto;overflow-y:hidden;background:#f8fafc;border-top:1px solid #e5eaf3;border-bottom:1px solid #e5eaf3}
.crm-scroll-top>div{height:1px;min-width:1500px}
.crm-scroll-top::-webkit-scrollbar,.crm-single-line-wrap::-webkit-scrollbar,.wrap::-webkit-scrollbar{height:10px}
.crm-scroll-top::-webkit-scrollbar-thumb,.crm-single-line-wrap::-webkit-scrollbar-thumb,.wrap::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:999px}
.crm-single-line-wrap{overflow:auto!important;-webkit-overflow-scrolling:touch}
.crm-single-line-table{width:max-content!important;min-width:1450px!important;table-layout:fixed!important;border-collapse:collapse}
.crm-single-line-table th,.crm-single-line-table td{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.period-tools{display:flex;gap:8px;flex-wrap:nowrap;align-items:center;overflow:auto;padding-bottom:2px}
.period-tools .input{min-width:150px}.period-tools .select{min-width:130px}
.call-link{cursor:pointer;color:#2563eb;font-weight:900;text-decoration:none}
.call-link:hover{text-decoration:underline}
@media(max-width:900px){.main{min-width:0}.crm-single-line-table{min-width:1450px!important}.crm-single-line-wrap{overflow-x:auto!important}.card{overflow:hidden}.topbar{min-width:0}.top-actions{overflow-x:auto;white-space:nowrap}.top-actions button{flex:0 0 auto}}

/* V3.51 - TV: conserver le rendu tableau meme sur mobile/Ringover */
@media(max-width:900px){
  body.page-televente .tv-table-wrap{overflow:auto!important;max-height:none!important;height:calc(100vh - 300px)!important;min-height:430px!important;-webkit-overflow-scrolling:touch!important;}
  body.page-televente .tv-table{display:table!important;min-width:1500px!important;width:1500px!important;table-layout:fixed!important;border-collapse:collapse!important;background:#fff!important;}
  body.page-televente .tv-table thead{display:table-header-group!important;}
  body.page-televente .tv-table tbody{display:table-row-group!important;}
  body.page-televente .tv-table tr{display:table-row!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;}
  body.page-televente .tv-table th,body.page-televente .tv-table td{display:table-cell!important;width:auto!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;vertical-align:middle!important;border-bottom:1px solid #edf2f7!important;}
  body.page-televente .tv-table td:before{content:none!important;display:none!important;}
  body.page-televente .tv-table th:nth-child(1),body.page-televente .tv-table td:nth-child(1){width:105px!important}
  body.page-televente .tv-table th:nth-child(2),body.page-televente .tv-table td:nth-child(2){width:170px!important}
  body.page-televente .tv-table th:nth-child(3),body.page-televente .tv-table td:nth-child(3){width:180px!important}
  body.page-televente .tv-table th:nth-child(4),body.page-televente .tv-table td:nth-child(4){width:140px!important}
  body.page-televente .tv-table th:nth-child(5),body.page-televente .tv-table td:nth-child(5){width:110px!important}
  body.page-televente .tv-table th:nth-child(6),body.page-televente .tv-table td:nth-child(6){width:165px!important}
  body.page-televente .tv-table th:nth-child(7),body.page-televente .tv-table td:nth-child(7){width:135px!important}
  body.page-televente .tv-table th:nth-child(8),body.page-televente .tv-table td:nth-child(8){width:90px!important}
  body.page-televente .tv-table th:nth-child(9),body.page-televente .tv-table td:nth-child(9){width:80px!important}
  body.page-televente .tv-table th:nth-child(10),body.page-televente .tv-table td:nth-child(10){width:220px!important;overflow:visible!important}
}
/* V3.51 - grands tableaux : vraie barre de scroll en haut */
.crm-scroll-top{height:18px;overflow-x:auto;overflow-y:hidden;background:#f8fafc;border-top:1px solid #e5eaf3;border-bottom:1px solid #e5eaf3;scrollbar-width:thin;scrollbar-color:#94a3b8 #eaf1fb;}
.crm-scroll-top>div{height:1px;min-width:1px;}
.crm-scroll-top::-webkit-scrollbar{height:10px}.crm-scroll-top::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:999px}.crm-scroll-top::-webkit-scrollbar-track{background:#eaf1fb;border-radius:999px}
.crm-single-line-wrap{overflow:auto!important;-webkit-overflow-scrolling:touch!important;}
.crm-single-line-table{white-space:nowrap!important;}
