* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}
body {
    overflow: hidden;
    color: #e0e0e0;
    background-color: #0a0a0a;
}
.hidden { display: none !important; }
#loader {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #050505;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader-text {
    color: #555;
    letter-spacing: 4px;
    margin-bottom: 30px;
    font-size: 1.2rem;
}
.starting-lights {
    display: flex;
    gap: 15px;
    background: #111;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #222;
}
.light {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #222;
    transition: background 0.2s, box-shadow 0.2s;
}
.light.red { background: #ff0000; box-shadow: 0 0 15px #ff0000; }
.light.green { background: #00ff00; box-shadow: 0 0 20px #00ff00; }
.garage-bg {
    position: absolute; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url('garage.jpg'); 
    background-size: cover; background-position: center;
    filter: blur(8px) brightness(0.3);
    z-index: 0;
}
.webgl { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1; outline: none; }
.cinematic-nav {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 20px 50px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 40;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}
.logo { font-size: 1.2rem; font-weight: 800; letter-spacing: 2px; }
.logo span { color: #888; font-weight: 400; }
.nav-links { display: flex; gap: 30px; }
.cam-btn {
    color: #aaa; text-decoration: none; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 1.5px; transition: color 0.3s;
}
.cam-btn:hover { color: #fff; }
#lines-svg { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 5; }
#lines-svg line { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1px; transition: opacity 0.3s; }
.target {
    position: absolute; width: 6px; height: 6px; background: #fff; border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15); transform: translate(-50%, -50%);
    z-index: 6; pointer-events: none; transition: opacity 0.3s;
}
.target.hidden { opacity: 0; }
.panel {
    position: absolute; z-index: 10; background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
    padding: 20px 25px; width: 280px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    cursor: pointer; transition: transform 0.4s, background 0.4s, border-color 0.4s;
}
.panel:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.08); border-color: #fff; }
.panel h3 { color: #fff; font-size: 1rem; font-weight: 500; margin-bottom: 8px; letter-spacing: 1px; text-transform: uppercase; }
.panel p { font-size: 0.85rem; color: #a0a0a0; font-weight: 300; }
.click-hint { display: block; margin-top: 10px; font-size: 0.75rem; color: #555; }
.panel-tl { top: 12%; left: 8%; }
.panel-bl { bottom: 12%; left: 8%; }
.panel-tr { top: 12%; right: 8%; text-align: right; }
.panel-br { bottom: 12%; right: 8%; text-align: right; }
#modal-container {
    position: fixed; 
    top: 0; 
    right: -600px;
    width: 550px; 
    max-width: 100vw; 
    height: 100vh;
    background: rgba(12, 12, 12, 0.95); 
    border-left: 2px solid #cc0000;
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    z-index: 100;
    top: 70px;
    height: calc(100vh - 70px);
    padding: 60px 40px 40px 40px;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0,0,0,0.8);
}
#modal-content::after {
    content: "";
    display: block;
    height: 40px;
}
#modal-container.open { right: 0; }
.modal-box { position: relative; width: 100%; height: 100%; }
#close-modal {
    position: absolute; 
    top: -45px; 
    left: -10px;
    z-index: 10; 
    background: none; 
    border: none;
    color: #888; 
    font-size: 1.5rem; 
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}
#close-modal:hover { color: #cc0000; transform: scale(1.2); }
#modal-content h2 { font-size: 1.8rem; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; color: #fff;}
#modal-content h3 { font-size: 1rem; color: #cc0000; margin-bottom: 25px; font-weight: 400; }
#modal-content p { font-size: 1rem; line-height: 1.7; color: #bbb; margin-bottom: 14px; }
#modal-content p.highlight { font-size: 1rem; color: #cc0000; margin-bottom: 25px; font-weight: 400; }
#modal-content strong { color: #fff; font-weight: 600; }

/* --- CRÉDITS DES MODÈLES 3D (obligatoires : licence CC BY 4.0) --- */
.credits {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    z-index: 15; font-size: 0.65rem; color: #555; letter-spacing: 0.3px;
    white-space: nowrap;
}
.credits a { color: #777; text-decoration: none; }
.credits a:hover { color: #fff; }
/* --- CRÉDITS DES MODÈLES 3D (obligatoires : licence CC BY 4.0) --- */
.credits {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    z-index: 15; font-size: 0.65rem; color: #555; letter-spacing: 0.3px;
    white-space: nowrap;
}
.credits a { color: #777; text-decoration: none; }
.credits a:hover { color: #fff; }

/* --- NAVIGATION QUAND UN ÉCRAN DU COCKPIT EST ZOOMÉ --- */
#screen-nav {
    position: fixed; left: 50%; bottom: 6%; transform: translateX(-50%);
    z-index: 30; display: flex; align-items: center; gap: 14px;
    padding: 10px 16px; border-radius: 999px;
    background: rgba(8, 12, 16, 0.75); border: 1px solid rgba(0, 210, 255, 0.35);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: #cfd8dc; font-size: 0.85rem; letter-spacing: 1px;
}
#screen-nav button {
    background: none; border: 1px solid rgba(0, 210, 255, 0.4); color: #00d2ff;
    border-radius: 999px; min-width: 38px; height: 38px; padding: 0 14px;
    font-size: 1rem; cursor: pointer; transition: background 0.2s, color 0.2s;
}
#screen-nav button:hover { background: #00d2ff; color: #04080c; }
#screen-nav #sn-close { font-size: 0.8rem; letter-spacing: 1px; margin-left: 8px; }

/* --- PAGE PLEIN ÉCRAN (quand on plonge dans un écran du cockpit) --- */
#screen-page {
    position: fixed; inset: 0; z-index: 25;
    display: flex; flex-direction: column;
    background: radial-gradient(ellipse at 50% 35%, #08161d 0%, #04080c 70%);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s;
    font-size: clamp(15px, 2.1vw, 30px);
}
#screen-page.visible { opacity: 1; visibility: visible; pointer-events: auto; }
#screen-page .sp-head {
    margin: clamp(70px, 11vh, 110px) auto 0; width: min(1000px, 86vw);
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 0.7em; border-bottom: 2px solid #00d2ff;
    color: #9fb3bd; font-weight: 700; letter-spacing: 3px; font-size: 0.8em;
}
#sp-dots { display: flex; gap: 10px; }
#sp-dots i { width: 0.6em; height: 0.6em; border-radius: 50%; background: rgba(255,255,255,0.2); display: block; }
#sp-dots i.on { background: #00d2ff; box-shadow: 0 0 10px #00d2ff; }
#sp-body {
    flex: 1; margin: 0 auto; width: min(1000px, 86vw);
    display: flex; flex-direction: column; justify-content: center;
    padding-bottom: 14vh; overflow-y: auto;
}
#sp-body.swap { animation: sp-in 0.45s ease both; }
@keyframes sp-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#sp-body .b-label { color: #789; letter-spacing: 3px; font-size: 0.8em; margin: 1.1em 0 0.4em; }
#sp-body .b-big { color: #00d2ff; font-size: 2.4em; line-height: 1.1; margin: 0.2em 0 0.25em; font-weight: 800; }
#sp-body .b-sub { color: #fff; font-size: 1.3em; margin-bottom: 0.4em; }
#sp-body .b-rule { border: 0; height: 2px; background: rgba(0,210,255,0.35); margin: 0.9em 0; }
#sp-body .b-text { color: #cfd8dc; font-size: 1.15em; margin: 0.35em 0; }
#sp-body .b-hi { color: #fff; font-size: 1.2em; margin: 0.35em 0; }
#sp-body .b-dim { color: #99a7ad; font-size: 1.05em; margin: 0.3em 0; }
#sp-body .b-small { color: #99a7ad; font-size: 0.9em; margin: 0.25em 0; }
#sp-body .b-bar { margin: 0.9em 0; }
#sp-body .b-bar-top { display: flex; justify-content: space-between; color: #cfd8dc; font-size: 1.05em; margin-bottom: 0.35em; }
#sp-body .b-bar-right { color: #789; }
#sp-body .b-track { height: 0.5em; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
#sp-body .b-fill { height: 100%; width: calc(var(--v) * 100%); background: linear-gradient(90deg, #0090b0, #00d2ff); border-radius: 99px;
    transform-origin: left; animation: sp-grow 0.9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 0.08s); }
@keyframes sp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#sp-body .b-chips { display: flex; flex-wrap: wrap; gap: 0.6em; margin: 0.4em 0 1em; }
#sp-body .b-chips span { padding: 0.35em 0.9em; border: 1px solid rgba(0,210,255,0.5); background: rgba(0,210,255,0.1); color: #00d2ff; font-size: 1em; }
