/* LogiMission V3.1.5 — apparence CLASSIQUE V2.9 par défaut.
   CSS de présentation exclusivement ; données V3 / permissions / actions inchangées.
   Toutes les règles ci-dessous sont volontairement limitées à data-theme="clair".
   Les cinq thèmes premium restent ceux de la V3.1.4. */
:root[data-theme="clair"]{
  color-scheme:light;
  --v3-bg:#f3f6fc;--v3-panel:#ffffff;--v3-soft:#f1f5fc;
  --v3-text:#182840;--v3-muted:#63758c;--v3-border:#e0e6f0;
  --v3-primary:#286edc;--v3-primaryText:#ffffff;
  --v3-sidebar:#0d1d38;--v3-sidebarEnd:#182f58;--v3-nav:#3679ec;
  --v3-accent:#397feb;--v3-mast:#0e1f3f;
  --studio-panel:#ffffff;--studio-line:#e0e6f0;--studio-glow:#306cd41e;
  --studio-heading:#182840;
}
:root[data-theme="clair"] body{background:#f3f6fc;color:#182840;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
/* Authentique positionnement V2.9 : sidebar bleu nuit + page claire, sans grande bannière. */
:root[data-theme="clair"] .app{display:grid;grid-template-columns:247px minmax(0,1fr);grid-template-rows:minmax(100vh,auto);background:#f3f6fc}
:root[data-theme="clair"] .v3-masthead{display:none}
:root[data-theme="clair"] .sidebar{grid-column:1;grid-row:1;background:linear-gradient(180deg,#0d1d38,#182f58);color:#e8efff;border-right:0;box-shadow:none;padding:24px 16px 18px;min-height:100vh}
:root[data-theme="clair"] .sidebar .brand{display:flex;gap:12px;padding:0 4px;margin:0 0 17px;align-items:center}
:root[data-theme="clair"] .brand-mark{background:#357ded;color:white;border-radius:13px;padding:10px;font-size:23px}
:root[data-theme="clair"] .brand-title{color:white;font-size:18px}
:root[data-theme="clair"] .brand-sub{color:#acc2ed;font-size:11px}
:root[data-theme="clair"] .nav-section{border-color:#ffffff1a;margin-bottom:4px}
:root[data-theme="clair"] .nav-section summary{background:transparent;border-radius:9px;padding:12px 10px;color:#b9cdeb;font-size:11px;letter-spacing:.07em}
:root[data-theme="clair"] .nav-section[open] summary,:root[data-theme="clair"] .nav-section summary:hover{background:#ffffff12;color:#fff}
:root[data-theme="clair"] .nav-section .nav-btn{color:#c9d7ee;border:0;background:transparent;font-size:12px;font-weight:650;min-height:42px;padding:11px 13px;margin:3px 0;border-radius:10px}
:root[data-theme="clair"] .nav-section .nav-btn:hover{background:#ffffff17;color:#fff;transform:none}
:root[data-theme="clair"] .nav-section .nav-btn.active{background:linear-gradient(90deg,#2b67c7,#3679ec);color:white;box-shadow:0 6px 16px #0c1f4370}
:root[data-theme="clair"] .nav-section .nav-chevron{color:#aac2e7}
:root[data-theme="clair"] .sidebar-bottom{background:#ffffff09;border:1px solid #ffffff25;color:#c3d2ed;border-radius:13px;font-size:11px}
:root[data-theme="clair"] .v27-public-link{color:#eaf2ff}
:root[data-theme="clair"] .main{grid-column:2;grid-row:1;min-width:0;max-width:1680px;width:100%;margin:0 auto;padding:28px 33px 50px;background:#f3f6fc;position:relative}
:root[data-theme="clair"] .topbar{display:flex;margin-bottom:24px;gap:16px}
:root[data-theme="clair"] .heading{font-size:28px;letter-spacing:-.8px;color:#182840;font-weight:800}
:root[data-theme="clair"] .eyebrow{color:#71849f;font-size:11px;letter-spacing:1.3px}
:root[data-theme="clair"] .subheading{color:#75869c;font-size:13px}
:root[data-theme="clair"] .v302-current-date,:root[data-theme="clair"] .role-pill{background:#eaf0ff;color:#3158ab;border:1px solid #dbe6fa}
/* Carte V2.9 — conserve les nouvelles cartes fonctionnelles V3. */
:root[data-theme="clair"] .card,:root[data-theme="clair"] .ticket,:root[data-theme="clair"] .timeline-card{background:#fff;color:#182840;border:1px solid #e0e6f0;border-radius:16px;box-shadow:0 6px 24px #213b6810}
:root[data-theme="clair"] .card.pad{padding:18px 20px}
:root[data-theme="clair"] .card-title{color:#1a2c45;font-size:16px;font-weight:800;letter-spacing:-.2px}
:root[data-theme="clair"] .card-head{border-bottom:1px solid #edf1f7;padding-bottom:11px;margin-bottom:12px}
:root[data-theme="clair"] .soft,:root[data-theme="clair"] .hint{color:#728198}
:root[data-theme="clair"] .btn:not(.danger){background:#286edc;color:#fff;border:1px solid #286edc;box-shadow:0 3px 8px #2c70db29}
:root[data-theme="clair"] .btn.secondary,:root[data-theme="clair"] .btn.slate{background:#eaf1ff;color:#2a5795;border-color:#eaf1ff;box-shadow:none}
:root[data-theme="clair"] .btn:focus-visible,:root[data-theme="clair"] button:focus-visible{outline:2px solid #357ded;outline-offset:2px}
:root[data-theme="clair"] .field,:root[data-theme="clair"] input:not([type="checkbox"]),:root[data-theme="clair"] select,:root[data-theme="clair"] textarea{background:#fff;color:#21334a;border-color:#d9e3f0}
:root[data-theme="clair"] .notice{background:#edf5ff;color:#43617e;border:1px solid #d4e5f6}
:root[data-theme="clair"] .notice.demo{background:#fffae5;color:#765313;border-color:#f3df9f}
:root[data-theme="clair"] .metric{background:#fff;color:#182840;border:1px solid #e0e6f0;box-shadow:0 6px 24px #213b6810;min-height:100px;gap:14px}
:root[data-theme="clair"] .metric-icon{background:#edf3ff;color:#286edc;border:0;width:50px;height:50px;border-radius:14px}
:root[data-theme="clair"] .metric-value{color:#203651;font-size:29px;line-height:1.08}
:root[data-theme="clair"] .metric-label{color:#64758b;font-size:11px;font-weight:750}
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(1),
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(2),
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(3),
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(4){background:#fff;border-color:#e0e6f0;box-shadow:0 6px 24px #213b6810}
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(1){border-bottom:3px solid #3679ec}
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(2){border-bottom:3px solid #e5ad3d}
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(3){border-bottom:3px solid #36b478}
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(4){border-bottom:3px solid #ed8660}
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(2) .metric-icon{color:#b47b1a;background:#fff5e0}
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(3) .metric-icon{color:#229b62;background:#e7f8f0}
:root[data-theme="clair"] .v3-board-metrics .metric:nth-child(4) .metric-icon{color:#cc7154;background:#fff0e9}
:root[data-theme="clair"] .v3-dashboard .card:not(.metric){background:#fff}
:root[data-theme="clair"] .v3-dashboard{gap:17px}
:root[data-theme="clair"] .v3-board-metrics{gap:16px}
:root[data-theme="clair"] .v3-dashboard-grid{grid-template-columns:minmax(0,1.08fr) minmax(300px,.92fr);gap:16px;grid-template-areas:'day requests' 'quick requests' 'stock vehicles' 'forecast forecast';align-items:stretch}
:root[data-theme="clair"] .v3-dashboard-grid:has(.v315-classic-rank){grid-template-areas:'day requests' 'quick ranking' 'stock vehicles' 'forecast forecast'}
:root[data-theme="clair"] .v3-day-widget{min-height:220px}
:root[data-theme="clair"] .v3-public-widget{min-height:0}
:root[data-theme="clair"] .v3-quick-widget{min-height:130px}
:root[data-theme="clair"] .v3-vehicle-widget,:root[data-theme="clair"] .v3-stock-widget{min-height:105px}
:root[data-theme="clair"] .v3-forecast-widget{min-height:200px}
:root[data-theme="clair"] .v3-day-widget .ticket{background:#fff;border:1px solid #e5ebf4;box-shadow:none}
:root[data-theme="clair"] .v3-day-widget .ticket.urgent{background:#fff0f1;border-color:#eeb0b6;border-left:4px solid #de3e4b}
:root[data-theme="clair"] .v3-day-widget .ticket-name{color:#192c45}
:root[data-theme="clair"] .ticket-code{background:#e8eef9;color:#34537e}
:root[data-theme="clair"] .v3-request-item{background:#f7f9fd;border:1px solid #e1e7f2;color:#1e314a}
:root[data-theme="clair"] .v3-request-item .v3-request-name{color:#203551}
:root[data-theme="clair"] .v3-public-widget .v3-tabs span{background:#f3f6fa;color:#4c6380;border-radius:8px}
:root[data-theme="clair"] .v3-public-widget .v3-tabs span.active{background:#e7efff;color:#245cad}
:root[data-theme="clair"] .v3-quick{background:#f3f7ff;color:#284e7b;border:1px solid #dbe6f7;border-radius:11px;box-shadow:none;transition:background .15s,border-color .15s,transform .15s}
:root[data-theme="clair"] .v3-quick:hover{background:#e9f2ff;border-color:#8bb2ed;transform:translateY(-1px)}
:root[data-theme="clair"] .v3-quick b{color:#286edc}
:root[data-theme="clair"] .v3-stock-summary{background:#f8faff;color:#203551}
:root[data-theme="clair"] .v3-stock-summary strong{color:#213e62}
:root[data-theme="clair"] .v3-stock-circle{border-color:#6a9fed}
/* Le classement V2.9 reste réellement connecté aux données V3 et à la permission utilisateur. */
:root[data-theme="clair"] .v315-classic-rank{grid-area:ranking;min-width:0;display:flex}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking{margin:0;width:100%;border:1px solid #e0e6f0;box-shadow:0 6px 24px #213b6810;overflow:hidden}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking>summary{background:#f5f8ff;color:#17365e;border:0;padding:14px 17px;font-size:15px;font-weight:800}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking-body{background:#fff;color:#243850;padding:13px}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking-filters label{color:#596f8a;font-size:11px}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking-row{background:#f8faff;border:1px solid #e9edf6;border-radius:8px;padding:9px;margin:4px 0;color:#243850}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking-row:first-child{background:#edf4ff;border-color:#c8d9f7}
:root[data-theme="clair"] .v315-classic-rank .v25-champions{display:flex;flex-wrap:wrap;gap:8px;color:#486280;font-size:11px}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking-body .hint{margin-top:8px}
:root[data-theme="clair"] .fleet-banner{background:#f0faf4;color:#213e34;border:1px solid #cdeedc}
:root[data-theme="clair"] .fleet-banner.amber{background:#fff8e9;border-color:#ffe4a0}
:root[data-theme="clair"] .fleet-banner.red{background:#fff0f1;border-color:#ffcbcb}
:root[data-theme="clair"] .v30-theme-tile{background:#fff;border:1px solid #dee7f2;color:#233b57}
:root[data-theme="clair"] .v30-theme-tile.selected{border:2px solid #3679ec;box-shadow:0 0 0 3px #3679ec20}
:root[data-theme="clair"] .v30-preview-clair{background:linear-gradient(90deg,#112448 0 24%,#f3f6fc 24% 100%);position:relative}
:root[data-theme="clair"] .v30-preview-clair::after{content:'';position:absolute;left:33%;top:28%;width:55%;height:12px;background:#fff;border:1px solid #dbe4f2;border-radius:6px;box-shadow:0 18px 0 #fff,0 36px 0 #fff}
/* Ne jamais écraser les avertissements rouges et les statuts fonctionnels. */
:root[data-theme="clair"] .ticket.urgent{border-left-color:#de3e4b;background:#fff0f1}
:root[data-theme="clair"] .pill.red{background:#ffe1e3;color:#c42b39}
@media(min-width:761px){:root[data-theme="clair"] .sidebar{position:sticky;top:0;height:100vh;overflow-y:auto}}
@media(max-width:1200px){:root[data-theme="clair"] .v3-dashboard-grid,:root[data-theme="clair"] .v3-dashboard-grid:has(.v315-classic-rank){grid-template-columns:minmax(0,1fr) minmax(280px,.95fr)}}
@media(max-width:1040px){:root[data-theme="clair"] .v3-dashboard-grid,:root[data-theme="clair"] .v3-dashboard-grid:has(.v315-classic-rank){grid-template-columns:minmax(0,1fr);grid-template-areas:'day' 'requests' 'ranking' 'quick' 'stock' 'vehicles' 'forecast'}}
@media(max-width:760px){
 :root[data-theme="clair"] .app{display:block;min-height:100dvh}
 :root[data-theme="clair"] .sidebar{grid-column:auto;grid-row:auto;position:fixed;min-height:0;height:100dvh;max-height:100dvh;overflow-y:auto;padding:20px 14px 90px;z-index:30}
 :root[data-theme="clair"] .main{grid-column:auto;grid-row:auto;padding:18px 14px 110px;min-width:0;max-width:none}
 :root[data-theme="clair"] .topbar{gap:12px;flex-wrap:wrap}
 :root[data-theme="clair"] .heading{font-size:25px}
 :root[data-theme="clair"] .v3-board-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 :root[data-theme="clair"] .v3-dashboard-grid,:root[data-theme="clair"] .v3-dashboard-grid:has(.v315-classic-rank){grid-template-columns:minmax(0,1fr);grid-template-areas:'day' 'requests' 'ranking' 'quick' 'stock' 'vehicles' 'forecast'}
 :root[data-theme="clair"] .mobile-bottom-nav{display:block}
 :root[data-theme="clair"] .v3-public-widget,:root[data-theme="clair"] .v3-day-widget{min-height:0}
 :root[data-theme="clair"] .v3-day-widget .ticket.v3-compact-ticket{grid-template-columns:65px minmax(0,1fr)}
}
@media(max-width:390px){:root[data-theme="clair"] .main{padding:13px 10px 106px}:root[data-theme="clair"] .v3-board-metrics{gap:9px}:root[data-theme="clair"] .metric{padding:12px 9px;gap:9px}}
/* Priorité sur la navigation unifiée V3.1.2, limitée au thème classique. */
:root[data-theme="clair"]{--nav-accent:#9fc7ff;--nav-border:#5e93e7;--nav-highlight:#2b67c7;--nav-highlight-end:#3679ec;--nav-shadow:#0c1f4380}
:root[data-theme="clair"] .app .grouped-sidebar-nav .nav-btn.active{background:linear-gradient(90deg,#2b67c7,#3679ec);color:#fff;border-color:#5189e6;box-shadow:0 6px 16px #0c1f4380}
:root[data-theme="clair"] .app .grouped-sidebar-nav .nav-section>summary{color:#b9cdeb}
:root[data-theme="clair"] .app .grouped-sidebar-nav .nav-section[open]>summary{color:#fff}
:root[data-theme="clair"] .app .grouped-sidebar-nav .nav-section .nav-btn{color:#d1def5}
:root[data-theme="clair"] .app .grouped-sidebar-nav .nav-section .nav-btn.active{color:#fff}
:root[data-theme="clair"] .v315-classic-rank .v25-ranking{max-width:100%;min-width:0;align-self:stretch}
@media(min-width:761px){
 :root[data-theme="clair"] .app .sidebar{--nav-sidebar-top:#0d1d38;--nav-sidebar-bottom:#182f58;background:linear-gradient(180deg,#0d1d38,#182f58);min-height:100vh;height:100vh;max-height:100vh;padding:24px 16px 18px}
 :root[data-theme="clair"] .app .sidebar .brand{display:flex;position:relative;z-index:3}
 :root[data-theme="clair"] .app .sidebar::before,:root[data-theme="clair"] .app .sidebar::after{display:none}
}
