:root{color-scheme:dark;--bg:#080b14;--panel:#121827;--panel2:#182033;--text:#f6f7fb;--muted:#9aa5bc;--accent:#7657ff;--accent2:#36c6f4;--line:#273148;--ok:#3ddc97}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,sans-serif;background:radial-gradient(circle at 15% 0,#202b50 0,transparent 35%),linear-gradient(180deg,#0c1120,var(--bg));color:var(--text);min-height:100vh}a{color:inherit;text-decoration:none}.topbar{min-height:72px;display:flex;align-items:center;justify-content:space-between;padding:14px max(18px,5vw);border-bottom:1px solid #ffffff12;background:#080b14d9;position:sticky;top:0;z-index:10;backdrop-filter:blur(18px)}.brand{font-weight:900;font-size:1.2rem}.brand-mark{color:var(--accent2)}.brand small{font-size:.62rem;color:var(--muted);font-weight:600}.topbar nav{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.container{width:min(1160px,calc(100% - 32px));margin:42px auto 90px}.hero{display:flex;justify-content:space-between;align-items:center;gap:32px;margin:26px 0 44px}.hero h1,.page-head h1,.profile-banner h1,.game-page h1{font-size:clamp(2.3rem,6vw,4.8rem);line-height:.98;margin:.18em 0}.hero p{max-width:650px}.eyebrow,.tag{text-transform:uppercase;letter-spacing:.16em;color:#9fe6ff;font-size:.74rem;font-weight:800}.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:12px;background:linear-gradient(135deg,var(--accent),#9b5cff);color:#fff;padding:12px 18px;font-weight:800;cursor:pointer;box-shadow:0 10px 30px #7657ff33}.button.small{padding:8px 12px}.level-card,.panel,.scorebox,.auth-card,.stat-grid article,.achievement{background:linear-gradient(145deg,#172038,#101625);border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:0 20px 55px #0005}.level-card{min-width:min(360px,100%)}.level-line{display:flex;justify-content:space-between;gap:20px;margin-bottom:13px}.xp-track{height:12px;border-radius:99px;background:#060912;overflow:hidden;border:1px solid #ffffff14}.xp-track i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2));border-radius:inherit;transition:width .6s ease}.level-card small,.muted-text{color:var(--muted)}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:0 0 48px}.stat-grid article strong{display:block;font-size:2rem}.stat-grid article span{color:var(--muted)}.section-title{display:flex;justify-content:space-between;align-items:end}.section-title h2{font-size:2rem;margin:.2em 0 20px}.game-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px}.game-card{border:1px solid var(--line);border-radius:24px;overflow:hidden;background:var(--panel);box-shadow:0 20px 50px #0004}.game-card.muted{opacity:.55}.game-cover{height:150px;display:grid;place-items:center;background:linear-gradient(135deg,#273151,#12182a);font-size:2.8rem;font-weight:950}.cover-2048{background:radial-gradient(circle at 30% 20%,#f4a340,#9a351c 70%)}.game-body{padding:22px}.game-body h3{font-size:1.5rem;margin:.25em 0}.game-body p:not(.tag){color:var(--muted);min-height:48px}.profile-banner{display:flex;align-items:center;gap:22px;padding:38px;border:1px solid var(--line);border-radius:28px;background:linear-gradient(120deg,#31256d,#14253a);margin-bottom:24px}.avatar{width:96px;height:96px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--accent),var(--accent2));font-size:2.2rem;font-weight:900}.profile-grid{display:grid;grid-template-columns:1fr 1.25fr;gap:20px;margin-bottom:20px}.mini-stats{display:flex;gap:24px;margin-top:24px}.mini-stats b{font-size:1.35rem}.badge-list{display:grid;gap:12px}.badge{display:flex;gap:13px;align-items:center;padding:11px;border-radius:14px;background:#ffffff08}.badge span{font-size:1.4rem}.badge small{display:block;color:var(--muted);margin-top:3px}.activity{padding:0;list-style:none}.activity li{display:grid;grid-template-columns:105px 1fr auto;gap:15px;padding:14px 0;border-bottom:1px solid var(--line)}.activity time{color:var(--muted)}.achievement-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.achievement{display:flex;gap:16px}.achievement.locked{opacity:.55;filter:saturate(.4)}.achievement-icon{font-size:2rem}.achievement h3{margin:0}.achievement p,.achievement small{color:var(--muted)}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:14px;border-bottom:1px solid var(--line)}.game-page{display:flex;justify-content:space-between;align-items:center;gap:28px}.scorebox strong{display:block;font-size:2.4rem}.board{width:min(92vw,480px);aspect-ratio:1;display:grid;grid-template-columns:repeat(4,1fr);gap:10px;background:#202944;padding:10px;border-radius:22px;touch-action:none}.tile{display:grid;place-items:center;border-radius:14px;background:#11182b;font-size:clamp(1.2rem,5vw,2.4rem);font-weight:900}.t2,.t4{background:#2d3760}.t8,.t16{background:#6144bf}.t32,.t64{background:#7c3aed}.t128,.t256,.t512{background:#b45309}.t1024,.t2048{background:#dc2626}.game-actions{display:flex;align-items:center;gap:18px;margin-top:20px}.auth-card{max-width:520px;margin:70px auto}.auth-card form{display:grid;gap:18px}label{display:grid;gap:8px;color:var(--muted)}input{width:100%;padding:13px;border-radius:12px;border:1px solid var(--line);background:#0d1427;color:#fff}.alert{background:#7f1d1d;padding:12px;border-radius:10px}footer{text-align:center;color:var(--muted);padding:30px}@media(max-width:780px){.topbar{align-items:flex-start}.topbar nav{justify-content:flex-end;gap:10px}.hero,.game-page{align-items:flex-start;flex-direction:column}.level-card,.scorebox{width:100%}.stat-grid{grid-template-columns:1fr 1fr}.profile-grid{grid-template-columns:1fr}.activity li{grid-template-columns:1fr}.container{margin-top:25px}.profile-banner{padding:24px}}@media(max-width:480px){.brand small{display:none}.topbar nav a:not(.button){font-size:.85rem}.stat-grid{grid-template-columns:1fr 1fr}.profile-banner{align-items:flex-start;flex-direction:column}}
.status-pill{display:inline-flex;padding:7px 11px;border-radius:999px;background:#ffffff10;border:1px solid var(--line);color:var(--muted);font-size:.78rem;font-style:normal;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.recent-panel{margin-top:28px}.table-wrap{overflow:auto}.module-list{display:grid;gap:10px}.module-list>div{display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:14px;padding:14px;border-radius:14px;background:#ffffff08}.module-list span{color:var(--muted)}@media(max-width:620px){.module-list>div{grid-template-columns:1fr}.topbar{position:static}.topbar nav{width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}}

/* 0.3.0-alpha.1 */
.nav-toggle{display:none;border:1px solid var(--line);background:#11182b;color:#fff;border-radius:10px;padding:8px 11px;font-size:1.15rem}.game-meta{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.game-meta span{font-size:.76rem;padding:6px 9px;border:1px solid var(--line);border-radius:999px;color:#c4cee3;background:#ffffff08}.cover-snake{background:radial-gradient(circle at 30% 15%,#8eea64,#176c4b 68%,#0d2630)}.snake-shell{display:grid;grid-template-columns:minmax(0,480px) 120px;gap:22px;align-items:center}.snake-board{width:min(92vw,480px);height:auto;border:1px solid var(--line);border-radius:22px;background:#0b1020;box-shadow:0 20px 55px #0006;touch-action:none}.touch-pad{display:grid;grid-template-columns:repeat(3,38px);grid-template-rows:repeat(2,38px);gap:5px;justify-content:center}.touch-pad button{border:1px solid var(--line);background:#172038;color:#fff;border-radius:10px;font-size:1rem}.touch-pad button[data-dir=up]{grid-column:2}.touch-pad button[data-dir=left]{grid-column:1}.touch-pad button[data-dir=down]{grid-column:2}.touch-pad button[data-dir=right]{grid-column:3}
@media(max-width:780px){.nav-toggle{display:block}.topbar{flex-wrap:wrap}.topbar nav{display:none;width:100%;padding-top:12px}.nav-open .topbar nav{display:flex}.snake-shell{grid-template-columns:1fr}.touch-pad{grid-template-columns:repeat(3,52px);grid-template-rows:repeat(2,52px);margin:auto}.touch-pad button{font-size:1.2rem}}

/* 0.3.0-alpha.2 */
.cover-breakout{background:linear-gradient(135deg,#ff7a59,#f2c94c 48%,#7657ff)}
.cover-minesweeper{background:radial-gradient(circle at 35% 30%,#7b879f,#293248 62%,#101521)}
.button.secondary{background:#172038;border:1px solid var(--line);box-shadow:none}
.breakout-shell{width:min(100%,760px);padding:18px;border:1px solid var(--line);border-radius:24px;background:#111827;box-shadow:0 20px 55px #0006}
.breakout-board{display:block;width:100%;height:auto;border-radius:16px;background:#0b1020;touch-action:none}
.difficulty-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.difficulty-tabs button{padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:#11182b;color:#fff;font-weight:800;cursor:pointer}.difficulty-tabs button.active{background:linear-gradient(135deg,var(--accent),#9b5cff);border-color:transparent}
.mine-wrap{max-width:100%;overflow:auto;padding:16px;border:1px solid var(--line);border-radius:22px;background:#101625;box-shadow:0 20px 55px #0005}.mine-board{--cols:9;display:grid;grid-template-columns:repeat(var(--cols),minmax(27px,34px));gap:3px;width:max-content;margin:auto;user-select:none}.mine-cell{width:34px;height:34px;padding:0;border:1px solid #33405d;border-radius:6px;background:linear-gradient(145deg,#26324d,#182136);color:#fff;font-weight:900;font-size:1rem;cursor:pointer;touch-action:manipulation}.mine-cell.open{background:#0d1424;border-color:#202b40}.mine-cell.mine{background:#7f1d1d}.mine-cell[data-n="1"]{color:#60a5fa}.mine-cell[data-n="2"]{color:#4ade80}.mine-cell[data-n="3"]{color:#fb7185}.mine-cell[data-n="4"]{color:#c084fc}.mine-cell[data-n="5"],.mine-cell[data-n="6"],.mine-cell[data-n="7"],.mine-cell[data-n="8"]{color:#facc15}
@media(max-width:620px){.breakout-shell{padding:8px}.mine-cell{width:29px;height:29px;font-size:.88rem}.mine-board{grid-template-columns:repeat(var(--cols),29px)}}

/* 0.3.0-alpha.3 */
.cover-battleship{background:radial-gradient(circle at 30% 20%,#5bd5ff,#176a9a 55%,#0a2742)}
.cover-crosswords-arena{background:linear-gradient(135deg,#f3d28a,#c17b33 45%,#5f351d)}
.player-name-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin:16px 0 22px}
select{width:100%;padding:13px;border-radius:12px;border:1px solid var(--line);background:#0d1427;color:#fff}
.handoff{text-align:center;max-width:620px;margin:30px auto}.handoff-icon{font-size:4rem}.bs-game{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:24px}.bs-column h2{text-align:center}.bs-board{display:grid;grid-template-columns:repeat(10,minmax(25px,42px));gap:3px;width:max-content;max-width:100%;margin:auto;padding:10px;border:1px solid var(--line);border-radius:18px;background:#0c1830}.bs-cell{width:42px;height:42px;padding:0;border:1px solid #315377;border-radius:6px;background:#153d64;color:#fff;font-size:1.25rem;font-weight:900;cursor:pointer}.bs-cell:hover{filter:brightness(1.2)}.bs-cell.ship{background:#69758b}.bs-cell.hit{background:#b91c1c}.bs-cell.miss{background:#1d4f73;color:#8fd8ff}.bs-board.finished{opacity:.72}
.cw-scoreboard{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:18px 0}.cw-scoreboard article{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;border:1px solid var(--line);border-radius:14px;background:#111827}.cw-scoreboard article.active{outline:2px solid var(--accent2)}.cw-scoreboard strong{font-size:1.4rem}.cw-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:22px;align-items:start}.cw-board-wrap{overflow:auto;padding:12px;border-radius:20px;background:#101625;border:1px solid var(--line)}.cw-board{display:grid;grid-template-columns:repeat(15,36px);gap:2px;width:max-content;margin:auto}.cw-cell{width:36px;height:36px;padding:0;border:1px solid #38445c;border-radius:4px;background:#172038;color:#fff;font-weight:900;cursor:pointer}.cw-cell.center{background:#7657ff55}.cw-cell.fixed{background:#e6c48f;color:#38220d}.cw-cell.pending{background:#9fe6ff;color:#10233a}.cw-rack{display:flex;flex-wrap:wrap;gap:8px;min-height:58px;margin:14px 0}.cw-tile{width:48px;height:52px;position:relative;border:0;border-radius:8px;background:#e6c48f;color:#38220d;font-size:1.35rem;font-weight:900;box-shadow:0 4px 0 #9b6b32;cursor:pointer}.cw-tile small{position:absolute;right:5px;bottom:3px;font-size:.65rem}.cw-tile.selected{transform:translateY(-6px);outline:3px solid var(--accent2)}.cw-actions{display:grid;gap:10px}.cw-side{position:sticky;top:92px}
@media(max-width:900px){.bs-game,.cw-layout{grid-template-columns:1fr}.cw-side{position:static}.bs-cell{width:34px;height:34px}.bs-board{grid-template-columns:repeat(10,34px)}}
@media(max-width:420px){.bs-cell{width:28px;height:28px;font-size:1rem}.bs-board{grid-template-columns:repeat(10,28px);padding:6px}.cw-board{grid-template-columns:repeat(15,31px)}.cw-cell{width:31px;height:31px}}

/* 0.3.0-alpha.4 */
.cw-player-config{display:grid;gap:10px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#ffffff06}.cw-actions button:disabled{opacity:.45;cursor:not-allowed}.local-setup select{margin-bottom:8px}

/* CrossWords Arena — cases premium */
.cw-cell{position:relative;overflow:hidden}.cw-cell>span:not(.cw-bonus-label){font-size:1rem}.cw-cell>small{position:absolute;right:3px;bottom:1px;font-size:.52rem}.cw-cell.premium-tw{background:#c63f50}.cw-cell.premium-dw{background:#d98c99}.cw-cell.premium-tl{background:#2367a8}.cw-cell.premium-dl{background:#72acd2}.cw-cell.premium-dw[data-bonus="DW"]:nth-child(113){background:#d98c99}.cw-bonus-label{display:block;font-size:.58rem;line-height:1.05;font-weight:900;color:#fff;text-shadow:0 1px 2px #0008}.cw-cell.fixed,.cw-cell.pending{background:#e6c48f!important;color:#38220d}.cw-cell.pending{background:#9fe6ff!important;color:#10233a}.cw-premium-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px}.cw-premium-legend span{display:flex;align-items:center;gap:7px;font-size:.8rem}.cw-premium-legend i{width:18px;height:18px;border-radius:4px;display:inline-block}.cw-premium-legend .tw{background:#c63f50}.cw-premium-legend .dw{background:#d98c99}.cw-premium-legend .tl{background:#2367a8}.cw-premium-legend .dl{background:#72acd2}

.cw-tile.blank,.cw-cell.blank{background:#f4f0d8!important;color:#38220d;border:2px dashed #9b6b32}.warning{color:#f7b955!important}
.online-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.8fr);gap:1.25rem;margin:1.25rem 0}.online-summary{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:150px}.online-summary strong{font-size:2.8rem}.online-users,.room-players{display:grid;gap:.65rem}.online-user,.invitation-row,.player-row{display:flex;align-items:center;gap:.8rem;padding:.85rem 1rem;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:rgba(255,255,255,.035)}.online-user>div,.invitation-row>div:first-child{display:flex;flex-direction:column;flex:1}.online-user small,.invitation-row small,.player-row small{opacity:.7}.presence{width:11px;height:11px;border-radius:50%;background:#697386;box-shadow:0 0 0 4px rgba(105,115,134,.12)}.presence.on{background:#39d98a;box-shadow:0 0 0 4px rgba(57,217,138,.14)}.status-pill{padding:.5rem .8rem;border-radius:999px;font-weight:700}.status-pill.waiting{background:rgba(255,193,7,.15);color:#ffd666}.stack-form{display:grid;gap:.85rem}.stack-form label{display:grid;gap:.35rem}.stack-form input,.stack-form select{width:100%}.form-feedback{min-height:1.25em;color:#ff8e8e}.notice{margin-top:1.25rem}.tag{margin-left:auto;padding:.2rem .5rem;border-radius:999px;background:rgba(102,126,234,.18)}@media(max-width:800px){.online-layout{grid-template-columns:1fr}.invitation-row{align-items:flex-start;flex-wrap:wrap}.invitation-row>div:last-child{display:flex;gap:.4rem}}
.sync-two-boards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2rem}.sync-grid{display:grid;margin:auto}.sync-grid.bs{grid-template-columns:repeat(10,2.3rem)}.sync-grid.cw{grid-template-columns:repeat(15,minmax(1.6rem,2.25rem));overflow:auto}.sync-cell{aspect-ratio:1;border:1px solid rgba(255,255,255,.18);padding:0;font-weight:800}.sync-cell.ship{background:#64748b}.sync-cell.hit{background:#dc2626}.sync-cell.miss{background:#2563eb}.sync-cell.dw{background:#f59e9e}.sync-cell.tw{background:#e11d48}.sync-cell.tl{background:#2563eb}.sync-cell.dl{background:#72acd2}.sync-cell.pending{outline:3px solid #facc15}.sync-rack{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap;margin-top:1rem}.sync-rack .tile{min-width:2.8rem;min-height:2.8rem;font-weight:900}.sync-rack .selected{outline:3px solid #facc15}.cw-scoreline{text-align:center;margin-bottom:1rem}@media(max-width:800px){.sync-two-boards{grid-template-columns:1fr}.sync-grid.bs{grid-template-columns:repeat(10,1.9rem)}.sync-grid.cw{grid-template-columns:repeat(15,1.75rem)}}
.room-danger-actions{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(255,255,255,.12)}
.button.danger{background:#a91f2d;color:#fff;border-color:#c63c49}.button.danger:hover{background:#c02a39}

/* 0.5.1 — les contrôles marqués hidden ne doivent jamais être réaffichés par .button */
[hidden]{display:none!important}

/* Bataille navale 0.5.2 */
.board-note{min-height:2.6em;margin:.25rem 0 .7rem;color:var(--muted);font-size:.88rem}.sync-grid.bs{gap:2px;padding:6px;border-radius:14px;background:#071b2f;border:1px solid #ffffff22}.sync-grid.bs .sync-cell{position:relative;overflow:visible;border:1px solid #ffffff18;border-radius:3px;background:linear-gradient(145deg,#0b5682,#083a62);color:#fff;cursor:crosshair}.sync-grid.bs .sync-cell:not(:disabled):hover{outline:2px solid #7dd3fc;z-index:3;transform:scale(1.05)}.sync-grid.bs .sync-cell:disabled{opacity:1;cursor:default}.sync-grid.bs .sync-cell span{position:relative;z-index:4;font-size:1.35rem;line-height:1;text-shadow:0 1px 3px #000}.sync-grid.bs .sync-cell.ship::before,.sync-grid.bs .sync-cell.revealed-ship::before{content:"";position:absolute;z-index:1;background:linear-gradient(180deg,#d9e2ec,#718096 60%,#475569);border:1px solid #e2e8f0;box-shadow:inset 0 -3px 0 #334155,0 2px 5px #0008}.sync-grid.bs .sync-cell.ship-h::before{left:-2px;right:-2px;top:24%;bottom:24%}.sync-grid.bs .sync-cell.ship-v::before{top:-2px;bottom:-2px;left:24%;right:24%}.sync-grid.bs .sync-cell.ship-h.ship-start::before{left:12%;border-radius:70% 0 0 70%}.sync-grid.bs .sync-cell.ship-h.ship-end::before{right:12%;border-radius:0 70% 70% 0}.sync-grid.bs .sync-cell.ship-v.ship-start::before{top:12%;border-radius:70% 70% 0 0}.sync-grid.bs .sync-cell.ship-v.ship-end::before{bottom:12%;border-radius:0 0 70% 70%}.sync-grid.bs .sync-cell.ship-single::before{inset:18%;border-radius:50%}.sync-grid.bs .sync-cell.hit{background:radial-gradient(circle,#ff8a8a 0,#dc2626 45%,#7f1d1d 100%);box-shadow:inset 0 0 0 2px #fecaca}.sync-grid.bs .sync-cell.hit::after{content:"";position:absolute;inset:18%;z-index:3;border-radius:50%;background:#ef4444;box-shadow:0 0 10px 3px #ff0000}.sync-grid.bs .sync-cell.miss{background:radial-gradient(circle,#e0f2fe 0 13%,#2563eb 16%,#0b5682 50%)}.sync-grid.bs .sync-cell.sunk{background:linear-gradient(145deg,#450a0a,#991b1b)}.sync-grid.bs .sync-cell.sunk::before{background:linear-gradient(180deg,#7f1d1d,#3f0b0b);border-color:#f87171;box-shadow:inset 0 -3px 0 #1f0505,0 0 8px #ef4444}.bs-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:.7rem 1.2rem;margin:1.4rem auto 0;padding:12px;border:1px solid var(--line);border-radius:14px;background:#ffffff05}.bs-legend span{display:inline-flex;align-items:center;gap:.45rem;color:var(--muted);font-size:.88rem}.bs-legend i{display:inline-grid;place-items:center;width:1.35rem;height:1.35rem;border-radius:4px;font-style:normal;font-weight:900;color:#fff}.legend-sea{background:#0b5682}.legend-ship{background:linear-gradient(180deg,#d9e2ec,#64748b)}.legend-miss{background:#2563eb}.legend-hit{background:#dc2626}.legend-sunk{background:#450a0a;border:1px solid #f87171}@media(max-width:800px){.board-note{min-height:0}.bs-legend{justify-content:flex-start}}

/* CrossWords Arena 0.6.0 bêta 1 */
.sync-rack .tile{transition:transform .18s ease,outline-color .18s ease,opacity .18s ease}.sync-rack .tile:hover:not(:disabled){transform:translateY(-4px)}.sync-rack.exchange-mode{padding:10px;border:1px dashed #f59e0b;border-radius:14px;background:#f59e0b12}.sync-rack .tile.exchange-selected{outline:3px solid #fb923c;transform:translateY(-6px);box-shadow:0 8px 18px #fb923c44}.cw-meta{display:grid;gap:.65rem;margin:1rem auto;max-width:760px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#ffffff05}.cw-history{display:grid;gap:.35rem}.cw-history>span{font-weight:800;color:var(--muted);font-size:.82rem;text-transform:uppercase;letter-spacing:.08em}.cw-history small{padding:.35rem .5rem;border-radius:8px;background:#ffffff06;color:#dbe4f3}


/* Administration 0.7.0-beta.1 */
.admin-links{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}.button.secondary{background:#26344f;box-shadow:none}.admin-filter{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:14px;align-items:end;margin-bottom:20px}.admin-filter select,.stack-form select{width:100%;padding:13px;border-radius:12px;border:1px solid var(--line);background:#0d1427;color:#fff}.table-wrap{overflow:auto}.status-pill.ok{background:#14532d;color:#bbf7d0}.status-pill.danger{background:#7f1d1d;color:#fecaca}.notice.success{background:#14532d;padding:12px;border-radius:10px;margin:12px 0}.admin-user-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.danger-zone{border-color:#7f1d1d;margin-top:20px}.panel hr{border:0;border-top:1px solid var(--line);margin:22px 0}@media(max-width:800px){.admin-filter,.admin-user-grid{grid-template-columns:1fr}.admin-filter .button{width:100%}}


/* LexiCenter 0.7.1 */
.lexi-search{display:grid;grid-template-columns:2fr 1fr 130px auto;gap:14px;align-items:end}.lexi-search select,.stack-form select,textarea{width:100%;padding:13px;border-radius:12px;border:1px solid var(--line);background:#0d1427;color:#fff}.lexi-result{display:flex;justify-content:space-between;align-items:center;gap:24px;border-left:5px solid}.lexi-result.valid{border-left-color:var(--ok)}.lexi-result.invalid{border-left-color:#ef4444}.lexi-result h2{font-size:clamp(2rem,6vw,4rem);margin:.1em 0}.lexi-verdict{font-size:1.15rem;font-weight:900}.lexi-result.valid .lexi-verdict{color:#86efac}.lexi-result.invalid .lexi-verdict{color:#fca5a5}.lexi-actions{min-width:min(360px,100%)}.word-cloud,.word-grid{display:flex;flex-wrap:wrap;gap:9px}.word-cloud a,.word-grid a{padding:8px 11px;border-radius:999px;background:#ffffff09;border:1px solid var(--line)}.word-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.word-grid a{border-radius:10px}.lexi-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}.word-list{display:grid;gap:8px}.word-list a{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:10px;background:#ffffff07}.word-list small{color:var(--muted)}.admin-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.admin-tabs a,.filter-links a{padding:10px 14px;border-radius:10px;background:#ffffff08;border:1px solid var(--line)}.admin-tabs a.active,.filter-links a.active{background:var(--accent);color:#fff}.admin-tabs span{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:99px;background:#0005}.lexi-flow{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;margin:25px 0}.lexi-flow span,.lexi-flow strong{padding:12px 16px;border-radius:12px;background:#ffffff08;border:1px solid var(--line)}.suggestion-list{display:grid;gap:14px}.suggestion-list>article{display:grid;grid-template-columns:1fr minmax(280px,420px);gap:20px;padding:18px;border-radius:16px;background:#ffffff06}.suggestion-list h3{font-size:1.5rem;margin:0}.review-form{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:end}.link-danger{background:none;border:0;color:#fca5a5;cursor:pointer}.stack-form{display:grid;gap:16px}.section-title form{display:flex;gap:8px}.filter-links{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:800px){.lexi-search,.lexi-columns,.suggestion-list>article,.review-form{grid-template-columns:1fr}.lexi-result{align-items:flex-start;flex-direction:column}.lexi-actions{width:100%}}


/* CrossWords Arena 0.7.1.2 — validation des mots de l’IA */
.cw-ai-review{margin-top:1rem;padding:14px;border:1px solid #f59e0b;border-radius:14px;background:#f59e0b12}.cw-ai-review strong{display:block;font-size:1.05rem;color:#fde68a}.cw-ai-review p{margin:.55rem 0 1rem;color:var(--muted)}.cw-ai-review .cw-actions{display:flex;flex-wrap:wrap;gap:.65rem}

/* CrossWords Arena 0.7.1.3 — plateau mobile pleine largeur */
@media(max-width:620px){
  .container{width:calc(100% - 12px)}
  .cw-board-wrap{width:100%;padding:4px;overflow:hidden;border-radius:12px}
  .cw-board{width:100%;grid-template-columns:repeat(15,minmax(0,1fr));gap:1px;margin:0}
  .cw-cell{width:auto;height:auto;aspect-ratio:1;min-width:0;padding:0;border-radius:2px;font-size:clamp(.62rem,3vw,.9rem)}
  .cw-cell>span:not(.cw-bonus-label){font-size:clamp(.62rem,3vw,.9rem)}
  .cw-cell>small{right:1px;bottom:0;font-size:.42rem}
  .cw-bonus-label{font-size:clamp(.32rem,1.55vw,.48rem);line-height:1}
}

/* ChezJems Play 0.7.1.4 — CrossWords Arena multijoueur mobile */
html,body{max-width:100%;overflow-x:hidden}
#syncGame,#syncBoard{min-width:0;max-width:100%}
@media(max-width:620px){
  .container{width:100%;max-width:100%;padding-left:6px;padding-right:6px;margin-left:0;margin-right:0}
  .online-layout{width:100%;min-width:0}
  #syncGame.panel{width:100%;min-width:0;padding:10px 4px;border-radius:14px;overflow:hidden}
  #syncBoard{width:100%;overflow:hidden}
  .sync-grid.cw{width:100%;max-width:100%;grid-template-columns:repeat(15,minmax(0,1fr));gap:1px;margin:0;overflow:visible}
  .sync-grid.cw .sync-cell{width:auto;min-width:0;max-width:none;aspect-ratio:1;padding:0;border-radius:2px;font-size:clamp(.52rem,2.8vw,.82rem);line-height:1}
  .cw-scoreline{font-size:.9rem;margin:.2rem 0 .65rem}
  .sync-rack{width:100%;gap:5px;margin-top:.75rem}
  .sync-rack .tile{min-width:0;width:calc((100% - 30px)/7);max-width:46px;min-height:42px;padding:0;font-size:1.05rem}
  #syncGame .game-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%}
  #syncGame .game-actions .button{width:100%;min-width:0;padding:10px 6px;font-size:.78rem;white-space:normal}
}


/* ChezJems Play 0.7.1.5 — lisibilité des lettres CrossWords */
.sync-grid.cw .sync-cell.occupied{
  background:linear-gradient(145deg,#fff7df,#e8c98f)!important;
  color:#17120a!important;
  border-color:#fff4cf!important;
  font-weight:950;
  text-shadow:none;
  box-shadow:inset 0 -2px 0 #9d6b2f,0 1px 2px #0008;
}
.sync-grid.cw .sync-cell.pending.occupied{
  background:linear-gradient(145deg,#fff3a6,#f5c842)!important;
  color:#111827!important;
  outline:2px solid #fff7c2;
  outline-offset:-2px;
}
.sync-rack .tile{
  background:linear-gradient(145deg,#fffdf4,#e8c98f);
  color:#17120a;
  border:1px solid #fff4cf;
  font-weight:950;
  text-shadow:none;
  box-shadow:inset 0 -3px 0 #9d6b2f,0 3px 8px #0007;
}
.sync-rack .tile.used{opacity:.38}
@media(max-width:620px){
  .sync-grid.cw .sync-cell.occupied{font-size:clamp(.72rem,3.35vw,1rem);letter-spacing:-.02em}
  .sync-rack .tile{font-size:clamp(1rem,5vw,1.3rem);min-height:44px}
}

/* ChezJems Play 0.7.1.6 — lettres du plateau très lisibles */
.sync-grid.cw .sync-cell.occupied,
.sync-grid.cw .sync-cell.occupied:disabled{
  opacity:1!important;
  -webkit-text-fill-color:#111!important;
  color:#111!important;
  background:linear-gradient(145deg,#fffdf5 0%,#f0d49b 100%)!important;
  border:1px solid #fff7da!important;
  font-weight:1000!important;
  text-shadow:0 1px 0 #fff!important;
  box-shadow:inset 0 -2px 0 #a87532,0 1px 3px #0009!important;
}
.sync-grid.cw .sync-cell.pending.occupied,
.sync-grid.cw .sync-cell.pending.occupied:disabled{
  opacity:1!important;
  -webkit-text-fill-color:#111827!important;
  color:#111827!important;
  background:linear-gradient(145deg,#fff9b8,#f4c934)!important;
  outline:2px solid #fff6a3!important;
  outline-offset:-2px;
}
.cw-cell.fixed,
.cw-cell.fixed:disabled{
  opacity:1!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  background:linear-gradient(145deg,#fffdf5,#f0d49b)!important;
  border-color:#fff7da!important;
  font-weight:1000!important;
  text-shadow:0 1px 0 #fff!important;
}
.cw-cell.pending,
.cw-cell.pending:disabled{
  opacity:1!important;
  color:#111827!important;
  -webkit-text-fill-color:#111827!important;
  background:linear-gradient(145deg,#fff9b8,#f4c934)!important;
  font-weight:1000!important;
}
@media(max-width:620px){
  .sync-grid.cw .sync-cell.occupied,
  .cw-cell.fixed,
  .cw-cell.pending{
    font-size:clamp(.82rem,3.8vw,1.08rem)!important;
    line-height:1!important;
  }
}


/* ChezJems Play 0.7.1.7 — restauration des commandes CrossWords */
#syncGame .cw-game-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
  margin:.85rem 0 1rem;
  width:100%;
}
#syncGame .cw-game-actions .button{
  flex:1 1 180px;
}
@media(max-width:620px){
  #syncGame .cw-game-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    margin:.75rem 0 .9rem;
    padding:0 2px;
    position:relative;
    z-index:3;
  }
  #syncGame .cw-game-actions .button{
    display:block;
    width:100%;
    min-width:0;
    min-height:44px;
    padding:9px 5px;
    font-size:.76rem;
    line-height:1.15;
    white-space:normal;
  }
  #syncValidate{grid-column:1 / -1;font-size:.9rem!important;font-weight:800}
}

/* ChezJems Play 0.7.1.9 — cache automatique et commandes CrossWords persistantes */


/* Les commandes CrossWords restent affichées ; elles sont désactivées hors tour. */
body #syncGame .cw-game-actions [data-game-control="crosswords-arena"]{visibility:visible;}
body #syncGame .cw-game-actions [data-game-control="crosswords-arena"][disabled]{opacity:.55;cursor:not-allowed;}


/* ChezJems Play 0.7.1.12 — dernier mot visible pendant le tour du joueur */
.cw-cell.fixed.last-move,
.cw-cell.fixed.last-move:disabled,
.sync-grid.cw .sync-cell.occupied.last-move,
.sync-grid.cw .sync-cell.occupied.last-move:disabled{
  background:linear-gradient(145deg,#b9f6d2,#48d597)!important;
  color:#09291b!important;
  -webkit-text-fill-color:#09291b!important;
  border-color:#d9ffe9!important;
  outline:2px solid #30c984!important;
  outline-offset:-2px;
  box-shadow:inset 0 -2px 0 #16895a,0 0 8px #48d59788!important;
}

/* ChezJems Play 0.7.1.13.1 — correctif responsive CrossWords sans régression */
html,body{max-width:100%;overflow-x:hidden}

/* Le jeu local/IA ne peut jamais élargir la page. */
#cwGame,
#cwGame .cw-layout,
#cwGame .cw-board-wrap,
#cwGame .cw-side,
#cwGame .cw-game-actions,
#syncGame,
#syncGame .cw-game-actions{
  min-width:0;
  max-width:100%;
}

/* Les six commandes gardent exactement leur apparence, mais se replient proprement. */
#cwGame .cw-game-actions,
#syncGame .cw-game-actions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  width:100%;
  margin:.85rem 0 1rem;
}
#cwGame .cw-game-actions .button,
#syncGame .cw-game-actions .button{
  width:100%;
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.15;
  padding:11px 8px;
}

/* Plateau local : largeur fluide sur téléphone, dimensions historiques sur PC. */
@media(max-width:900px){
  #cwGame .cw-layout{grid-template-columns:minmax(0,1fr)!important;width:100%}
  #cwGame .cw-board-wrap{width:100%;max-width:100%;overflow:hidden;padding:4px}
  #cwGame .cw-board{
    width:100%!important;
    max-width:100%!important;
    grid-template-columns:repeat(15,minmax(0,1fr))!important;
    gap:1px!important;
  }
  #cwGame .cw-cell{
    width:auto!important;
    min-width:0!important;
    aspect-ratio:1;
    height:auto!important;
    font-size:clamp(.62rem,2.8vw,1rem)!important;
    line-height:1!important;
  }
  #cwGame .cw-side{position:static;width:100%;max-width:100%}
  #cwGame .cw-rack{width:100%;max-width:100%;justify-content:center}
}

@media(max-width:620px){
  #cwGame .cw-game-actions,
  #syncGame .cw-game-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    padding:0 2px;
  }
  #cwGame .cw-game-actions .button,
  #syncGame .cw-game-actions .button{
    min-height:44px;
    padding:9px 5px;
    font-size:.76rem;
  }
  #cwValidate,
  #syncValidate{grid-column:1/-1;font-size:.9rem!important;font-weight:800}
}

@media(max-width:380px){
  #cwGame .cw-game-actions .button,
  #syncGame .cw-game-actions .button{font-size:.7rem;padding:8px 3px}
}
