/* Joute à cartes (site) : seulement l'habillage autour des pages du jeu (ui/), qui gardent leur propre feuille de style. Même palette que le jeu : bleu nuit et or. */
@font-face { font-family: JouteColumna; src: url('/joute/ui/natif/Columna.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: JouteHybrid; src: url('/joute/ui/natif/Hybrid.otf') format('opentype'); font-display: swap; }
:root { --nuit: #05080f; --nuit-2: #0b1424; --or: #e2c98f; --or-sombre: #8a7447; --texte: #f6ead0; --doux: #b3ab95; --mal: #e0584f; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--nuit); color: var(--texte); font: 16px JouteHybrid, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .bouton, button, .marque { font-family: JouteColumna, Georgia, serif; font-weight: normal; }
.fond { position: fixed; inset: 0; z-index: 0; background: radial-gradient(ellipse at 50% -10%, #1b2c4d 0%, var(--nuit-2) 46%, var(--nuit) 100%); }
.fond .halo { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, rgba(226, 201, 143, .12), transparent 62%); }
.ecran { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; }
.ecran[hidden] { display: none; }
body.video-fond .fond { display: none; }
button, .bouton { font-size: 16px; letter-spacing: .03em; color: var(--texte); background: rgba(11, 20, 36, .9); border: 1px solid #e2c98f66; border-radius: 4px; padding: .65em 1.3em; cursor: pointer; text-decoration: none; display: inline-block; transition: border-color .12s, background .12s, filter .12s; }
button:hover, .bouton:hover { border-color: var(--or); background: rgba(24, 40, 70, .95); }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, .bouton:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
.bouton.principal, button.principal { background: linear-gradient(180deg, #e8d29e, #a8863d); color: #1a1204; border-color: #f4dfa6; }
.bouton.principal:hover, button.principal:hover { filter: brightness(1.08); }
.petit { font-size: .85rem; color: var(--doux); }

.accueil { margin: auto; text-align: center; padding: 24px; max-width: 520px; }
.accueil .emb { filter: drop-shadow(0 0 22px rgba(226, 201, 143, .35)); }
.accueil h1 { font-size: clamp(34px, 6vw, 56px); margin: .2em 0 .1em; color: var(--or); letter-spacing: .06em; text-shadow: 0 0 28px rgba(226, 201, 143, .3); }
.chapeau { color: var(--doux); margin: 0 0 1.6em; }

.barre { display: flex; align-items: center; justify-content: space-between; padding: 10px clamp(14px, 3vw, 32px); border-bottom: 1px solid #e2c98f33; background: rgba(5, 8, 15, .6); }
.marque { display: flex; align-items: center; gap: 12px; color: var(--or); text-decoration: none; font-size: 21px; letter-spacing: .06em; text-transform: uppercase; }
.barre-droite { display: flex; gap: 18px; align-items: center; color: var(--doux); }
.barre-droite .pseudo { color: var(--texte); }
.panneau { display: flex; flex-direction: column; min-height: 0; border: 1px solid #e2c98f44; background: linear-gradient(160deg, rgba(14, 26, 48, .86), rgba(6, 10, 20, .9)); border-radius: 6px; padding: clamp(14px, 1.8vw, 24px); min-width: 0; }
.panneau h2 { margin: 0 0 12px; color: var(--or); font-size: 21px; letter-spacing: .06em; text-transform: uppercase; }
.panneau h3 { margin: 18px 0 8px; color: var(--or-sombre); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.panneau h3 small { color: var(--doux); text-transform: none; letter-spacing: 0; }
.choix-perso { display: flex; flex-wrap: wrap; gap: 10px; }
.choix-perso button { display: flex; align-items: center; gap: 10px; padding: .5em 1em .5em .6em; }
.choix-perso button img { width: 26px; height: 26px; object-fit: contain; }
.choix-perso button[aria-pressed="true"] { border-color: var(--or); background: rgba(226, 201, 143, .14); box-shadow: 0 0 0 1px var(--or) inset; }
.alerte { color: #ffd9a8; border: 1px solid #e0a35a66; background: rgba(224, 163, 90, .08); padding: 10px 14px; border-radius: 4px; margin: 14px 0 0; }
.cadre-cartes { flex: 1; min-height: 260px; width: 100%; border: 0; background: transparent; margin-top: 4px; }
.actions-salon { display: flex; flex-wrap: wrap; gap: 12px; }
.etat-file { color: var(--or); margin: 14px 0 0; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.liste-joueurs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; overflow: auto; }
.liste-joueurs li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid #ffffff14; border-radius: 4px; background: rgba(5, 8, 15, .5); }
.liste-joueurs .statut { font-size: .8rem; color: var(--doux); flex: 1; padding-left: 8px; }

/* Table : le décor derrière les pages du jeu (dans le monde, c'est la vraie table de la salle). */
.ecran-table { background: var(--nuit); }
.table-jeu { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, #1b2c4d 0%, #0b1424 55%, #04060b 100%); }
.table-jeu .bois { position: absolute; left: 7%; right: 7%; top: 13%; bottom: 25%; border-radius: 28px / 22px; background: linear-gradient(180deg, #4a3220 0%, #3a2616 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .75), inset 0 0 0 3px #6b4a2c; }
.table-jeu .tapis { position: absolute; left: 8.4%; right: 8.4%; top: 15.4%; bottom: 27.4%; border-radius: 20px / 16px; background: radial-gradient(ellipse at 50% 45%, #214634 0%, #17301f 62%, #0f2016 100%); box-shadow: inset 0 0 90px rgba(0, 0, 0, .6); }
.couche { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.couche.barres { height: 11%; left: 12%; width: 76%; top: 1.5%; pointer-events: none; z-index: 3; }
.couche.partie { pointer-events: none; z-index: 2; }
.couche.jeu { z-index: 4; }

.defi { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(2, 4, 9, .72); }
.defi[hidden] { display: none; }
.boite { padding: 26px 34px; border-radius: 6px; border: 1px solid var(--or); background: linear-gradient(160deg, #12203a, #0a1020); text-align: center; max-width: 90vw; box-shadow: 0 20px 60px rgba(0, 0, 0, .7); }
.boite p { margin: 0 0 14px; font-size: 18px; }
.boite div { display: flex; gap: 12px; justify-content: center; margin-top: 12px; }
.toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 400; display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 10px 20px; border-radius: 4px; background: rgba(5, 8, 15, .94); border: 1px solid var(--or); animation: toast .3s ease-out; max-width: 80vw; text-align: center; }
.toast.erreur { border-color: var(--mal); color: #ffd3cf; }
@keyframes toast { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- accueil du jeu */
.accueil-jeu { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); align-items: center; gap: 4vw; padding: 0 clamp(20px, 7vw, 120px); position: relative; }
.titre-jeu img { filter: drop-shadow(0 0 22px rgba(226, 201, 143, .4)); }
.titre-jeu h1 { margin: .2em 0 .05em; font-size: clamp(40px, 6.4vw, 92px); line-height: 1; color: var(--or); letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 0 34px rgba(226, 201, 143, .35), 0 3px 8px #000; }
.sous-titre { margin: 0; color: var(--doux); letter-spacing: .24em; text-transform: uppercase; font-size: clamp(12px, 1.3vw, 17px); text-shadow: 0 2px 6px #000; }
.menu { display: grid; gap: 14px; }
.entree-menu { display: grid; gap: 4px; text-align: left; padding: 18px 26px; border: 1px solid #e2c98f55; border-left: 3px solid var(--or); border-radius: 3px; background: linear-gradient(90deg, rgba(8, 14, 28, .82), rgba(8, 14, 28, .55)); transition: transform .15s, border-color .15s, background .15s; }
.entree-menu b { font: clamp(20px, 2.2vw, 28px) JouteColumna, Georgia, serif; font-weight: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--texte); }
.entree-menu span { color: var(--doux); font-size: 14px; letter-spacing: .04em; }
.entree-menu:hover, .entree-menu:focus-visible { transform: translateX(8px); border-color: var(--or); background: linear-gradient(90deg, rgba(36, 56, 98, .9), rgba(14, 24, 46, .62)); outline: none; }
.entree-menu:hover b, .entree-menu:focus-visible b { color: var(--or); }
.pied-accueil { position: absolute; left: clamp(20px, 7vw, 120px); right: clamp(20px, 7vw, 120px); bottom: 22px; margin: 0; display: flex; justify-content: space-between; color: var(--doux); text-shadow: 0 1px 4px #000; }
#ecran-accueil.apparait .titre-jeu, #ecran-accueil.apparait .menu { animation: apparition .9s ease both; }
#ecran-accueil.apparait .menu { animation-delay: .25s; }
@keyframes apparition { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 860px) { .accueil-jeu { grid-template-columns: 1fr; align-content: center; padding-bottom: 60px; } .titre-jeu { text-align: center; } }

/* ---------- écrans secondaires */
.barre h2 { margin: 0; font-size: 20px; letter-spacing: .12em; text-transform: uppercase; color: var(--or); }
.barre .retour { padding: .45em 1em; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.barre-info { color: var(--doux); }
.sous-ecran { flex: 1; min-height: 0; padding: clamp(12px, 2.4vw, 28px); display: grid; grid-template-columns: minmax(0, 1fr); align-content: stretch; gap: clamp(14px, 2vw, 26px); }
.sous-ecran.deux { grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr); align-content: start; }
.sous-ecran.etroit { max-width: 760px; width: 100%; margin: 0 auto; align-content: start; }
@media (max-width: 860px) { .sous-ecran.deux { grid-template-columns: 1fr; overflow: auto; } }
.reglage { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 4px; border-bottom: 1px solid #ffffff14; cursor: pointer; }
.reglage:last-child { border-bottom: 0; }
.reglage b { display: block; font: 17px JouteColumna, Georgia, serif; font-weight: normal; letter-spacing: .06em; }
.reglage small { color: var(--doux); }
.reglage input[type=checkbox] { width: 22px; height: 22px; accent-color: #c9a65a; flex: none; }
.reglage > span { flex: 1; }
.reglage input { order: 2; }
