/* ALERTE 112 · V8 / interface lisible et compacte en paysage */
:root { --v8-header:#087cf1; --v8-body:#3c3c3d; --v8-deep:#292929; --v8-divider:#525252; }
.brand-inline {font-weight:900;letter-spacing:.07em}
/* Quick buttons order handled in experience-v10 */
#panel-right {width:min(510px,45vw)!important;border-radius:9px;border:3px solid #20262c;background:#3b3b3b;max-height:none;bottom:0px}
#panel-right .panel-head {min-height:45px;height:45px;background:var(--v8-header);padding:4px 11px}
#panel-right .panel-head h2 {font-size:17px;letter-spacing:0}
#panel-right .panel-body {padding:5px 7px 12px;background:var(--v8-body);font-size:13px}
#panel-right .v4-building-tabs {margin:5px 0 9px;gap:5px}
#panel-right .v4-building-tabs button {border-radius:4px;padding:7px 12px;font-size:12px}
.v8-group-name {min-height:34px;display:flex;align-items:center;background:#303033;color:#f6f6f6;font-weight:700;padding:7px 9px;border-bottom:1px solid #494949;margin-top:7px;font-size:12px}
.v8-group-name.quiet {background:#3a3a3a;color:#aeb5b9;font-weight:500}
.v8-list-row {display:grid;grid-template-columns:35px minmax(0,1fr) 88px;gap:8px;align-items:center;min-height:48px;padding:4px 8px;background:#454545;border-bottom:1px solid #5e5e5e}
.v8-list-icon {display:grid;place-items:center;width:30px;height:30px;border-radius:6px;background:#067cde;font-size:18px}
.v8-list-icon.phone {background:#186b91}
.v8-list-row strong {font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v8-list-row button {background:#087cf1;border:1px solid #56adfb;color:#fff;min-height:31px;border-radius:5px;font-size:12px;font-weight:700;cursor:pointer}
.v8-list-row button:hover,.v8-list-row button:focus-visible {background:#2998ff;outline:2px solid #fff5}
.v8-empty {padding:8px 10px;font-size:11px;color:#c2c2c2}
/* Caserne : vraie fenêtre unique, séparée de la liste des bâtiments */
.v8-building-screen {position:fixed;z-index:93;inset:max(9px,var(--sat)) max(12px,var(--sar)) max(10px,var(--sab)) max(12px,var(--sal));
 width:min(1240px,calc(100vw - var(--sal) - var(--sar) - 28px));max-height:calc(100dvh - var(--sat) - var(--sab) - 18px);
 margin:auto;display:flex;flex-direction:column;overflow:hidden;border:6px solid #222;border-radius:16px;background:var(--v8-body);box-shadow:0 0 0 150vmax #0008,0 12px 42px #0009;color:#efefef}
.v8-building-screen.hidden {display:none!important}
.v8-building-header {display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 58px;min-height:58px;background:var(--v8-header);padding:6px 15px 6px 23px}
.v8-building-header h2 {font:750 clamp(16px,2vw,23px)/1.2 system-ui;margin:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v8-building-header button {color:#163e65;background:transparent;font-size:32px;font-weight:900;border:0;min-width:44px;min-height:42px;cursor:pointer}
.v8-building-header button:hover {color:white}
.v8-building-body {flex:1 1 auto;min-height:0;display:grid;grid-template-columns:105px minmax(0,1fr)}
.v8-building-nav {background:#303033;display:flex;flex-direction:column;gap:5px;padding:12px 8px;border-right:2px solid #585858;overflow:auto}
.v8-building-nav button {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:75px;color:#ddd;background:#444;border:1px solid #656565;border-radius:7px;cursor:pointer;font-size:25px;padding:6px 2px}
.v8-building-nav button.selected {background:#117ff4;border-color:#83cbff;color:white}
.v8-building-nav button small {font:700 11px system-ui;letter-spacing:0}
.v8-building-content {min-width:0;min-height:0;overflow:auto;scrollbar-color:#777 #333;padding:13px 16px 22px}
.v8-building-nameline {display:grid;grid-template-columns:65px minmax(0,1fr) auto;align-items:center;gap:13px;margin-bottom:20px}
.v8-building-emblem {display:grid;place-items:center;border:5px solid #252525;background:#0878dd;border-radius:13px;width:58px;height:58px;font-size:31px}
.v8-name-field span {display:block;font-size:10px;color:#bfc5c9;margin-bottom:6px}
.v8-name-field input {width:100%;height:47px;font:500 17px system-ui;background:#f9f9f9;color:#2a2a2a;border:2px solid #bbb;border-radius:9px;padding:7px 14px}
.v8-name-field input:focus-visible {outline:3px solid #6ab7ff}
.v8-state-pill {border-radius:999px;padding:8px 11px;font-size:11px;font-weight:750;color:#fff;background:#455b51;white-space:nowrap}
.v8-state-pill.good {background:#22814d}.v8-state-pill.underway {background:#9c6e26}
.v8-building-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:20px}
.v8-building-metrics>div {display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:62px;background:#363636;border:1px solid #606060;border-radius:6px;padding:9px 13px}
.v8-building-metrics span {color:#bfbfbf;font-size:13px}.v8-building-metrics strong {font-size:20px;color:#fff;white-space:nowrap}
.v8-building-upgrade {display:flex;align-items:center;justify-content:space-between;gap:12px;background:#303033;border-radius:9px;padding:14px 17px;margin-top:10px}
.v8-building-upgrade>div {display:grid;gap:5px}.v8-building-upgrade strong {font-size:14px}.v8-building-upgrade small {font-size:11px;color:#b8b8b8}
.v8-info-note {background:#55452d;border-left:4px solid #d69c3c;padding:9px 12px;font-size:12px;margin:10px 0}
.v8-helper {font-size:11px;color:#bababa;line-height:1.45;margin:12px 0}
.v8-shortcuts {display:flex;gap:10px;margin-top:21px}.v8-shortcuts button {border:1px solid #767676;background:#4b4b4b;color:white;border-radius:4px;padding:10px 14px;cursor:pointer}
.v8-action {padding:8px 12px;border-radius:6px;border:1px solid #489efa;color:#fff;font:750 12px system-ui;min-height:37px;cursor:pointer;background:#0b75df;white-space:nowrap}
.v8-action.primary {background:#087cf1;box-shadow:0 3px 0 #03559f}
.v8-action.green {background:#29a84d;border-color:#81d596}
.v8-action.secondary {background:#585858;border-color:#8a8a8a}
.v8-action.small {min-height:29px;padding:4px 12px}
.v8-action:disabled {opacity:.42;cursor:not-allowed;box-shadow:none}
.v8-tab-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:63px;background:#333;border-radius:9px;margin:2px 0 12px;padding:10px 14px}
.v8-tab-heading span {display:flex;flex-direction:column;gap:4px}.v8-tab-heading strong {font-size:15px}.v8-tab-heading small {font-size:11px;color:#c5c5c5}
.v8-table-frame {overflow:auto;max-width:100%;border:1px solid #575757;border-radius:8px;overscroll-behavior:contain}
.v8-management-table {width:100%;min-width:450px;border-collapse:collapse;table-layout:auto;font:13px system-ui}
.v8-management-table.vehicle,.v8-management-table.buy {min-width:620px}
.v8-management-table th {background:#232323;color:#eee;text-align:left;font-weight:800;height:35px;padding:8px 14px}
.v8-management-table td {color:#dfdfdf;padding:8px 14px;min-height:40px;height:45px;border-bottom:1px solid #3d3d3d}
.v8-management-table tbody tr:nth-child(odd) td {background:#363636}.v8-management-table tbody tr:nth-child(even) td {background:#2d2d2d}
.v8-management-table tbody tr:hover td {background:#3d4751}
.v8-empty-row {text-align:center;color:#bfbfbf!important;height:70px!important}
.v8-status {display:inline-block;padding:3px 7px;font-size:11px;border-radius:3px;background:#454545}
.v8-status.ready {color:#a7f3c5}.v8-status.busy {color:#ffdc9b}
.v8-family {display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.v8-family img {width:59px;height:25px;object-fit:contain}
.v8-blue-tag {display:inline-block;background:#0d7de8;color:white;padding:7px 10px;min-width:90px;text-align:center;border-radius:5px;font-size:12px}
/* Service d'abord, familles ensuite */
.v8-filter-caption {font-size:11px;font-weight:700;margin:6px 0 5px;color:#ddd}
.v8-service-icons {display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 11px}
.v8-service-icons button {display:flex;align-items:center;gap:6px;min-height:36px;padding:5px 12px;background:#454545;color:#ddd;border:1px solid #747474;border-radius:5px;cursor:pointer}
.v8-service-icons button span {font-size:19px}.v8-service-icons button small {font:700 11px system-ui}
.v8-service-icons button.active {background:#096dd6;color:white;border-color:#73bfff}
.v8-service-icons button:disabled {opacity:.43;cursor:not-allowed}
.v43-families {margin-bottom:9px}
/* Boutique en grille compacte : pas de photos géantes */
.shop-screen {inset:max(12px,var(--sat)) max(14px,var(--sar)) max(12px,var(--sab)) max(14px,var(--sal))!important;max-width:980px;max-height:calc(100dvh - var(--sat) - var(--sab) - 24px);width:min(940px,calc(100vw - 30px));margin:auto;border:5px solid #222;border-radius:13px;background:#3d3d3d;box-shadow:0 0 0 130vmax #0009}
.shop-head {background:var(--v8-header)!important;min-height:49px;padding:7px 12px!important}
.shop-head h2 {font-size:17px}.shop-head .btn {font-size:12px;white-space:nowrap}
.shop-body {background:#3b3b3b!important;padding:9px 12px!important}
.v8-shop-select {display:flex;align-items:center;gap:8px;font-size:11px;margin:5px 0 10px}
.v8-shop-select select {height:32px;min-width:150px;max-width:min(360px,65vw);border-radius:5px;background:#eee;color:#333;padding:4px}
.v8-shop-nav {display:flex;gap:5px;margin-bottom:10px}
.v8-shop-nav button {border:1px solid #797979;background:#444;color:#fff;border-radius:3px;padding:7px 12px;cursor:pointer;font:700 11px system-ui}
.v8-shop-nav button.active {background:#0b73da;border-color:#64adfa}
.v8-shop-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.v8-shop-item {min-height:92px;background:#4b4b4b;border:1px solid #636363;border-radius:4px;padding:8px;display:flex;flex-direction:column;justify-content:space-between;gap:7px}
.v8-shop-item-main {display:flex;align-items:center;gap:7px;min-width:0}
.v8-shop-item-main b {display:block;font-size:12px}.v8-shop-item-main small {display:block;font-size:10px;color:#cfcfcf;line-height:1.15;margin-top:4px}
.v8-shop-item-icon {flex:none;display:grid;place-items:center;width:54px;min-height:28px;font-size:22px}
.v8-shop-item button {align-self:stretch;background:#2b3035;color:white;font:700 11px system-ui;border:1px solid #707070;min-height:28px;border-radius:3px;cursor:pointer}
.v8-shop-item button:not(:disabled):hover {background:#0d79dc}.v8-shop-item button:disabled {opacity:.45;cursor:not-allowed}
/* Small screens + keyboard: primary viewport stays fixed; modal content scrolls internally */
@media(max-height:600px) {
 .v8-building-screen {inset:calc(var(--sat) + 2px) calc(var(--sar) + 4px) calc(var(--sab) + 2px) calc(var(--sal) + 4px);width:calc(100vw - var(--sal) - var(--sar) - 8px);max-height:calc(100dvh - var(--sat) - var(--sab) - 4px);border-width:3px;border-radius:7px}
 .v8-building-header {min-height:37px;flex-basis:37px;padding:2px 9px}.v8-building-header h2 {font-size:14px}.v8-building-header button {font-size:24px;min-width:35px;min-height:32px}
 .v8-building-body {grid-template-columns:66px minmax(0,1fr)}.v8-building-nav {padding:6px 3px;gap:3px}
 .v8-building-nav button {min-height:53px;font-size:21px;padding:3px 1px}.v8-building-nav button small {font-size:8px}
 .v8-building-content {padding:7px 8px 13px}.v8-tab-heading {min-height:42px;padding:5px 8px;margin:0 0 7px}.v8-tab-heading strong {font-size:12px}.v8-tab-heading small {font-size:10px}.v8-action {min-height:30px;padding:4px 8px;font-size:10px}
 .v8-building-nameline {grid-template-columns:41px minmax(0,1fr) auto;gap:6px;margin-bottom:8px}.v8-building-emblem {width:38px;height:38px;font-size:22px;border-width:2px}.v8-name-field input {height:35px;font-size:15px}.v8-name-field span {font-size:9px;margin-bottom:3px}
 .v8-building-metrics {margin-bottom:8px}.v8-building-metrics>div {padding:5px 7px;min-height:38px}.v8-building-metrics span {font-size:10px}.v8-building-metrics strong {font-size:15px}.v8-building-upgrade {padding:8px;gap:6px}.v8-building-upgrade strong {font-size:11px}.v8-building-upgrade small {font-size:9px}.v8-helper {font-size:10px;margin:6px 0}.v8-shortcuts {margin-top:9px}
 .v8-management-table {font-size:11px;min-width:390px}.v8-management-table.vehicle,.v8-management-table.buy {min-width:570px}.v8-management-table th {height:27px;padding:5px 7px}.v8-management-table td {height:34px;padding:4px 7px}.v8-family img {width:45px;height:20px}.v8-blue-tag {padding:4px 6px;min-width:70px;font-size:10px}
 .shop-screen {width:calc(100vw - var(--sal) - var(--sar) - 8px);max-height:calc(100dvh - var(--sat) - var(--sab) - 4px);border-width:3px}.shop-head {min-height:35px}.shop-head h2 {font-size:12px}.shop-head .stat-pill {font-size:10px}
 .v8-shop-grid {grid-template-columns:repeat(3,minmax(0,1fr))}.v8-shop-item {min-height:74px;padding:5px}.v8-shop-item-main b {font-size:10px}.v8-shop-item-main small {font-size:9px}.v8-shop-item-icon {width:40px}.v8-shop-item-icon img {width:38px}.v8-shop-item button {font-size:10px;min-height:24px}
 .v8-service-icons {gap:4px;margin:4px 0 7px}.v8-service-icons button {min-height:28px;padding:3px 6px}.v8-service-icons button span {font-size:16px}.v8-service-icons button small {font-size:9px}.v8-filter-caption {font-size:10px;margin:4px 0}
 #panel-right {max-height:none;bottom:0px}
}
@media(max-width:680px) {
 .v8-service-icons button small {display:none}.v8-service-icons button {min-width:38px;justify-content:center}
 .v8-building-nameline {grid-template-columns:37px minmax(0,1fr)}.v8-state-pill {grid-column:2;justify-self:start;padding:3px 6px;font-size:9px}
 .v8-building-metrics {gap:4px}.v8-building-metrics>div {flex-direction:column;align-items:flex-start;gap:2px}
 .v8-shop-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce) { .v8-building-screen * {scroll-behavior:auto!important;transition:none!important} }

/* Lancement : vidéo plein écran pure sans élément superposé, fondu en sortie. */
.v8-splash {position:fixed;z-index:99999 !important;inset:0;overflow:hidden;background:#000;display:block;isolation:isolate;opacity:1;transition:opacity 1.1s ease-in-out}
.v8-splash.closing {opacity:0 !important;pointer-events:none !important;transition:opacity 1.1s ease-in-out !important}
#v8-intro-video, .v8-intro-video {width:100% !important;height:100% !important;object-fit:cover !important;display:block !important;pointer-events:none !important;background:#000 !important}
@media(prefers-reduced-motion:reduce){.v8-splash.closing{transition:opacity .35s ease !important}}
/* Correct the legacy V2 centering transform: no off-screen shop on desktop/mobile. */
.shop-screen {inset:auto!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:min(940px,calc(100vw - var(--sal) - var(--sar) - 28px))!important;max-height:calc(100dvh - var(--sat) - var(--sab) - 24px)!important}
@media(max-height:520px){.shop-screen{width:calc(100vw - var(--sal) - var(--sar) - 8px)!important;max-height:calc(100dvh - var(--sat) - var(--sab) - 6px)!important}}

/* ALERTE 112 V10 — Stylisation de la boutique 81 véhicules et fenêtres de déblocage */
.v10-shop-section-title {background:#27272a;color:#f8fafc;font-weight:800;font-size:13px;padding:8px 14px;border-radius:6px 6px 0 0;margin-top:12px;border-left:4px solid #087cf1;display:flex;align-items:center;gap:8px}
.v10-shop-section-title.locked {border-left-color:#64748b;color:#94a3b8;background:#1e1e24}
.v10-veh-cell {display:inline-flex;align-items:center;gap:9px;white-space:nowrap}
.v10-veh-cell b {font-size:13px;color:#fff}
.v10-veh-cell.locked b {color:#94a3b8}
.v10-dimmed {opacity:.42;filter:grayscale(30%)}
.v10-info-btn {display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#475569;color:#fff;border:1px solid #64748b;font-size:11px;cursor:pointer;font-weight:900;line-height:1;transition:background .15s}
.v10-info-btn:hover {background:#087cf1;border-color:#38bdf8}
.v10-buy-btn {padding:6px 12px;border-radius:6px;font:800 12px system-ui;cursor:pointer;border:1px solid transparent;white-space:nowrap;transition:transform .1s,opacity .15s;min-height:32px}
.v10-buy-btn.coins {background:linear-gradient(180deg,#f59e0b,#d97706);color:#1c1917;border-color:#fbbf24;box-shadow:0 2px 0 #92400e}
.v10-buy-btn.coins:hover:not(:disabled) {background:linear-gradient(180deg,#fbbf24,#f59e0b);transform:translateY(-1px)}
.v10-buy-btn.billets {background:linear-gradient(180deg,#22c55e,#16a34a);color:#fff;border-color:#4ade80;box-shadow:0 2px 0 #14532d}
.v10-buy-btn.billets:hover:not(:disabled) {background:linear-gradient(180deg,#4ade80,#22c55e);transform:translateY(-1px)}
.v10-buy-btn:disabled {opacity:.4;cursor:not-allowed;box-shadow:none;transform:none}
.v10-prereq-badge {display:inline-block;background:#27272a;color:#cbd5e0;border:1px solid #475569;padding:4px 9px;border-radius:5px;font-size:11px;font-weight:600}
.v10-functions-tag {display:inline-block;color:#e2e8f0;font-weight:700;font-size:12px;letter-spacing:.02em}
.v10-row-locked td {background:#242426!important;color:#71717a!important}
