/* Echo's Studio Box : site vitrine. Palette reprise de l'écran de chargement et du prototype. */
@font-face {
  font-family: "Press Start 2P";
  src: url("fonts/press-start-2p.woff2") format("woff2");
  font-display: swap;
}
:root {
  --ciel: #4f9ff0;
  --ciel-clair: #9fd3f7;
  --encre: #2a1b2e;
  --or: #ffd23f;
  --or-fonce: #e8a317;
  --papier: #fff8e1;
  --rose: #e8457a;
  --sarcelle: #27b5a4;
  --herbe: #4cc23f;
  --terre: #9a5b34;
  --terre-fonce: #6e3f24;
  --nuit: #1d1830;
  --nuit-2: #2a2445;
  --fond: #fff8e1;
  --texte: #2a1b2e;
  --texte-doux: #5d4c60;
  --carte: #ffffff;
  --bord: #2a1b2e;
  --lien: #1f6fc4;
  --pixel: "Press Start 2P", "Courier New", monospace;
  --corps: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #1d1830; --texte: #f4ecdb; --texte-doux: #c3b8cf; --carte: #2a2445; --bord: #0e0b18; --lien: #8cc8ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #1d1830; --texte: #f4ecdb; --texte-doux: #c3b8cf; --carte: #2a2445; --bord: #0e0b18; --lien: #8cc8ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 17px/1.6 var(--corps); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img.px, .px img { image-rendering: pixelated; image-rendering: crisp-edges; }
img { max-width: 100%; }
a { color: var(--lien); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.35; text-wrap: balance; }
.evitement { position: absolute; left: -9999px; top: 8px; background: var(--or); color: var(--encre); padding: 8px 12px; z-index: 99; }
.evitement:focus { left: 8px; }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 20; background: var(--ciel); border-bottom: 4px solid var(--encre); }
.entete-int { max-width: 1100px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marque img { display: block; width: 92px; height: auto; image-rendering: pixelated; }
.nav { display: flex; gap: 0; flex-wrap: wrap; justify-content: flex-end; }
.nav a { font: 8px/1 var(--pixel); color: var(--papier); text-decoration: none; padding: 12px 5px; text-shadow: 1px 1px 0 var(--encre); white-space: nowrap; }
.nav a:hover { color: var(--or); }
@media (min-width: 640px) { .marque img { width: 139px; } .nav a { font-size: 11px; padding: 10px 12px; } }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-block; font: 11px/1.4 var(--pixel); color: var(--encre); background: var(--or);
  border: 3px solid var(--encre); box-shadow: 0 4px 0 var(--encre); padding: 12px 16px; text-decoration: none;
  cursor: pointer; text-align: center;
}
.bouton:hover { background: #ffe07a; }
.bouton:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--encre); }
.bouton.secondaire { background: var(--papier); }
.bouton[aria-disabled="true"] { cursor: default; }
.etiquette { display: inline-block; font: 9px/1.4 var(--pixel); background: var(--rose); color: #fff; padding: 6px 8px; border: 2px solid var(--encre); }

/* ---------- Héros ---------- */
.heros { position: relative; background: linear-gradient(var(--ciel) 0%, var(--ciel-clair) 78%); overflow: hidden; border-bottom: 4px solid var(--encre); }
.heros-int { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 40px 16px 180px; text-align: center; }
.heros-logo { width: min(556px, 92vw); height: auto; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(42, 27, 46, .25)); }
.heros h1 { font: 14px/1.7 var(--pixel); color: var(--papier); text-shadow: 2px 2px 0 var(--encre); margin: 28px auto 12px; max-width: 30ch; }
.heros p.accroche { color: var(--encre); font-size: 18px; max-width: 46ch; margin: 0 auto 24px; }
.heros .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
@media (min-width: 640px) { .heros h1 { font-size: 20px; } .heros-int { padding-top: 72px; } }
.nuage { position: absolute; z-index: 1; width: 96px; height: 32px; image-rendering: pixelated; opacity: .95; animation: derive linear infinite; }
.nuage::before { content: ""; position: absolute; inset: 0; background:
  linear-gradient(#fff, #fff) 16px 0 / 40px 8px no-repeat,
  linear-gradient(#fff, #fff) 8px 8px / 64px 8px no-repeat,
  linear-gradient(#fff, #fff) 0 16px / 96px 8px no-repeat,
  linear-gradient(#dfeefb, #dfeefb) 0 24px / 96px 8px no-repeat; }
@keyframes derive { from { transform: translateX(-140px); } to { transform: translateX(calc(100vw + 40px)); } }
.sol-heros { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; z-index: 1;
  background:
    repeating-linear-gradient(90deg, var(--herbe) 0 12px, #5bcf4a 12px 24px) top / 100% 16px no-repeat,
    linear-gradient(var(--encre), var(--encre)) 0 16px / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, var(--terre) 0 32px, #a8663d 32px 64px) 0 20px / 100% 76px no-repeat;
}
.coureur { position: absolute; z-index: 3; bottom: 92px; left: 0; width: 48px; height: 68px; image-rendering: pixelated; }
.coureur.retourne { transform: scaleX(-1); }

/* ---------- Sections ---------- */
.section { padding: 64px 16px; }
.section-int { max-width: 1100px; margin: 0 auto; }
.section h2 { font: 16px/1.6 var(--pixel); margin: 0 0 8px; }
@media (min-width: 640px) { .section h2 { font-size: 22px; } }
.section .intro { color: var(--texte-doux); max-width: 60ch; margin: 0 0 32px; }
.section.nuit { background: var(--nuit); color: #f4ecdb; --texte-doux: #c3b8cf; --lien: #8cc8ff; --carte: var(--nuit-2); --bord: #0e0b18; }
.section.ciel { background: var(--ciel-clair); color: var(--encre); --texte-doux: #3b4a66; --carte: #fff; --lien: #1f5ea8; --bord: var(--encre); }
.grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.carte { background: var(--carte); border: 3px solid var(--bord); box-shadow: 0 5px 0 var(--bord); padding: 20px; }
.carte h3 { font: 11px/1.6 var(--pixel); margin: 0 0 10px; }
.carte p { margin: 0; }

/* Le jeu : trois piliers */
.piliers { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.piliers .carte { display: flex; gap: 16px; align-items: flex-start; }
.piliers .num { flex: none; font: 18px/1 var(--pixel); color: var(--encre); background: var(--or); border: 3px solid var(--encre); width: 48px; height: 48px; display: grid; place-items: center; }
.note-lots { font-size: 14px; color: var(--texte-doux); margin-top: 20px; }

/* Mini-jeux */
.jeux { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin-top: 8px; }
.jeu { background: var(--carte); border: 3px solid var(--bord); box-shadow: 0 5px 0 var(--bord); display: flex; flex-direction: column; }
.jeu .ecran { aspect-ratio: 144 / 256; background: #000; border-bottom: 3px solid var(--bord); overflow: hidden; max-height: 340px; }
.jeu .ecran img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; image-rendering: pixelated; }
.jeu .infos { padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.jeu .infos img { width: 40px; height: 40px; flex: none; image-rendering: pixelated; border: 2px solid var(--bord); }
.jeu h3 { font: 10px/1.6 var(--pixel); margin: 0 0 4px; }
.jeu .genre { font-size: 14px; color: var(--texte-doux); margin: 0 0 6px; }
.jeu .desc { font-size: 15px; margin: 0; }

/* Studio */
.studio { display: grid; gap: 32px; align-items: center; }
@media (min-width: 800px) { .studio { grid-template-columns: 220px 1fr; } }
.portrait { justify-self: center; background: var(--or); border: 4px solid var(--encre); box-shadow: 0 6px 0 var(--encre); width: 200px; height: 200px; display: grid; place-items: center; }
.portrait img { width: 120px; height: 190px; image-rendering: pixelated; object-fit: contain; }
.valeurs { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.valeurs li { padding-left: 28px; position: relative; }
.valeurs li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; background: var(--or); border: 2px solid var(--encre); }

/* Projets */
.projet .etat { font: 8px/1.4 var(--pixel); display: inline-block; padding: 5px 7px; border: 2px solid var(--bord); margin-bottom: 12px; }
.projet .etat.en-cours { background: var(--herbe); color: var(--encre); }
.projet .etat.idee { background: var(--papier); color: var(--encre); }
.projet .etat.secret { background: var(--rose); color: #fff; }
.mystere { font: 32px/1 var(--pixel); color: var(--or); text-shadow: 3px 3px 0 var(--encre); margin-bottom: 12px; }

/* Vidéos */
.video { max-width: 880px; margin: 0 auto; position: relative; aspect-ratio: 16 / 9; background: var(--encre); border: 4px solid var(--bord); box-shadow: 0 6px 0 var(--bord); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--papier);
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 4px), radial-gradient(circle at 50% 40%, #3a3266, #15111f 75%); }
.video-facade p { margin: 8px 0 0; font-size: 14px; color: #c3b8cf; max-width: 44ch; }
.video-facade .titre { font: 13px/1.6 var(--pixel); color: var(--or); margin: 14px 0 0; }
.video-facade button { margin-top: 16px; }
.video-facade img { width: 48px; height: 68px; image-rendering: pixelated; }
.chaine { max-width: 880px; margin-left: auto; margin-right: auto; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Pied de page ---------- */
.pied { background: var(--terre-fonce); color: #f4e3cf; position: relative; }
.pied .sol { height: 20px; background: repeating-linear-gradient(90deg, var(--herbe) 0 12px, #5bcf4a 12px 24px); border-top: 4px solid var(--encre); border-bottom: 4px solid var(--encre); }
.pied-int { max-width: 1100px; margin: 0 auto; padding: 32px 16px 8px; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pied-col { display: flex; flex-direction: column; gap: 6px; }
.pied-col p { margin: 0; }
.pied a { color: var(--or); }
.pied-titre { font: 10px/1.6 var(--pixel); color: var(--papier); margin-bottom: 6px !important; }
.pied-bas { max-width: 1100px; margin: 0 auto; padding: 16px 16px 28px; font-size: 13px; color: #d9c3a8; }

/* ---------- Pages légales ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 40px 16px 64px; }
.doc h1 { font: 16px/1.6 var(--pixel); margin: 0 0 24px; }
@media (min-width: 640px) { .doc h1 { font-size: 20px; } }
.doc h2 { font-size: 21px; margin: 40px 0 10px; padding-top: 12px; border-top: 3px dashed color-mix(in srgb, var(--texte) 25%, transparent); scroll-margin-top: 90px; }
.doc h3 { font-size: 18px; margin: 24px 0 8px; scroll-margin-top: 90px; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc .tableau { overflow-x: auto; margin: 16px 0; border: 2px solid var(--bord); }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid color-mix(in srgb, var(--texte) 20%, transparent); }
.doc th { background: color-mix(in srgb, var(--or) 35%, var(--fond)); }
.doc tbody tr:last-child td { border-bottom: 0; }
.sommaire { margin: 0 0 24px; background: var(--carte); border: 3px solid var(--bord); padding: 12px 16px; }
.sommaire summary { font: 10px/1.6 var(--pixel); cursor: pointer; }
.sommaire ol { margin: 12px 0 0; padding-left: 20px; }
mark.a-completer { background: #ffe066; color: #2a1b2e; padding: 0 3px; border-radius: 2px; outline: 1px dashed #b38600; }
.encadre { background: var(--carte); border: 3px solid var(--bord); box-shadow: 0 4px 0 var(--bord); padding: 14px 18px; margin: 20px 0; }
.encadre p { margin: 0; }

/* Formulaire de suppression */
.formulaire { display: grid; gap: 16px; background: var(--carte); border: 3px solid var(--bord); box-shadow: 0 5px 0 var(--bord); padding: 20px; margin: 20px 0; }
.formulaire label { font-weight: 600; display: block; margin-bottom: 6px; }
.formulaire .aide { font-size: 14px; color: var(--texte-doux); margin: 4px 0 0; }
.formulaire input[type="text"], .formulaire input[type="email"], .formulaire textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--bord); background: var(--fond); color: var(--texte); border-radius: 0; }
.formulaire .case { display: flex; gap: 10px; align-items: flex-start; }
.formulaire .case input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--or-fonce); }
.formulaire .case label { font-weight: 400; margin: 0; }
.retour { margin: 0; padding: 12px 14px; border: 2px solid var(--bord); background: color-mix(in srgb, var(--herbe) 25%, var(--carte)); }
.retour[hidden] { display: none; }
.etapes { counter-reset: e; list-style: none; padding: 0; display: grid; gap: 12px; }
.etapes li { counter-increment: e; padding-left: 44px; position: relative; min-height: 32px; }
.etapes li::before { content: counter(e); position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center; font: 11px/1 var(--pixel); background: var(--or); color: var(--encre); border: 2px solid var(--encre); }

/* 404 */
.perdu { text-align: center; padding: 80px 16px; }
.perdu img { width: 72px; height: 102px; image-rendering: pixelated; }
.perdu h1 { font: 18px/1.6 var(--pixel); }

@media (prefers-reduced-motion: reduce) { .nuage { animation: none; } }
@media (max-width: 420px) { .marque img { width: 76px; } .nav a { font-size: 7px; padding: 12px 4px; } .entete-int { padding: 6px 10px; } }
