/* Performance garage: car first, parts next, engineering behind an explicit view. */
:root { --balise:#ddf63b; --balise-ink:#172002; --side-w:clamp(300px,25cqw,360px); }
.header { background:#0b1119ed; border-bottom:1px solid #ffffff13; }
.side-nav button { font-style:normal; text-transform:uppercase; font-size:1rem; letter-spacing:.06em; }
.side-nav button.sel::after { background:var(--balise); height:3px; }
.route-chip { background:#18232c; box-shadow:none; border:1px solid #ffffff26; border-radius:3px; }
.sidebar { background:linear-gradient(100deg,#0e1620f5,#101b26e8); box-shadow:12px 0 45px #0003; }
.car-group { border-radius:3px; background:#ffffff02; }
.car-group > summary { padding-block:7px; }
.car-group-0 > summary .car-group-label { font-size:1.08rem; letter-spacing:.03em; }
.garage-scene-ui { left:0; }
.garage-identity { left:calc(var(--side-w) + 24px); top:24px; max-width:calc(100% - var(--side-w) - 460px); }
.plate h1 { font-size:clamp(1.5rem,2.5cqw,2.6rem); font-style:normal; font-weight:700; }
.plate-number { font-size:1.1rem; }
.garage-identity .section-kicker { display:none; }
.car-stats { display:none; }
.garage-camera-tools { right:280px; top:100px; width:166px; }
.view-buttons { grid-template-columns:repeat(3,1fr); }
.view-buttons button { font-size:.75rem; padding:7px 5px; }
.garage-bottom { right:20px; bottom:16px; }
.garage-drive { min-width:230px; clip-path:none; border-radius:3px; font-size:1.5rem; padding:12px 20px; box-shadow:none; background:var(--balise); color:var(--balise-ink); }
.garage-drive::before,.garage-drive::after { display:none; }
.garage-orbit-hint { font-size:.66rem; color:#a8b6c6; }
.build-performance { position:absolute; right:20px; top:80px; width:236px; padding:18px; background:linear-gradient(120deg,#0d1723ef,#10202be3); border:1px solid #ffffff1a; border-top:2px solid var(--balise); border-radius:4px; pointer-events:auto; }
.build-performance h2 { font-family:var(--display); font-size:1.3rem; font-weight:600; line-height:1.12; margin:8px 0 18px; }
#buildPreviewState { font-size:.56rem; color:var(--balise); letter-spacing:.12em; }
.build-stat { display:grid; grid-template-columns:1fr auto; border-top:1px solid #ffffff13; padding:12px 0 10px; gap:3px 8px; }
.build-stat > span { color:#9fadc0; font-size:.76rem; align-self:center; }
.build-stat strong { font-family:var(--display); font-size:1.65rem; font-weight:600; }
.build-stat small { grid-column:1/-1; text-align:right; font-size:.65rem; color:#8394a8; }
.build-stat small.gain { color:var(--balise); }.build-stat small.loss { color:#ff937d; }
.performance-note { margin:8px 0 12px; color:#8291a4; font-size:.6rem; }
.workshop-primary,.workshop-secondary,.workshop-back { width:100%; border:0; border-radius:3px; padding:11px 12px; font-family:var(--display); font-size:1.05rem; font-weight:700; }
.workshop-primary { background:var(--balise); color:var(--balise-ink); }
.workshop-primary:disabled { background:#263440; color:#8395a4; cursor:default; }
.workshop-secondary { background:#ffffff0b; border:1px solid #ffffff25; color:#e1e8ef; margin-top:8px; }
.workshop-back { background:none; color:#aab8c5; font-size:.9rem; padding-bottom:0; }
.workshop-panel { display:none; position:absolute; inset:var(--top-h) 0 0; pointer-events:none; }
body[data-garage-tab=setup]:not(.advanced-tuning) .workshop-panel { display:block; }
body[data-garage-tab=setup]:not(.advanced-tuning) .sidebar { display:none; }
body[data-garage-tab=setup]:not(.advanced-tuning) .garage-identity { left:310px; max-width:calc(100% - 770px); }
body[data-garage-tab=setup] #modifySelected { display:none; }
body[data-garage-tab=tools] .build-performance { display:none; }
.part-detail { position:absolute; top:20px; bottom:218px; left:20px; width:264px; overflow-y:auto; padding:17px; background:#0e1823ee; border:1px solid #ffffff1c; border-radius:4px; pointer-events:auto; scrollbar-width:thin; }
.part-detail-icon { color:var(--balise); width:64px; height:64px; margin:16px 0 10px; }
.part-detail svg,.part-card svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.part-detail h2 { font-family:var(--display); font-size:1.8rem; font-weight:600; margin:0 0 6px; }
#partDescription { font-size:.76rem; color:#a4b5c6; line-height:1.45; margin:0 0 14px; }
.part-tiers { display:grid; gap:5px; margin-bottom:10px; }
.part-tier { padding:9px 12px; text-align:left; border:1px solid #ffffff1c; border-left:3px solid #73879c; background:#ffffff04; border-radius:3px; font-family:var(--display); font-size:1rem; }
.part-tier[data-part-tier="1"] { border-left-color:#65b8ff; }.part-tier[data-part-tier="2"] { border-left-color:#c293ff; }.part-tier[data-part-tier="3"] { border-left-color:#ffba5a; }
.part-tier.sel { border-color:var(--balise); background:#ddf63b12; color:var(--balise); }
.part-tier:disabled { opacity:.35; }
.part-unlocks { font-size:.66rem; line-height:1.5; color:#9badbf; margin:12px 0 4px; }
.workshop-dock { position:absolute; left:20px; right:20px; bottom:14px; height:185px; background:#0b141eea; border:1px solid #ffffff1b; border-radius:4px; pointer-events:auto; padding:12px; }
.part-categories { display:flex; gap:6px; border-bottom:1px solid #ffffff18; padding-bottom:9px; }
.part-categories button { background:none; border:0; border-radius:3px; padding:7px 16px; text-transform:uppercase; font-size:.78rem; letter-spacing:.06em; color:#8e9daf; }
.part-categories button.sel { color:var(--balise); background:#ddf63b10; }
.part-cards { display:flex; gap:7px; overflow-x:auto; padding:10px 0 3px; scrollbar-width:thin; scroll-snap-type:x proximity; }
.part-card { flex:0 0 126px; min-height:112px; border:1px solid #ffffff1a; background:#172431b0; border-radius:3px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:5px; padding:9px; color:#9eafbe; scroll-snap-align:center; }
.part-card svg { width:39px; height:39px; }
.part-card b { font-family:var(--display); font-weight:600; font-size:.95rem; color:#e6edf1; line-height:1.1; }
.part-card small { font-size:.61rem; color:#8195a8; }
.part-card.sel { border-color:var(--balise); color:var(--balise); background:#d6f7350a; }
body[data-garage-tab=setup]:not(.advanced-tuning) .garage-bottom { bottom:218px; }
body[data-garage-tab=setup]:not(.advanced-tuning) .garage-orbit-hint { display:none; }
body[data-garage-tab=setup]:not(.advanced-tuning) .garage-category-rail { display:none; }
.advanced-tuning .workshop-panel { display:none; }
.advanced-tuning .garage-category-rail { right:280px; left:calc(var(--side-w) + 12px); }
.part-locked { opacity:.5; }.field-unlock { color:#efc06a; font-size:.68rem; margin:6px 0 0; }.field-unlock[hidden] { display:none; }
.laboratory { border:1px solid #ffffff1c; padding:8px; margin:10px 0; }.laboratory summary { cursor:pointer; font-size:.75rem; color:#a2b4c6; }.laboratory .input-setting { font-size:.75rem; }
.title-screen { background:linear-gradient(90deg,#070c14ed 0%,#08111cbe 30%,#09111a25 65%,transparent); }
.title-intro { font-style:normal; }.title-edition { color:#cde3f0; }
.title-menu .menu-item { clip-path:none; border-radius:3px; min-width:250px; font-style:normal; text-transform:uppercase; letter-spacing:.04em; background:#0e1a29cf; font-size:1.35rem; padding:14px 20px; border:1px solid #ffffff24; }
.title-menu .menu-item::before,.title-menu .menu-item::after { display:none; }
.title-menu .menu-item.primary { background:var(--balise); color:var(--balise-ink); font-size:1.7rem; border-color:var(--balise); }
.options-shell { background:#0c1622f5; border:1px solid #ffffff24; }.options-nav button.sel { color:var(--balise); border-color:var(--balise); }
:focus-visible { outline:2px solid var(--balise); outline-offset:3px; }
@container (max-width:1050px) { .part-detail { width:230px; }.build-performance { width:200px; }.garage-camera-tools { right:235px; }.part-cards .part-card { flex-basis:110px; } }
html.compact { --side-w:clamp(240px,30cqw,280px); }
html.compact .garage-identity { left:calc(var(--side-w) + 12px); top:10px; max-width:calc(100% - var(--side-w) - 200px); }
html.compact .plate h1 { font-size:1.2rem; padding:0; }.plate-number { padding-right:8px; }
html.compact #garageCarMeta { font-size:.6rem; }
html.compact .build-performance { right:10px; top:54px; width:162px; padding:10px; }
html.compact .build-performance h2 { font-size:.9rem; margin:4px 0 7px; }
html.compact .build-stat { padding:5px 0; gap:0 3px; }
html.compact .build-stat strong { font-size:1.15rem; }.build-stat span { font-size:.62rem; }.build-stat small { font-size:.53rem; }
html.compact .build-stat:last-child { display:none; }
html.compact .performance-note { font-size:.5rem; margin:5px 0; }
html.compact #buildPreviewState { font-size:.45rem; letter-spacing:.03em; }
html.compact .build-performance .workshop-primary { padding:6px; font-size:.83rem; }
html.compact .garage-camera-tools { right:186px; top:12px; width:116px; }
html.compact .view-buttons { grid-template-columns:repeat(3,1fr); }
html.compact .view-buttons button { padding:4px; font-size:.6rem; }
html.compact .garage-bottom { right:10px; bottom:9px; }
html.compact .garage-drive { font-size:1rem; min-width:162px; padding:8px 12px; }
html.compact .garage-drive small { display:none; }
html.compact .workshop-dock { left:10px; right:10px; bottom:8px; height:116px; padding:5px 8px; }
html.compact .part-categories { padding-bottom:4px; gap:2px; }.part-categories button { font-size:.61rem; padding:4px 8px; }
html.compact .part-cards { padding:5px 0 0; gap:5px; }.part-card { flex-basis:90px; }
html.compact .part-card { min-height:73px; flex-basis:96px; padding:5px; gap:2px; }.part-card svg { height:25px; width:25px; }.part-card b { font-size:.76rem; }.part-card small { font-size:.5rem; }
html.compact .part-detail { left:10px; top:8px; bottom:132px; width:210px; padding:9px; }
html.compact .part-detail-icon { display:none; }.part-detail h2 { font-size:1.6rem; }
html.compact .part-detail h2 { font-size:1.15rem; margin:0 0 3px; }
html.compact .part-detail .section-kicker { display:none; }
html.compact #partDescription { font-size:.62rem; margin:0 0 6px; line-height:1.2; }
html.compact .part-tiers { grid-template-columns:1fr 1fr; gap:4px; margin-bottom:6px; }.part-tier { padding:5px 6px; font-size:.8rem; }
html.compact .part-detail .workshop-primary,html.compact .part-detail .workshop-secondary { padding:6px; font-size:.8rem; margin-top:4px; }
html.compact .part-unlocks { display:none; }.part-detail .workshop-back { padding-top:8px; }
html.compact .part-detail .workshop-back { font-size:.7rem; padding-top:6px; }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .garage-identity { left:236px; max-width:calc(100% - 440px); }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .garage-bottom { bottom:135px; }
html.compact .garage-orbit-hint { display:none; }
.workshop-dock::after { content:'LB / RB · Catégories     A / Entrée · Choisir     B / Échap · Retour     Stick droit · Vue'; position:absolute; right:16px; top:19px; color:#8c9eaf; font-size:.62rem; pointer-events:none; }
html.compact body.garage-open #sidebarToggle { display:block; padding:6px 9px; font-size:.8rem; }
html.compact .header-right { gap:4px; }
html.compact .route-chip b { max-width:72px; font-size:.8rem; }
html.compact #garageOptionsBtn { font-size:.8rem; padding:6px 9px; }
html.compact .garage-bottom { display:none; }
html.compact .workshop-dock::after { display:none; }
html.compact .build-stat { padding:4px 0; line-height:1.05; }
html.compact .build-stat strong { line-height:1.05; font-size:1.08rem; }
html.compact .build-stat small { line-height:1.05; font-size:.48rem; }
html.compact .build-stat span { line-height:1.05; }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .build-performance h2 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin:4px 0; font-size:.85rem; }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .performance-note { display:none; }
@container (max-height:350px) {
 .part-detail { width:190px !important; padding:7px !important; }
 #partDescription { display:none; }
 .part-detail h2 { font-size:.95rem !important; line-height:1; margin:0 0 3px !important; }
 .part-tiers { gap:3px !important; margin-bottom:3px !important; }
 .part-tier { padding:4px 5px !important; line-height:1.1; font-size:.75rem !important; }
 .part-detail .workshop-primary,.part-detail .workshop-secondary { padding:5px 6px !important; margin-top:2px !important; line-height:1.1; font-size:.73rem !important; }
 .part-detail .workshop-back { display:none; }
 body[data-garage-tab=setup] .garage-identity,body[data-garage-tab=setup] .garage-camera-tools { display:none; }
 .side-nav button { padding-inline:7px !important; font-size:.86rem !important; }
 .header .route-chip { display:none; }
}
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .build-performance { width:152px; padding:8px; }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) #buildPreviewState { font-size:.42rem; line-height:1; margin-bottom:2px; }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .build-performance h2 { font-size:.75rem; line-height:1; margin:2px 0; }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .build-stat { padding:3px 0; }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .build-stat strong { font-size:1rem; line-height:1; }
html.compact body[data-garage-tab=setup]:not(.advanced-tuning) .build-stat small { font-size:.45rem; line-height:1; }
