/* ============================================================
   Metro in Paris — simulateur de conduite du métro parisien
   ============================================================ */

:root{
  --bg:      #0d1117;
  --bg2:     #151b24;
  --ink:     #e8edf4;
  --muted:   #8b97a8;
  --edge:    #253040;
  --accent:  #ffcd00;
}

*{ box-sizing:border-box; }

html,body{
  margin:0; padding:0; height:100%;
  background:var(--bg);
  color:var(--ink);
  font-family:"Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
}

#app{ position:fixed; inset:0; }

.screen{ position:absolute; inset:0; display:none; }
.screen.active{ display:block; }

/* ------------------------------------------------------------
   Menus
   ------------------------------------------------------------ */

#screen-line, #screen-station{
  overflow-y:auto;
  background:
    radial-gradient(1100px 700px at 50% -10%, #1c2634 0%, transparent 60%),
    linear-gradient(180deg, #0d1117 0%, #0a0d12 100%);
}

.menu-inner{
  max-width:1220px;
  margin:0 auto;
  padding:min(3.5vh,28px) 24px 40px;
  text-align:center;
}

.logo{
  display:flex; align-items:center; justify-content:center; gap:18px;
  margin:0 0 6px; font-weight:700;
}
/* le M vient de img/logo.svg, source unique du logo */
.logo-m{
  width:64px; height:64px; border-radius:50%;
  display:block;
  box-shadow:0 0 0 6px rgba(255,255,255,.09);
}
.logo-word{
  font-size:clamp(30px,6vw,58px);
  letter-spacing:.16em;
}
.tagline{
  margin:0 0 20px; color:var(--muted);
  letter-spacing:.24em; font-size:12px; text-transform:uppercase;
}

.step{
  font-size:15px; font-weight:600; letter-spacing:.18em;
  text-transform:uppercase; color:var(--muted);
  margin:0 0 14px;
}

/* --- choix de la ligne --- */
.line-choice{
  display:flex; flex-wrap:wrap; gap:6px 18px;
  justify-content:center; margin-bottom:18px;
}
.line-card{
  border:0; background:transparent; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:8px 6px; border-radius:16px; width:176px;
  transition:transform .18s ease, background .18s ease;
}
.line-card:hover{ transform:translateY(-6px); background:rgba(255,255,255,.04); }
.roundel{
  width:74px; height:74px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:39px; font-weight:800; line-height:1;
  box-shadow:0 10px 24px rgba(0,0,0,.55), inset 0 -6px 18px rgba(0,0,0,.22);
}
.roundel.small{ font-size:23px; letter-spacing:-.02em; }

/* --- lignes annoncées mais non exploitées --- */
.soon-step{ margin-top:6px; color:#4d5a6a; }
.line-card.soon{ cursor:default; opacity:.72; }
.line-card.soon:hover{ transform:none; background:transparent; }
.line-card.soon .roundel{
  filter:grayscale(.45); box-shadow:0 6px 16px rgba(0,0,0,.45);
}
.line-card.soon .line-ends b{ color:#8b97a8; font-weight:500; }
.works{
  display:inline-flex; align-items:center; gap:7px;
  margin-top:8px; padding:4px 10px 4px 7px; border-radius:5px;
  font-size:10.5px; font-weight:700; letter-spacing:.04em;
  color:#f2c53d; background:rgba(240,192,0,.09);
  border:1px solid rgba(240,192,0,.32);
  text-transform:uppercase;
}
/* petite barrière de chantier, à gauche du libellé */
.works::before{
  content:''; flex:0 0 auto; width:11px; height:13px; border-radius:2px;
  background:repeating-linear-gradient(45deg,
    #f0c000 0 4px, #262626 4px 8px);
}
.line-card:hover .roundel{ box-shadow:0 16px 40px rgba(0,0,0,.65), 0 0 0 8px rgba(255,255,255,.07); }
.line-ends{
  color:var(--muted); font-size:11px; line-height:1.45; max-width:166px;
}
.line-ends b{ color:var(--ink); font-weight:600; }
.line-ends .meta{ color:#5d6a7c; font-size:11px; }
.line-ends .tag{
  display:inline-block; margin-top:6px; padding:2px 8px; border-radius:99px;
  background:rgba(120,190,255,.14); color:#8ecbff;
  font-size:10px; letter-spacing:.06em; text-transform:uppercase;
}

/* --- choix du terminus --- */
#line-badge-wrap{ margin-bottom:26px; }
.line-badge{
  display:inline-flex; align-items:center; gap:12px;
  padding:8px 18px 8px 8px; border-radius:99px;
  background:rgba(255,255,255,.06);
}
.line-badge .dot{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:22px;
}
.line-badge .dot.small{ font-size:14px; }
.line-badge span.txt{ font-size:13px; letter-spacing:.12em; color:var(--muted); text-transform:uppercase; }

.terminus-choice{
  display:flex; flex-wrap:wrap; gap:22px; justify-content:center;
}
.term-card{
  cursor:pointer; border:1px solid var(--edge); background:var(--bg2);
  border-radius:16px; padding:26px 30px; min-width:300px; max-width:380px;
  text-align:left; color:var(--ink);
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}
.term-card:hover{ transform:translateY(-4px); border-color:#41546e; background:#1a212c; }
.term-card .kicker{
  font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--muted);
}
.term-card .name{ font-size:25px; font-weight:700; margin:8px 0 12px; line-height:1.15; }
.term-card .dir{ font-size:13px; color:var(--muted); }
.term-card .dir b{ color:var(--accent); font-weight:600; }
.term-card .via{ margin-top:8px; font-size:11.5px; color:#5d6a7c; }

.back-btn{
  margin-top:38px; background:none; border:0; cursor:pointer;
  color:var(--muted); font-size:13px; letter-spacing:.06em;
}
.back-btn:hover{ color:var(--ink); }

.hint{ color:#5d6a7c; font-size:12px; margin-top:8px; }

/* --- interrupteur d'option --- */
.switch{
  display:inline-flex; align-items:flex-start; gap:14px; cursor:pointer;
  max-width:520px; text-align:left; padding:14px 20px; border-radius:14px;
  border:1px solid var(--edge); background:rgba(255,255,255,.02);
  transition:border-color .18s ease, background .18s ease;
}
.switch:hover{ border-color:#41546e; background:rgba(255,255,255,.045); }
.switch input{ position:absolute; opacity:0; width:0; height:0; }
.switch .track{
  flex:0 0 auto; width:42px; height:24px; border-radius:99px; margin-top:1px;
  background:#2b3542; position:relative;
  transition:background .2s ease;
}
.switch .knob{
  position:absolute; top:3px; left:3px; width:18px; height:18px;
  border-radius:50%; background:#8b97a8;
  transition:transform .2s ease, background .2s ease;
}
.switch input:checked + .track{ background:var(--accent); }
.switch input:checked + .track .knob{ transform:translateX(18px); background:#12161c; }
.switch input:focus-visible + .track{ box-shadow:0 0 0 3px rgba(255,205,0,.35); }
.switch-text b{ display:block; font-size:13.5px; font-weight:600; color:var(--ink); }
.switch-sub{
  display:block; margin-top:4px; font-size:11.5px; line-height:1.55; color:#5d6a7c;
}

/* ------------------------------------------------------------
   Jeu
   ------------------------------------------------------------ */

#screen-game{ background:#05070a; }

#cv{
  position:absolute; top:50%; left:50%;
  transform:translate(-50%,-50%);
  display:block;
  touch-action:none;
  cursor:default;
  background:#05070a;
}

#hud-top{
  position:absolute; top:12px; right:14px;
  display:flex; gap:8px; z-index:5;
}
.mini-btn{
  width:34px; height:34px; border-radius:8px; cursor:pointer;
  background:rgba(20,26,35,.82); color:#9fb0c4;
  border:1px solid rgba(255,255,255,.12);
  font-size:15px; line-height:1;
}
.mini-btn:hover{ color:#fff; background:rgba(38,48,64,.92); }
.mini-btn.off{ color:#5a6575; text-decoration:line-through; }

.overlay-panel{
  display:none;
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  z-index:8; width:min(440px,88vw);
  background:rgba(14,19,26,.97);
  border:1px solid var(--edge); border-radius:16px;
  padding:28px 30px; text-align:center;
  box-shadow:0 30px 80px rgba(0,0,0,.7);
}
.overlay-panel.show{ display:block; }
.overlay-panel h3{
  margin:0 0 10px; font-size:13px; letter-spacing:.22em;
  text-transform:uppercase; color:var(--muted);
}
.overlay-panel p{ margin:0 0 22px; font-size:21px; font-weight:600; }

.big-btn{
  display:block; width:100%; margin:0 0 10px; cursor:pointer;
  padding:13px 18px; border-radius:10px; border:0;
  background:var(--accent); color:#12161c;
  font-size:14px; font-weight:700; letter-spacing:.05em;
}
.big-btn:hover{ filter:brightness(1.08); }
.ghost-btn{
  display:block; width:100%; cursor:pointer;
  padding:11px 18px; border-radius:10px;
  border:1px solid var(--edge); background:transparent; color:var(--muted);
  font-size:13px;
}
.ghost-btn:hover{ color:var(--ink); border-color:#41546e; }

.keys{ list-style:none; margin:0 0 16px; padding:0; text-align:left; }
.keys li{
  font-size:13.5px; color:var(--muted);
  padding:7px 0; border-bottom:1px solid rgba(255,255,255,.06);
}
.keys li b{ color:var(--ink); font-weight:600; display:inline-block; min-width:96px; }
.overlay-panel .small{
  font-size:12px; font-weight:400; color:#6e7d90; line-height:1.6; margin-bottom:18px;
}
