/* v1.17 — cockpit superviseur HAKOM, mobile-first, modals et Google Maps */
:root{--tp17-blue:#294fd0;--tp17-pink:#e83988;--tp17-ink:#15233b;--tp17-soft:#f6f8fd}
.tp17-group-tag{display:inline-flex;background:#e8efff;color:#2550a7;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:800;margin:2px}
.tp17-account-scope{background:#f2f6ff;border:1px solid #dbe6ff;border-radius:16px;padding:16px;display:grid;gap:12px;color:#344d79}
.tp17-account-scope[hidden]{display:none!important}
.tp17-account-scope h4{margin:0;color:#172b4c;font-size:14px}
.tp17-account-scope p{font-size:11px;margin:0;color:#536991}
.tp17-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}
.tp17-choice{display:flex;align-items:center;gap:8px;background:white;border:1px solid #d6e0ef;padding:10px;border-radius:10px;color:#1d3358;font-size:11px;font-weight:700}
.tp17-choice input{width:18px;height:18px;accent-color:#315cd3;flex:0 0 18px}
.tp17-choice small{color:#7287a7}
body.tp17-supervisor-shell{--bg:#f6f9ff;--text:#162848;color:#162848;background:#f6f9ff}
body.tp17-supervisor-shell #ambient{display:none}
body.tp17-supervisor-shell .app-shell{grid-template-columns:76px minmax(0,1fr)}
body.tp17-supervisor-shell .sidebar{padding:18px 8px;background:#12264a;border-right:0}
body.tp17-supervisor-shell .sidebar-brand{padding:5px 0 25px;justify-content:center}
body.tp17-supervisor-shell .sidebar-brand .sidebar-client-logo{min-width:43px;width:43px}
body.tp17-supervisor-shell .sidebar-brand>div:not(.sidebar-client-logo){display:none}
body.tp17-supervisor-shell .tp15-sidebar-collapse{display:none}
body.tp17-supervisor-shell .nav-item{grid-template-columns:1fr;text-align:center;justify-items:center;padding:14px 4px}
body.tp17-supervisor-shell .nav-item b{display:none}
body.tp17-supervisor-shell .sidebar-footer{display:flex;align-items:center;justify-content:center;padding:0;margin-top:auto}
body.tp17-supervisor-shell .sidebar-footer .status-pill{display:none}
body.tp17-supervisor-shell .sidebar-footer .logout{color:#c9d7ff;font-size:10px;writing-mode:vertical-rl}
body.tp17-supervisor-shell .main{min-width:0}
body.tp17-supervisor-shell .topbar{height:65px;padding:0 20px;background:white;color:#1b2b49;border-bottom:1px solid #e3eaf5}
body.tp17-supervisor-shell .topbar h2{font-size:16px}
body.tp17-supervisor-shell .topbar .eyebrow{color:#52659a}
body.tp17-supervisor-shell .clock{color:#324a75}
body.tp17-supervisor-shell .user-chip{border-color:#e2eaf6}
body.tp17-supervisor-shell .user-chip strong{color:#1a2b4b}
body.tp17-supervisor-shell .user-chip small{color:#677a99}
body.tp17-supervisor-shell .content{padding:0;margin:0;max-width:none;overflow:hidden}
.tp17-loading{min-height:60vh;display:grid;place-items:center;color:#2c4d8e;font-weight:800;gap:14px}
.tp17-spinner{height:45px;width:45px;border:4px solid #d9e6fa;border-top-color:#3a63db;border-radius:50%;animation:tp17spin 1s linear infinite}@keyframes tp17spin{to{transform:rotate(360deg)}}
.tp17-root{--left:320px;--right:300px;position:relative;width:100%;height:calc(100dvh - 65px);min-height:580px;overflow:hidden;background:#e6f2ff;color:#192a48;isolation:isolate}
.tp17-map{position:absolute;inset:0;z-index:0;background:linear-gradient(150deg,#e8f1fd,#deeaf6)}
.tp17-map-placeholder{padding:40px;font-weight:700;color:#7891b8}
.tp17-map-scrim{position:absolute;pointer-events:none;inset:0;background:linear-gradient(90deg,rgba(243,248,255,.24),transparent 28%,transparent 70%,rgba(239,246,255,.2));z-index:1}
.tp17-toolbar{position:absolute;z-index:4;left:16px;right:16px;top:15px;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:13px 17px;border:1px solid #e0e8f2;border-radius:20px;background:rgba(255,255,255,.97);box-shadow:0 13px 38px rgba(23,49,96,.12)}
.tp17-header-intro{min-width:220px;flex:1 1 300px}.tp17-kicker{font-size:9px;letter-spacing:.16em;color:#758bab;font-weight:900}
.tp17-header-intro h2{font:850 clamp(16px,1.6vw,22px)/1.25 Manrope,Inter,sans-serif;letter-spacing:-.045em;margin:4px 0 0;color:#162945}.tp17-header-intro h2 span{color:#315bd3}
.tp17-toolbar-field{display:flex;flex-direction:column;gap:3px;font-size:9px;color:#70829c;font-weight:800;min-width:0}
.tp17-toolbar-field input,.tp17-toolbar-field select{height:38px;min-height:0;max-width:144px;background:#f5f8ff;color:#1c375d;border:1px solid #dce5f4;border-radius:9px;padding:7px 10px;font-size:12px;font-weight:800}
.tp17-btn{height:42px;display:inline-flex;align-items:center;gap:8px;border-radius:12px;background:#eaf0fa;border:1px solid #d9e6f9;color:#2c4f9e;padding:10px 14px;font-size:12px;font-weight:800;white-space:nowrap}
.tp17-btn-primary{border:0;color:white;background:linear-gradient(120deg,#2857d8,#5874ef);box-shadow:0 7px 20px rgba(44,86,210,.2)}
.tp17-btn-primary span{font-size:22px;font-weight:500;line-height:0}
.tp17-btn-refresh{padding:10px 13px;font-size:20px}
.tp17-floating-panel{position:absolute;z-index:3;top:119px;bottom:20px;min-width:0;background:rgba(255,255,255,.97);border:1px solid #e5ebf5;border-radius:22px;padding:17px;box-shadow:0 10px 35px rgba(21,52,107,.15);display:flex;flex-direction:column;overflow:auto;scrollbar-width:thin;scrollbar-color:#ccd8ed transparent;transition:transform .23s ease,opacity .23s ease}
.tp17-left{width:var(--left);left:16px}.tp17-right{width:var(--right);right:16px}
.tp17-left-closed .tp17-left{transform:translateX(calc(-100% - 38px));opacity:0;pointer-events:none}
.tp17-right-closed .tp17-right{transform:translateX(calc(100% + 38px));opacity:0;pointer-events:none}
.tp17-panel-handle{position:absolute;top:140px;z-index:4;border:1px solid #d8e3f5;background:#fff;border-radius:11px;width:34px;height:40px;box-shadow:0 5px 15px #20477a2b;font-size:19px;color:#31549a}
.tp17-left-handle{left:calc(var(--left) + 22px)}.tp17-right-handle{right:calc(var(--right) + 22px)}
.tp17-left-closed .tp17-left-handle{left:12px}.tp17-right-closed .tp17-right-handle{right:12px}
.tp17-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.tp17-panel-heading h3{font-size:16px;font-weight:900;letter-spacing:-.02em;color:#1c2f50;margin:4px 0 12px}
.tp17-panel-heading>strong{display:grid;place-items:center;padding:6px 10px;border-radius:10px;background:#edf2ff;color:#315ac2;font-size:13px}
.tp17-panel-search input{min-height:41px;border:1px solid #e0e7f3;border-radius:12px;color:#1b2e4d;background:#f7f9fe;font-size:11px;padding:10px 12px}
.tp17-driver-grid{display:grid;gap:7px;max-height:160px;overflow:auto;margin:10px 0 17px;flex-shrink:0;scrollbar-width:thin}
.tp17-driver-tile{display:grid;grid-template-columns:34px minmax(0,1fr) 20px;gap:8px;align-items:center;min-width:0;text-align:left;border:1px solid #e0e7f2;background:#fff;border-radius:13px;padding:7px 9px;transition:.15s;color:#1c3255}
.tp17-driver-tile:hover,.tp17-driver-tile.chosen{background:#edf3ff;border-color:#6d8de8;transform:translateY(-1px)}
.tp17-avatar{display:grid;place-items:center;border-radius:10px;background:#e9edff;color:#3c58bd;width:34px;height:34px;font-weight:900}
.tp17-driver-tile b,.tp17-circuit b{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tp17-driver-tile small,.tp17-circuit small{display:block;color:#7688a2;font-size:9px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tp17-driver-tile i{font-style:normal;color:#3d60c7;font-size:21px}
.tp17-vehicles-heading{margin-top:3px}.tp17-vehicles-heading h3{margin-bottom:9px}
.tp17-vehicle-tags{display:flex;flex-wrap:wrap;gap:6px;overflow:auto;max-height:112px;flex-shrink:0;scrollbar-width:thin}
.tp17-vtag{display:flex;align-items:center;gap:5px;max-width:100%;background:#f1f5fc;color:#30496e;border:1px solid #e0e7f2;padding:7px 9px;border-radius:10px;font-size:10px;text-align:left}
.tp17-vtag span{font-size:15px;color:#3967c1}.tp17-vtag b{font-weight:850}.tp17-vtag small{font-size:9px;color:#7b8a9f;overflow:hidden;text-overflow:ellipsis;max-width:90px}
.tp17-circuits-title{margin-top:19px}.tp17-circuits-title h3{margin-bottom:8px}
.tp17-circuits{overflow:auto;min-height:95px;scrollbar-width:thin;flex:1;display:grid;align-content:start;gap:7px;padding-right:3px}
.tp17-circuit{min-width:0;display:grid;grid-template-columns:33px minmax(0,1fr) 16px;align-items:center;text-align:left;gap:9px;background:#fff;border:1px solid #e0e6f2;border-radius:13px;padding:10px;color:#203755}
.tp17-circuit:hover,.tp17-circuit:focus{border-color:#5380ea;background:#f2f6ff}
.tp17-circuit-icon{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:#ffeef7;color:#cc317b;font-size:19px}
.tp17-circuit strong{color:#4266bf;font-size:22px}.tp17-panel-note{font-size:11px;color:#72849e}
.tp17-list-filter{font-size:10px;color:#6f84a4;background:#f2f6fd;border-radius:10px;padding:9px 10px;margin-bottom:10px;overflow-wrap:anywhere}
.tp17-missions{display:grid;align-content:start;gap:9px;overflow:auto;scrollbar-width:thin;min-height:150px;flex:1}
.tp17-mission-tile{min-width:0;text-align:left;background:#fff;border:1px solid #e2e7ef;border-radius:16px;padding:13px;display:grid;grid-template-columns:auto 1fr;gap:5px 10px;color:#162744}
.tp17-mission-tile:hover{background:#f7f9ff;border-color:#7997ed}.tp17-mission-type{justify-self:start;border-radius:99px;padding:5px 8px;background:#e9efff;color:#2556c3;font-size:9px;font-weight:900}.tp17-mission-type.tourism{background:#fff0f7;color:#c83280}
.tp17-mission-tile>strong{font-size:19px;justify-self:end;letter-spacing:-.02em}.tp17-mission-tile>b{grid-column:1/-1;font-size:12px}
.tp17-mission-tile>small{grid-column:1/-1;font-size:10px;color:#7d8ca5}.tp17-mission-tile>span:last-child{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center}
.tp17-mission-tile>span:last-child i{font-style:normal;font-size:10px;color:#4168ba;font-weight:850}
.tp17-zero{padding:40px 8px;text-align:center;color:#7c8daa;font-size:11px}.tp17-zero>span{display:block;font-size:35px;color:#4169d6;margin-bottom:10px}.tp17-zero b{display:block;color:#213a66;font-size:14px}.tp17-zero p{line-height:1.6}
.tp17-footnote{position:absolute;bottom:16px;left:calc(var(--left) + 46px);z-index:2;padding:9px 14px;border-radius:99px;background:#fff;color:#496592;font-size:10px;font-weight:750;box-shadow:0 6px 20px #1f4a8c2b;pointer-events:none}
.tp17-left-closed .tp17-footnote{left:55px}
.tp17-map-unavailable{max-width:390px;position:absolute;top:35%;left:50%;transform:translateX(-50%);padding:25px;background:white;border-radius:16px;box-shadow:0 15px 50px #1f3c8333;text-align:center;color:#254470;font-size:13px;line-height:1.6}
.tp17-mobile-tabs{display:none}
/* Large modal : formulaire blanc et carte interactive, optimisé tactile. */
#modalHost .tp17-modal-backdrop{z-index:120;padding:10px;background:rgba(18,31,54,.48);backdrop-filter:blur(7px)}
#modalHost .tp17-modal-backdrop .modal{width:min(960px,98vw);max-height:96dvh;background:#f9fbff;border:1px solid #d4dff1;color:#193354;display:flex;flex-direction:column;border-radius:20px;box-shadow:0 25px 85px rgba(14,35,80,.32)}
#modalHost .tp17-modal-backdrop .modal-head{padding:16px 20px;border-bottom:1px solid #e1e9f5;background:#fff;color:#1b3357;flex-shrink:0}
#modalHost .tp17-modal-backdrop .modal-head h3{font-size:17px}
#modalHost .tp17-modal-backdrop .modal-body{overflow:auto;min-height:0;padding:20px}
#modalHost .tp17-modal-backdrop .modal-foot{padding:11px 20px;border-top:1px solid #dfe7f4;background:#fff;flex-shrink:0;flex-wrap:wrap}
#modalHost .tp17-modal-backdrop .close-btn{color:#324967}
.tp17-wizard-intro{display:flex;align-items:center;gap:13px;margin-bottom:16px;background:#eef3fd;padding:14px;border-radius:14px;color:#1b3359}
.tp17-wizard-intro>span{width:36px;height:36px;display:grid;place-items:center;background:#dbe5ff;color:#3152c1;border-radius:11px;font-weight:900}
.tp17-wizard-intro b{display:block;font-size:15px}.tp17-wizard-intro small{display:block;color:#677e9b;font-size:11px;margin-top:3px;overflow-wrap:anywhere}
.tp17-wizard-form{display:grid;gap:13px;color:#30486b;font-size:12px}
.tp17-wizard-form>label{display:grid;gap:5px;font-size:11px;font-weight:800}
.tp17-wizard-form input,.tp17-wizard-form select{border:1px solid #d6e0ed;background:#fff;color:#1c375c;min-height:43px;padding:9px 12px;border-radius:11px;box-shadow:none}
.tp17-wizard-form p{margin:0;color:#667994;font-size:11px;line-height:1.6}
.tp17-modal-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tp17-modal-fields label{display:grid;min-width:0;gap:5px;font-size:11px;font-weight:800;color:#4c6181}
.tp17-modal-fields input,.tp17-modal-fields select{width:100%;min-width:0}
.tp17-modal-map{position:relative;min-height:250px;background:#e7effa;border-radius:16px;overflow:hidden}
.tp17-modal-map>div:first-child{height:315px;width:100%}
.tp17-map-instruction{position:absolute;z-index:1;left:10px;bottom:11px;background:#fff;padding:8px 12px;border-radius:10px;font-size:10px;font-weight:850;color:#315899;max-width:calc(100% - 20px);box-shadow:0 5px 18px #1a3b7833;pointer-events:none}
.tp17-modal-stopbar{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#233f6d}
.tp17-edit-stops{display:grid;gap:8px;max-height:210px;overflow-y:auto;padding:3px}
.tp17-stop-row{display:flex;align-items:center;gap:7px;background:#fff;border:1px solid #dae3f1;border-radius:11px;padding:6px;min-width:0}
.tp17-stop-index{display:grid;place-items:center;flex:0 0 27px;width:27px;height:29px;background:#e8efff;color:#355aba;border-radius:8px;font-weight:900;font-size:11px}
.tp17-stop-row input,.tp17-stop-row select{min-width:0;min-height:36px;padding:5px 8px;flex:1 1 100px;font-size:11px}
.tp17-stop-row input[type=time]{flex:0 0 103px;max-width:103px}
.tp17-stop-row select{flex:0 0 122px;max-width:122px}
.tp17-stop-row>button{flex:0 0 31px;width:31px;height:33px;border-radius:8px;border:0;background:#edf2fc;color:#365baf;font-weight:900}
.tp17-stop-row>button:last-child{color:#bd3479;background:#fff0f7}
/* Global desktop/tablet responsive hardening without distorting existing pages */
.main,.content,.panel,.cards-grid,.grid-2,.page-head,.form-grid,.setting-grid{min-width:0}
@media(max-width:1180px){.tp17-root{--left:285px;--right:270px}.tp17-header-intro{flex:1 1 180px;min-width:150px}.tp17-toolbar{gap:7px;padding:10px}}
@media(max-width:980px){.tp17-root{--left:270px;--right:260px}.tp17-floating-panel{padding:11px}.tp17-toolbar{top:8px;left:9px;right:9px}.tp17-floating-panel{top:108px;bottom:14px}}
@media(max-width:850px){body.tp17-supervisor-shell .app-shell{display:block}body.tp17-supervisor-shell .sidebar{display:none}body.tp17-supervisor-shell .topbar{height:58px;padding:0 13px}body.tp17-supervisor-shell .menu-btn{display:none}body.tp17-supervisor-shell .content{padding:0}.tp17-root{height:calc(100dvh - 58px)}.tp17-toolbar{position:absolute;top:7px;left:7px;right:7px;gap:7px}.tp17-header-intro{flex:1 1 100%;min-width:0}.tp17-header-intro h2{font-size:16px}.tp17-toolbar-field{flex:1 1 auto}.tp17-toolbar-field input,.tp17-toolbar-field select{max-width:none;width:100%;font-size:11px}.tp17-btn{min-height:38px;height:38px;flex:1 1 auto;justify-content:center}.tp17-btn-refresh{flex:0 0 42px}.tp17-floating-panel{top:auto!important;bottom:60px!important;left:7px!important;right:7px!important;width:auto!important;height:min(48dvh,490px);min-height:180px;max-height:calc(100dvh - 255px);padding:13px;border-radius:18px;transform:none!important;opacity:1!important}.tp17-root[data-mobile-pane="routes"] .tp17-right,.tp17-root[data-mobile-pane="missions"] .tp17-left,.tp17-root[data-mobile-pane="map"] .tp17-floating-panel{display:none!important}.tp17-root[data-mobile-pane="map"] .tp17-footnote{display:block}.tp17-panel-handle{display:none}.tp17-footnote{display:none;left:14px;bottom:73px}.tp17-mobile-tabs{display:grid;position:absolute;z-index:6;bottom:7px;left:8px;right:8px;grid-template-columns:repeat(3,1fr);gap:5px;padding:5px;border-radius:15px;background:#fff;box-shadow:0 8px 30px #24466d2b}.tp17-mobile-tabs button{border:0;border-radius:10px;background:transparent;color:#71819b;min-height:42px;font-size:11px;font-weight:850}.tp17-mobile-tabs button.active{background:#e9efff;color:#3058c0}.tp17-driver-grid{max-height:112px}.tp17-vehicle-tags{max-height:72px}.tp17-circuits{min-height:75px}.tp17-modal-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:500px){.tp17-root{min-height:450px}.tp17-toolbar{gap:6px}.tp17-header-intro h2{font-size:14px}.tp17-header-intro .tp17-kicker{font-size:8px}.tp17-btn{font-size:11px}.tp17-modal-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.tp17-modal-map>div:first-child{height:245px}.tp17-modal-map{min-height:245px}#modalHost .tp17-modal-backdrop .modal{max-height:99dvh;width:100%;border-radius:12px}#modalHost .tp17-modal-backdrop .modal-head{padding:11px 13px}#modalHost .tp17-modal-backdrop .modal-body{padding:12px}#modalHost .tp17-modal-backdrop .modal-foot{padding:10px;justify-content:stretch}#modalHost .tp17-modal-backdrop .modal-foot .btn{flex:1;min-height:42px;font-size:11px}.tp17-stop-row{flex-wrap:wrap}.tp17-stop-row input:first-of-type{flex:1 1 calc(100% - 49px)}.tp17-stop-row input[type=time],.tp17-stop-row select{flex:1 1 35%;max-width:none}.tp17-stop-row>button{flex:1 1 30px}.tp17-edit-stops{max-height:150px}}
