/* LudoAfrik — palette terre, or et couleurs vives africaines. */
:root {
  --bg: #1a1208;
  --bg2: #241810;
  --panel: #2c2014;
  --panel2: #3a2a18;
  --cream: #fbf3e2;
  --gold: #e0a82e;
  --gold-2: #c9962b;
  --terracotta: #c75b39;
  --green: #2a9d5c;
  --text: #f4ecdc;
  --muted: #b8a888;
  --red: #e63946;
  --blue: #2d6cdf;
  --yellow: #f4a300;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --veil: linear-gradient(rgba(15, 10, 5, 0.66), rgba(15, 10, 5, 0.8));
  --border: rgba(224, 168, 46, 0.18);
}

/* --- Mode clair (data-theme="light") : palette sable/crème, texte sombre, or assombri pour le contraste. --- */
html[data-theme="light"] {
  --bg: #f6ecd9;
  --bg2: #efe2c9;
  --panel: #fffaf0;
  --panel2: #f3e6cf;
  --cream: #3a2a14;       /* anciennement quasi-blanc -> devient brun foncé pour rester lisible */
  --gold: #b3801b;
  --gold-2: #9a6e16;
  --terracotta: #b34e2f;
  --green: #1f7d47;
  --text: #2c2114;
  --muted: #6f6048;
  --red: #c62f3b;
  --blue: #2356bf;
  --yellow: #c9870a;
  --shadow: 0 10px 30px rgba(120, 90, 30, 0.18);
  --veil: linear-gradient(rgba(255, 250, 240, 0.55), rgba(246, 236, 217, 0.78));
  --border: rgba(120, 90, 30, 0.22);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

/* Fond décoratif rotatif (crossfade toutes les 5 s) — derrière tout le contenu /app. */
#decor-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.decor-layer { position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease; will-change: opacity; transform: scale(1.06); }
.decor-layer.show { opacity: 1; }
.decor-veil { position: absolute; inset: 0; pointer-events: none; background: var(--veil); }

/* Bouton de bascule de langue (bandeaux app/admin/auth). */
.lang-btn { border-color: rgba(224, 168, 46, 0.5); font-weight: 800; }
.auth-top { display: flex; justify-content: flex-end; padding: 10px 14px 0; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(224, 168, 46, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(199, 91, 57, 0.18), transparent 60%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  background-attachment: fixed;
  min-height: 100%;
  overflow-x: hidden;
}
h1, h2, h3, .logo, .brand, .btn { font-family: 'Baloo 2', system-ui, sans-serif; }
h3 { margin: 0 0 12px; font-size: 18px; color: var(--cream); }

.screen { display: none; min-height: 100vh; }
.screen.active { display: block; animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.container { max-width: 1180px; margin: 0 auto; padding: 18px; }

/* ---- Boutons ---- */
.btn {
  border: none; border-radius: 12px; padding: 11px 18px; font-size: 15px; font-weight: 700;
  cursor: pointer; color: #2a1a0a; background: #e8ddc4; transition: transform 0.08s, filter 0.15s, box-shadow 0.15s;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }
.btn-primary { background: linear-gradient(135deg, var(--terracotta), #e07a4e); color: #fff; }
.btn-secondary { background: linear-gradient(135deg, #3a2a18, #50381f); color: var(--cream); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #f2c14e); color: #3a2400; box-shadow: 0 6px 18px rgba(224, 168, 46, 0.4); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.12); }
.btn-ghost:hover { color: var(--text); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.icon-btn { font-size: 18px; padding: 8px 12px; }
.icon-btn.muted { background: #6b2020; color: #fff; }

/* ---- Cartes / champs ---- */
.card {
  background: linear-gradient(180deg, rgba(58, 42, 24, 0.85), rgba(36, 24, 16, 0.92));
  border: 1px solid rgba(224, 168, 46, 0.18);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}
.field {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25); color: var(--text); font-size: 15px; font-family: inherit;
}
.field:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 168, 46, 0.18); }
.field::placeholder { color: #97876b; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.gap { gap: 12px; }
.row .field { flex: 1; }
.spacer { flex: 1; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.divider { text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin: 14px 0; position: relative; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: rgba(255, 255, 255, 0.1); }
.divider::before { left: 0; } .divider::after { right: 0; }
.empty { color: var(--muted); text-align: center; padding: 20px; }

/* ---- Auth ---- */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 8vh 20px; text-align: center; }
.auth-legal { margin-top: 22px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.auth-legal a { color: var(--muted); text-decoration: none; }
.auth-legal a:hover { color: var(--gold); text-decoration: underline; }
.brand { font-size: 46px; margin: 0; background: linear-gradient(135deg, var(--gold), var(--terracotta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { color: var(--muted); margin: 6px 0 26px; font-size: 16px; }
/* Logo (image carrée) accolé au nom dans les bandeaux/landing/auth. Taille bornée (sinon l'image
   s'afficherait à sa taille intrinsèque). flex-shrink:0 pour ne pas se déformer dans un flex. */
.brand-logo { height: 28px !important; width: 28px !important; object-fit: contain; vertical-align: middle; border-radius: 6px; margin-right: 6px; flex: 0 0 auto; }
.brand-logo-lg { height: 44px !important; width: 44px !important; border-radius: 11px; }
.auth-card { text-align: left; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; background: rgba(0, 0, 0, 0.25); padding: 5px; border-radius: 12px; }
.tab { flex: 1; padding: 10px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; font-family: 'Baloo 2'; }
.tab.active { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #3a2400; }
.auth-card .field { margin-bottom: 12px; }
.form-error { color: #ff9a8b; font-size: 14px; min-height: 18px; margin-bottom: 8px; }

/* ---- Topbar ---- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: rgba(0, 0, 0, 0.3); border-bottom: 1px solid rgba(224, 168, 46, 0.15); flex-wrap: wrap; }
.logo { font-size: 22px; font-weight: 800; color: var(--gold); }
.user-chip { background: rgba(0, 0, 0, 0.3); padding: 7px 14px; border-radius: 20px; font-size: 14px; }
.user-chip small { color: var(--muted); }
.pill { background: rgba(224, 168, 46, 0.18); color: var(--gold); padding: 6px 12px; border-radius: 20px; font-weight: 700; font-size: 13px; }
.pill.big { font-size: 15px; letter-spacing: 2px; }

/* ---- Accueil ---- */
.home-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; margin-top: 18px; }
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.char-tile { background: rgba(0, 0, 0, 0.25); border: 2px solid transparent; border-radius: 14px; padding: 12px 6px; cursor: pointer; text-align: center; transition: 0.15s; color: var(--text); }
.char-tile:hover { border-color: rgba(224, 168, 46, 0.4); transform: translateY(-2px); }
.char-tile.selected { border-color: var(--gold); background: rgba(224, 168, 46, 0.12); box-shadow: 0 0 0 3px rgba(224, 168, 46, 0.15); }
.char-emoji { font-size: 34px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); }
.char-name { font-weight: 800; font-size: 14px; margin-top: 4px; }
.char-tag { font-size: 11px; color: var(--muted); }
.room-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.room-row { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, 0.22); padding: 10px 12px; border-radius: 11px; }
.room-row strong { font-size: 14px; }
.room-code { color: var(--gold); font-size: 12px; }
.code-field { letter-spacing: 4px; text-transform: uppercase; font-weight: 800; text-align: center; }

/* ---- Salon ---- */
.room-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.room-left, .room-right { display: flex; flex-direction: column; gap: 18px; }
.player-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.swatch { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }
.p-emoji { font-size: 22px; }
.crown { font-size: 14px; }
.ready { font-size: 12px; color: var(--muted); }
.ready.on { color: var(--green); font-weight: 800; }
.color-pick { display: flex; gap: 12px; margin-bottom: 14px; }
.color-btn { width: 46px; height: 46px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); transition: 0.15s; }
.color-btn:hover:not(:disabled) { transform: scale(1.08); }
.color-btn.active { border-color: #fff; box-shadow: 0 0 0 3px var(--gold); }
.color-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- Vidéo ---- */
/* Tuiles vidéo : grandes et responsives. auto-fit -> 1 colonne quand peu de participants
   (tuiles bien grandes), 2 colonnes quand il y en a plus. La colonne média est élargie ci-dessous. */
.video-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.video-tile { position: relative; aspect-ratio: 4 / 3; background: #0c0904; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.10); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.video-tile video { width: 100%; height: 100%; object-fit: cover; }
.video-tile.local { border-color: var(--gold); }
.v-label { position: absolute; bottom: 6px; left: 8px; font-size: 12px; background: rgba(0, 0, 0, 0.55); padding: 2px 8px; border-radius: 8px; }
.v-off { color: var(--muted); font-size: 13px; }
.video-controls { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }

/* ---- Chat ---- */
.chat-card { display: flex; flex-direction: column; }
.chat-log { height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; padding-right: 4px; }
.chat-msg { font-size: 14px; background: rgba(0, 0, 0, 0.2); padding: 6px 10px; border-radius: 9px; word-break: break-word; }
.chat-msg strong { color: var(--gold); }

/* ---- Jeu ---- */
.game-grid { display: grid; grid-template-columns: 220px minmax(320px, 1fr) clamp(250px, 26vw, 360px); gap: 18px; align-items: start; }
.game-left, .game-right { display: flex; flex-direction: column; gap: 16px; }
.game-center { display: flex; justify-content: center; }
/* Volet caméra repliable : on masque les tuiles (le gros consommateur de place), les boutons restent. */
.video-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.video-head h3 { margin: 0; }
.cam-collapse { line-height: 1; }
.video-card.collapsed .video-strip { display: none; }

/* Layout « media-bottom » (Awalé) : plateau en pleine largeur en haut, bloc vidéo + chat EN BAS.
   Le plateau Awalé porte déjà les infos joueurs -> on masque la colonne gauche. */
.game-grid.media-bottom .game-left { display: none; }
@media (min-width: 821px) {
  .game-grid.media-bottom { grid-template-columns: 1fr; grid-template-areas: "center" "media"; }
  .game-grid.media-bottom .game-center { grid-area: center; }
  .game-grid.media-bottom .game-right {
    grid-area: media; flex-direction: row; flex-wrap: wrap;
    justify-content: center; align-items: flex-start; gap: 16px;
  }
  .game-grid.media-bottom .game-right > .card { flex: 1 1 320px; max-width: 460px; }
  .game-grid.media-bottom .video-strip { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
.game-grid.media-bottom .awale-board { max-width: 820px; }

/* Pause : overlay plein écran. */
.pause-overlay { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 7, 3, 0.78); backdrop-filter: blur(4px); }
.pause-card { background: var(--panel); border: 1px solid rgba(224,168,46,.35); border-radius: 18px;
  padding: 28px 36px; text-align: center; box-shadow: var(--shadow); max-width: 92vw; }
.pause-icon { font-size: 48px; }
.pause-card h2 { margin: 6px 0 8px; }
/* Gestion des joueurs (hôte). */
.pm-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pm-row { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.2); padding: 8px 12px; border-radius: 10px; }
.pm-name { flex: 1; font-weight: 700; }
/* Lien d'invitation. */
.invite-link { display: flex; gap: 8px; align-items: center; }
.invite-link .field { flex: 1; font-size: 12px; }
.board-wrap { width: 100%; max-width: 620px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
#board { border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); }

.turn-banner { padding: 8px 16px; border-radius: 20px; font-weight: 800; font-family: 'Baloo 2'; color: #fff; background: var(--panel2); box-shadow: var(--shadow); }
.turn-banner.win { background: linear-gradient(135deg, var(--gold), var(--terracotta)); }

.players-panel { display: flex; flex-direction: column; gap: 10px; }
.pp-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px; background: rgba(0, 0, 0, 0.25); border-left: 5px solid var(--c); transition: 0.2s; }
.pp-card.turn { background: rgba(224, 168, 46, 0.14); box-shadow: 0 0 0 2px var(--c); transform: translateX(3px); }
.pp-card.offline { opacity: 0.5; }
.pp-emoji { font-size: 28px; }
.pp-info { flex: 1; }
.pp-info strong { font-size: 14px; }
.pp-sub { font-size: 12px; color: var(--muted); }
.rank { font-weight: 800; color: var(--gold); }

.dice-area { display: flex; flex-direction: column; align-items: center; gap: 12px; background: rgba(0, 0, 0, 0.25); border-radius: 14px; padding: 16px; }
.dice { width: 70px; height: 70px; background: linear-gradient(145deg, #fff, #e8e0cc); border-radius: 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.8); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 10px; gap: 2px; }
.dice.empty { display: flex; align-items: center; justify-content: center; font-size: 38px; }
.dice .pip { border-radius: 50%; }
.dice .pip.on { background: #2a1a0a; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4); align-self: center; justify-self: center; width: 12px; height: 12px; }
.dice.rolling { animation: roll 0.5s ease; }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }
.move-hint { font-size: 13px; color: var(--gold); text-align: center; min-height: 18px; }

/* ---- Toasts ---- */
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(20, 12, 6, 0.95); border: 1px solid rgba(224, 168, 46, 0.4); color: var(--text); padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); opacity: 0; transform: translateY(-10px); transition: 0.3s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: #e6394680; }

/* ---- Confettis ---- */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 999; overflow: hidden; }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall 3.2s linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0.4; } }

/* ---- Public/privé (segmented) ---- */
.segmented { display: flex; gap: 6px; background: rgba(0, 0, 0, 0.25); padding: 5px; border-radius: 12px; }
.seg { flex: 1; padding: 9px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; font-family: 'Baloo 2'; }
.seg.active { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #3a2400; }
.pill.private { background: rgba(91, 58, 142, 0.25); color: #c8b3e8; }
.pill.copy { cursor: pointer; }
.pill.copy:hover { filter: brightness(1.15); }
.player-row.offline { opacity: 0.5; }
.bot-badge { font-size: 14px; }
.mini-x { border: none; background: rgba(230, 57, 70, 0.25); color: #ffb3ab; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; font-weight: 800; }
.mini-x:hover { background: rgba(230, 57, 70, 0.45); color: #fff; }

/* ---- Classement ---- */
.lb-card { margin-top: 18px; }
.leaderboard { display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: rgba(0, 0, 0, 0.22); border-radius: 11px; }
.lb-row.me { background: rgba(224, 168, 46, 0.16); box-shadow: inset 0 0 0 1px rgba(224, 168, 46, 0.4); }
.lb-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.lb-page { font-size: 13px; color: var(--muted); font-weight: 700; }
.lb-rank { width: 32px; text-align: center; font-weight: 800; color: var(--gold); }
.lb-emoji { font-size: 22px; }
.lb-name { flex: 1; }
.lb-lvl { font-size: 12px; color: var(--muted); }
.lb-score { font-weight: 800; color: var(--gold); min-width: 70px; text-align: right; }

/* ---- Pion parti ---- */
.pp-card.abandoned { opacity: 0.5; filter: grayscale(0.6); }

/* ---- Modal de résultats ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10, 6, 3, 0.78); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1100; padding: 20px; animation: fade 0.3s ease; }
.modal { width: 100%; max-width: 460px; background: linear-gradient(180deg, #3a2a18, #241810); border: 1px solid rgba(224, 168, 46, 0.35); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.res-title { text-align: center; margin: 0 0 18px; font-size: 26px; color: var(--gold); }
.res-rows { display: flex; flex-direction: column; gap: 8px; }
.res-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); border-left: 5px solid var(--c); }
.res-row.me { background: rgba(224, 168, 46, 0.14); }
.res-rank { font-size: 20px; width: 30px; text-align: center; }
.res-name { flex: 1; }
.res-detail { font-size: 12px; color: var(--muted); }
.res-points { font-weight: 800; color: var(--gold); min-width: 72px; text-align: right; }
.res-total { text-align: center; margin: 16px 0; font-weight: 700; color: var(--cream); }
.res-actions { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 8px; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .home-grid, .room-grid { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: 1fr; }
  .game-left, .game-right { flex-direction: row; flex-wrap: wrap; }
  .players-panel { flex: 1; min-width: 220px; }
  .dice-area { flex: 1; }
  .game-right .card { flex: 1; min-width: 240px; }
}
@media (max-width: 560px) {
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { gap: 8px; }
  .logo { font-size: 18px; }
}

/* ============ Multi-jeux : sélecteur, salons, amis ============ */
.mini-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.game-pick { display: flex; gap: 8px; }
.game-opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 2px solid transparent; border-radius: 12px; background: rgba(0, 0, 0, 0.25); color: var(--text); cursor: pointer; font-family: 'Baloo 2'; }
.game-opt:hover { border-color: rgba(224, 168, 46, 0.4); }
.game-opt.active { border-color: var(--gold); background: rgba(224, 168, 46, 0.12); }
.go-icon { font-size: 26px; }
.go-name { font-size: 13px; font-weight: 700; }
.room-game { font-size: 12px; color: var(--muted); }
#damesboard { border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); }

.lb-friends { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 18px; }
.friends-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.friend-row { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, 0.22); padding: 8px 12px; border-radius: 11px; }
.fr-emoji { font-size: 20px; }
.fr-name { flex: 1; }
.fr-score { font-size: 12px; color: var(--gold); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #555; flex: none; }
.dot.on { background: #36d36f; box-shadow: 0 0 8px #36d36f; }
.toast.invite { display: flex; align-items: center; gap: 10px; border-color: var(--gold); }

/* ============ Table 151 ============ */
.cards-table { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.oppo-strip { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.oppo { background: rgba(0, 0, 0, 0.28); border-radius: 14px; padding: 10px 12px; min-width: 150px; border: 2px solid transparent; }
.oppo.turn { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(224, 168, 46, 0.3); }
.oppo.offline { opacity: 0.5; }
.oppo-head { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 6px; }
.oppo-emoji { font-size: 20px; }
.oppo-score { margin-left: auto; color: var(--gold); font-weight: 700; font-size: 12px; }
.oppo-cards { display: flex; }
.oppo-cards .card-back.small { margin-left: -14px; }
.oppo-cards .card-back.small:first-child { margin-left: 0; }
.oppo-count { font-size: 11px; color: var(--muted); }

.pile-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.deck-pile { position: relative; }
.deck-count { position: absolute; bottom: -6px; right: -6px; background: var(--gold); color: #2a1a00; font-weight: 800; font-size: 12px; padding: 1px 7px; border-radius: 10px; }
.pile-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.meta-line.suit.red { color: #ff6b6b; } .meta-line.suit.black { color: var(--cream); }
.meta-line.frozen { color: #8fd3ff; } .meta-line.warn { color: #ffb86b; } .meta-line.target { color: var(--muted); }

.card-face { width: 76px; height: 106px; border-radius: 9px; background: #fff; position: relative; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; font-weight: 800; user-select: none; border: 1px solid #d0c9b8; color: #1a1a1a; }
.card-face.red { color: #d11; } .card-face.black { color: #1a1a1a; }
.card-face .c-corner { position: absolute; font-size: 16px; line-height: 1; }
.card-face .c-corner.tl { top: 6px; left: 7px; } .card-face .c-corner.br { bottom: 6px; right: 7px; transform: rotate(180deg); }
.card-face .c-mid { font-size: 38px; }
.card-face.small { width: 30px; height: 44px; font-size: 10px; }
.card-face.joker { background: linear-gradient(135deg, #2c2c44, #5a3a7a); color: #ffe; flex-direction: column; gap: 2px; }
.card-face.joker .jk { font-size: 26px; } .card-face.joker .jk-label { font-size: 9px; }
.card-back { width: 62px; height: 88px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 26px; background: repeating-linear-gradient(45deg, #1f7a4a, #1f7a4a 7px, #14543a 7px, #14543a 14px); border: 1px solid #0d3a28; box-shadow: 0 3px 8px rgba(0,0,0,0.45); }
.card-back.small { width: 30px; height: 44px; font-size: 14px; }

.hand-zone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hand-label { font-weight: 800; font-family: 'Baloo 2'; color: var(--gold); }
.my-hand { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 90px; }
.hand-card { transition: transform 0.12s; }
.hand-card.playable { cursor: pointer; box-shadow: 0 0 0 2px var(--gold), 0 6px 14px rgba(0,0,0,0.5); }
.hand-card.playable:hover { transform: translateY(-10px); }
.hand-card.drawn { outline: 3px dashed var(--gold); }
.card-actions { display: flex; gap: 10px; align-items: center; position: relative; }
.suit-chooser { position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; background: rgba(20,12,6,0.96); padding: 8px; border-radius: 12px; border: 1px solid var(--gold); z-index: 20; }
.suit-btn { width: 40px; height: 40px; border-radius: 8px; border: none; background: #fff; font-size: 22px; cursor: pointer; }
.suit-btn.red { color: #d11; } .suit-btn.black { color: #1a1a1a; } .suit-btn.neutral { color: #888; }

@media (max-width: 1000px) { .lb-friends { grid-template-columns: 1fr; } }

/* ============ Config de variante ============ */
.config-list { display: flex; flex-direction: column; gap: 10px; }
.preset-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.preset-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.preset-btn { background: #3a2a18; color: var(--cream); }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cfg-label { font-size: 14px; }
.cfg-select { background: rgba(0, 0, 0, 0.3); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 9px; padding: 7px 10px; font-family: inherit; font-size: 14px; }
.cfg-select:disabled { opacity: 0.7; }
.cfg-toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.cfg-toggle input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ============ Polish UX ============ */
.btn { position: relative; overflow: hidden; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-gold::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: skewX(-20deg); animation: sheen 3.5s ease-in-out infinite; }
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 140%; } }
.card { transition: transform 0.15s, box-shadow 0.15s; }
.turn-banner.mine { animation: turnpulse 1.2s ease-in-out infinite; }
@keyframes turnpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 168, 46, 0.5); } 50% { box-shadow: 0 0 0 8px rgba(224, 168, 46, 0); } }
.pp-card.turn { animation: ppturn 1.4s ease-in-out infinite; }
@keyframes ppturn { 0%, 100% { box-shadow: 0 0 0 2px var(--c); } 50% { box-shadow: 0 0 14px 1px var(--c); } }
.char-tile, .game-opt, .color-btn { transition: transform 0.12s, border-color 0.15s, background 0.15s; }

/* ============ Responsive / mobile ============ */
@media (max-width: 820px) {
  .game-grid { display: flex; flex-direction: column; gap: 14px; }
  .game-center { order: 1; }
  .game-left { order: 2; display: flex; flex-direction: column; gap: 12px; }
  .game-left #action-area { order: -1; }       /* dé / actions juste sous le plateau */
  .game-right { order: 3; display: flex; flex-direction: column; gap: 12px; }
  .board-wrap { max-width: min(94vw, 56vh); margin: 0 auto; }
  .players-panel { flex-direction: row; flex-wrap: wrap; }
  .pp-card { flex: 1 1 45%; min-width: 140px; }
  .video-strip { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } /* 2 joueurs -> 2 grandes tuiles */
  .video-tile { aspect-ratio: 1; }
  .dice-area { flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap; }
  .my-hand { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .hand-card { flex: none; }
  .hand-card.playable:hover { transform: none; }                /* pas de hover au doigt */
  .pile-row { gap: 14px; }
}
@media (max-width: 560px) {
  .container { padding: 12px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .turn-banner { font-size: 13px; padding: 7px 12px; }
  .btn { padding: 12px 16px; }                                  /* cibles tactiles */
  .btn-sm { padding: 9px 12px; }
  .color-btn { width: 52px; height: 52px; }
  .dice { width: 64px; height: 64px; }
  .card-face { width: 54px; height: 78px; } .card-face .c-mid { font-size: 26px; }
  .card-back { width: 54px; height: 78px; }
  .game-opt { padding: 10px 4px; } .go-icon { font-size: 22px; }
  .oppo { min-width: 130px; }
  .video-controls .icon-btn { font-size: 20px; padding: 10px 14px; } /* micro/cam accessibles */
  .modal { padding: 18px; }
}

/* ============ Rétention / progression UX ============ */
.icon-only { padding: 9px 12px; font-size: 16px; }
.divider.thin { margin: 8px 0; font-size: 11px; }

.hero-card { margin-top: 18px; background: linear-gradient(135deg, rgba(58,42,24,0.95), rgba(36,24,16,0.95)); }
.hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.hero-avatar { font-size: 40px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.hero-id strong { font-size: 20px; }
.hero-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.lvl-badge { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #3a2400; font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 20px; }
.streak { color: #ff8a3c; font-weight: 800; font-size: 13px; }
.hero-rank { color: var(--muted); font-size: 12px; }
.hero-stats { display: flex; gap: 16px; text-align: center; }
.hero-stats strong { font-size: 18px; color: var(--gold); }
.hero-stats small { color: var(--muted); font-size: 12px; }
.xp-bar { height: 12px; border-radius: 8px; background: rgba(0,0,0,0.4); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
.xp-fill { height: 100%; background: linear-gradient(90deg, var(--terracotta), var(--gold)); border-radius: 8px; transition: width 0.8s cubic-bezier(0.2,0.8,0.2,1); box-shadow: 0 0 10px rgba(224,168,46,0.5); }
.xp-label { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }

.instant-btn { font-size: 18px; padding: 15px; letter-spacing: 0.3px; }

.lb-sep { text-align: center; color: var(--muted); letter-spacing: 3px; }

/* ---- Modales génériques (succès, aide) ---- */
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head .res-title { margin: 0; }
.modal-close { background: rgba(255,255,255,0.08); border: none; color: var(--text); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; }
.modal-close:hover { background: rgba(255,255,255,0.18); }
.ach-modal, .help-modal { max-width: 480px; }
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ach { background: rgba(0,0,0,0.25); border-radius: 12px; padding: 12px; text-align: center; opacity: 0.55; filter: grayscale(0.6); transition: 0.2s; }
.ach.on { opacity: 1; filter: none; box-shadow: 0 0 0 1px rgba(224,168,46,0.4); background: rgba(224,168,46,0.1); }
.ach-icon { font-size: 30px; }
.ach-label { font-weight: 700; font-size: 13px; margin: 4px 0; }
.ach-prog { font-size: 11px; color: var(--muted); }
.help-body p { font-size: 14px; line-height: 1.5; background: rgba(0,0,0,0.2); padding: 10px 12px; border-radius: 10px; margin: 8px 0; }

/* ---- Résultats enrichis ---- */
.res-prog { margin: 16px 0; text-align: center; }
.levelup-banner { background: linear-gradient(135deg, var(--gold), var(--terracotta)); color: #fff; font-weight: 800; padding: 8px; border-radius: 12px; margin-bottom: 10px; animation: pop 0.5s ease; }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.res-gain { font-size: 24px; font-weight: 800; color: var(--gold); margin-bottom: 8px; animation: pop 0.5s ease; }

@media (max-width: 560px) {
  .hero-top { flex-wrap: wrap; }
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  .instant-btn { font-size: 16px; }
}

/* ---- Économie : jetons, boutique, cadeaux ---- */
.coins-chip { background: rgba(224, 168, 46, 0.16); color: var(--gold); font-weight: 800; border-radius: 20px; padding: 6px 12px; }
.coins-chip:hover { background: rgba(224, 168, 46, 0.28); }
.toast.gift { border-color: var(--gold); background: linear-gradient(180deg, rgba(58, 42, 24, 0.97), rgba(36, 24, 16, 0.97)); }
.link-btn { background: none; border: none; color: var(--gold); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

.shop-balance { text-align: center; font-weight: 700; color: var(--gold); margin: 0 0 14px; }
.shop-note { text-align: center; color: #f0c46a; background: rgba(224, 168, 46, 0.12); border-radius: 10px; padding: 8px; margin-bottom: 12px; font-size: 13px; }
.pack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pack-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border: 2px solid rgba(224, 168, 46, 0.25); border-radius: 16px; background: rgba(0, 0, 0, 0.25); color: var(--text); cursor: pointer; transition: 0.15s; font-family: inherit; }
.pack-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.pack-card.popular { border-color: var(--gold); background: rgba(224, 168, 46, 0.1); }
.pack-card:disabled { opacity: 0.5; cursor: wait; }
.pack-badge { position: absolute; top: -10px; background: linear-gradient(135deg, var(--gold), #f2c14e); color: #3a2400; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 10px; }
.pack-coins { font-size: 22px; font-weight: 800; color: var(--gold); }
.pack-bonus { font-size: 12px; color: #7fd18b; font-weight: 700; }
.pack-label { font-size: 13px; opacity: 0.85; }
.pack-price { margin-top: 6px; font-weight: 800; font-size: 18px; }

.gift-targets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.gift-to-label { font-weight: 700; opacity: 0.8; }
.chip { background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(224, 168, 46, 0.3); color: var(--text); border-radius: 16px; padding: 5px 11px; cursor: pointer; font: inherit; font-size: 13px; }
.chip.on { background: var(--gold); color: #3a2400; border-color: var(--gold); font-weight: 700; }
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gift-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 1px solid rgba(224, 168, 46, 0.25); border-radius: 14px; background: rgba(0, 0, 0, 0.25); color: var(--text); cursor: pointer; transition: 0.15s; }
.gift-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.gift-emoji { font-size: 26px; }
.gift-name { font-size: 11px; opacity: 0.8; text-align: center; }
.gift-cost { font-size: 12px; font-weight: 800; color: var(--gold); }
.gift-btn { font-size: 18px; }

.gift-fx { position: fixed; left: 50%; top: 55%; transform: translate(-50%, -50%); font-size: 90px; z-index: 1300; pointer-events: none; animation: giftPop 2.4s ease forwards; }
@keyframes giftPop {
  0% { transform: translate(-50%, -10%) scale(0.2); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  70% { transform: translate(-50%, -55%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -160%) scale(0.7); opacity: 0; }
}

@media (max-width: 560px) {
  .pack-grid { grid-template-columns: 1fr 1fr; }
  .gift-grid { grid-template-columns: repeat(3, 1fr); }
  .gift-fx { font-size: 70px; }
}

/* ---- Auth : œil mot de passe, reset ---- */
.pass-wrap { position: relative; }
.pass-wrap .field { width: 100%; padding-right: 44px; }
.eye-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 6px; }
.forgot-link { display: block; margin: 12px auto 0; }
.reset-step2 { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.reset-body { display: flex; flex-direction: column; gap: 10px; }

/* ---- Univers / décors ---- */
.decor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.decor-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border: 2px solid transparent; border-radius: 12px; color: #fff; cursor: pointer; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); transition: 0.15s; font-family: inherit; }
.decor-opt:hover:not(:disabled) { transform: translateY(-2px); }
.decor-opt.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 168, 46, 0.3); }
.decor-opt:disabled { cursor: default; opacity: 0.9; }
.decor-emoji { font-size: 24px; }
.decor-name { font-size: 11px; font-weight: 700; }
@media (max-width: 560px) { .decor-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Awalé ---- */
.aw-player { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 12px; background: var(--panel2); margin: 6px auto; max-width: 560px; }
.aw-player.turn { box-shadow: 0 0 0 2px var(--gold); }
.aw-name { font-weight: 700; }
.aw-store { font-weight: 800; color: var(--gold); }
.awale-board { display: flex; align-items: stretch; justify-content: center; gap: 12px; margin: 4px auto; max-width: 720px; }
.aw-rows { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.aw-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.aw-pit { position: relative; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #5a3d1e, #2c1c0c); border: 2px solid #6b4a26;
  display: flex; align-items: center; justify-content: center; min-height: 56px; }
.aw-row.mine .aw-pit.legal { cursor: pointer; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(224,168,46,.35), inset 0 0 18px rgba(224,168,46,.25); }
.aw-row.mine .aw-pit.legal:hover { transform: translateY(-2px); }
.aw-pit.empty { opacity: .7; }
.aw-pit.just-sown { border-color: #f2c14e; }
.aw-pit.captured { animation: awcap .8s ease; }
@keyframes awcap { 0% { box-shadow: 0 0 0 6px rgba(46,200,120,.6); } 100% { box-shadow: none; } }
.aw-seeds { position: absolute; inset: 14%; display: flex; flex-wrap: wrap; gap: 2px;
  align-content: center; justify-content: center; pointer-events: none; }
.aw-seed { width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff4d8, #cda35a); }
.aw-count { position: absolute; bottom: -2px; right: 6px; font-size: 12px; font-weight: 800;
  color: #fff; text-shadow: 0 1px 2px #000; }
.aw-grenier { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-width: 64px; border-radius: 16px; background: var(--panel2); padding: 8px;
  font-size: 22px; }
.aw-grenier b { font-size: 26px; color: var(--gold); }
@media (max-width: 560px) { .aw-pit { min-height: 42px; } .aw-grenier { min-width: 44px; font-size: 16px; } }

/* ---- Belote ---- */
.belote-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--panel2); border-radius: 12px; padding: 8px 14px; margin: 4px auto; max-width: 640px; }
.belote-score { font-weight: 800; }
.belote-score.mine { color: var(--gold); }
.belote-trump { text-align: center; font-size: 13px; opacity: .9; }
.trump-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #1b2733; font-weight: 800; }
.trump-chip.red { color: #ff6b6b; } .trump-chip.black { color: #e9eef5; }
.belote-target { font-size: 12px; opacity: .7; }
.belote-table { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.belote-bar { width: 100%; max-width: 640px; }
.belote-center { display: flex; align-items: center; justify-content: center; min-height: 360px; }
.belote-players { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0; }
.belote-player { display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 10px; background: var(--panel2); border: 2px solid transparent; }
.belote-player.team0 { border-left: 4px solid #4aa3ff; } .belote-player.team1 { border-left: 4px solid #ff8a4a; }
.belote-player.turn { box-shadow: 0 0 0 2px var(--gold); }
.belote-player.offline { opacity: .5; }
.bp-name { font-size: 12px; font-weight: 700; }
.belote-backs { display: flex; }
.belote-backs .card-back.tiny { width: 14px; height: 20px; font-size: 0; margin-left: -8px;
  border-radius: 3px; border: 1px solid #2a3a4a; background: linear-gradient(135deg,#15324a,#0a1d2e); }
.belote-bidding { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.belote-retourne { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bid-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.belote-trick { display: grid; grid-template-columns: repeat(3, 92px); grid-template-rows: repeat(3, 116px);
  gap: 6px; place-items: center; }
.trick-slot { display: flex; align-items: center; justify-content: center; }
.trick-slot.pos-bottom { grid-area: 3 / 2; }
.trick-slot.pos-left { grid-area: 2 / 1; }
.trick-slot.pos-top { grid-area: 1 / 2; }
.trick-slot.pos-right { grid-area: 2 / 3; }
.belote-hand { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.belote-hand .card-face { cursor: default; transition: transform .12s; }
.belote-hand .card-face.playable { cursor: pointer; box-shadow: 0 0 0 3px var(--gold), 0 6px 16px rgba(0,0,0,.5); }
.belote-hand .card-face.playable:hover { transform: translateY(-10px); }
.belote-hand .card-face.disabled { opacity: .5; }
/* Sur tablette/mobile, les cartes du pli/de la main rétrécissent un peu. */
@media (max-width: 560px) {
  .belote-trick { grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(3, 86px); }
  .belote-hand .card-face, .belote-trick .card-face { width: 56px; height: 80px; }
  .belote-hand .card-face .c-mid, .belote-trick .card-face .c-mid { font-size: 26px; }
}

/* =========================================================================
   MODE CLAIR — surcharges du chrome de l'app.
   Beaucoup de surfaces ont un fond sombre codé en dur (cartes brunes, panneaux
   rgba(0,0,0,.2-.3)) ; en thème clair, le texte devient sombre -> sombre/sombre,
   illisible. On réadapte ici tous les fonds/bordures. Spécificité supérieure
   (html[data-theme]) -> gagne sans réécrire les règles de base ; le mode sombre
   n'est pas affecté.
   ========================================================================= */
html[data-theme="light"] .card,
html[data-theme="light"] .hero-card { background: linear-gradient(180deg, #fffaf0, #f3e6cf); border-color: rgba(120, 90, 30, 0.22); }
/* Champs de saisie + selects : fond clair, bordure et placeholder lisibles. */
html[data-theme="light"] .field,
html[data-theme="light"] .cfg-select { background: #fffdf8; border-color: rgba(120, 90, 30, 0.32); color: var(--text); }
html[data-theme="light"] .field::placeholder { color: #9a8c70; }
html[data-theme="light"] .field:focus { border-color: var(--gold); }
/* Pistes d'onglets (segments / tabs) : fond clair pour que le libellé inactif (muted) ressorte. */
html[data-theme="light"] .tabs,
html[data-theme="light"] .segmented { background: rgba(120, 90, 30, 0.10); }
/* Bandeau supérieur. */
html[data-theme="light"] .topbar { background: rgba(255, 250, 240, 0.66); border-bottom-color: rgba(120, 90, 30, 0.18); }
/* Tous les petits panneaux/lignes/puces « enfoncés » : teinte chaude subtile sur fond crème. */
html[data-theme="light"] .user-chip,
html[data-theme="light"] .chip,
html[data-theme="light"] .char-tile,
html[data-theme="light"] .room-row,
html[data-theme="light"] .pm-row,
html[data-theme="light"] .pp-card,
html[data-theme="light"] .dice-area,
html[data-theme="light"] .lb-row,
html[data-theme="light"] .res-row,
html[data-theme="light"] .game-opt,
html[data-theme="light"] .friend-row,
html[data-theme="light"] .oppo,
html[data-theme="light"] .ach,
html[data-theme="light"] .pack-card,
html[data-theme="light"] .gift-card,
html[data-theme="light"] .chat-msg,
html[data-theme="light"] .help-body p { background: rgba(120, 90, 30, 0.08); }
/* Pip foncé du dé : reste foncé (le dé est blanc) — OK. Barre d'XP : piste un peu plus claire. */
html[data-theme="light"] .xp-bar { background: rgba(120, 90, 30, 0.18); }
