/* Chicken Burger : DA de la photo de référence. Fond blanc, nom en noir très gras centré au-dessus du burger. */
:root { --bg: #ffffff; --ink: #000000; --muted: #6b6b6b; --line: #e3e3e3; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden;
  font-family: Inter, Helvetica, Arial, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
body { touch-action: manipulation; user-select: none; -webkit-user-select: none; }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: max(14px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom)); }

/* Nom du burger : hauteur fixe pour que le burger ne saute pas quand le nom change de longueur */
#scene { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }
#tete { width: 100%; max-width: 680px; text-align: center; }
#tete-titre { height: min(21vh, 190px); display: flex; align-items: center; justify-content: center; }
#titre { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; color: var(--ink);
  min-width: 0; max-width: 100%; text-align: center; }
#titre.pop { animation: pop .28s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(1.12); } to { transform: scale(1); } }
#kicker { margin: 0 0 -4px; font-size: 17px; font-weight: 700; }
#sous { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); min-height: 1.3em; }
#sous.fort { color: var(--ink); font-size: 18px; font-weight: 800; }
#sous.alerte { color: var(--ink); font-weight: 700; }
#sous.accroche { max-width: 340px; margin: 4px auto 0; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.35; }

/* Accueil : les deux modes, côte à côte au-dessus du burger */
#modes { position: relative; display: flex; justify-content: center; gap: 14px; width: 100%; max-width: 420px; margin: 46px auto 0; }
/* Flèches dessinées au-dessus des stickers : elles poussent doucement vers chaque choix */
.fleches { position: absolute; left: 50%; top: -48px; width: 160px; height: 52px; transform: translateX(-50%); overflow: visible; pointer-events: none; }
.fleche path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fleche-g { animation: pousse-g 1s ease-in-out infinite alternate; }
.fleche-d { animation: pousse-d 1s ease-in-out infinite alternate; }
@keyframes pousse-g { to { transform: translate(-3px, 3px); } }
@keyframes pousse-d { to { transform: translate(3px, 3px); } }
/* Stickers de fast-food : macaron rond (Équilibre), étoile à pointes (Rush), phrase qui tourne autour */
.mode { position: relative; flex: none; width: min(38vw, 148px); aspect-ratio: 1; padding: 0; border: 0; background: none;
  color: var(--ink); font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  animation: entre .5s cubic-bezier(.2, 1.6, .4, 1) both; transition: transform .15s cubic-bezier(.2, 1.6, .4, 1); }
.mode[data-mode="equilibre"] { --penche: -7deg; transform: rotate(var(--penche)); }
.mode[data-mode="rush"] { --penche: 8deg; transform: rotate(var(--penche)); color: #fff; animation-delay: .1s; }
.mode:hover { transform: rotate(var(--penche)) scale(1.05); }
.mode:active { transform: rotate(var(--penche)) scale(.94); }
.mode-fond { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mode-fond circle { fill: #fff; stroke: var(--ink); stroke-width: 5; }
.mode-fond polygon { fill: var(--ink); }
.mode-anneau { transform-origin: 100px 100px; animation: tourne 22s linear infinite; }
.mode[data-mode="rush"] .mode-anneau { animation-duration: 7s; }
.mode-anneau text { font-size: 14px; font-weight: 800; letter-spacing: .04em; fill: currentColor; }
.mode-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mode-anneau, .mode-emoji, .fleche { animation: none !important; } }
.mode-emoji { font-size: 30px; line-height: 1.1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
body.accueil #tete-titre { height: auto; padding-top: max(4vh, 40px); }

/* Accueil : « i » (crédits) à gauche, langues à droite */
#barre-haut { display: none; position: absolute; top: max(10px, env(safe-area-inset-top)); left: 12px; right: 12px;
  justify-content: space-between; align-items: center; z-index: 4; }
body.accueil #barre-haut { display: flex; }
#infos { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; color: var(--ink);
  font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 18px; line-height: 1; cursor: pointer; }
#infos:hover { background: var(--ink); color: #fff; }
#langues { display: flex; gap: 4px; }
#langues button { padding: 5px 8px; border: 2px solid transparent; border-radius: 999px; background: none; color: var(--muted);
  font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
#langues button span { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
#langues button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }

/* Crédits */
#credits { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(255, 255, 255, .7); }
#credits .carte { width: min(100%, 360px); background: #fff; border: 2px solid var(--ink); border-radius: 22px;
  padding: 20px 18px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .18); animation: popin .26s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes popin { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#credits-titre { margin: 0 0 10px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
#credits-liste { margin: 0 0 12px; padding-left: 18px; font-size: 15px; font-weight: 600; line-height: 1.45; }
#credits-liste li { margin-bottom: 6px; }
.credits-lien { display: inline-block; margin-bottom: 14px; color: var(--muted); font-weight: 700; font-size: 14px; }
.mode-nom { font-size: clamp(16px, 4.6vw, 21px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.mode[data-mode="equilibre"] .mode-emoji { animation: balance 2.4s ease-in-out infinite; }
.mode[data-mode="rush"] .mode-emoji { animation: flamme .5s ease-in-out infinite alternate; }
@keyframes entre { from { opacity: 0; transform: rotate(var(--penche)) scale(.6); } to { opacity: 1; transform: rotate(var(--penche)); } }
@keyframes balance { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes flamme { from { transform: scale(1); } to { transform: scale(1.14) translateY(-1px); } }
#sous.alerte.fort { font-size: 19px; animation: secoue .35s ease-in-out infinite alternate; }
@keyframes secoue { from { transform: translateX(-2px); } to { transform: translateX(2px); } }

/* Équilibre : bouton d'arrêt en haut, loin du pouce qui tape */
#stop { margin-top: 8px; padding: 9px 20px; border-radius: 999px; border: 2px solid var(--ink); background: #fff;
  color: var(--ink); font-family: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
#stop:active { background: var(--ink); color: #fff; }

/* Consigne avant le premier tap */
#intro { position: absolute; left: 0; right: 0; top: 4%; text-align: center; pointer-events: none; padding: 0 8px; }
#intro-titre { margin: 0; font-size: clamp(26px, 7.5vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
#intro-texte { margin: 10px auto 0; max-width: 340px; font-size: 16px; font-weight: 600; color: var(--muted); line-height: 1.35; }
#intro-go { margin: 14px 0 0; font-size: 17px; font-weight: 800; animation: clignote 1s ease-in-out infinite alternate; }
@keyframes clignote { from { opacity: 1; } to { opacity: .35; } }

#stage { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 680px; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#chrono { position: absolute; top: 6px; right: 0; font-weight: 800; font-size: 34px; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; }
#chrono::after { content: ' s'; font-size: 18px; }
#chrono.urgent { animation: secoue .2s ease-in-out infinite alternate; }
#bulle { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-weight: 800; font-size: 26px;
  letter-spacing: -0.02em; pointer-events: none; }
#bulle.vole { animation: vole .75s ease-out forwards; }
@keyframes vole { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-30px); } }

/* Commandes du bas */
#bas { width: 100%; max-width: 420px; flex: none; }
.ctrl { display: flex; flex-direction: column; align-items: center; padding-top: 10px; }
.btn { width: 100%; padding: 15px; border-radius: 999px; border: 2px solid var(--ink); background: var(--ink); color: #fff;
  font-family: inherit; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn:disabled { opacity: .3; cursor: default; }
.desc { margin: 5px 0 12px; font-size: 13px; color: var(--muted); text-align: center; }
.ligne { display: flex; gap: 10px; width: 100%; margin-top: 10px; }
.ligne .btn { flex: 1; padding: 13px; font-size: 16px; }

/* Partage : quatre boutons de même poids (PARTAGE.md), dans la DA du jeu */
.partage { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; }
.partage-titre { flex-basis: 100%; text-align: center; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.partage button { flex: 1; min-width: 0; padding: 9px 2px; border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  color: var(--ink); font-family: inherit; font-weight: 800; font-size: 13px; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap; }
.partage button:hover { background: var(--ink); color: #fff; }

/* Rush : « On met quelle sauce ? » puis « On ajoute un truc ? ». Le pop-up glisse depuis la gauche,
   loin de l'endroit où on tapait (comme les jeux console où il faut arrêter de marteler pour viser). */
#choix { position: absolute; inset: 0; z-index: 3; display: flex; justify-content: flex-start; align-items: flex-start;
  padding-top: 2%; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, .5) 55%, rgba(255, 255, 255, 0) 80%); }
#choix .carte { width: min(60%, 250px); background: #fff; border: 2px solid var(--ink); border-radius: 20px;
  padding: 14px 12px 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, .18); text-align: left; pointer-events: auto; }
#choix.entre .carte { animation: glisse .3s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes glisse { from { transform: translateX(-110%) rotate(-4deg); } to { transform: none; } }
#choix-question { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; text-transform: uppercase; }
.barre { width: 100%; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 10px; }
#barre-pleine { height: 100%; background: var(--ink); transform-origin: left center; }
.options { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.option { padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink);
  font-family: inherit; font-weight: 800; font-size: 16px; text-align: left; cursor: pointer; }
.option.on { background: var(--ink); color: #fff; }
.option.on::after { content: ' ✓'; }
#choix.verrou .option, #choix.verrou #choix-fin { opacity: .45; }
#choix-fin { margin-top: 8px; padding: 11px; font-size: 15px; }

/* Liens de sortie (PARTAGE.md) : accueil et fin, jamais pendant la partie */
.pl-sortie { display: flex; justify-content: center; gap: 18px; margin-top: 12px; font-size: .88rem; font-weight: 700; }
.pl-sortie a { color: var(--muted); text-decoration: none; }
.pl-sortie a:hover { color: var(--ink); text-decoration: underline; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 5; }
