@charset "UTF-8";
/* Doomsloop — charte : voir DESIGN.md.
   1. Textures Doom tuilées en pixels nets (aucun dégradé, aucun flou).
   2. Panneaux = murs à cadre métal riveté (border-image), angles vifs, bevel 2 px — jamais d'ombre douce.
   3. Titres en police DOOM rouge cerclée de sombre ; texte courant en mono ; menus au curseur-crâne. */

@font-face {
  font-family: "doomregular";
  src: url("../font/doom.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  /* La police DOOM n'a d'outlines que pour l'ASCII (+ ÄÖÜß) : ses glyphes accentués sont VIDES.
     On la limite à ces plages pour que é, č, ш… retombent sur la police suivante de la pile. */
  unicode-range: U+0020-007E, U+00A7, U+00C4, U+00D6, U+00DC, U+00DF, U+00E4, U+00F6, U+00FC;
}

:root {
  --red: #cc0104;
  --red-dark: #520300;
  --ink: #d8d0c0;
  --ink-dim: #8c8478;
  --black: #000;
  --panel: rgba(8, 6, 4, 0.88);
  --bevel-light: #6a6a6a;
  --bevel-dark: #1a1a1a;
  --doom: "doomregular", Impact, "Franklin Gothic Medium", "Arial Black", "DejaVu Sans Condensed", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: var(--black); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  /* Mur de briques du mod, tuile ×2, assombri par multiplication — pas de dégradé. */
  background-color: #1b120c;
  background-image: url("../img/wall.png");
  background-size: 128px 256px;
  background-blend-mode: multiply;
  image-rendering: pixelated;
}

.pixel { image-rendering: pixelated; }

.wall {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ---------- Masthead ---------- */
.masthead {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title langs" "tag tag";
  align-items: end;
  column-gap: 24px;
  margin-bottom: 20px;
}

.title {
  grid-area: title;
  margin: 0;
  font-family: var(--doom);
  font-weight: normal;
  font-size: clamp(30px, 6.5vw, 80px);
  min-width: 0;
  white-space: nowrap;
  line-height: 0.9;
  letter-spacing: 0.02em;
  /* Lettres remplies par la texture de bronze du mod, cerclées de rouge sombre. */
  filter: drop-shadow(2px 0 0 var(--red-dark)) drop-shadow(-2px 0 0 var(--red-dark))
          drop-shadow(0 2px 0 var(--red-dark)) drop-shadow(0 -2px 0 var(--red-dark))
          drop-shadow(6px 6px 0 #000);
}
.title-text {
  background: url("../img/bronze.png") repeat;
  background-size: 128px 256px;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.tagline {
  grid-area: tag;
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--ink);
  border-left: 4px solid var(--red);
  padding-left: 12px;
}

.langs {
  grid-area: langs;
  display: flex;
  gap: 0;
  border: 2px solid var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-light);
  background: var(--panel);
}
.langs a {
  display: block;
  padding: 4px 10px;
  color: var(--ink-dim);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  border-right: 1px solid var(--bevel-dark);
}
.langs a:last-child { border-right: 0; }
.langs a.active { color: var(--red); background: #140000; }
.langs a:hover { color: var(--ink); }

/* ---------- Panneaux (murs à cadre riveté) ---------- */
.panel {
  position: relative;
  margin: 0 0 24px;
  padding: 24px 28px;
  background: var(--panel);
  border: 12px solid transparent;
  border-image: url("../img/plate.png") 16 repeat;
  /* bevel : clair en haut/gauche, sombre en bas/droite, comme les cadres du menu DOOM */
  box-shadow: inset 2px 2px 0 var(--bevel-light), inset -2px -2px 0 var(--bevel-dark);
}
.panel-secondary { padding: 18px 28px; color: var(--ink-dim); }

main.panel {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  column-gap: 32px;
}
.steps { grid-column: 1; margin: 0; padding: 0; list-style: none; }
.play { grid-column: 2; align-self: start; position: sticky; top: 16px; }

.step { margin: 0 0 28px; }
.step:last-child { margin-bottom: 0; }

.step-title, .panel-secondary .step-title {
  margin: 0 0 8px;
  font-family: var(--doom);
  font-weight: normal;
  font-size: 30px;
  line-height: 1;
  color: var(--red);
  text-shadow: 0 1px 1px var(--red-dark), 0 -1px 1px var(--red-dark), 1px 0 1px var(--red-dark), -1px 0 1px var(--red-dark), 3px 2px 0 #000;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cursor {
  width: 20px; height: 24px; flex: none;
  background: url("../img/skull1.png") no-repeat center / contain;
  image-rendering: pixelated;
}

.hint { margin: 6px 0; color: var(--ink-dim); font-size: 13.5px; }
.hint-warn { color: #e0a020; }

/* ---------- Zone de dépôt ---------- */
.dropzone {
  margin: 12px 0;
  padding: 28px 16px;
  border: 2px dashed var(--ink-dim);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  background: #000;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.over { border-color: var(--red); color: #fff; outline: none; }
.dropzone.busy { border-style: solid; border-color: var(--red); }
.dropzone-label { font-family: var(--doom); font-size: 22px; letter-spacing: 0.03em; }

.face-result { margin: 12px 0; }
.face-result img { display: block; max-width: 100%; border: 2px solid var(--bevel-dark); background: #000; }

.faces-demo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.faces-demo img { width: 256px; height: auto; }

/* ---------- Menus DOOM (liste verticale, curseur-crâne) ---------- */
.menu { list-style: none; margin: 8px 0 0; padding: 0; }
.menu-item {
  display: block;
  padding: 4px 0 4px 34px;
  font-family: var(--doom);
  font-size: 24px;
  line-height: 1.1;
  color: var(--red);
  text-decoration: none;
  text-shadow: 0 1px 1px var(--red-dark), 0 -1px 1px var(--red-dark), 1px 0 1px var(--red-dark), -1px 0 1px var(--red-dark), 3px 2px 0 #000;
  position: relative;
}
.menu-item:hover { color: #ff2a2a; }
.menu-item.selected::before {
  content: "";
  position: absolute; left: 0; top: 3px;
  width: 24px; height: 26px;
  background: url("../img/skull1.png") no-repeat center / contain;
  image-rendering: pixelated;
  animation: skull 0.6s steps(1) infinite;
}
@keyframes skull { 50% { background-image: url("../img/skull2.png"); } }

/* ---------- Bouton JOUER ---------- */
.play-btn {
  display: block;
  padding: 14px 18px;
  font-family: var(--doom);
  font-size: 44px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  color: #000;
  background: var(--red);
  border: 4px solid #000;
  box-shadow: inset 3px 3px 0 #ff5a5a, inset -3px -3px 0 var(--red-dark);
}
.play-btn:hover { background: #ff2a2a; }
.play-btn:active { box-shadow: inset -3px -3px 0 #ff5a5a, inset 3px 3px 0 var(--red-dark); }
.play-btn[aria-disabled="true"] { background: #4a4a4a; color: #222; pointer-events: none; box-shadow: none; }

.plain { margin: 0; padding-left: 18px; }
.plain li { margin: 4px 0; }

/* ---------- Pied ---------- */
.foot { padding: 12px 4px 0; border-top: 2px solid var(--bevel-dark); color: var(--ink-dim); font-size: 13px; }
.foot a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--red-dark); }
.foot a:hover { color: var(--red); }
.credits { margin: 6px 0; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .wall { padding: 16px 12px 32px; }
  .masthead { grid-template-columns: 1fr; grid-template-areas: "langs" "title" "tag"; }
  .langs { justify-self: start; margin-bottom: 8px; }
  .panel { padding: 16px 14px; border-width: 10px; }
  main.panel { grid-template-columns: 1fr; }
  .steps, .play { grid-column: 1; }
  .play { position: static; margin-top: 20px; }
  .menu-item { font-size: 21px; }
  .step-title { font-size: 26px; }
  .dropzone-label { font-size: 19px; }
  .faces-demo img { width: 192px; }
}
