/* style.css — ambiance ZX81 : monospace, majuscules, angles droits */

body {
    margin: 0;
    overflow: hidden;
    background: #050505;
    font-family: "Courier New", Courier, monospace;
}

.hidden-canvas {
    display: none;
}

#ui-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.88);
    padding: 18px;
    border: 2px solid #ffffff;
    border-radius: 0;
    width: 300px;
    box-shadow: 6px 6px 0 rgba(255, 255, 255, 0.15);
    line-height: 1.5;
    user-select: none;
}

#ui-panel h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid #444;
    padding-bottom: 6px;
}

.control-group {
    margin-bottom: 10px;
}

label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
}

select,
button {
    background: #000;
    color: white;
    border: 1px solid #fff;
    padding: 6px 10px;
    border-radius: 0;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    text-transform: uppercase;
}

select:hover,
button:hover {
    background: #fff;
    color: #000;
}

button {
    width: 100%;
    margin-top: 8px;
    font-weight: bold;
}

input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
}

input[type="range"] {
    width: 110px;
    cursor: pointer;
}

#step-counter {
    font-size: 14px;
    background: #ffffff;
    color: #000000;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    padding: 4px 0;
    letter-spacing: 1px;
}

#info {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.88);
    padding: 15px;
    border: 2px solid #ffffff;
    border-radius: 0;
    max-width: 360px;
    line-height: 1.4;
    pointer-events: none;
    user-select: none;
}

#info h3 {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 13px;
    text-transform: uppercase;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

kbd {
    background: #000;
    border: 1px solid #fff;
    padding: 2px 6px;
    border-radius: 0;
    font-weight: bold;
    font-family: inherit;
}

#raycastCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background: #000;
    display: none;
    z-index: 40;
    pointer-events: none;
}

#ui-panel,
#info {
    z-index: 100;
}

#raycastCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background: #000;
    display: none;
    z-index: 40;
    pointer-events: none;
}

#raycastCanvas.active {
    display: block;
}

/* Scanlines par-dessus, sans bloquer les interactions */
body.raycast-on::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 45;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.18) 0px,
        rgba(0, 0, 0, 0.18) 1px,
        transparent 1px,
        transparent 3px
    );
}

#ui-panel, #info { z-index: 100; }


#fps-counter {
    position: fixed;
    right: 12px;
    bottom: 12px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.35);
    font-family: "Courier New", monospace;
    font-size: 11px;
    padding: 2px 8px;
    z-index: 120;
    pointer-events: none;
    user-select: none;
}

#minimapCanvas {
    position: fixed;
    left: 10px;
    top: 220px; /* valeur de repli ; la position réelle est fixée par JS */
    width: 176px;
    height: 176px;
    z-index: 60;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: #000;
    display: none;
}

.group-label {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

#cameraGroup.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.seg{ display:flex; gap:4px; flex-wrap:wrap; }
.seg-btn{ flex:1; min-width:0; width:auto; margin-top:0; background:#222; color:#ccc;
    border:1px solid #555; padding:6px 4px; border-radius:0; cursor:pointer;
    font-size:12px; font-family:inherit; text-transform:uppercase; letter-spacing:1px; }
.seg-btn:hover{ background:#333; color:#fff; }
.seg-btn.active{ background:#fff; color:#000; border-color:#fff; font-weight:bold; }
.group-label{ font-size:11px; letter-spacing:2px; text-transform:uppercase;
    color:rgba(255,255,255,0.6); margin-bottom:4px; }
#cameraGroup.disabled{ opacity:0.35; pointer-events:none; }
#raycastCanvas{ display:block; background:transparent; transition:opacity 0.25s ease; }
#minimapCanvas{ background:transparent; border:none; }
#step-counter{ position:relative; overflow:hidden; cursor:pointer; }
#progress-fill{ position:absolute; left:0; top:0; bottom:0; width:0%; background:#00cc44; opacity:0.35; }
#step-text{ position:relative; z-index:1; }
#scannerCanvas{ position:fixed; left:10px; bottom:10px; z-index:120; pointer-events:none; opacity:0.75; }

#fxCanvas{ position:fixed; top:0; left:0; width:100vw; height:100vh;
    z-index:70; pointer-events:none; }
#ui-panel{ z-index:100; }
#info{ z-index:100; }
