/* Mise en page : un ecran de jeu — bandeau (niveau, coups), plateau au centre, consigne, commandes en bas.
   Monde visuel : le Paris du clip a la tombee du jour ; pate rouge (l'echarpe), moule en fissures d'or (kintsugi). */
:root {
  --nuit: #161932;
  --crepuscule: #3a2853;
  --rose: #e6877a;
  --sol: #22274a;
  --sol-clair: #293059;
  --pierre: #565c86;
  --pierre-haut: #7d82ad;
  --pate: #e3372a;
  --or: #e9b74c;
  --miel: #f2a21e;
  --ressort: #5fd3c6;
  --texte: #f4eef6;
  --texte-doux: #b8b1d0;
  --voile: rgba(16, 18, 38, .86);
  --f-titre: "Gloock", "Georgia", serif;
  --f-ui: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--nuit); color: var(--texte); font: 500 1rem/1.4 var(--f-ui);
  overflow: hidden; -webkit-tap-highlight-color: transparent;
}
#app {
  height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); gap: .5rem;
  padding-inline: 16px; padding-block: .75rem .9rem; box-sizing: border-box;
  background: radial-gradient(120% 70% at 50% -10%, var(--crepuscule) 0%, transparent 70%), var(--nuit);
  max-width: 760px; margin: 0 auto;
}
.tete { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.titre-jeu {
  font: 400 1.35rem/1 var(--f-titre); color: var(--texte); background: none; border: 0; padding: 0; cursor: pointer;
  text-align: left; letter-spacing: .01em;
}
.titre-jeu small { display: block; font: 600 .78rem/1.3 var(--f-ui); color: var(--texte-doux); letter-spacing: .02em; margin-top: .25rem; }
.compteur { font-variant-numeric: tabular-nums; color: var(--texte-doux); font-size: .92rem; text-align: right; }
.compteur b { color: var(--texte); font-size: 1.25rem; font-weight: 700; }
#scene { position: relative; min-height: 0; min-width: 0; overflow: hidden; touch-action: none; display: grid; place-items: center; user-select: none; }
#plateau { width: 100%; height: 100%; display: block; max-width: 100%; }
.aide { margin: 0; min-height: 1.4em; text-align: center; color: var(--texte-doux); font-size: .95rem; text-wrap: balance; }
.commandes { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.groupe { display: flex; gap: .5rem; }
button.bouton {
  font: 600 .9rem/1 var(--f-ui); color: var(--texte); background: var(--sol-clair); border: 1px solid #3a4170;
  border-radius: 12px; padding: .7rem .85rem; display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
}
button.bouton:hover { background: #333a68; }
button.bouton:active { transform: translateY(1px); }
button.bouton svg { width: 18px; height: 18px; }
button.fleche { padding: .7rem; }
button.fleche.conseil { background: var(--or); color: var(--nuit); border-color: var(--or); }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.voile {
  position: fixed; inset: 0; background: var(--voile); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; z-index: 5; overflow-y: auto;
  backdrop-filter: blur(3px);
}
.carte {
  background: linear-gradient(180deg, #2a2550, #1c1f3d); border: 1px solid #45407a; border-radius: 18px;
  padding: 1.4rem 1.3rem 1.2rem; width: min(420px, 100%); box-sizing: border-box; text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45); justify-self: center;
}
.carte h2 { font: 400 2rem/1.1 var(--f-titre); margin: 0 0 .4rem; text-wrap: balance; }
.carte p { margin: .3rem 0; color: var(--texte-doux); }
.etoiles { display: flex; justify-content: center; gap: .5rem; margin: .8rem 0 1rem; }
.etoiles svg { width: 34px; height: 34px; }
.carte .groupe { justify-content: center; flex-wrap: wrap; }
.carte a { color: var(--or); }
.choix-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; margin-top: 1rem; }
.case-niv {
  font: 600 .82rem/1.2 var(--f-ui); color: var(--texte); background: var(--sol-clair); border: 1px solid #3a4170;
  border-radius: 12px; padding: .6rem .4rem; cursor: pointer; display: grid; gap: .25rem; justify-items: center; min-height: 5.2rem;
}
.case-niv .num { font: 400 1.5rem/1 var(--f-titre); }
.case-niv.actuel { border-color: var(--or); }
.mini-etoiles { color: var(--or); letter-spacing: .1em; font-size: .8rem; min-height: 1em; }
@media (max-width: 520px) { .lib { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
#app { touch-action: none; }
button, a { touch-action: manipulation; }
#plateau.entree { animation: entree .38s ease-out; }
@keyframes entree { from { opacity: 0; transform: scale(.965); } to { opacity: 1; transform: none; } }
.tuto { position: absolute; left: 50%; top: 22%; width: 54px; height: 54px; margin-left: -27px; pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, rgba(233,183,76,.9) 0 30%, rgba(233,183,76,.25) 31% 60%, transparent 61%);
  animation: tuto 1.6s ease-in-out infinite; }
@keyframes tuto { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 70% { transform: translateY(160px); opacity: .9; } 100% { transform: translateY(170px); opacity: 0; } }
.carte-large { width: min(600px, 100%); }
.espace-haut { margin-top: 1rem; }
.bouton-jour { width: 100%; justify-content: center; margin-top: .9rem; background: linear-gradient(180deg, #4a3a22, #3a2d1a) !important; border-color: var(--or) !important; color: #ffe6a8 !important; }
.bouton-jour small { color: var(--texte-doux); font-weight: 500; }
.total-etoiles { color: var(--or); font-variant-numeric: tabular-nums; }
.case-niv svg { width: 64px; height: 48px; display: block; }
.partage-texte { width: 100%; box-sizing: border-box; margin-top: .6rem; font: 500 .85rem/1.35 var(--f-ui); color: var(--texte);
  background: #141733; border: 1px solid #45407a; border-radius: 10px; padding: .5rem; resize: none; }
.lien-site { font-size: .85rem; }
.lien-site a { color: var(--or); }
@media (prefers-reduced-motion: reduce) { .tuto { animation: none; } #plateau.entree { animation: none; } }
.titre-monde { grid-column: 1 / -1; margin: .6rem 0 0; font: 400 1.15rem/1.2 var(--f-titre); color: var(--or); text-align: left; }
.titre-monde:first-child { margin-top: 0; }
/* Rappels du clip : Paris au crepuscule derriere le plateau, image et parole a la victoire, bannieres des mondes */
body { background: url(paris.svg) center bottom / max(1100px, 100%) auto no-repeat, var(--nuit); }
#app { background: radial-gradient(120% 70% at 50% -10%, var(--crepuscule) 0%, transparent 70%); }
#b-son .lib, #b-musique .lib { display: none; }
.image-clip { display: block; width: calc(100% + 2.6rem); max-width: none; margin: -1.4rem -1.3rem .9rem; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 18px 18px 0 0; background: #1c1f3d; }
.citation { margin: .2rem 0 .6rem; font: italic 400 1.05rem/1.35 var(--f-titre); color: #ffe3b0; text-wrap: balance; }
.titre-monde { display: flex; align-items: center; gap: .7rem; }
.titre-monde img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid #45407a; flex: none; }
#b-musique[aria-pressed="false"], #b-son[aria-pressed="false"] { opacity: .7; }

