.sudoku-app { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 2.5rem; align-items: start; }

/* ---------- semi-roue (à gauche) ---------- */
.sudoku-gauche { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.semi-roue { position: relative; width: min(230px, 40vw); aspect-ratio: 1 / 2; overflow: hidden; }
.semi-roue svg { position: absolute; left: 0; top: 0; width: 200%; height: 100%; transition: transform 5.2s cubic-bezier(.12, .6, .1, 1); filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .5)); }
.semi-pointeur { position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 2; width: 0; height: 0;
  border-left: 28px solid var(--text); border-top: 15px solid transparent; border-bottom: 15px solid transparent;
  filter: drop-shadow(2px 0 3px rgba(0, 0, 0, .6)); }
.sudoku-resultat { min-height: 3rem; text-align: center; font-weight: 700; font-size: 1.05rem; }
.sudoku-resultat.gagne { color: var(--ok); }
.sudoku-resultat.perdu { color: var(--danger); }
.sudoku-resultat.info { color: var(--text); }
.sudoku-resultat.erreur { color: var(--danger); }
.sudoku-legende { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.sudoku-legende li { display: flex; align-items: center; gap: .4rem; padding: .2rem .65rem; background: var(--surface-2); border-radius: 999px; font-size: .85rem; }
.sudoku-legende .pastille-mult { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.sudoku-legende small { color: var(--soft); }

/* ---------- panneau de droite ---------- */
.sudoku-droite h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.sudoku-aide { color: var(--soft); font-size: .92rem; margin-bottom: .9rem; }
.sudoku-invite { background: rgba(124, 92, 255, .1); border: 1px solid rgba(124, 92, 255, .45); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1.4rem; }
.sudoku-invite a { color: var(--primary); font-weight: 700; }
.sudoku-puces { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.puce { padding: .4rem 1rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.puce:hover, .puce.actif { border-color: var(--primary); }
.puce.actif { box-shadow: 0 0 0 3px rgba(124, 92, 255, .25); }
.sudoku-label { display: block; font-weight: 500; margin-bottom: .35rem; }
.sudoku-input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: .7rem .9rem; font: inherit; font-size: 1.1rem; margin-bottom: 1rem; }
.sudoku-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 92, 255, .25); }
.sudoku-droite .btn:disabled { background: var(--surface-2); color: var(--soft); opacity: .6; cursor: not-allowed; }

/* ---------- barre de jeu ---------- */
.sudoku-barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; width: min(100%, 480px); margin-bottom: 1rem; }
.chrono { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 1.5rem; font-weight: 700; }
.chrono.urgent { color: var(--danger); }
.points-erreurs { display: inline-flex; align-items: center; gap: .35rem; color: var(--soft); font-size: .9rem; }
.point { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--border); }
.point.plein { background: var(--danger); border-color: var(--danger); }
.sudoku-mise { color: var(--soft); font-size: .9rem; }

/* ---------- grille ---------- */
.sudoku-grille { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 480px); aspect-ratio: 1; gap: 1px;
  background: var(--border); border: 3px solid var(--text); border-radius: 8px; overflow: hidden; user-select: none; }
.cellule { box-sizing: border-box; background: var(--surface-2); display: grid; place-items: center; cursor: pointer;
  font-weight: 700; font-size: clamp(1rem, 3.6vw, 1.6rem); }
.cellule.bord-d { border-right: 2px solid var(--text); }
.cellule.bord-b { border-bottom: 2px solid var(--text); }
.cellule.donnee { background: var(--surface); color: var(--soft); }
.cellule.remplie { color: #b9a8ff; }
.cellule.liee { background: #262d4d; }
.cellule.donnee.liee { background: #1c2139; }
.cellule.meme { background: rgba(124, 92, 255, .3); }
.cellule.selectionnee { background: rgba(124, 92, 255, .55); color: #fff; }
.cellule.flash-faux { animation: sudoku-faux .55s; }
.cellule.flash-bon { animation: sudoku-bon .5s; }
@keyframes sudoku-faux { 0%, 100% { background: rgba(255, 93, 108, .7); } 50% { background: rgba(255, 93, 108, .35); } }
@keyframes sudoku-bon { from { background: rgba(47, 209, 166, .6); } to { } }

.sudoku-pave { display: grid; grid-template-columns: repeat(9, 1fr); gap: .35rem; width: min(100%, 480px); margin-top: 1rem; }
.touche { display: flex; flex-direction: column; align-items: center; padding: .45rem 0; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.touche small { color: var(--soft); font-size: .65rem; font-weight: 400; }
.touche:hover:not(:disabled) { border-color: var(--primary); }
.touche:disabled { opacity: .3; cursor: not-allowed; }
#sudoku-fin { margin-top: 1.2rem; width: min(100%, 480px); }

/* ---------- historique ---------- */
.sudoku-histo-bloc { margin-top: 2rem; }
.sudoku-histo { list-style: none; display: grid; gap: .35rem; font-size: .95rem; }
.sudoku-histo li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .8rem; background: var(--surface-2); border-radius: 10px; color: var(--soft); }
.sudoku-histo li.gain strong { color: var(--ok); }
.sudoku-histo li.perte strong { color: var(--danger); }

@media (max-width: 760px) { .sudoku-app { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .semi-roue svg { transition-duration: .6s; } .cellule.flash-faux, .cellule.flash-bon { animation: none; } }
