/*
 * Go : pages de jeu (ordinateur, à deux, entraînement, duel, défi du jour).
 * Le socle (police, #app, boutons, barre du haut, encart de classement) vient
 * de jeu.css partagé, chargé avant. Ici : l'écran de réglages, le salon, le
 * goban, le décompte, le panneau de fin.
 */

body { --go-bois: #dcb468; --go-bois-bord: #8a6428; --go-ligne: #3b2a10; --go-noir: #1b1c1f; --go-blanc: #f4f2ea; }
#app { max-width: 760px; position: relative; z-index: 1; }
.top-bar h1 { font-size: 1.35rem; }
.top-bar .etiquette { min-width: 60px; text-align: right; font-size: 0.8rem; font-weight: 700; color: var(--color-light); }
[hidden] { display: none !important; }

/* ============================== RÉGLAGES ============================== */

.reglages { max-width: 600px; margin: 0 auto; text-align: left; }
.reglages h2 { font-family: var(--font-display); font-size: 1.15rem; color: #f0f3f6; text-align: center; margin-bottom: 14px; }
.reglage { margin-bottom: 18px; }
.reglage-titre { display: block; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texte-doux); margin-bottom: 8px; }
.reglage-aide { font-size: 0.86rem; line-height: 1.5; color: var(--texte-doux); margin-top: 8px; min-height: 1.3em; }

.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix button {
  flex: 1 1 96px;
  min-height: 46px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--texte);
  background: var(--surface-2);
  border: 1px solid var(--line-forte);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.choix-serre button { flex: 1 1 44px; padding: 10px 6px; }
.choix-serre button:first-child { flex-basis: 80px; }
.choix button:hover { border-color: var(--color-light); }
.choix button[aria-pressed="true"] { background: color-mix(in srgb, var(--color-btn1) 46%, var(--surface-2)); border-color: var(--color-light); color: #fff; }
.choix button:focus-visible, .btn:focus-visible, .fin-fermer:focus-visible, .btn-son:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.bilan { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 0.88rem; line-height: 1.6; text-align: center; color: var(--texte-doux); }
.bilan strong { color: var(--texte); }
.bilan a { color: var(--color-light); }
.action { text-align: center; margin: 6px 0 14px; }
.btn { min-height: 44px; }
.btn-grand { min-height: 50px; padding: 14px 38px; font-size: 1.02rem; }
.btn-discret { background: transparent; border-color: transparent; color: var(--texte-doux); }
.btn-discret:hover:not(:disabled) { color: var(--texte); border-color: var(--line-forte); }
.liens-modes { text-align: center; font-size: 0.88rem; line-height: 2; color: var(--texte-faible); }
.liens-modes a { color: var(--texte-doux); text-decoration: none; }
.liens-modes a:hover { color: var(--color-light); text-decoration: underline; }
.regles-rappel { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 0.88rem; line-height: 1.6; color: var(--texte); }
.regles-rappel summary { cursor: pointer; font-weight: 700; color: var(--texte-doux); min-height: 28px; }
.regles-rappel p { margin-top: 8px; }

.plus-reglages { margin: 0 0 14px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.plus-reglages summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; font-size: 0.88rem; font-weight: 700; color: var(--texte-doux); }
.plus-reglages[open] summary { margin-bottom: 12px; }
.btn-fichier { display: inline-flex; align-items: center; cursor: pointer; }
.niveau-estime { color: var(--texte); }
.regles-partie { margin: 6px 0 8px; text-align: left; }

.btn-son {
  min-width: 44px; min-height: 44px;
  font: inherit; font-size: 1.05rem;
  color: var(--texte-doux);
  background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
}
.btn-son:hover { border-color: var(--line-forte); }

/* ============================== EN PARTIE ============================== */

.info-bar { margin-bottom: 10px; min-height: 46px; }
.hint { font-size: 0.86rem; line-height: 1.45; color: var(--texte-doux); margin: 8px 0 6px; min-height: 1.3em; }
.outils-partie { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 8px; }
.outils-partie .btn { padding: 8px 14px; font-size: 0.85rem; }

/* Les deux joueurs : pastille de couleur, nom, prisonniers et komi. */
.joueurs { display: flex; gap: 8px; justify-content: center; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.joueur { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 0.86rem; border: 1px solid var(--line); background: var(--surface-2); max-width: 100%; }
.joueur .nom { overflow-wrap: anywhere; text-align: left; }
.joueur .prisonniers { font-weight: 400; font-size: 0.78rem; color: var(--texte-doux); }
.joueur .pendule { font-variant-numeric: tabular-nums; font-weight: 800; color: #f0f3f6; }
.joueur .pendule.urgent { color: #e08080; }
.joueur .pastille { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.joueur-noir .pastille { background: var(--go-noir); border: 1px solid #000; }
.joueur-blanc .pastille { background: var(--go-blanc); border: 1px solid #a49e8e; }
.joueur.actif { border-color: var(--color-light); background: color-mix(in srgb, var(--color-btn1) 34%, var(--surface-2)); }
.score-manches { font-weight: 800; color: #f0f3f6; font-size: 0.95rem; }
.bandeau-spectateur { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 12px; margin-bottom: 10px; border: 1px solid var(--color-light); border-radius: 8px; background: var(--surface-2); font-size: 0.88rem; }
.bandeau-spectateur p { margin: 0; color: var(--texte); }
.info-spectateurs { font-size: 0.85rem; color: var(--texte-doux); }
.bandeau-alerte { background: color-mix(in srgb, #d2973a 16%, var(--surface-2)); border: 1px solid #d2973a; color: #f0d9b0; border-radius: 8px; padding: 9px 12px; font-size: 0.88rem; line-height: 1.45; margin-bottom: 10px; }

/* ---------- Le goban ---------- */

.go-goban { width: min(100%, 680px); margin: 0 auto; position: relative; }
.go-cadre { user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.go-svg { display: block; width: 100%; height: auto; border-radius: 6px; border: 2px solid var(--go-bois-bord); }
.go-svg:focus { outline: none; }
.go-svg:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.go-bois { fill: var(--go-bois); }
.go-ligne { stroke: var(--go-ligne); stroke-linecap: square; }
.go-hoshi { fill: var(--go-ligne); }
.go-coord { fill: #5a4116; font-family: system-ui, sans-serif; font-weight: 700; }
.go-pierre { stroke-width: 0.03; }
.go-noire { fill: var(--go-noir); stroke: #000; }
.go-blanche { fill: var(--go-blanc); stroke: #8f8a7c; }
.go-actif .go-svg { cursor: pointer; }
.go-en-marquage .go-svg { cursor: pointer; }
.go-fantome { opacity: 0.45; pointer-events: none; }
.go-preselection { opacity: 0.6; }
.go-morte { opacity: 0.4; }
.go-croix-morte { stroke: #c0392b; stroke-width: 0.08; stroke-linecap: round; fill: none; }
.go-dernier { fill: none; stroke-width: 0.06; }
.go-dernier.sur-noir { stroke: #f4f2ea; }
.go-dernier.sur-blanc { stroke: #1b1c1f; }
.go-numero { font-family: system-ui, sans-serif; font-weight: 700; pointer-events: none; }
.go-numero.sur-noir { fill: #f4f2ea; }
.go-numero.sur-blanc { fill: #1b1c1f; }
.go-ko { fill: none; stroke: #b03030; stroke-width: 0.06; }
.go-indice { fill: none; stroke: #2f7fd0; stroke-width: 0.09; }
.go-curseur { fill: none; stroke: #2f7fd0; stroke-width: 0.05; }
.go-terr { stroke-width: 0.02; }
.go-terr-noir { fill: var(--go-noir); stroke: #000; }
.go-terr-blanc { fill: var(--go-blanc); stroke: #6e695c; }
.go-goban.victoire-moi .go-svg, .go-goban.victoire-autre .go-svg { border-color: #39b36a; }

.go-attente {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 700; color: #f0f3f6;
  background: rgba(8, 10, 14, 0.72);
  border-radius: 6px;
  pointer-events: none;
}

/* ---------- Décompte après deux passes ---------- */

.decompte { margin: 6px 0 10px; padding: 12px 14px; border: 1px solid var(--color-light); border-radius: 10px; background: var(--surface-2); text-align: left; }
.decompte h2 { font-family: var(--font-display); font-size: 1.05rem; color: #f0f3f6; margin-bottom: 6px; }
.decompte-aide { font-size: 0.86rem; line-height: 1.5; color: var(--texte-doux); margin-bottom: 8px; }
.decompte-score { font-weight: 700; color: var(--texte); margin-bottom: 10px; }
.decompte-etat { font-size: 0.84rem; color: var(--texte-doux); margin-bottom: 8px; }
.decompte-boutons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Relecture de la partie ---------- */

.relecture { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 10px 0 4px; }
.relecture .btn { min-width: 46px; min-height: 44px; padding: 8px 12px; }
.relecture .position { min-width: 110px; font-size: 0.88rem; font-weight: 700; color: var(--texte); font-variant-numeric: tabular-nums; }
.relecture .btn-quitter { margin-left: 6px; }
.relecture-note { width: 100%; text-align: center; font-size: 0.86rem; color: #f0d9b0; margin: 4px 0 0; }

/* ---------- Fin de partie : À CÔTÉ ou SOUS le goban, jamais dessus ---------- */

.fin-partie {
  position: relative;
  max-width: 480px;
  margin: 14px auto 4px;
  padding: 20px 18px 16px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line-forte);
  border-radius: 12px;
}
.fin-partie h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 6px; padding: 0 34px; }
.win-text { color: #64ab7c; }
.lose-text { color: #d07070; }
.draw-text { color: #d2973a; }
.fin-fermer {
  position: absolute; top: 6px; right: 6px;
  width: 44px; height: 44px;
  font-size: 1.4rem; line-height: 1;
  color: var(--texte-doux);
  background: transparent; border: 1px solid transparent; border-radius: 50%; cursor: pointer;
}
.fin-fermer:hover { color: var(--texte); border-color: var(--line-forte); }
.fin-message { color: var(--texte); font-size: 0.93rem; line-height: 1.5; margin-bottom: 6px; }
.fin-detail { color: var(--texte-doux); font-size: 0.84rem; line-height: 1.5; margin-bottom: 8px; }
.fin-detail:empty { display: none; }
.fin-statut { font-size: 0.86rem; line-height: 1.5; color: var(--texte-doux); margin-bottom: 12px; min-height: 1.3em; }
.fin-statut.ok { color: #8cc7a0; }
.fin-statut.alerte { color: #e0a0a0; }
.fin-statut a, .fin-liens a { color: var(--color-light); }
.fin-boutons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.fin-boutons .btn { min-height: 46px; }
.fin-boutons-second { margin-top: 6px; gap: 2px; }
.fin-boutons-second .btn { min-height: 40px; font-size: 0.85rem; padding: 6px 10px; }
.fin-liens { margin: 10px 0 14px; font-size: 0.86rem; line-height: 1.9; }
.fin-liens:empty { margin: 0 0 12px; }
.cta-score-msg { color: var(--texte); font-size: 0.88rem; margin-bottom: 10px; }
.cta-auth-btns { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.partage-score { margin-bottom: 12px; }

.barre-fin { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 4px; }
.barre-fin .resume { width: 100%; font-weight: 700; color: #f0f3f6; }

.confetti { position: fixed; top: -10px; z-index: 200; pointer-events: none; font-size: 1.2rem; animation: go-confetti 3s ease-in forwards; }
@keyframes go-confetti { to { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

/* ---------- Analyse d'après-partie ---------- */

.analyse-partie { text-align: left; margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-1); font-size: 0.86rem; line-height: 1.5; color: var(--texte-doux); }
.analyse-titre { font-weight: 700; color: var(--texte); margin-bottom: 6px; }
.analyse-partie ol { margin: 0; padding-left: 1.2em; }
.analyse-partie li { margin: 4px 0; }
.lien-analyse { font: inherit; color: var(--color-light); background: none; border: 0; padding: 2px 0; text-align: left; cursor: pointer; text-decoration: underline; min-height: 32px; }
.btn-rejouer-depuis { display: block; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--texte); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; margin: 2px 0 6px; min-height: 32px; cursor: pointer; }
.btn-rejouer-depuis:hover { border-color: var(--color-light); }

/* ============================== SALON DU DUEL ============================== */

.lobby-msg { color: var(--texte-doux); margin: 4px 0 14px; font-size: 0.95rem; min-height: 1.4em; }
.salon-bloc { max-width: 520px; margin: 0 auto 16px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); text-align: left; }
.salon-titre { font-family: var(--font-display); font-size: 1.1rem; color: #f0f3f6; margin-bottom: 12px; }
.salon-code { display: flex; gap: 10px; flex-wrap: wrap; }
.salon-code input, .salon-pseudo input {
  flex: 1 1 130px; min-width: 0; min-height: 48px; padding: 8px 12px;
  font: inherit; font-weight: 700;
  color: var(--texte); background: var(--surface-0); border: 1px solid var(--line-forte); border-radius: 8px;
}
.salon-code input { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.3em; text-align: center; text-transform: uppercase; }
.salon-pseudo input { width: 100%; font-size: 1rem; }
.salon-code input:focus, .salon-pseudo input:focus { outline: 2px solid var(--color-light); outline-offset: 1px; }
.salon-code .btn { flex: 1 1 110px; min-height: 48px; }
.salon-bloc .reglage { margin-bottom: 14px; }
.salon-bloc .choix button { flex-basis: 84px; }
.salon-bloc .choix-serre button { flex-basis: 40px; }
.salon-bloc .btn-creer { width: 100%; min-height: 48px; }
.salon-attente { max-width: 480px; margin: 0 auto 16px; text-align: center; }
.code-affiche { font-size: 2.4rem; font-weight: 800; letter-spacing: 0.3em; text-indent: 0.3em; color: var(--color-light); margin: 8px 0 6px; }
.salon-explication { font-size: 0.9rem; line-height: 1.6; color: var(--texte-doux); margin: 8px auto 14px; }
.salon-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.partie-publique { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.partie-publique:last-child { border-bottom: 0; }
.partie-publique .qui { font-weight: 700; overflow-wrap: anywhere; }
.partie-publique .quoi { display: block; font-size: 0.8rem; font-weight: 400; color: var(--texte-doux); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-forte); border-top-color: var(--color-light); border-radius: 50%; animation: go-tourne 0.8s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes go-tourne { to { transform: rotate(360deg); } }

.compte-a-rebours { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; background: rgba(6, 8, 11, 0.82); }
.compte-a-rebours span { font-family: var(--font-display); font-size: 6rem; font-weight: 700; color: var(--color-light); }

#lobby-status.mode-invitation > .salon-bloc:not(.salon-pseudo):not(.salon-invitation),
#lobby-status.mode-invitation > .bilan { display: none; }
.salon-invitation-action { text-align: center; margin: 0 auto 18px; }

/* ============================== DÉFI DU JOUR ============================== */

.page-defi #app { max-width: 800px; }
#entree-defi { text-align: center; }
#entree-defi h1 { font-size: 1.45rem; margin-bottom: 6px; }
.defi-date { color: var(--texte-doux); font-size: 0.92rem; margin-bottom: 12px; }
.btn-lancer { margin: 8px auto 6px; }
.etat-defi { min-height: 1.2em; color: var(--texte-doux); font-size: 0.92rem; margin: 6px 0 10px; }
.defi-avertissement { font-size: 0.8rem; color: var(--texte-faible); margin-bottom: 18px; }
.classement-titre { font-family: var(--font-display); font-size: 1.1rem; color: #f0f3f6; text-align: center; margin-bottom: 10px; }
.lb-echec { color: #d07070; font-weight: 800; }
.titre-jeu-defi { font-family: var(--font-display); font-size: 1.15rem; color: #f0f3f6; }
.defi-compte { margin: 14px auto 18px; padding: 16px; max-width: 520px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 0.92rem; line-height: 1.55; }
.defi-compte-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.defi-btn-inscription, .defi-btn-connexion { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 6px; font-weight: 700; text-decoration: none; }
.defi-btn-inscription { background: var(--color-btn1); color: #fff; }
.defi-btn-connexion { border: 1px solid var(--line-forte); color: var(--texte); }
.objectif-du-jour { font-size: 1.02rem; color: var(--texte); margin: 0 0 14px; }
.objectif-du-jour strong { color: #fff; }
.defi-apres { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 4px 0 8px; }
.defi-prochain { font-size: 0.88rem; color: var(--texte-doux); margin: 4px 0 12px; }
.defi-semaine { max-width: 480px; margin: 6px auto 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.defi-serie { font-size: 0.9rem; color: var(--texte-doux); margin-bottom: 10px; }
.defi-serie strong { color: var(--texte); }
.semaine-jours { display: flex; gap: 6px; justify-content: center; list-style: none; margin: 0 0 8px; padding: 0; }
.semaine-jours li { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.8rem; font-weight: 800; border: 2px solid var(--line-forte); color: var(--texte-faible); }
.semaine-jours .jour-gagne { background: #39b36a; border-color: #39b36a; color: #fff; }
.semaine-jours .jour-perdu { border-color: #d07070; color: #d07070; }
.semaine-jours .jour-manque { border-style: dashed; }
.semaine-jours .jour-aujourdhui { border-color: var(--color-light); color: var(--texte); }
.defi-semaine-aide { font-size: 0.78rem; line-height: 1.45; color: var(--texte-faible); }
.consigne-probleme { font-size: 1rem; font-weight: 700; color: #f0f3f6; margin: 4px 0 10px; text-align: left; }
.go-hors-zone { fill: rgba(20, 16, 8, 0.38); }
.go-vise { stroke-width: 0.05; fill: none; }
.go-vise.sur-noir { stroke: #f0b0a0; }
.go-vise.sur-blanc { stroke: #c0392b; }
.lb-reussi { color: #64ab7c; font-weight: 800; }
.defi-hier { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 4px 0 18px; }
.defi-hier-stat { font-size: 0.86rem; color: var(--texte-doux); }
.btn-solution-revue { display: block; margin: 10px auto 0; }
.zone-revue { margin: 6px 0 22px; scroll-margin-top: 70px; }
.zone-revue .go-goban { max-width: 460px; }
.zone-revue .hint { text-align: center; max-width: 620px; margin: 0 auto 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ============================== APPRENDRE LE GO ============================== */

.go-repere-cible { fill: none; stroke: #2f7fd0; stroke-width: 0.07; stroke-dasharray: 0.12 0.08; }
.go-repere-trouve { fill: #2f7fd0; }
.lecon { text-align: left; padding: 12px 14px; border: 1px solid var(--line-forte); border-radius: 10px; background: var(--surface-2); margin-bottom: 14px; }
.lecon-numero { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texte-doux); margin-bottom: 4px; }
.lecon h2 { font-family: var(--font-display); font-size: 1.2rem; color: #f0f3f6; margin-bottom: 8px; }
.lecon-texte { font-size: 0.95rem; line-height: 1.6; color: var(--texte); margin-bottom: 10px; }
.lecon-choix { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.lecon-choix .bonne-reponse { border-color: #39b36a; background: color-mix(in srgb, #39b36a 30%, var(--surface-2)); }
.lecon-retour { min-height: 1.4em; font-size: 0.9rem; line-height: 1.5; color: var(--texte-doux); margin-bottom: 10px; }
.lecon-retour.ok { color: #8cc7a0; }
.lecon-retour.alerte { color: #e0a0a0; }
.lecon-boutons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lecons-liste { text-align: left; margin-bottom: 14px; }
.lecons-liste summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; margin-bottom: 6px; }
.lecons-liste ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lecon-lien { width: 100%; min-height: 40px; padding: 8px 12px; text-align: left; font: inherit; font-size: 0.9rem; color: var(--texte-doux); background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.lecon-lien:hover { border-color: var(--color-light); color: var(--texte); }
.lecon-lien.actif { border-color: var(--color-light); color: #fff; background: color-mix(in srgb, var(--color-btn1) 34%, var(--surface-2)); }
.lecon-lien.faite { color: #8cc7a0; }
.apprendre-texte { text-align: left; margin: 26px 0 10px; font-size: 0.93rem; line-height: 1.65; color: var(--texte-doux); }
.apprendre-texte h2 { font-family: var(--font-display); font-size: 1.2rem; color: #f0f3f6; margin-bottom: 8px; }
.apprendre-texte ol { padding-left: 1.3em; margin: 8px 0 12px; }
.apprendre-texte strong { color: var(--texte); }
.apprendre-texte a { color: var(--color-light); }

/* ============================== MISE EN PAGE ============================== */

@media (max-height: 900px) {
  body.go-en-jeu .jeu-banner { display: none; }
}

/* Pendant qu'on joue, rien d'autre que la partie : les blocs latéraux du site
   reviennent dès qu'elle est finie, si l'écran est assez large pour eux. */
body.go-blocs-caches .bandeau-infos-wrap, body.go-blocs-caches .bloc-jeux-une-wrap { display: none !important; }
/* Pendant les leçons « Apprendre le go », rien d'autre que la leçon, quelle que soit la largeur. */
body.page-apprendre .bandeau-infos-wrap, body.page-apprendre .bloc-jeux-une-wrap { display: none !important; }
@media (max-width: 1699px) {
  body.go-en-jeu .bandeau-infos-wrap, body.go-en-jeu .bloc-jeux-une-wrap { display: none !important; }
}

/* Écran large : le goban à gauche, aussi grand que la hauteur le permet, les
   informations et le résultat à droite. */
@media (min-width: 980px) and (min-height: 521px) {
  body.go-en-jeu #app { max-width: 1280px; }
  body.go-en-jeu .zone-jeu { display: grid; grid-template-columns: minmax(0, auto) minmax(280px, 1fr); grid-template-rows: auto 1fr; gap: 0 28px; align-items: start; }
  body.go-en-jeu .go-goban { width: min(860px, calc(100svh - 120px), 62vw); margin: 0; }
  body.go-en-jeu .colonne-plateau { grid-column: 1; grid-row: 1 / span 2; }
  body.go-en-jeu .colonne-infos { grid-column: 2; grid-row: 1; }
  body.go-en-jeu .colonne-fin { grid-column: 2; grid-row: 2; }
  body.go-en-jeu .fin-partie { margin: 8px 0 0; max-width: none; }
  body.go-en-jeu .barre-fin { justify-content: flex-start; }
  body.go-en-jeu .top-bar h1 { font-size: 1.15rem; }
  body.go-en-jeu .back-link { white-space: nowrap; }
  body.go-en-jeu .joueurs { justify-content: flex-start; }
}

/* Téléphone à la verticale : le goban prend toute la largeur de l'écran. */
@media (max-width: 560px) {
  .top-bar h1 { font-size: 1.1rem; }
  .joueur { padding: 5px 10px; font-size: 0.8rem; }
  .compte-a-rebours span { font-size: 4.5rem; }
  .code-affiche { font-size: 2rem; }
  body.go-en-jeu .jeu-banner { display: none; }
  .go-goban { width: calc(100vw - 6px); margin-left: calc((100% - (100vw - 6px)) / 2); }
  .info-bar { min-height: 40px; margin-bottom: 6px; }
  /* Réglages : les cinq niveaux sur une ligne, et le bouton « Jouer » dans le premier écran. */
  #choix-niveau button { flex: 1 1 52px; padding: 10px 2px; font-size: 0.8rem; }
  #description-taille { display: none; }
  .reglages .reglage { margin-bottom: 14px; }
}

/* Tablette à la verticale : le goban tient dans la hauteur, sous les informations de la partie. */
@media (min-width: 561px) and (max-width: 979px) and (orientation: portrait) {
  body.go-en-jeu .jeu-banner { display: none; }
  body.go-en-jeu .go-goban { width: min(100%, 680px, calc(100svh - 385px)); }
}

@media (max-width: 380px) {
  .salon-code input, .salon-code .btn { flex-basis: 100%; }
}

/* Téléphone tenu à l'horizontale : goban à gauche sur toute la hauteur, infos à droite. */
@media (orientation: landscape) and (max-height: 520px) {
  body.go-en-jeu { padding: 4px; padding-top: 4px; }
  body.go-en-jeu .jeu-banner, body.go-en-jeu footer { display: none; }
  body.go-en-jeu #app { max-width: none; padding: 6px 10px; }
  body.go-en-jeu .zone-jeu { display: grid; grid-template-columns: auto minmax(180px, 1fr); grid-template-rows: auto 1fr; gap: 0 14px; align-items: start; padding-top: 46px; }
  body.go-en-jeu .colonne-plateau { grid-column: 1; grid-row: 1 / span 2; }
  body.go-en-jeu .colonne-infos { grid-column: 2; grid-row: 1; text-align: left; }
  body.go-en-jeu .colonne-fin { grid-column: 2; grid-row: 2; }
  body.go-en-jeu .top-bar { border-bottom: 0; margin-bottom: 6px; padding-bottom: 0; }
  body.go-en-jeu .go-goban { width: calc(100svh - 60px); margin: 0; }
  body.go-en-jeu .fin-partie { margin: 8px 0 0; padding: 14px 12px 12px; }
  body.go-en-jeu .fin-partie h2 { font-size: 1.2rem; }
}
