:root {
  --bg: #0b1019;
  --panel: #0f1626;
  --panel-2: #16203a;
  --line: #313d53;
  --lime: #c6f432;
  --lime-dark: #9fc41f;
  --white: #f4f6fb;
  --muted: #9aa6c0;
  --red: #ff5a5a;
  --amber: #ffb53b;
  --radius: 14px;
  --mono: "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(ellipse at 75% 0, #192738 0, transparent 44rem), var(--bg);
  color: var(--white);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
}

button { font: inherit; }

/* ---------- Barre du haut ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px clamp(12px, 3vw, 32px);
  background: #050810;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { height: 42px; width: auto; border-radius: 6px; }
.brand-title { font-weight: 700; font-size: 18px; }
.brand-sub { color: var(--lime); font-size: 14px; }

.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.steps li {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.steps li.done { color: var(--lime); border-color: var(--lime-dark); }
.steps li.current { background: var(--lime); color: #000; border-color: var(--lime); font-weight: 700; }

.score-box { display: flex; align-items: center; gap: 12px; }
.team { overflow-wrap: anywhere; color: var(--muted); font-size: 15px; }
.score {
  flex-shrink: 0;
  background: var(--panel-2);
  border: 1px solid var(--lime-dark);
  color: var(--lime);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--mono);
}

.fiction-banner {
  background: #1a1405;
  color: var(--amber);
  text-align: center;
  font-size: 14px;
  padding: 6px 16px;
  border-bottom: 1px solid #3a2c0a;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid #9abbfb; outline-offset: 3px; }
#app:focus { outline: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.muted { color: var(--muted); }
.lime { color: var(--lime); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 10px;
  border: 2px solid var(--lime);
  background: var(--lime);
  color: #000;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: #d8ff5c; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--lime); }
.btn.ghost:hover { background: rgba(198, 244, 50, .1); }
.btn:focus-visible, .spot:focus-visible, .card:focus-visible, .event:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; align-items: center; }

/* ---------- Écran d'alerte ---------- */
.alert-hero {
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  background: linear-gradient(125deg, #202a3d, var(--panel) 70%);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 56px);
}
.alert-hero h1 {
  font-size: clamp(2rem, 5.5vw, 4rem);
  letter-spacing: -.04em;
  margin-bottom: 24px;
}
.alert-hero p { max-width: 62ch; }
.alert-hero p:last-child { margin-bottom: 0; }
.alert-tag {
  color: var(--amber);
  font-family: var(--mono);
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.start-panel { margin-top: 20px; }
.start-panel form { align-items: end; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a0f1c;
  color: var(--white);
  font: inherit;
}

/* ---------- Enquête ---------- */
.investigate-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.progress {
  font-family: var(--mono);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 10px;
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--white);
  cursor: pointer;
}
.tab[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }
.tab .count { font-family: var(--mono); color: var(--muted); margin-left: 6px; }

.scene-help { color: var(--muted); margin-bottom: 12px; }

.spot {
  cursor: zoom-in;
  border-radius: 6px;
  position: relative;
  transition: background .15s;
}
.terminal .spot:hover { background: rgba(198, 244, 50, .12); }
.terminal .spot.found { background: rgba(198, 244, 50, .18); }
.desk-scene .spot:hover { filter: brightness(1.15); box-shadow: 0 0 0 3px rgba(198, 244, 50, .5); }
.spot.found {
  outline: 3px solid var(--lime);
}
.spot.found::after {
  content: "✓";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  color: #000;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.spot.hinted { outline: 3px dashed var(--amber); outline-offset: 3px; }
.spot.nothing { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* Scène courriel */
.mail {
  background: #f4f6fb;
  color: #1b2233;
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.mail-bar { background: #dfe4ee; padding: 10px 16px; font-size: 14px; color: #4a556e; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.mail-head { padding: 18px 22px 8px; border-bottom: 1px solid #d5dbe6; }
.mail-head div { margin-bottom: 6px; }
.mail-body { padding: 18px 22px 26px; }
.mail-body .spot, .mail-head .spot { padding: 1px 3px; }
.mail .spot:hover { background: rgba(80, 110, 0, .15); }
.mail .spot:focus-visible { outline-color: #2457d6; }
.mail .spot.found { background: rgba(198, 244, 50, .55); outline-color: #6f8f00; }
.mail-body .fake-btn {
  display: inline-block;
  background: #2457d6;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  margin: 8px 0;
}
.mail .fake-btn:hover, .mail .fake-btn.found { background: #1e439f; }
.link-preview {
  font-family: var(--mono);
  font-size: 13px;
  color: inherit;
  font-weight: 400;
  display: inline-block;
}

/* Scène journal */
.terminal {
  background: #03060c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 15px;
  overflow: hidden;
}
.terminal-bar { background: #0d1424; padding: 8px 14px; color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.terminal-body { padding: 14px; overflow-x: auto; }
.log-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.log-table th { text-align: left; color: var(--lime); font-weight: 400; padding: 6px 10px; border-bottom: 1px dashed var(--line); }
.log-table td { padding: 8px 10px; color: #cfe3a0; border-bottom: 1px solid #0d1424; }
.log-table tr.spot td:first-child { border-radius: 6px 0 0 6px; }
.log-table tr.spot.found::after { top: 6px; right: 6px; }
.prompt-line { color: var(--muted); margin-bottom: 8px; }

/* Scène bureau */
.desk-scene {
  position: relative;
  height: 470px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 21% 40%, #ffcd8b25, transparent 53%),
    repeating-linear-gradient(1deg, transparent 0 28px, #2d130c33 30px 31px) bottom / 100% 42% no-repeat,
    linear-gradient(#192b43 0 58%, #b07852 58% 60%, #7a4d36 60% 100%);
}
.desk-scene .spot { position: absolute; }
.monitor {
  left: 28%; top: 6%; width: 44%; height: 50%;
  background: #111827;
  border: 10px solid #1f2937;
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
}
.monitor-screen { background: #e9eef8; color: #1b2233; height: 100%; border-radius: 4px; padding: 10px; font-size: 13px; }
.monitor-screen .session { background: #2457d6; color: #fff; border-radius: 4px; padding: 4px 8px; display: inline-block; margin-bottom: 8px; }
.monitor-stand { position: absolute; left: 46%; top: 56%; width: 8%; height: 7%; background: #1f2937; }
.postit {
  left: 64%; top: 10%; width: 120px; height: 110px;
  background: #ffe866; color: #333;
  transform: rotate(6deg);
  padding: 10px;
  font-family: "Comic Sans MS", "Segoe Print", cursive;
  font-size: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .35);
}
.notebook {
  left: 6%; top: 66%; width: 180px; height: 120px;
  background: #b91c1c; color: #fff;
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .35);
}
.notebook small { display: block; opacity: .85; }
.desk-scene .usb, .desk-scene .mug, .desk-scene .plant {
  text-align: center;
}
.desk-scene .spot img {
  display: block;
  width: 100%;
  transition: transform .2s ease;
  filter: drop-shadow(4px 11px 6px #10101a80);
}
.desk-scene .spot:hover img, .desk-scene .spot:focus-visible img {
  transform: translateY(-5px) rotate(-3deg);
}
.usb { left: 66%; top: 76%; width: min(17%, 156px); }
.usb small { display:inline-block; padding: 3px 7px; margin-top: 3px; border-radius: 4px; background: #f1dfbb; color: #302415; line-height: 1.15; }
.mug { right: 4%; top: 54%; width: min(12%, 116px); }
.plant { left: 5%; bottom: 42%; width: min(18%, 173px); }
.phone {
  left: 40%; top: 72%; width: 70px; height: 110px;
  background: #111827;
  border: 4px solid #374151;
  border-radius: 12px;
  color: #fff; font-size: 11px; padding: 8px 6px; text-align: center;
}

/* ---------- Fenêtre d'explication ---------- */
.modal {
  background: var(--panel);
  color: var(--white);
  border: 2px solid var(--lime);
  border-radius: var(--radius);
  padding: 26px;
  width: min(520px, calc(100% - 32px));
}
.modal::backdrop { background: rgba(0, 0, 0, .75); }
.modal .points { font-family: var(--mono); color: var(--lime); font-weight: 700; font-size: 20px; margin-bottom: 8px; }
.modal.bad { border-color: var(--red); }
.modal.bad .points { color: var(--red); }

/* ---------- Défense ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.card {
  text-align: left;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--white);
  cursor: pointer;
  min-height: 130px;
  display: flex; flex-direction: column; gap: 8px;
}
.card:hover { border-color: var(--muted); }
.card[aria-pressed="true"] { border-color: var(--lime); background: #18240a; }
.card .card-title { font-weight: 700; font-size: 18px; }
.card .card-text { color: var(--muted); font-size: 15px; }
.card.good { border-color: var(--lime); }
.card.bad { border-color: var(--red); }
.card .verdict { font-size: 14px; margin-top: auto; }
.card.good .verdict { color: var(--lime); }
.card.bad .verdict { color: var(--red); }
.card:disabled { cursor: default; }

/* ---------- Chronologie ---------- */
.timeline-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.event-pool, .event-slots { display: flex; flex-direction: column; gap: 10px; }
.event {
  text-align: left;
  font-family: var(--mono);
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #03060c;
  color: #cfe3a0;
  cursor: pointer;
}
.event:hover { border-color: var(--lime); }
.slot {
  min-height: 50px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--muted);
  display: flex; gap: 10px; align-items: center;
}
.slot.filled { text-align: left; cursor: pointer; border-style: solid; color: #cfe3a0; background: #03060c; }
.slot.filled:disabled { cursor: default; }
.slot-verdict { display: block; margin-top: 3px; color: var(--muted); }
.slot.right { border-color: var(--lime); }
.slot.wrong { border-color: var(--red); }
.slot .n { color: var(--lime); font-weight: 700; }

.console-out {
  font-family: var(--mono);
  background: #03060c;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
  color: #cfe3a0;
  white-space: pre-wrap;
  min-height: 60px;
}

/* ---------- Défi final ---------- */
.final-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; margin: 20px 0; }
.notebook-panel { margin: 16px 0; }
.notebook-panel summary { cursor: pointer; font-weight: 700; color: var(--lime); }
.notebook-panel[open] summary { margin-bottom: 16px; }
.notebook-panel dl { margin: 0 0 16px; }
.notebook-panel dt { font-weight: 600; }
.notebook-panel dd { margin: 0 0 8px; color: var(--muted); }
.presentation-panel textarea { display: block; resize: vertical; margin-bottom: 16px; }
.presentation-panel textarea:last-child { margin-bottom: 0; }
.rubric { border: 0; padding: 0; margin: 16px 0; }
.rubric legend { padding: 0; font-weight: 700; }
.rubric label { display: flex; gap: 8px; align-items: baseline; font-weight: 400; }
.rubric input { accent-color: var(--lime); }
.score-detail { margin-top: 12px; }
.leaderboard { overflow-wrap: anywhere; }
.big-score { font-family: var(--mono); font-size: 56px; color: var(--lime); font-weight: 700; line-height: 1; }
.rank { font-size: 22px; font-weight: 700; margin-top: 8px; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 12px; }
.rule { background: var(--panel-2); border-left: 4px solid var(--lime); padding: 14px; border-radius: 8px; }

.leaderboard { width: 100%; border-collapse: collapse; margin-top: 8px; }
.leaderboard td, .leaderboard th { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.leaderboard th { color: var(--muted); font-weight: 400; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  visibility: hidden;
  width: max-content;
  max-width: calc(100% - 24px);
  transform: translateX(-50%) translateY(120px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 10px;
  transition: transform .25s;
  z-index: 60;
}
.toast.show { visibility: visible; transform: translateX(-50%) translateY(0); }

@media (max-width: 700px) {
  h1 { font-size: 28px; }
  .desk-scene { height: 600px; background: linear-gradient(#27384c 0 55%, #ae7953 55% 57%, #794d38 57% 100%); }
  .monitor { left: 6%; top: 3%; width: 88%; height: 34%; }
  .monitor-stand { top: 37%; height: 5%; }
  .postit { left: auto; right: 5%; top: 40%; width: 104px; }
  .plant { left: 43%; top: 47%; bottom: auto; width: min(21%, 97px); }
  .notebook { left: 4%; top: 42%; width: min(44%, 150px); height: auto; }
  .phone { left: 8%; top: 72%; }
  .usb { left: auto; right: 7%; top: 78%; width: min(34%, 120px); }
  .mug { left: auto; right: 12%; top: 63%; width: min(17%, 68px); }
  .steps { order: 1; width: 100%; }
  main { padding-inline: 12px; }
  .panel { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.campus-art { display:block; width:100%; image-rendering:auto; margin-top:16px; border-radius:8px; }
.campus-map { display:grid; grid-template-columns:repeat(3,1fr); background: url("assets/ecole-salles-coherentes.png") center top / 100% auto no-repeat, #202b40; image-rendering:auto; border:2px solid #53637c; border-radius:12px; overflow:hidden; }
.room-door { display:flex; flex-direction:column; align-items:center; justify-content:end; padding: min(31vw,322px) 4px 14px; background:transparent; color:white; cursor:pointer; border:0; transition:background .18s; }
.room-door:hover,.room-door:focus-visible { background:#bcff671a; box-shadow:inset 0 0 0 3px var(--lime); }
.room-door strong,.room-door small { background:#141f30; padding:2px 6px; border-radius:4px; }
.room-door small { color:var(--lime); }
.map-back { background:transparent; border:0; padding:4px 0 14px; color:var(--lime); cursor:pointer; }
#scene { animation:enter-room .24s ease-out; }
@keyframes enter-room { from { opacity:.45; transform:translateY(5px); } }
@media(max-width:600px){.room-door strong,.room-door small {font-size:.75rem;}}

/* Les salles partagent le même décor sur l’accueil et la carte. */
.alert-hero { position:relative; isolation:isolate; overflow:hidden; min-height:clamp(280px,32vw,410px); display:flex; flex-direction:column; justify-content:flex-end; padding:clamp(20px,4vw,42px); border:1px solid #41516a; }
.alert-hero::before { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(0deg,#08101a 0%,rgba(8,16,26,.9) 13%,rgba(8,16,26,.28) 62%,transparent); }
.alert-hero .campus-art { position:absolute; inset:0; z-index:-2; width:100%; height:100%; object-fit:cover; margin:0; border-radius:0; }
.alert-hero h1 { margin-bottom:8px; text-shadow:0 2px 16px #071019; }
.alert-hero .alert-tag { margin:0 0 6px; }
.campus-map { background-size:100% 100%; }
.room-door { justify-content:flex-end; align-items:stretch; padding:clamp(95px,27vw,300px) 8px 12px; background:linear-gradient(0deg,#091425,transparent 36%); border-right:1px solid #ffffff28; }
.room-door:last-child { border-right:0; }
.room-door strong,.room-door small { background:transparent; text-shadow:0 1px 5px #000; }
.room-door:hover,.room-door:focus-visible { background:linear-gradient(0deg,#162b30,transparent 52%); }
.room-door strong { font-size:clamp(.85rem,2vw,1.35rem); line-height:1.15; }
.room-door small { font: .8rem var(--mono); }
.cards .card { position:relative; overflow:hidden; background:linear-gradient(135deg,#1b2a3e,#111a29); }
.cards .card::before { content:""; display:block; width:24px; height:5px; border-radius:3px; background:#7287a4; }
.cards .card[aria-pressed="true"]::before { background:var(--lime); }
.mail, .terminal, .desk-scene { box-shadow:0 16px 38px #02081455; }
.toast { border-color:var(--lime-dark); box-shadow:0 8px 30px #0008; }
@media(max-width:600px){.room-door{padding-inline:2px}.room-door small{font-size:.68rem}.alert-hero{min-height:270px}}

.guide {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 9px 14px 9px 9px;
  border: 1px solid #3a526b;
  border-radius: 14px;
  background: linear-gradient(110deg,#1b3543,#172336 65%);
  animation: enter-room .24s ease-out;
}
.guide-portrait {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
  object-position: bottom;
  background: #315762;
  border-radius: 10px;
}
.guide-copy strong { color: #a3efd7; }
.guide-copy p { margin: 1px 0 0; line-height: 1.35; }
.voice {
  padding: 7px 10px;
  border: 1px solid #638499;
  border-radius: 7px;
  background: #152738;
  color: #fff;
  cursor: pointer;
}
.voice[aria-pressed="true"] { border-color: #a3efd7; }
.guide:has(.voice[aria-pressed="true"]) .guide-portrait { animation: guide-speaking .52s ease-in-out infinite alternate; }
@keyframes guide-speaking { to { transform: translateY(-2px) rotate(-2deg); } }
.cards .card::before { display: none; }
.card-icon { font-size: 1.65rem; line-height: 1.15; }
@media (max-width: 510px) {
  .guide { grid-template-columns: 49px 1fr; gap: 7px 10px; }
  .guide-portrait { width: 49px; height: 49px; }
  .voice { grid-column: 2; justify-self: start; min-height: 36px; font-size: .82rem; }
}

.guide-portrait {
  object-position: center;
  background: #2c505e;
  border: 1px solid #5d8d94;
}
.desk-scene .postit { transform: rotate(5deg); }
.desk-scene .notebook {
  background: linear-gradient(90deg, #3c2330 0 7px, #7b3448 7px);
  border: 2px solid #451f32;
  border-radius: 3px 10px 10px 3px;
}
.desk-scene .monitor { border-color: #182233; }
.desk-scene .monitor-screen { border: 2px solid #3b5574; background: #dcecf2; }
.desk-scene .monitor-screen .session { background: #275369; }

.deduction-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.deduction-grid .card { display:grid; place-items:center; align-content:center; text-align:center; min-height:108px; }
.deduction-grid .card span { font-size:2rem; }
.deduction-feedback { min-height:1.5em; margin-top:12px; }
.deduction-grid .good { border-color:#9de8bc; }
.deduction-grid .bad { border-color:#e9ae72; }
.log-table { min-width:0; overflow-wrap:anywhere; }
.log-table td, .log-table th { padding:8px clamp(4px,1.2vw,13px); }

/* Défis interactifs */
.reason-choices { display:grid; gap:12px; margin:20px 0; }
.reason-choices .btn { white-space:normal; text-align:left; }
.packet-stage { max-width:680px; margin:20px auto; text-align:center; }
.packet-icon { font-size:4rem; animation:enter-room .3s ease-out; }
.packet-target { padding:20px; border:2px dashed #7bbec9; border-radius:16px; font-size:1.15rem; margin:20px 0; }
.packet-stage .actions { justify-content:center; }
progress { width:100%; height:16px; accent-color:#c6f432; }
.rescue-evidence { border-left:4px solid #c6f432; padding:4px 18px; margin:20px 0; }
.rescue-evidence p { margin:10px 0; }
label.card { display:grid; gap:10px; cursor:pointer; }
label.card:has(input:checked) { border-color:#c6f432; background:#203d40; }
#rescueReason { width:100%; padding:14px; margin:12px 0; background:#172336; color:#fff; border:1px solid #7bbec9; border-radius:10px; font:inherit; }
.answer-feedback, #rescueFeedback, #packetFeedback { min-height:2em; }
button[hidden] { display:none; }

.server-room { padding:24px; border:1px solid #52687c; border-radius:20px; background:#142333; margin:20px 0; }
.server-racks { display:flex; gap:16px; justify-content:center; }
.server-rack { width:110px; padding:12px; background:#0b1420; border:3px solid #52687c; border-radius:8px; }
.server-rack i { display:block; height:24px; margin:8px 0; background:#243c4d; border-right:8px solid #a4e894; }
.maintenance-note { padding:16px; margin:20px 0; background:#f6e6af; color:#25303b; border-radius:8px; }
.maintenance-note summary { cursor:pointer; font-weight:bold; }
.server-computer { display:grid; gap:12px; margin:20px auto 0; padding:20px; border:2px solid #7392a1; border-radius:12px; background:#243c4d; color:white; cursor:pointer; font:inherit; }
.computer-display { padding:22px 50px; background:#081822; color:#b3ef8a; font:bold 2rem monospace; border:5px solid #567280; }
.command-output { white-space:pre-wrap; overflow-wrap:anywhere; max-height:320px; overflow:auto; padding:20px; color:#b3ef8a; }
.command-form { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:16px; }
.command-form input { flex:1 1 160px; width:0; min-width:130px; font-family:monospace; }
.computer-label { position:absolute; left:12px; top:12px; z-index:2; padding:8px; background:#f6e6af; color:#25303b; border-radius:5px; font-size:.8rem; pointer-events:none; }

.server-computer { border:3px solid #0d171b; box-shadow:0 5px 0 #0d171b; background:#294c50; }
.server-room { border:3px solid #0d171b; background:#172638; }
.desk-scene .monitor { border:7px solid #101b1e; background:#325d60; }
.desk-scene .monitor-screen { border:3px solid #101b1e; background:#e7dec3; }
.desk-scene .monitor-screen .session { background:#325d60; }
.desk-scene .postit { background:#e9cf8a; border:3px solid #302b26; font-family:inherit; }
.desk-scene .phone { border:4px solid #101b1e; background:#294c50; }
.desk-scene .notebook { border:3px solid #241d20; background:#783d48; }
.computer-label { left:2%; top:auto; bottom:3%; border:2px solid #302b26; }
.serverConsole[hidden], #serverConsole[hidden] { display:none; }
@media(max-width:600px) { .server-racks {gap:4px;} .server-rack {width:30%;} }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none !important; scroll-behavior:auto !important; } }

/* Laboratoire : salle, PC, application et message. */
.laboratory-room { position:relative; width:100%; aspect-ratio:2170 / 2175; border:3px solid #52687c; border-radius:16px; background:url('assets/ecole-salles-coherentes.png') left center / 300% auto no-repeat; overflow:hidden; }
.lab-pc-hotspot { position:absolute; padding:0; border:0; border-radius:3px; background:transparent; cursor:pointer; box-shadow:none; }
.lab-pc-hotspot:hover { background:transparent; box-shadow:none; }
.lab-pc-hotspot:focus-visible { outline:3px solid #f1da9f; outline-offset:3px; }
.lab-pc-1 { left:36%; top:51%; width:10%; height:6%; }
.lab-pc-2 { left:52%; top:52%; width:10%; height:6%; }
.lab-pc-3 { left:66%; top:51%; width:10%; height:6%; }
.lab-pc-4 { left:18%; top:56%; width:19%; height:10%; }
.lab-pc-5 { left:43%; top:57%; width:19%; height:10%; }
.lab-pc-6 { left:66%; top:57%; width:17%; height:10%; }
.school-desktop { min-height:390px; padding:22px; border:7px solid #192b39; border-radius:16px; background:linear-gradient(130deg,#244c61,#183341); position:relative; }
.desktop-top,.desktop-taskbar { color:#d1e3dd; font-size:.85rem; }
.desktop-taskbar { margin-top:70px; padding-top:14px; border-top:1px solid #658786; }
.desktop-apps { display:flex; flex-wrap:wrap; gap:20px; margin-top:30px; }
.desktop-app { display:grid; gap:8px; width:165px; padding:18px; border:2px solid #92b3ae; border-radius:12px; background:#173341; color:#fff; font:inherit; cursor:pointer; }
.desktop-app:hover { background:#315c61; }
.desktop-app span { font-size:2.7rem; color:#f0d79e; }
.desktop-app small { font-size:.8rem; }
.inbox-title { padding:0 20px; }
.inbox-message { width:100%; display:grid; grid-template-columns:1fr 2fr 1fr; gap:16px; text-align:left; padding:22px; background:#fff; color:#243547; border:0; border-top:1px solid #c5cfda; font:inherit; cursor:pointer; }
.inbox-message:hover,.inbox-message:focus-visible { background:#dbece8; }
.inbox-message.unread { border-left:5px solid #315f70; }
@media(max-width:600px) { .inbox-message {grid-template-columns:1fr; gap:6px;} .desktop-app {width:140px;} }

/* Le plan utilise lui aussi les proportions de l’illustration source. */
.campus-map { aspect-ratio:2170 / 725; background-size:100% auto; }
.room-door { padding:0 4px 10px; min-width:0; }

/* Écrans des postes du laboratoire. */
.pc-monitor { max-width:1000px; margin:20px auto; border:12px solid #172128; border-radius:20px; box-shadow:0 12px 0 #10191e; background:#172128; }
.pc-screen { position:relative; min-height:480px; background:linear-gradient(145deg,#386677,#1d3f54 60%,#243e42); overflow:hidden; border-radius:8px; }
.pc-bezel { padding:12px; text-align:center; color:#a1b1b6; font-size:.65rem; letter-spacing:2px; }
.pc-bezel span {float:right; color:#97d2ae;}
.pc-systembar,.pc-taskbar {display:flex; justify-content:space-between; gap:12px; padding:10px 16px; background:#142934df; color:#e9f2ed; font-size:.8rem; }
.pc-taskbar {align-items:center; margin-top:24px;}
.taskbar-clock {margin-left:auto;}
.pc-workspace {min-height:360px; padding:20px; position:relative;}
.pc-workspace .desktop-apps {margin:0; flex-direction:column; gap:12px;}
.pc-workspace .desktop-app {width:100px; padding:10px; background:transparent; border:1px solid transparent; font-size:.9rem;}
.pc-workspace .desktop-app:hover,.pc-workspace .desktop-app:focus-visible {border-color:#c1d9d3; background:#d8eee01a;}
.pc-file-window {position:absolute; inset:20px 20px 20px 140px; background:#f2f1e9; color:#203647; border-radius:8px; overflow:auto; box-shadow:0 12px 30px #0005;}
.pc-windowbar {display:flex; justify-content:space-between; padding:10px 16px; background:#dae3df; gap:12px;}
.pc-windowbar button {border:0; background:transparent; cursor:pointer; font-size:1.4rem;}
.file-content {padding:20px;}
.pc-lockscreen {min-height:480px; display:flex; flex-direction:column; padding:24px; background:radial-gradient(ellipse at 25% 20%,#43677a,#203a50 60%,#182b40); color:#fff;}
.lock-clock {font-size:2.6rem; font-weight:300; line-height:1.2;}
.lock-clock small {display:block; font-size:.85rem;}
.pc-signin {width:min(340px,100%); margin:25px auto; text-align:center;}
.user-avatar {width:70px; height:70px; margin:auto; border-radius:50%; background:#819ca7; color:#dae6e7; display:grid; place-items:center; font-size:2.8rem;}
.pc-signin h3 {margin:12px 0 4px;}
.pc-signin p {font-size:.85rem; color:#d2e1e6;}
.pc-signin label {font-size:.8rem; text-align:left;}
.password-row {display:flex; margin-top:6px;}
.password-row input {min-width:0; border-radius:4px 0 0 4px; background:#f5f7f5; color:#203647;}
.password-row button {border:0; padding:0 16px; font-size:1.4rem; cursor:pointer; background:#9db9be;}
.lock-bottom {margin-top:auto; display:flex; align-items:center; justify-content:space-between; font-size:.8rem; gap:12px;}
.lock-bottom button {padding:8px 12px; background:#ffffff14; color:white; border:1px solid #8ca4af; border-radius:5px; cursor:pointer;}
.pc-screen .mail {margin:16px; border-radius:6px;}
.pc-file-window[hidden] {display:none;}
@media(max-width:600px) {.pc-monitor{border-width:6px}.pc-screen,.pc-lockscreen{min-height:450px}.pc-systembar{font-size:.7rem}.pc-file-window{inset:10px}.pc-screen .mail{margin:6px}.pc-lockscreen{padding:18px}}

/* Icônes illustrées transparentes, palette commune à Alex. */
.game-icon { display:inline-block; width:30px; height:30px; flex-shrink:0; vertical-align:middle; background-image:url('assets/icones-interface.png'); background-size:400% 300%; background-repeat:no-repeat; }
.icon-lock {background-position:0 0;}
.icon-user {background-position:33.333333% 0;}
.icon-document {background-position:66.666667% 0;}
.icon-chat {background-position:100% 0;}
.icon-trash {background-position:0 50%;}
.icon-clock {background-position:33.333333% 50%;}
.icon-shield {background-position:66.666667% 50%;}
.icon-usb {background-position:100% 50%;}
.icon-notebook {background-position:0 100%;}
.icon-server {background-position:33.333333% 100%;}
.icon-backup {background-position:66.666667% 100%;}
.icon-sound {background-position:100% 100%;}
.icon-mail {background-image:url('assets/icone-courriel.png');background-size:contain;background-position:center;}
.icon-folder {background-image:url('assets/icone-fichiers.png');background-size:contain;background-position:center;}
.desktop-app .game-icon {width:65px;height:65px;margin:auto;}
.card-icon .game-icon,.deduction-grid .game-icon {width:48px;height:48px;}
.packet-icon .game-icon {width:90px;height:90px;}
.user-avatar {background:transparent;}
.user-avatar .game-icon {width:70px;height:70px;}
.voice {display:inline-flex;align-items:center;gap:7px;}
.voice .game-icon {width:24px;height:24px;}
.pc-screen {background:#183341 url('assets/fond-ecran-enquete.png') center / cover no-repeat;}
.pc-lockscreen {background:linear-gradient(#10253255,#10253299),url('assets/fond-ecran-enquete.png') center / cover no-repeat;}
.pc-signin {padding:18px;border-radius:15px;background:#122c3ddd;box-shadow:0 6px 24px #0003;}
.pc-monitor {border-color:#274348;box-shadow:0 0 0 3px #101b20,0 12px 0 #101b20,0 18px 32px #0004;}
.pc-bezel {background:#274348;color:#b1c6bf;}
.pc-systembar,.pc-taskbar {background:#102733ed;}
.pc-screen .mail {box-shadow:0 8px 24px #0006;border:2px solid #1c363d;}
.pc-screen .mail-bar,.pc-windowbar {background:#c8d5c9;color:#203c43;}
.pc-screen .fake-btn {background:#35666d;}
.pc-screen .inbox-message {background:#f5efdf;}
.pc-screen .inbox-message:hover {background:#dfebdc;}
.desk-scene .plant img,.desk-scene .mug img,.desk-scene .usb img {filter:saturate(.7) drop-shadow(3px 6px 3px #10101a55);}

/* Accessoires transparents du bureau et équipements illustrés. */
.office-prop {display:block;width:100%;aspect-ratio:1;background:url('assets/objets-bureau-cartoon.png') 0 center / 300% 100% no-repeat;}
.office-mug {background-position:50% center;}
.office-usb {background-position:100% center;}
.desk-scene .spot:hover .office-prop {transform:translateY(-3px);}
.server-rack {width:30%;max-width:190px;aspect-ratio:1;padding:0;border:0;border-radius:0;background:url('assets/equipements-serveurs-cartoon.png') left center / 200% 100% no-repeat;}
.server-pc-art {display:block;width:210px;max-width:100%;aspect-ratio:1;background:url('assets/equipements-serveurs-cartoon.png') right center / 200% 100% no-repeat;}
.server-computer {padding:6px 12px 12px;background:transparent;border:0;box-shadow:none;}
.server-computer:hover .server-pc-art {filter:brightness(1.12);}
.server-computer:focus-visible {outline:3px solid #e6cf9b;}
.terminal-help {padding:16px;background:#dce6dc;color:#203b42;font-family:var(--sans,system-ui);}
.terminal-help p {font-size:.9rem;margin:8px 0;}
.command-examples {display:flex;flex-wrap:wrap;gap:8px;}
.command-examples button {background:#315d62;color:white;border:2px solid #16383e;border-radius:7px;padding:10px;cursor:pointer;font:inherit;font-size:.85rem;}
.command-examples button:hover {background:#42767a;}

/* Même illustration et mêmes proportions à chaque entrée de salle. */
.office-room,.server-photo {position:relative;width:100%;aspect-ratio:2170 / 2175;overflow:hidden;border:3px solid #52687c;border-radius:16px;background-image:url('assets/ecole-salles-coherentes.png');background-size:300% auto;background-repeat:no-repeat;}
.office-room {background-position:right center;}
.server-photo {background-position:center center;padding:0;}
.room-laptop {position:absolute;border:0;padding:0;background:transparent;cursor:pointer;}
.room-laptop img {display:block;width:100%;height:100%;object-fit:contain;}
.room-laptop:focus-visible,.office-book-hit:focus-visible,.office-usb-hit:focus-visible {outline:3px solid #f1da9f;outline-offset:3px;}
.office-laptop {left:44%;top:49%;width:26%;height:19%;}
.office-book-hit {position:absolute;left:28%;top:57%;width:16%;height:9%;border:0;background:transparent;cursor:pointer;}
.office-usb-hit {position:absolute;left:71%;top:62%;width:9%;height:7%;padding:0;border:0;background:transparent;cursor:pointer;}
.maintenance-table {position:absolute;left:28%;top:69%;width:44%;height:5%;background:#77503b;border:3px solid #272428;box-shadow:0 5px 0 #3b302c;}
.maintenance-table::before,.maintenance-table::after {content:"";position:absolute;top:100%;width:6%;height:100px;background:#3b302c;}
.maintenance-table::before {left:5%;}.maintenance-table::after {right:5%;}
.server-laptop {left:35%;top:49%;width:30%;height:23%;}
.desk-computer-content {padding:20px;min-height:350px;}
.evidence-item {display:block;padding:18px;margin:12px 0;background:#f1e6cb;color:#233e43;border:2px solid #587173;border-radius:8px;}
.paper-note {background:#e4ce97;}
.desk-evidence {max-width:650px;margin:20px auto;}
.evidence-usb {width:150px;margin:auto;}
.close-laptop {margin-left:auto;padding:8px;border:1px solid #7a9695;background:#274748;color:white;border-radius:5px;cursor:pointer;}
#serverConsole {margin-top:20px;border:8px solid #274348;border-radius:14px;}

/* Les accessoires sont peints dans leur scène, avec leurs ombres de contact. */
.desk-surface-hit,.desk-detail-hit,.server-closed-laptop {position:absolute;border:0;padding:0;background:transparent;cursor:pointer;}
.desk-surface-hit {left:17%;top:59%;width:67%;height:13%;}
.desk-closeup {position:relative;width:100%;aspect-ratio:3 / 2;background:none;border-radius:14px;overflow:hidden;}
.detail-laptop {left:34%;top:21%;width:41%;height:30%;}
.detail-notebook {left:11%;top:39%;width:24%;height:37%;}
.detail-usb {left:79%;top:54%;width:12%;height:10%;}
.server-closed-laptop {left:42%;top:63%;width:17%;height:6%;}
.desk-surface-hit:focus-visible,.desk-detail-hit:focus-visible,.server-closed-laptop:focus-visible {outline:3px solid #f1da9f;outline-offset:3px;}
.opened-laptop-preview {display:block;width:180px;height:150px;object-fit:contain;margin:10px auto;}
#serverRoomView[hidden],#serverInstructions[hidden] {display:none;}
.result-alex {width:100px;height:110px;object-fit:contain;float:right;margin:0 0 12px 20px;}

/* Une main signale les actions possibles. */
button:not(:disabled),[role="button"],summary,label:has(input[type="radio"]),label:has(input[type="checkbox"]) {cursor:pointer;}
button:not(:disabled) *,[role="button"] * {cursor:inherit;}
button:disabled {cursor:default;}
.detail-postit {left:16.7%;top:46.5%;width:10.6%;height:13%;z-index:2;}
.postit-inspection {max-width:600px;margin:20px auto;text-align:center;}
.postit-inspection .spot {display:inline-block;outline-offset:8px;}
.sticky-note {position:relative;display:flex;flex-direction:column;justify-content:center;gap:15px;width:250px;min-height:240px;padding:32px 22px 40px;margin:20px;background:linear-gradient(#e2c36b 0 16%,#f3dc91 16% 91%,#ead088 91%);color:#33291c;box-shadow:3px 12px 16px #0004;transform:rotate(-5deg);font-family:"Segoe Print","Comic Sans MS",cursive;font-size:1.25rem;}
.sticky-note strong {font-size:1.9rem;}
.sticky-note::after {content:"";position:absolute;right:0;bottom:0;border-style:solid;border-width:0 0 24px 24px;border-color:transparent transparent #bc9f51 #fff0bd;filter:drop-shadow(-2px -2px 2px #0002);}
.desk-checklist {display:flex;flex-wrap:wrap;gap:8px 20px;padding:12px 16px;list-style:none;background:#203b42;border-radius:8px;color:#e5e7cd;}
.server-memory {padding:10px 14px;background:#f2e5bf;color:#243e43;border-radius:7px;margin-bottom:14px;}
.guided-server-choices {display:flex;flex-wrap:wrap;gap:10px;margin:14px 0;}
.terminal-help .btn.ghost {color:#24474b;border-color:#527b79;}
.terminal-help .muted {color:#45615e;}
.manual-terminal {padding:14px;color:#d9e5e1;}
.manual-terminal summary {cursor:pointer;}
.mission-next {padding:12px 16px;background:#25464c;color:#f0e6c5;border-left:4px solid #d8c084;border-radius:6px;}

/* L’image corrigée est chargée directement, sous les zones interactives. */
.desk-preview-image {display:block;width:100%;height:auto;pointer-events:none;user-select:none;}
button:not(:disabled):hover,button:not(:disabled):hover *,[role="button"]:hover,[role="button"]:hover *,summary:hover {cursor:pointer !important;}
.desk-detail-hit,.desk-surface-hit,.lab-pc-hotspot,.server-closed-laptop {z-index:2;cursor:pointer !important;pointer-events:auto;}
.detail-postit {z-index:3;}

/* Crédits */
.game-footer {padding:24px;text-align:center;}
.game-footer a,.credits-back,.credits-profile {color:#d7e8cf;text-underline-offset:5px;}
.game-footer a:hover,.credits-back:hover,.credits-profile:hover {color:#f1da9f;}
.credits-page {max-width:760px;margin:40px auto;padding:0 18px;}
.credits-page .panel {padding:clamp(24px,5vw,48px);}
.credits-alex {display:block;width:100px;height:110px;object-fit:contain;margin-bottom:20px;}
.credits-list dt {color:#a8c7ba;font-size:.9rem;margin-top:24px;}
.credits-list dd {margin:6px 0 0;font-size:1.1rem;}
.credits-profile {display:inline-block;margin-top:20px;}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;}
