:root {
  /* Palette alignée sur thiossane-game.lovable.app */
  --bg: #211911;
  --fg: #f2eee7;
  --card: #47362b;
  --surface: #3d3027;
  --muted: #362b24;
  --muted-fg: #ab9c8b;
  --border: #4f3e33;
  --primary: #e6ad00;
  --primary-fg: #1b0e04;
  --accent: #f68000;
  --wave: #0073d2;
  --orange-money: #ee7b00;
  --yas: #009c25;
  --radius: 12px;
  --sidebar: #291f18;
  --secondary: #47372c;
}
html, body {
  background-color: #221811 !important;
  background: var(--bg);
  color: var(--fg);
}

/* ===== Anti-FOUC : pas de flash de design au chargement ===== */
html.app-loading body {
  visibility: hidden !important;
}
html.app-ready body,
html:not(.app-loading) body {
  visibility: visible;
}
/* Couleurs de base identiques au thème (évite flash blanc) */
html {
  background-color: #221811;
  color: #f2eee7;
}


* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Fredoka', sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}
h1, h2, h3 { font-family: 'Fredoka', sans-serif; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; }

/* Header */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 1rem;
  /* anti-FOUC header : évite le "petit puis normal" au chargement */
  min-height: 4.25rem;
  box-sizing: border-box;
}
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo img { width: 48px; height: 48px; object-fit: contain; }
.logo-fallback { width: 48px; height: 48px; flex-shrink: 0; }
.logo-title { display: block; font-weight: 700; color: var(--primary); font-size: 1rem; }
.logo-sub { font-size: 0.62rem; color: var(--muted-fg); text-transform: uppercase; letter-spacing: 0.12em; }

.main-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.nav-btn, .auth-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.15rem; border-radius: 9999px;
  background: var(--surface); color: var(--fg);
  font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid var(--border); transition: all 0.2s;
}
.nav-btn:hover, .auth-btn:hover {
  background: var(--primary); color: var(--primary-fg);
  transform: translateY(-1px);
}

/* Layout */
.container { max-width: 1280px; margin: 0 auto; padding: 1rem 1.5rem; }
.layout {
  display: grid;
  grid-template-columns: 112px 1fr 220px;
  gap: 1rem;
  align-items: start; /* ne pas étirer catégories / vedettes jusqu'en bas */
  grid-template-areas:
    "sidebar hero featured"
    "sidebar catalog catalog";
}
.layout > .sidebar { grid-area: sidebar; }
.layout > .hero { grid-area: hero; }
.layout > .featured { grid-area: featured; }
.layout > .catalog-below,
.layout > #catalog-section { grid-area: catalog; }

/* Accueil : catalogue sous le hero (ligne 2) */
body:not(.page-jeux) .layout > .catalog-below {
  margin-top: 0.5rem;
}

/* Mode JEUX (Mes jeux.png) : sidebar + catalogue uniquement */
body.page-jeux .layout,
html.page-jeux-pending .layout,
html.page-jeux .layout {
  grid-template-columns: 112px 1fr !important;
  grid-template-areas:
    "sidebar catalog" !important;
}
body.page-jeux .layout > .hero,
body.page-jeux .layout > .featured,
html.page-jeux-pending .layout > .hero,
html.page-jeux-pending .layout > .featured {
  display: none !important;
}


/* Sidebar */
.section-title {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted-fg);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.category-list { display: flex; flex-direction: column; gap: 0.35rem; min-height: 0; }
.category-item {
  display: flex; align-items: center; gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  /* Marron site (pas le blanc navigateur des <button>) */
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
  font: inherit;
  text-align: left;
}
.category-item:hover {
  background: var(--surface);
  border-color: var(--primary);
}
.category-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; transition: all 0.2s;
  flex-shrink: 0;
  color: var(--muted-fg);
}
.category-item:hover .category-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}
.category-item:hover .category-icon {
  color: var(--primary-fg);
}
.category-label {
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase;
  color: var(--muted-fg);
  letter-spacing: 0.04em;
}
.category-item:hover .category-label { color: var(--fg); }

/* Hero */
.hero {
  position: relative; border-radius: var(--radius);
  overflow: hidden; min-height: 400px;
}
.hero img { width: 100%; height: 100%; min-height: 400px; object-fit: cover; display: block; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(34,24,17,0.85), rgba(34,24,17,0.1));
}
.hero-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 1rem;
}
.hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.hero-content p { margin-top: 0.5rem; opacity: 0.9; text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.hero-play-btn {
  margin-top: 1.5rem;
  padding: 0.75rem 2.5rem; border-radius: 9999px;
  background: rgba(61,48,39,0.7); color: var(--primary);
  font-weight: 700; font-size: 1.3rem;
  backdrop-filter: blur(4px);
  border: 2px solid var(--primary);
  transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.hero-play-btn:hover { background: var(--primary); color: var(--primary-fg); transform: scale(1.05); }

/* Featured */
.featured-list { display: flex; flex-direction: column; gap: 0.75rem; min-height: 0; }
.featured-card {
  position: relative; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  display: block; transition: all 0.3s;
  width: 100%; padding: 0; text-align: left;
  background: var(--card); color: inherit; cursor: pointer;
}
.featured-card img { width: 100%; height: 110px; object-fit: cover; display: block; }
.featured-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.featured-overlay {
  position: absolute; inset: 0;
  background: rgba(34,24,17,0.3);
  display: flex; align-items: center; justify-content: center;
}
.play-btn {
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  background: rgba(61,48,39,0.7); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; backdrop-filter: blur(4px);
  transition: all 0.3s;
}
.featured-card:hover .play-btn { background: var(--primary); color: var(--primary-fg); transform: scale(1.1); }
.featured-title {
  position: absolute; bottom: 1.35rem; left: 0.5rem;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.featured-price {
  position: absolute; bottom: 0.35rem; right: 0.5rem;
  font-size: 0.65rem; font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Download */
.download-section {
  margin-top: 1rem; padding: 1.5rem 1.25rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center;
}
.download-section h2 { font-size: 1.2rem; font-weight: 700; }
.subtitle { color: var(--muted-fg); font-size: 0.9rem; margin: 0.4rem 0 1.2rem; }
.payment-grid {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
}
.payment-btn {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; min-width: 200px; justify-content: center;
  transition: all 0.2s; color: white; font-size: 1rem;
}
.payment-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.pb-small { font-size: 0.7rem; opacity: 0.85; text-align: left; }
.pb-name { font-weight: 700; text-align: left; }
.payment-wave { background: var(--wave); }
.payment-orange { background: var(--orange-money); color: #1a1510; }
.payment-yas { background: var(--yas); }
.payment-btn.selected { outline: 3px solid var(--primary); outline-offset: 2px; }
.footnote { color: var(--muted-fg); font-size: 0.75rem; margin-top: 1rem; }

/* Footer */
.footer {
  text-align: center; padding: 1.5rem;
  color: var(--muted-fg); font-size: 0.75rem;
  border-top: 1px solid var(--border); margin-top: 2rem;
}
.footer-links {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem;
  justify-content: center; margin-bottom: 0.5rem;
}
.footer-links a {
  color: var(--muted-fg); font-size: 0.8rem; text-decoration: none;
}
.footer-links a:hover { color: var(--primary); text-decoration: underline; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(34,24,17,0.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 1rem;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; padding: 1.5rem;
  max-width: 380px; width: 100%;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.modal-header h3 { font-weight: 700; }
.modal-close { background: transparent; color: var(--muted-fg); font-size: 1.2rem; }
.modal-close:hover { color: var(--fg); }
.amount-box {
  background: var(--surface); border-radius: var(--radius);
  padding: 1rem; text-align: center; margin-bottom: 1rem;
}
.amount-box p { color: var(--muted-fg); font-size: 0.85rem; }
.amount { color: var(--primary); font-size: 1.6rem; font-weight: 700; margin-top: 0.25rem; }
.modal label { display: block; font-size: 0.85rem; color: var(--muted-fg); margin-bottom: 0.4rem; }
.modal input {
  width: 100%; padding: 0.75rem 1rem; border-radius: var(--radius);
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--border); font-family: inherit; font-size: 1rem;
}
.modal input:focus { outline: none; border-color: var(--primary); }
.confirm-btn {
  width: 100%; padding: 0.85rem; margin-top: 1rem;
  border-radius: var(--radius); font-weight: 700;
  background: var(--primary); color: var(--primary-fg);
  transition: all 0.2s;
}
.confirm-btn:disabled { background: var(--muted); color: var(--muted-fg); cursor: not-allowed; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--primary); border-top-color: transparent;
  border-radius: 50%; margin: 1.5rem auto 1rem;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { text-align: center; font-weight: 600; }
.loading-sub { text-align: center; color: var(--muted-fg); font-size: 0.85rem; margin-top: 0.25rem; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(43,182,115,0.2); color: var(--yas);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 1rem auto;
}
.success-title { text-align: center; font-weight: 700; font-size: 1.1rem; }
.success-sub { text-align: center; color: var(--muted-fg); font-size: 0.85rem; margin: 0.25rem 0 1rem; }
.download-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius);
  background: var(--primary); color: var(--primary-fg);
  font-weight: 700; margin: 0 auto; width: fit-content;
}
.download-btn { display: flex; justify-content: center; }

/* Responsive (détails unifiés en bas de fichier) */

/* Page secondaires */
.back-link {
  display: inline-block; color: var(--muted-fg);
  font-size: 0.85rem; margin-bottom: 1.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--fg); }
.page-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-sub { color: var(--muted-fg); margin-bottom: 2rem; }

.grid-3 {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.content-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all 0.2s;
}
.content-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.card-emoji { font-size: 2.5rem; margin-bottom: 0.75rem; }
.content-card h3 { font-weight: 700; margin-bottom: 0.5rem; }
.content-card p { color: var(--muted-fg); font-size: 0.9rem; margin-bottom: 1rem; }
.price-tag {
  display: inline-block; padding: 0.3rem 0.75rem;
  border-radius: 9999px; background: var(--primary);
  color: var(--primary-fg); font-weight: 700; font-size: 0.8rem;
}

/* Events */
.event-list { display: flex; flex-direction: column; gap: 1rem; }
.event-card {
  display: flex; gap: 1.5rem; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: all 0.2s;
}
.event-card:hover { border-color: var(--primary); }
.event-date {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface); border-radius: var(--radius);
  padding: 0.75rem 1rem; min-width: 70px;
}
.event-date .day { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.event-date .month { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-fg); }
.event-card h3 { font-weight: 700; margin-bottom: 0.25rem; }
.event-card p { color: var(--muted-fg); font-size: 0.9rem; margin-bottom: 0.5rem; }
.event-loc { font-size: 0.8rem; color: var(--primary); }

/* Auth */
.container.narrow { max-width: 440px; }
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; padding: 2rem;
}
.auth-card h1 { text-align: center; font-weight: 700; margin-bottom: 1.5rem; }
.auth-card form { display: flex; flex-direction: column; gap: 0.5rem; }
.auth-card label { font-size: 0.85rem; color: var(--muted-fg); margin-top: 0.5rem; }
.auth-card input {
  width: 100%; padding: 0.75rem 1rem; border-radius: var(--radius);
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--border); font-family: inherit; font-size: 1rem;
}
.auth-card input:focus { outline: none; border-color: var(--primary); }
.auth-card .confirm-btn { margin-top: 1rem; }
.auth-toggle { text-align: center; margin-top: 1rem; color: var(--muted-fg); font-size: 0.9rem; }
.auth-toggle button { background: transparent; color: var(--primary); font-weight: 600; padding: 0 0.25rem; }
.auth-error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.empty-state { color: var(--muted-fg); font-size: 0.9rem; padding: 1rem 0; }
.auth-toggle button:hover { text-decoration: underline; }

/* ===== Animations ===== */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes float-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

.animate-fade-in    { animation: fade-in 0.6s ease-out both; }
.animate-scale-in   { animation: scale-in 0.3s ease-out both; }
.animate-slide-in   { animation: slide-in-right 0.5s ease-out both; }
.hover-scale        { transition: transform 0.2s ease; }
.hover-scale:hover  { transform: scale(1.05); }

/* Stagger entrance for homepage elements */
.hero            { animation: fade-in 0.6s ease-out both; }
.sidebar         { animation: fade-in 0.6s ease-out 0.1s both; }
.featured        { animation: fade-in 0.6s ease-out 0.2s both; }
.download-section{ animation: fade-in 0.6s ease-out 0.3s both; }
.hero-content h1 { animation: fade-in 0.6s ease-out 0.3s both; }
.hero-content p  { animation: fade-in 0.6s ease-out 0.45s both; }
.hero-play-btn   { animation: scale-in 0.5s ease-out 0.6s both, float-pulse 3s ease-in-out 2s infinite; }

.featured-card   { animation: fade-in 0.5s ease-out both; }
.featured-card:nth-child(1){ animation-delay: .25s; }
.featured-card:nth-child(2){ animation-delay: .35s; }
.featured-card:nth-child(3){ animation-delay: .45s; }
.featured-card:nth-child(4){ animation-delay: .55s; }
.featured-card:nth-child(5){ animation-delay: .65s; }

.category-item   { animation: slide-in-right 0.4s ease-out both; }
.category-item:nth-child(1){ animation-delay: .15s; }
.category-item:nth-child(2){ animation-delay: .2s; }
.category-item:nth-child(3){ animation-delay: .25s; }
.category-item:nth-child(4){ animation-delay: .3s; }
.category-item:nth-child(5){ animation-delay: .35s; }
.category-item:nth-child(6){ animation-delay: .4s; }

.modal           { animation: scale-in 0.25s ease-out both; }
.content-card    { animation: fade-in 0.5s ease-out both; }
.event-card      { animation: slide-in-right 0.5s ease-out both; }
.event-card:nth-child(2){ animation-delay: .1s; }
.event-card:nth-child(3){ animation-delay: .2s; }

/* ===== Game detail page ===== */
.container.narrow-md { max-width: 900px; }

.game-detail-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 1rem; overflow: hidden;
}
.game-detail-media { position: relative; }
.game-detail-media img {
  width: 100%; height: 360px; object-fit: cover; display: block;
}
.game-detail-overlay {
  position: absolute; inset: 0;
  background: rgba(34,24,17,0.4);
  display: flex; align-items: center; justify-content: center;
}
.play-btn-xl {
  width: 5rem; height: 5rem; font-size: 2rem;
  cursor: pointer; border: none;
}
.game-detail-body { padding: 2rem; }
.game-detail-body h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.game-desc { color: var(--muted-fg); margin-bottom: 1.25rem; line-height: 1.6; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tag {
  padding: 0.35rem 0.85rem; border-radius: 9999px;
  background: var(--surface); color: var(--fg);
  font-size: 0.75rem; font-weight: 600;
}

.game-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-bottom: 1.5rem;
  padding: 1rem; background: var(--surface);
  border-radius: var(--radius);
}
.stat { text-align: center; }
.stat-value { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.75rem; color: var(--muted-fg); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.25rem; }

.related-section { margin-top: 2.5rem; }
.related-img {
  width: 100%; height: 130px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 0.75rem;
}

/* Game launcher modal */
.game-launcher { max-width: 720px; }
.game-frame {
  aspect-ratio: 16/9;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-top: 0.5rem;
}
.game-loading { text-align: center; }


/* ===== Account (joueur) — largeur store, aéré ===== */
.account-page {
  max-width: 1280px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 3rem;
}
.account-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}
.account-hero h1 {
  margin: 0.15rem 0 0.4rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}
.account-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.account-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  font-size: 2rem;
  flex-shrink: 0;
  overflow: hidden;
}
.account-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-top: 1.35rem;
}
.account-summary > div {
  min-width: 0;
  padding: 0.9rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}
.account-summary span {
  display: block;
  color: var(--muted-fg);
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.account-summary strong {
  display: block;
  text-transform: capitalize;
  font-size: 1rem;
}
.account-hero p { color: var(--muted-fg); max-width: 42rem; line-height: 1.5; }
.eyebrow {
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary) !important;
  margin: 0;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  width: 100%;
}
.account-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: sticky;
  top: 1rem;
}
.account-tab {
  border: 0;
  background: transparent;
  padding: 0.9rem 1.05rem;
  border-radius: 0.75rem;
  text-align: left;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--fg);
  text-decoration: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s, color 0.15s;
}
.account-tab:hover,
.account-tab.active {
  background: var(--surface);
  color: var(--primary);
}
.account-tab.danger {
  margin-top: 0.5rem;
  color: #e07070;
}
.account-tab.danger:hover {
  background: color-mix(in srgb, #e07070 12%, var(--card));
}
.account-content {
  min-width: 0;
  width: 100%;
}
.account-panel {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  width: 100%;
  box-sizing: border-box;
}
.account-panel.active {
  display: block;
  animation: fade-in 0.25s ease-out both;
}
.account-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}
.panel-subtitle,
.muted { color: var(--muted-fg); }

/* Formulaires : pleine largeur du panneau (plus de 620px étroit) */
.account-form {
  display: grid;
  gap: 1.1rem;
  max-width: none;
  width: 100%;
  margin-top: 1.35rem;
}
.account-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}
.account-form input,
.account-form select,
.account-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.account-form .confirm-btn {
  justify-self: start;
  min-width: 12rem;
  margin-top: 0.25rem;
}
.account-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.35rem;
  width: 100%;
}
.account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  width: 100%;
  box-sizing: border-box;
}
.account-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
  .account-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .account-tab {
    flex: 1 1 auto;
    width: auto;
    text-align: center;
  }
  .account-panel {
    padding: 1.35rem 1.25rem;
  }
  .account-hero {
    padding: 1.35rem 1.25rem;
  }
}


/* ===== Game detail (pages avancées) ===== */
.game-detail-page { max-width: 1080px; }
.game-detail-back { margin-bottom: 1rem; display: inline-flex; }
.game-detail-card { box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.game-detail-meta { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1.25rem; }
.game-detail-actions { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; }
.game-action-btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:.8rem 1.2rem; border-radius: var(--radius);
  background:var(--primary); color:var(--primary-fg); font-weight:700;
  border:1px solid var(--primary); cursor:pointer; font-family:inherit; text-decoration:none;
  transition: all 0.2s;
}
.game-action-btn.secondary { background:var(--surface); color:var(--fg); border-color:var(--border); }
.game-action-btn:hover { transform:translateY(-1px); filter:brightness(1.04); }
.game-detail-note { margin-top:1rem; color:var(--muted-fg); font-size:.85rem; }
.game-detail-loading, .game-detail-error { padding:2rem; text-align:center; background:var(--card); border:1px solid var(--border); border-radius:1rem; }
.game-detail-error { color:#ffb4a8; }
@media (max-width: 700px) {
  .game-detail-media img { height:260px; }
  .game-detail-body { padding:1.25rem; }
  .game-stats { grid-template-columns:1fr; }
  .game-detail-actions .game-action-btn { width:100%; }
}

/* Choix du type de compte à l'inscription — cartes lisibles */
.account-type-choice {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.account-type-choice[hidden],
#account-type-field[hidden],
#name-field[hidden],
#age-fields[hidden] {
  display: none !important;
}
.account-type-hint {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-fg);
  margin: 0;
}
.account-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 520px) {
  .account-type-grid { grid-template-columns: 1fr; }
}
.account-type-card {
  position: relative;
  cursor: pointer;
  margin: 0;
}
.account-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.account-type-card-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  height: 100%;
  padding: 1rem 1rem 1.1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.account-type-card:hover .account-type-card-inner {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.account-type-card input:checked + .account-type-card-inner {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  box-shadow: 0 0 0 1px var(--primary), 0 8px 20px rgba(0,0,0,0.25);
}
.account-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.account-type-card input:checked + .account-type-card-inner .account-type-icon {
  background: var(--primary);
  color: var(--primary-fg);
}
.account-type-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg);
  line-height: 1.25;
}
.account-type-desc {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted-fg);
  line-height: 1.35;
}
/* Ancien radio-label (compat) */
.account-type-choice .radio-label {
  display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem;
  padding: .6rem .8rem; border: 1px solid var(--border); border-radius: .6rem; cursor: pointer;
}
.account-type-choice .radio-label:has(input:checked) { border-color: var(--primary); background: var(--surface); }


/* ========== Boutique — layout aligné sur front.zip ========== */
/* Même grille 200px | 1fr | 240px que .layout du zip */
.header-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(31, 26, 21, 0.94);
}
.nav-btn.nav-active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}
.nav-toggle {
  display: none;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 1.1rem;
}

.store-page { padding-bottom: 3rem; }

/* Hero carousel — même esprit que .hero du zip (min-height, overlay, contenu centré) */
.hero-carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  background: var(--card);
  min-height: 400px; /* comme .hero du zip */
}
.hero-carousel-track {
  display: flex;
  width: 100%;
  will-change: transform;
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 400px;
  display: block;
  color: inherit;
  overflow: hidden;
}
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(34,24,17,0.85), rgba(34,24,17,0.1));
  z-index: 1;
}
.hero-slide .hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  max-width: none;
}
.hero-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.hero-slide h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  margin-bottom: 0.35rem;
}
.hero-slide p {
  margin-top: 0.5rem;
  opacity: 0.9;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 9999px;
  background: rgba(61,48,39,0.7);
  color: var(--primary);
  border: 2px solid var(--primary);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}
.hero-nav:hover { background: var(--primary); color: var(--primary-fg); }
.hero-prev { left: 0.75rem; }
.hero-next { right: 0.75rem; }
.hero-dots {
  position: absolute;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.35rem;
}
.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: rgba(255,255,255,.35);
  border: none;
  padding: 0;
  cursor: pointer;
}
.hero-dot.is-active { background: var(--primary); transform: scale(1.15); }
.hero-catalog-link {
  position: absolute;
  bottom: 0.9rem;
  right: 1rem;
  z-index: 3;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(61,48,39,0.7);
  border: 1px solid var(--primary);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}
.hero-catalog-link:hover { background: var(--primary); color: var(--primary-fg); }

/* Toolbar recherche + chips — style zip (surface, border, primary) */
.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.store-search-wrap { flex: 1 1 220px; min-width: 180px; }
.store-search {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.store-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(215, 175, 61, 0.2);
}
.store-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: var(--surface);
  color: var(--muted-fg);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: inherit;
}
.chip:hover { color: var(--fg); border-color: var(--primary); }
.chip-active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

/* Layout boutique = même grille que .layout du zip */
.store-layout {
  align-items: start;
}
.catalog-main { min-width: 0; }
.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

/* Cartes catalogue — hauteur FIXE dès le premier paint */
.catalog-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  animation: fade-in 0.45s ease-out both;
  color: inherit;
  text-decoration: none;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  box-sizing: border-box;
}
.catalog-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.catalog-card-media {
  position: relative;
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  background: var(--surface);
  flex-shrink: 0;
  overflow: hidden;
}
.catalog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.badge-free {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--yas);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
}
.catalog-card-body {
  padding: 0.75rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.catalog-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-card-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}
.catalog-empty { grid-column: 1 / -1; padding: 1.25rem; text-align: center; color: var(--muted-fg); min-height: 0; display: flex; align-items: center; justify-content: center; }

.category-item.category-active {
  background: var(--surface);
  border: 1px solid var(--primary); /* contour jaune actif */
  box-shadow: 0 0 0 1px rgba(215, 175, 61, 0.3);
}
.category-item.category-active .category-label {
  color: var(--primary);
  font-weight: 700;
}
.category-item.category-active .category-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

/* Skeletons */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--muted) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.2s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line { height: 2.2rem; margin-bottom: 0.4rem; }
.skeleton-line-short { width: 60%; height: 0.85rem; }
.skeleton-img { height: 100px; margin-bottom: 0.5rem; }
.skeleton-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
}
/* Skeletons catalogue = même hauteur fixe que .catalog-card */
.catalog-grid .skeleton-card.catalog-skeleton,
.catalog-grid .catalog-skeleton {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}
.catalog-grid .catalog-skeleton .skeleton-media {
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  width: 100%;
  background: linear-gradient(90deg, var(--surface) 25%, var(--muted) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
.catalog-grid .catalog-skeleton .skeleton-body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
  min-height: 0;
}
.catalog-grid .catalog-skeleton .skeleton-line {
  height: 0.95rem;
  margin-bottom: 0;
  border-radius: 4px;
}
/* Grille : hauteur = contenu. Réserve 1 rangée SEULEMENT pendant le skeleton */
.catalog-grid,
.catalog-grid-mesjeux {
  min-height: 0;
  height: auto;
  align-content: start;
}
.catalog-grid:has(.catalog-skeleton),
.catalog-grid-mesjeux:has(.catalog-skeleton) {
  min-height: 280px; /* 1 rangée pendant chargement */
}
.skeleton-card-sm { height: 110px; margin-bottom: 0.75rem; }
.skeleton-stack { display: flex; flex-direction: column; gap: 0.35rem; }

/* (media queries mobile unifiées plus bas — section Responsive boutique) */

html { scroll-behavior: smooth; }

/* Compact hero option (si utilisé ailleurs) */
.hero-compact {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.hero-compact img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.hero-compact .hero-content { padding: 1.5rem; }

/* Prix promo */
.price-old { text-decoration: line-through; color: var(--muted-fg); font-size: 0.85em; margin-right: 0.35rem; }
.price-new { color: var(--primary); font-weight: 700; }
.badge-sale {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  margin-left: 0.25rem;
}
.price-sale { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.15rem; }

/* Admin / Dev sticky */
.admin-shell .header,
.developer-page .header { position: sticky; top: 0; z-index: 50; }


/* === UI unifiée (boutons / formulaires) — cohérent avec zip === */
.confirm-btn,
.btn-primary,
button.confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--primary);
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.15s;
}
.confirm-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.confirm-btn:disabled {
  background: var(--muted);
  color: var(--muted-fg);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary,
button.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.btn-secondary:hover {
  border-color: var(--primary);
}

.small-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.15s;
}
.small-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.small-btn.danger-btn {
  border-color: rgba(200, 60, 50, 0.45);
  color: #e8a09a;
}
.small-btn.danger-btn:hover {
  background: rgba(200, 60, 50, 0.12);
  border-color: #c0392b;
}

.account-form input,
.account-form select,
.account-form textarea,
.dev-add-version-form input,
.dev-add-version-form select,
.admin-panel-form input,
.admin-panel-form select,
.admin-panel-form textarea,
.admin-inline-form input,
.modal input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus,
.dev-add-version-form input:focus,
.dev-add-version-form select:focus,
.admin-panel-form input:focus,
.admin-inline-form input:focus,
.modal input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(215, 175, 61, 0.18);
}

/* Language switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-right: .5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted-fg);
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .35rem .55rem;
  cursor: pointer;
  line-height: 1;
}
.lang-btn:hover { color: var(--fg); background: rgba(255,255,255,.06); }
.lang-btn.lang-active {
  background: var(--primary);
  color: var(--primary-fg);
}
@media (max-width: 720px) {
  .lang-switcher { margin-right: .25rem; }
  .lang-btn { padding: .3rem .45rem; font-size: .7rem; }
}

/* Theme selector */
.theme-selector {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.theme-selector-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-fg);
  white-space: nowrap;
}
.theme-selector-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.4rem 1.8rem 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aa9b85' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.55rem center;
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 9rem;
  max-width: 12rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.theme-selector-select:hover,
.theme-selector-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(215, 175, 61, 0.22);
}
.header .theme-selector {
  margin-left: 0.35rem;
}
@media (max-width: 900px) {
  .theme-selector-label { display: none; }
  .theme-selector-select { min-width: 7.5rem; font-size: 0.72rem; }
}

html {
  transition: background-color 0.25s ease, color 0.25s ease;
}
body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---- Pagination partagée ---- */
.pager-slot { margin-top: 1rem; }
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 0;
}
.pager-info {
  font-size: .85rem;
  opacity: .75;
}
.pager-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.pager-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 .5rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: inherit;
  cursor: pointer;
  font-size: .85rem;
}
.pager-btn:hover:not(:disabled) {
  background: rgba(255,255,255,.1);
}
.pager-btn.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
  font-weight: 600;
}
.pager-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.pager-ellipsis {
  opacity: .5;
  padding: 0 .2rem;
}

/* ========== Alignement design.zip : layout 3 colonnes + hero au centre ========== */

/* Hero dans la grille design (colonne centrale) */
.layout > .hero,
.layout > .hero-carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 400px;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 0;
}

/* Carousel intégré dans le hero design */
.layout .hero-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 400px;
  will-change: transform;
}
.layout .hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 400px;
  display: block;
  color: inherit;
  overflow: hidden;
}
.layout .hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.layout .hero-slide .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(34,24,17,0.85), rgba(34,24,17,0.1));
  z-index: 1;
}
.layout .hero-slide .hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}
.layout .hero-slide h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  margin-bottom: 0.35rem;
}
.layout .hero-slide p {
  margin-top: 0.35rem;
  opacity: 0.9;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.layout .hero-play-btn,
.hero-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.layout .hero-play-btn:hover,
.hero-play-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* Nav carousel dans le layout */
.layout .hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 9999px;
  background: rgba(61,48,39,0.7);
  color: var(--primary);
  border: 2px solid var(--primary);
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}
.layout .hero-nav:hover { background: var(--primary); color: var(--primary-fg); }
.layout .hero-prev { left: 0.5rem; }
.layout .hero-next { right: 0.5rem; }
.layout .hero-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.35rem;
}

/* Toolbar recherche sous le layout design */
.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.5rem 0 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}
.store-search-wrap { flex: 1 1 220px; }
.store-search {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 0.9rem;
}
.store-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(232,185,74,0.25);
}
.store-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s;
}
.chip:hover, .chip.chip-active, .chip.active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

/* Catalogue sous le layout (pleine largeur) */
.catalog-below {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}
.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

/* Header simple comme design (pas sticky obligatoire) */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive — boutique alignée design Lovable (mobile propre) */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  /* Sur tablette/mobile : masquer sidebar catégories + vedettes (comme Lovable mobile) */
  .layout > .sidebar,
  .layout > .featured {
    display: none;
  }
  .layout > .hero,
  .layout > .hero-carousel {
    order: 1;
    min-height: 280px;
    aspect-ratio: 16 / 10;
    max-height: none;
  }
  .layout .hero-slide { min-height: 280px; }

  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.5rem;
  }
  .main-nav.nav-open { display: flex; }

  .header {
    flex-wrap: wrap;
    padding: 0.65rem 1rem;
    gap: 0.5rem;
  }
  .logo img { width: 40px; height: 40px; }
  .logo-title { font-size: 0.85rem; }
  .auth-btn span { display: none; } /* icône seule sur mobile */
  .auth-btn {
    padding: 0.55rem 0.75rem;
    border-radius: 9999px;
  }

  .store-search-bar {
    flex-direction: row;
    gap: 0.5rem;
  }
  .store-search-btn {
    flex-shrink: 0;
    padding: 0.7rem 1.1rem;
  }

  .catalog-below { margin-top: 0.5rem; }
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .catalog-card-media {
    aspect-ratio: 16 / 9;
  }
  .catalog-card-body {
    padding: 1rem 1.1rem 1.15rem;
  }
  .catalog-card-title {
    font-size: 1.05rem;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 0.55rem 0.85rem;
  }
  .container {
    padding: 0.85rem 1rem;
  }
  .hero-carousel,
  .layout .hero-slide {
    min-height: 220px;
  }
  .hero-slide .hero-content h1 {
    font-size: 1.55rem;
  }
  .hero-play-btn {
    padding: 0.6rem 1.6rem;
    font-size: 1rem;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .download-section {
    padding: 1.5rem 1rem;
  }
}

/* ========== Panorama hero — responsive & adapté à la colonne centrale ========== */
.layout > .hero,
.layout > .hero-carousel {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
  max-height: min(520px, 70vh);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.layout .hero-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100%;
  will-change: transform;
}

.layout .hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  overflow: hidden;
}

.layout .hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.layout .hero-slide .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(34,24,17,0.88), rgba(34,24,17,0.15));
  z-index: 1;
}

.layout .hero-slide .hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(0.75rem, 3vw, 1.75rem);
  box-sizing: border-box;
}

.layout .hero-slide h1 {
  font-size: clamp(1.15rem, 2.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0,0,0,0.65);
  margin: 0 0 0.35rem;
  max-width: 95%;
  word-break: break-word;
}

.layout .hero-slide p,
.layout .hero-kicker {
  font-size: clamp(0.7rem, 1.6vw, 0.95rem);
  margin: 0.25rem 0;
  opacity: 0.92;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  max-width: 90%;
}

.layout .hero-play-btn,
.layout .hero-slide .hero-play-btn {
  margin-top: clamp(0.6rem, 2vw, 1.25rem);
  padding: clamp(0.45rem, 1.2vw, 0.7rem) clamp(1rem, 3vw, 1.75rem);
  font-size: clamp(0.75rem, 1.8vw, 1rem);
  border-radius: 9999px;
  background: rgba(61,48,39,0.75);
  color: var(--primary);
  font-weight: 700;
  border: 2px solid var(--primary);
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s;
}

.layout .hero-play-btn:hover,
.layout .hero-slide .hero-play-btn:hover {
  background: var(--primary);
  color: var(--primary-fg);
  transform: scale(1.05);
}

.layout .hero-nav {
  width: clamp(2rem, 4vw, 2.6rem);
  height: clamp(2rem, 4vw, 2.6rem);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
}

.layout .hero-prev { left: clamp(0.35rem, 1.5vw, 0.65rem); }
.layout .hero-next { right: clamp(0.35rem, 1.5vw, 0.65rem); }

.layout .hero-dots {
  bottom: clamp(0.4rem, 1.5vw, 0.85rem);
}

.layout .hero-dot {
  width: clamp(0.4rem, 1vw, 0.55rem);
  height: clamp(0.4rem, 1vw, 0.55rem);
  border-radius: 50%;
  border: none;
  background: rgba(243,236,224,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.layout .hero-dot.is-active {
  background: var(--primary);
  transform: scale(1.25);
}

@media (max-width: 900px) {
  .layout > .hero,
  .layout > .hero-carousel {
    aspect-ratio: 16 / 9;
    max-height: min(380px, 55vh);
    width: 100%;
  }
}

@media (max-width: 600px) {
  .layout > .hero,
  .layout > .hero-carousel {
    aspect-ratio: 4 / 3;
    max-height: min(300px, 50vh);
  }
  .layout .hero-slide h1 {
    font-size: clamp(1.05rem, 5vw, 1.5rem);
  }
}


/* ========== Sidebar catégories : hauteur alignée sur le panorama ========== */
.layout > .sidebar {
  max-height: min(520px, 70vh); /* même plafond que le hero */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}
.layout > .sidebar .section-title {
  flex-shrink: 0;
}
.layout > .sidebar .category-list {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-right: 0.25rem;
  /* scrollbar discrète */
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface);
}
.layout > .sidebar .category-list::-webkit-scrollbar {
  width: 6px;
}
.layout > .sidebar .category-list::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 9999px;
}
.layout > .sidebar .category-list::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 9999px;
}

/* Vedettes : même plafond, scroll si besoin */
.layout > .featured {
  max-height: min(520px, 70vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.layout > .featured .section-title { flex-shrink: 0; }
.layout > .featured .featured-list {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface);
}

@media (max-width: 900px) {
  /* Masquer catégories + vedettes sur mobile/tablette (design Lovable mobile) */
  .layout > .sidebar,
  .layout > .featured {
    display: none !important;
  }
}

/* ========== Alignement exact design thiossane-game.lovable.app ========== */

/* Barre de recherche pleine largeur */
.store-search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.store-search-bar .store-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.store-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg);
  pointer-events: none;
}
.store-search-bar .store-search {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.store-search-bar .store-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(215, 175, 61, 0.2);
}
.store-search-btn {
  padding: 0.7rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--primary);
  color: var(--primary-fg);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.store-search-btn:hover { opacity: 0.9; }

/* Lien "Voir tous les jeux" */
.catalog-see-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.catalog-see-all:hover { text-decoration: underline; }

/* Cartes catalogue — hauteur FIXE (pas de saut quand images/données arrivent) */
.catalog-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  box-sizing: border-box;
}
.catalog-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.catalog-card-media {
  position: relative;
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.catalog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.catalog-card-body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.catalog-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}
.catalog-card-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted-fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.25rem; /* réserve l'espace même sans description */
}
.catalog-card-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: auto;
  flex-shrink: 0;
}

/* Bouton APK */
.download-apk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem auto 0;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.download-apk-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(215, 175, 61, 0.35);
}

/* Section équipe */
.team-section {
  margin-top: 1.25rem;
  margin-bottom: 1rem;
}
.team-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}
.team-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.team-card:hover { border-color: var(--primary); }
.team-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.team-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.25;
}
.team-role {
  font-size: 0.72rem;
  color: var(--muted-fg);
  margin-top: 0.15rem;
}

/* Footer enrichi */
.footer {
  text-align: center;
  padding: 1.75rem 1.5rem;
  color: var(--muted-fg);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  background: var(--card);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
}
.footer-phone:hover { color: var(--primary); }
.footer-social {
  display: flex;
  gap: 0.5rem;
}
.social-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted-fg);
  transition: all 0.2s;
}
.social-btn:hover {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

/* Nav active */
.nav-btn.nav-active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

/* Sidebar catégories centrées comme design */
.layout > .sidebar .section-title {
  text-align: center;
}
.category-item {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.65rem 0.4rem;
  background: transparent;
  border: none;
}
.category-item:hover {
  background: transparent;
  border: none;
}
.category-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
  color: var(--muted-fg);
}
.category-item:hover .category-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}
.category-item:hover .category-icon {
  color: var(--primary-fg);
}
.category-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted-fg);
  letter-spacing: 0.04em;
}
.category-item:hover .category-label { color: var(--fg); }
.category-item.category-active .category-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}
.category-item.category-active .category-label {
  color: var(--primary);
}

/* Featured cards plus proches du design */
.featured-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
  transition: all 0.25s;
}
.featured-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}
.featured-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.featured-card:hover .featured-overlay { opacity: 1; }
.featured-title {
  position: absolute;
  bottom: 0.35rem;
  left: 0.5rem;
  right: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-price { display: none; }

/* Grille catalogue 3 colonnes sur grand écran */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
/* (voir section Responsive boutique plus haut) */

/* Hero play button jaune comme design */
.hero-play-btn {
  margin-top: 1.25rem;
  padding: 0.7rem 2.25rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 1.15rem;
  border: none;
  box-shadow: 0 4px 16px rgba(215, 175, 61, 0.4);
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 22px rgba(215, 175, 61, 0.55);
}

/* Cartes packs/livres — même esprit que catalog-card */
.pack-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: linear-gradient(145deg, var(--surface), var(--card));
  border-bottom: 1px solid var(--border);
}
.pack-card-emoji { font-size: 2.75rem; line-height: 1; }
.content-pack-card { cursor: default; }
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  color: var(--fg);
}
.legal-page h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--primary); }
.legal-page h2 { font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 0.75rem; color: var(--fg); }
.legal-page p, .legal-page li { color: var(--muted-fg); line-height: 1.65; margin-bottom: 0.75rem; }
.legal-page a { color: var(--primary); }
.legal-meta { font-size: 0.85rem; color: var(--muted-fg); margin-bottom: 1.25rem; }
.legal-toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.legal-toc ol { margin: 0.5rem 0 0 1.25rem; color: var(--muted-fg); }
.legal-toc a { color: var(--fg); text-decoration: none; }
.legal-toc a:hover { color: var(--primary); }
.legal-note {
  background: var(--surface);
  border-left: 3px solid var(--primary);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
  color: var(--muted-fg);
  font-size: 0.9rem;
}

/* ===== Fiche jeu — bas de page (avis, signalement, studio) ===== */
.game-detail-page {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 3rem;
  min-height: 50vh;
}
.game-detail-card {
  margin-bottom: 1.5rem;
}
.game-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
}
.game-studio-block {
  margin: 1.25rem 0;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.game-studio-link a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}
.game-studio-link a:hover { text-decoration: underline; }
.game-panel {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.game-panel-hint {
  font-size: 0.9rem;
  margin: 0 0 1rem;
  line-height: 1.45;
}
.game-form {
  max-width: 36rem;
  margin-top: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.game-form-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}
.form-feedback { margin-top: 0.5rem; font-size: 0.9rem; }
.reviews-list { margin-bottom: 0.5rem; }
.reviews-summary { margin: 0 0 0.85rem; font-size: 0.9rem; }
.review-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.review-item:last-child { border-bottom: none; }
.review-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.review-item-date { font-size: 0.85rem; }
.review-item-stars {
  color: var(--primary);
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.review-item-comment {
  margin: 0.35rem 0 0;
  color: var(--fg);
  line-height: 1.5;
  font-size: 0.95rem;
}
.review-dev-reply {
  margin-top: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
}
.review-dev-reply strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.review-dev-reply p { margin: 0; color: var(--fg); line-height: 1.45; }
.game-detail-actions {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}
/* Sticky footer sans reflow agressif */
html {
  min-height: 100%;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main,
body > .container,
main.container {
  flex: 1 0 auto;
}
body > .footer,
.footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* ===== Fiche jeu style Lovable (thiossane-game.lovable.app/jeu/...) ===== */
.gd-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 2rem;
}
.gd-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  padding: 1.25rem 1.35rem 1.5rem;
}
.gd-hero-card { padding: 0; }
.gd-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
}
.gd-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gd-cover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  border: none;
  background: rgba(40, 32, 24, 0.55);
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.gd-cover-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--primary);
  color: var(--primary-fg);
}
.gd-hero-body {
  padding: 1.35rem 1.5rem 1.6rem;
}
.gd-title {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--fg);
}
.gd-desc {
  color: var(--muted-fg);
  line-height: 1.55;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.gd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}
.gd-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-fg);
}
.gd-btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.gd-btn-play:hover {
  background: var(--primary);
  color: var(--primary-fg);
  transform: translateY(-1px);
}
.gd-secondary-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.gd-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--fg);
}
.gd-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .gd-info-grid { grid-template-columns: 1fr; }
  .gd-title { font-size: 1.35rem; }
}
.gd-info-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.gd-info-label {
  font-size: 0.75rem;
  color: var(--muted-fg);
  font-weight: 500;
}
.gd-info-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
}
.gd-download-text {
  color: var(--muted-fg);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.1rem;
}
.gd-btn-download {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
}
.gd-btn-download:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.gd-login-hint {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--muted-fg);
}
.gd-login-hint a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.gd-login-hint a:hover { text-decoration: underline; }
.gd-empty-reviews {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}
.game-detail-back {
  margin-bottom: 1rem;
  color: var(--muted-fg);
  font-weight: 600;
  font-size: 0.9rem;
  background: transparent;
  border: none;
  padding: 0.35rem 0;
}
.game-detail-back:hover {
  color: var(--primary);
  background: transparent;
  border: none;
}
.game-detail-page {
  max-width: 780px;
  margin: 0 auto;
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}


/* Contre .container qui limite la largeur du compte joueur */
.container.player-shell,
.container.account-page.player-shell {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ===== Compte joueur — layout responsive ===== */
.player-shell.account-page {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 2rem;
  box-sizing: border-box;
}
.player-shell .account-grid {
  display: block;
  position: relative;
  width: 100%;
  min-height: 0;
}
/* Desktop / tablette large : sidebar gauche fixe */
.player-shell .player-sidebar {
  position: fixed;
  top: 4.5rem;
  left: 0;
  bottom: 0;
  width: 220px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.player-sidebar-brand {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.player-sidebar-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.player-sidebar-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted-fg);
  margin-top: 0.15rem;
}
.player-sidebar-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  -webkit-overflow-scrolling: touch;
}
.player-sidebar-foot {
  flex-shrink: 0;
  padding: 0.5rem;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.player-shell .player-sidebar .account-tab {
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  font-size: 0.88rem;
  padding: 0.7rem 0.85rem;
}
.player-shell .account-hero {
  margin: 0 1rem 1rem 236px;
  max-width: calc(100% - 252px);
  box-sizing: border-box;
}
.player-shell .account-content {
  margin: 0 1rem 2rem 236px;
  padding: 0;
  max-width: min(960px, calc(100% - 252px));
  width: auto;
  box-sizing: border-box;
}
.player-shell .account-panel {
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}
.player-shell .account-form {
  max-width: 100%;
}
.player-shell .account-summary {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.player-shell .account-item {
  flex-wrap: wrap;
}

/* Tablette */
@media (max-width: 1024px) {
  .player-shell .player-sidebar { width: 200px; }
  .player-shell .account-hero {
    margin-left: 212px;
    max-width: calc(100% - 228px);
  }
  .player-shell .account-content {
    margin-left: 212px;
    max-width: calc(100% - 228px);
  }
}

/* Mobile & petite tablette : nav horizontale sous le header (plus de barre du bas) */
@media (max-width: 860px) {
  .player-shell.account-page {
    padding: 0 0 1.5rem;
  }
  .player-shell .player-sidebar {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    max-height: none;
    flex-direction: row;
    align-items: stretch;
    border-right: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 25;
  }
  .player-sidebar-brand {
    display: none;
  }
  .player-sidebar-nav {
    flex: 1 1 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.3rem;
    padding: 0.45rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .player-sidebar-foot {
    flex: 0 0 auto;
    border-top: none;
    border-left: 1px solid var(--border);
    padding: 0.45rem 0.5rem;
    display: flex;
    align-items: center;
  }
  .player-shell .player-sidebar .account-tab {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
    text-align: center;
  }
  .player-shell .account-hero {
    margin: 0.85rem 0.85rem 0.75rem;
    max-width: none;
    width: auto;
    padding: 1.15rem 1.1rem;
  }
  .player-shell .account-content {
    margin: 0 0.85rem 1.5rem;
    max-width: none;
    width: auto;
    padding: 0;
  }
  .player-shell .account-panel {
    padding: 1.15rem 1rem;
  }
  .player-shell .account-identity {
    gap: 0.85rem;
  }
  .player-shell .account-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .player-shell .account-form .confirm-btn {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }
}

@media (max-width: 520px) {
  .player-shell .account-summary {
    grid-template-columns: 1fr;
  }
  .player-shell .account-hero h1 {
    font-size: 1.35rem;
  }
  .player-shell .account-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .player-sidebar-nav {
    padding: 0.4rem;
  }
  .player-shell .player-sidebar .account-tab {
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
  }
}

/* =========================================================
   MOBILE-FIRST POLISH — app moderne (PC + smartphone)
   Touch targets, fluid sizes, no desktop feel on phone
   ========================================================= */

/* Safe areas (notch / home indicator) */
html {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Touch-friendly defaults */
button,
.nav-btn,
.auth-btn,
.confirm-btn,
.btn-primary,
.btn-secondary,
.small-btn,
.game-action-btn,
.play-btn,
.hero-play-btn,
.payment-btn,
.pager-btn,
.account-tab,
.admin-nav-btn,
.category-item,
.lang-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Inputs larger & readable on mobile */
input,
select,
textarea {
  font-size: 16px; /* évite zoom iOS */
  max-width: 100%;
}

@media (max-width: 900px) {
  /* Boutons — cibles tactiles ≥ 44px */
  .nav-btn,
  .auth-btn {
    min-height: 44px;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  .confirm-btn,
  .btn-primary,
  button.confirm-btn {
    min-height: 48px;
    padding: 0.85rem 1.35rem;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
  }
  .btn-secondary,
  button.btn-secondary {
    min-height: 44px;
    padding: 0.75rem 1.2rem;
    font-size: 0.9rem;
  }
  .small-btn {
    min-height: 40px;
    padding: 0.55rem 0.95rem;
    font-size: 0.85rem;
  }
  .game-action-btn {
    min-height: 48px;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
  }
  .hero-play-btn,
  .layout .hero-play-btn {
    min-height: 48px;
    padding: 0.75rem 1.75rem;
    font-size: 1.05rem;
  }
  .payment-btn {
    min-height: 52px;
    padding: 0.85rem 1rem;
  }
  .pager-btn {
    min-width: 40px;
    min-height: 40px;
  }

  /* Formulaires */
  input,
  select,
  textarea,
  .account-form input,
  .account-form select,
  .modal input {
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-size: 16px;
    border-radius: 10px;
  }

  /* Header plus compact mais tactile */
  .header {
    padding: 0.5rem 0.85rem;
    gap: 0.5rem;
    min-height: 3.5rem;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.35rem;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--fg);
  }
  .main-nav .nav-btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 48px;
    border-radius: 12px;
  }

  /* Conteneurs */
  .container {
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
  }

  /* Modales plein écran confortable */
  .modal-backdrop {
    padding: 0.75rem;
    align-items: flex-end;
  }
  .modal-box {
    max-width: 100%;
    width: 100%;
    border-radius: 1rem 1rem 0 0;
    padding: 1.25rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom));
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Cartes & grilles */
  .grid-3,
  .catalog-grid,
  .team-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .content-card,
  .catalog-card {
    border-radius: 14px;
  }

  /* Tables scrollables */
  table,
  .dash-table-scroll,
  .table-wrap {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 520px;
  }

  /* Typo fluide */
  .page-title {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  }
  h1 { font-size: clamp(1.4rem, 5vw, 2rem); }
  h2 { font-size: clamp(1.15rem, 4vw, 1.5rem); }

  /* Account type cards full width */
  .account-type-grid {
    grid-template-columns: 1fr;
  }
  .account-type-card-inner {
    padding: 1.1rem 1rem;
    min-height: 88px;
  }

  /* Footer compact */
  .footer {
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  }
  .footer-links {
    gap: 0.65rem 1rem;
  }
}

@media (max-width: 600px) {
  /* Boutons encore plus adaptés téléphone */
  .nav-btn,
  .auth-btn {
    font-size: 0.78rem;
    letter-spacing: 0.03em;
  }
  .confirm-btn,
  .btn-primary {
    font-size: 1rem;
    border-radius: 14px;
  }
  .logo-title { font-size: 0.8rem; }
  .logo-sub { font-size: 0.55rem; }
  .logo img,
  .logo-fallback {
    width: 36px;
    height: 36px;
  }

  /* Hero mobile */
  .hero-slide .hero-content h1,
  .layout .hero-slide h1 {
    font-size: clamp(1.25rem, 6vw, 1.6rem);
    line-height: 1.25;
  }
  .hero-slide .hero-content p {
    font-size: 0.85rem;
  }

  /* Espacement réduit mais aéré */
  .section-title {
    font-size: 0.7rem;
  }

  /* Actions jeu / détail pleine largeur */
  .game-detail-actions {
    flex-direction: column;
    width: 100%;
  }
  .game-detail-actions .game-action-btn {
    width: 100%;
  }

  /* Auth card */
  .auth-card {
    padding: 1.25rem 1rem;
    margin: 0.5rem auto;
    border-radius: 16px;
  }

  /* Pagination */
  .pager-btns {
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .header {
    padding: 0.45rem 0.65rem;
  }
  .container {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
  .nav-btn,
  .auth-btn {
    padding: 0.5rem 0.75rem;
  }
}

/* Empêche le débordement horizontal global */
img,
video,
iframe,
canvas {
  max-width: 100%;
  height: auto;
}

/* Player / compte — boutons tactiles */
@media (max-width: 860px) {
  .player-shell .player-sidebar .account-tab,
  .account-tab {
    min-height: 44px;
    font-size: 0.82rem;
  }
  .player-shell .account-form .confirm-btn,
  .account-form .confirm-btn {
    width: 100%;
    min-height: 48px;
  }
}


/* ========== Mes jeux.png — catalogue plein largeur ========== */
.catalog-below {
  margin-top: 1.75rem;
  padding-top: 0.5rem;
}
.catalog-head-mesjeux {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.catalog-title-mesjeux {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted-fg);
  margin: 0;
  border: none;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.see-all-games {
  color: var(--primary, #e8b923);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.see-all-games:hover {
  opacity: 0.85;
  text-decoration: underline;
}
.catalog-count-visible,
.catalog-count {
  display: none !important;
}
.catalog-chips {
  display: none !important;
}
.catalog-grid-mesjeux {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
@media (max-width: 1024px) {
  .catalog-grid-mesjeux {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .catalog-grid-mesjeux {
    grid-template-columns: 1fr;
  }
}
.badge-category {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  padding: 0.22rem 0.55rem;
  border-radius: 9999px;
  background: rgba(31, 25, 18, 0.78);
  color: var(--fg);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(215, 175, 61, 0.35);
}
.catalog-card-media .badge-free {
  left: auto;
  right: 0.55rem;
}
/* Header aligné palette lovable */
.header {
  background: var(--card);
}
body, main, .container {
  background: transparent;
}


/* ========== Mode page JEUX = affichage exact Mes jeux.png ========== */
html.page-jeux-pending body .hero,
html.page-jeux-pending body .featured,
html.page-jeux-pending body .download-section,
html.page-jeux-pending body .team-section,
body.page-jeux .hero,
body.page-jeux .featured,
body.page-jeux .download-section,
body.page-jeux .team-section {
  display: none !important;
}

html.page-jeux-pending .layout,
body.page-jeux .layout {
  grid-template-columns: 112px 1fr !important;
}

/* Catalogue en zone principale (plus de "sous le hero") */
html.page-jeux-pending .catalog-below,
body.page-jeux .catalog-below {
  margin-top: 0;
  padding-top: 0;
  /* Visuellement collé au layout : on le tire dans la colonne principale */
  max-width: none;
}

/* Sur mode jeux : le catalogue occupe toute la largeur utile à droite de la sidebar */
body.page-jeux main.container,
html.page-jeux-pending main.container {
  max-width: 1400px;
}

body.page-jeux .catalog-below,
html.page-jeux-pending .catalog-below {
  display: block;
}

/* Accueil : catalogue secondaire plus discret optionnel — reste visible sous le hero */
body:not(.page-jeux) .catalog-below {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Chips + grille style maquette */
body.page-jeux .catalog-chips,
html.page-jeux-pending .catalog-chips {
  margin-bottom: 1.25rem;
}

body.page-jeux .catalog-grid-mesjeux,
html.page-jeux-pending .catalog-grid-mesjeux {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

@media (max-width: 1100px) {
  body.page-jeux .catalog-grid-mesjeux,
  html.page-jeux-pending .catalog-grid-mesjeux {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  body.page-jeux .layout,
  html.page-jeux-pending .layout {
    grid-template-columns: 1fr !important;
  }
  body.page-jeux .catalog-grid-mesjeux,
  html.page-jeux-pending .catalog-grid-mesjeux {
    grid-template-columns: 1fr;
  }
}

/* Sidebar catégories toujours visible en mode jeux */
body.page-jeux .sidebar,
html.page-jeux-pending .sidebar {
  display: block !important;
}

/* Fond strict design */
html.page-jeux-pending,
body.page-jeux {
  background-color: #221811 !important;
}

/* ============================================================
   FIX 2026-10 — Play fullscreen, fiche jeu pleine largeur,
   responsive + suppression espaces vides
   ============================================================ */

/* --- Conteneurs : utiliser toute la largeur utile --- */
.container,
main.container,
.store-page {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(0.75rem, 2.5vw, 1.5rem);
  padding-right: clamp(0.75rem, 2.5vw, 1.5rem);
  box-sizing: border-box;
}

/* Fiche jeu : pleine largeur de la page, plus de bande étroite 720px */
.game-detail-page {
  max-width: 1280px !important;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 2rem;
  min-height: auto;
}
.game-detail-page .gd-stack,
.gd-stack {
  max-width: 100% !important;
  width: 100%;
  margin: 0;
  padding-bottom: 1.5rem;
  gap: 1.25rem;
}
.gd-hero-card .gd-cover {
  aspect-ratio: 21 / 9;
  max-height: min(420px, 45vh);
}
.gd-hero-body {
  padding: clamp(1rem, 2.5vw, 1.6rem) clamp(1rem, 2.5vw, 1.75rem);
}
.gd-title {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}
.gd-info-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.gd-secondary-actions,
.gd-btn-play,
.gd-btn-download {
  width: auto;
  max-width: 100%;
}
@media (max-width: 640px) {
  .gd-hero-card .gd-cover {
    aspect-ratio: 16 / 10;
    max-height: none;
  }
  .gd-btn-play,
  .gd-btn-download,
  .game-action-btn {
    width: 100%;
    justify-content: center;
  }
  .gd-secondary-actions {
    flex-direction: column;
  }
  .gd-secondary-actions .game-action-btn,
  .gd-secondary-actions a {
    width: 100%;
    text-align: center;
  }
}

/* --- Page JOUER : zone de jeu large + barre d'outils --- */
.play-shell {
  max-width: 1400px !important;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 1.5rem;
}
.play-card {
  background: var(--card);
  border-radius: 16px;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  border: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
}
.play-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.play-toolbar h1 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.play-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.play-stage {
  position: relative;
  width: 100%;
  min-height: min(70vh, 720px);
  height: min(70vh, 720px);
  border-radius: 12px;
  background: #000;
  overflow: hidden;
  margin: 0;
  padding: 0;
  display: block;
}
.play-stage iframe,
#play-frame {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: block;
  background: #000;
}
.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Bouton fullscreen */
.play-fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.play-fs-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.play-fs-btn.is-active {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

/* Mode fullscreen (API Fullscreen + classe CSS fallback) */
.play-stage:fullscreen,
.play-stage:-webkit-full-screen,
.play-stage.is-fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  background: #000;
  margin: 0;
  padding: 0;
}
.play-stage:fullscreen iframe,
.play-stage:-webkit-full-screen iframe,
.play-stage.is-fullscreen iframe {
  width: 100% !important;
  height: 100% !important;
}
/* Barre flottante en fullscreen */
.play-fs-exit {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10000;
  display: none;
}
.play-stage:fullscreen .play-fs-exit,
.play-stage:-webkit-full-screen .play-fs-exit,
.play-stage.is-fullscreen .play-fs-exit,
body.play-is-fullscreen .play-fs-exit {
  display: inline-flex;
}

@media (max-width: 640px) {
  .play-stage {
    min-height: 55vh;
    height: 55vh;
    border-radius: 8px;
  }
  .play-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .play-toolbar-actions {
    width: 100%;
  }
  .play-fs-btn,
  .play-actions .game-action-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* --- Espaces vides : footer collé, main sans trou inutile --- */
html, body {
  width: 100%;
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main,
main.container,
body > .container {
  flex: 1 0 auto;
  width: 100%;
}
.footer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
}

/* Pages contenu court (livres, packs, events, privacy, login) */
.store-page,
.content-page,
.auth-page-wrap {
  width: 100%;
}
.grid-3,
.catalog-grid {
  width: 100%;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .layout > .sidebar,
  .layout > .featured {
    display: block;
    width: 100%;
  }
  .layout > .hero,
  .layout > .hero-carousel {
    min-height: 260px;
  }
}
@media (max-width: 600px) {
  .header {
    padding: 0.55rem 0.85rem;
  }
  .header .main-nav {
    width: 100%;
  }
  .container,
  main.container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .download-section,
  .team-section,
  .auth-card {
    width: 100%;
    box-sizing: border-box;
  }
  .footer {
    padding: 1.25rem 0.85rem;
    text-align: center;
  }
}

/* Compte / login — éviter colonnes trop étroites + vides */
.account-grid {
  width: 100%;
}
@media (max-width: 860px) {
  .account-grid {
    grid-template-columns: 1fr !important;
  }
}
.auth-card {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Privacy & pages texte */
.privacy-page,
.legal-page {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem clamp(0.75rem, 2vw, 1.5rem) 2rem;
  box-sizing: border-box;
}

/* Images / media jamais plus larges que le viewport */
img, video, iframe, embed, object {
  max-width: 100%;
}

/* ============================================================
   FIX espaces vides accueil — grille = hauteur contenu
   ============================================================ */
.catalog-grid,
.catalog-grid-mesjeux {
  min-height: 0 !important;
  height: auto !important;
  align-content: start !important;
}
/* Pendant le chargement uniquement (skeletons présents) */
.catalog-grid:has(.catalog-skeleton),
.catalog-grid-mesjeux:has(.catalog-skeleton) {
  min-height: 280px !important;
}
.catalog-below {
  margin-bottom: 0.75rem !important;
}
body:not(.page-jeux) .catalog-below {
  margin-top: 1rem !important;
}
.download-section {
  margin-top: 1rem !important;
}
.team-section {
  margin-top: 1.25rem !important;
}
/* Cartes : largeur fluide, hauteur stable mais grille non forcée */
.catalog-grid-mesjeux {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  width: 100%;
}
@media (max-width: 1024px) {
  .catalog-grid-mesjeux {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .catalog-grid-mesjeux {
    grid-template-columns: 1fr;
  }
  .catalog-card,
  .catalog-grid .catalog-skeleton {
    height: auto;
    min-height: 240px;
    max-height: none;
  }
  .catalog-card-media,
  .catalog-grid .catalog-skeleton .skeleton-media {
    height: 150px;
    min-height: 150px;
    max-height: 150px;
  }
}
/* Layout accueil : ne pas étirer les zones vides */
.layout {
  align-items: start !important;
  align-content: start !important;
}
.layout > .catalog-below,
.layout > #catalog-section {
  align-self: start;
}
/* Main : pas de padding bas excessif */
main.container {
  padding-bottom: 1.25rem;
}

/* ============================================================
   TYPOGRAPHIE FLUIDE — lisible mobile → desktop
   ============================================================ */
html {
  font-size: 100%; /* base navigateur */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-size: clamp(0.92rem, 0.88rem + 0.25vw, 1.05rem);
  line-height: 1.5;
}

/* Titres génériques */
h1, .page-title {
  font-size: clamp(1.45rem, 1.2rem + 1.2vw, 2.15rem);
  line-height: 1.2;
}
h2 {
  font-size: clamp(1.15rem, 1.05rem + 0.55vw, 1.45rem);
  line-height: 1.25;
}
h3 {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.3;
}

/* Header / nav */
.logo-title {
  font-size: clamp(0.9rem, 0.85rem + 0.3vw, 1.1rem) !important;
}
.logo-sub {
  font-size: clamp(0.55rem, 0.5rem + 0.2vw, 0.68rem) !important;
}
.nav-btn, .auth-btn {
  font-size: clamp(0.72rem, 0.68rem + 0.2vw, 0.85rem) !important;
  padding: clamp(0.45rem, 0.4rem + 0.2vw, 0.6rem) clamp(0.75rem, 0.65rem + 0.4vw, 1.15rem) !important;
}

/* Sections accueil */
.section-title,
.catalog-title-mesjeux {
  font-size: clamp(0.72rem, 0.68rem + 0.2vw, 0.85rem) !important;
}
.category-label {
  font-size: clamp(0.7rem, 0.65rem + 0.15vw, 0.8rem) !important;
}
.category-icon {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.2rem) !important;
}

/* Hero carousel */
.hero-content h1,
.layout .hero-slide h1 {
  font-size: clamp(1.4rem, 1.1rem + 2vw, 2.75rem) !important;
  line-height: 1.15;
}
.hero-content p,
.layout .hero-slide p {
  font-size: clamp(0.85rem, 0.8rem + 0.35vw, 1.1rem) !important;
}
.hero-play-btn,
.layout .hero-play-btn {
  font-size: clamp(0.95rem, 0.9rem + 0.4vw, 1.25rem) !important;
  padding: clamp(0.55rem, 0.5rem + 0.25vw, 0.8rem) clamp(1.25rem, 1rem + 1vw, 2.25rem) !important;
}

/* Cartes catalogue */
.catalog-card-title {
  font-size: clamp(0.85rem, 0.8rem + 0.25vw, 1.05rem) !important;
  line-height: 1.3 !important;
}
.catalog-card-desc {
  font-size: clamp(0.72rem, 0.68rem + 0.2vw, 0.85rem) !important;
  line-height: 1.45 !important;
}
.catalog-card-price,
.badge-free,
.badge-category {
  font-size: clamp(0.65rem, 0.62rem + 0.15vw, 0.78rem) !important;
}
.see-all-games {
  font-size: clamp(0.8rem, 0.75rem + 0.2vw, 0.95rem) !important;
}

/* Featured */
.featured-title {
  font-size: clamp(0.65rem, 0.6rem + 0.2vw, 0.75rem) !important;
}
.featured-price {
  font-size: clamp(0.6rem, 0.55rem + 0.15vw, 0.7rem) !important;
}

/* Fiche jeu */
.gd-title {
  font-size: clamp(1.3rem, 1.15rem + 1vw, 2rem) !important;
}
.gd-desc {
  font-size: clamp(0.88rem, 0.84rem + 0.25vw, 1.02rem) !important;
}
.gd-tag {
  font-size: clamp(0.65rem, 0.6rem + 0.15vw, 0.75rem) !important;
}
.gd-card-title {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem) !important;
}
.gd-info-label {
  font-size: clamp(0.7rem, 0.66rem + 0.15vw, 0.8rem) !important;
}
.gd-info-value {
  font-size: clamp(0.88rem, 0.84rem + 0.2vw, 1rem) !important;
}
.gd-btn-play,
.gd-btn-download,
.game-action-btn {
  font-size: clamp(0.88rem, 0.84rem + 0.25vw, 1.05rem) !important;
}

/* Play page */
.play-toolbar h1 {
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.5rem) !important;
}
.play-fs-btn {
  font-size: clamp(0.78rem, 0.74rem + 0.15vw, 0.9rem) !important;
}

/* Download + équipe */
.download-section h2 {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem) !important;
}
.download-section .subtitle {
  font-size: clamp(0.82rem, 0.78rem + 0.2vw, 0.95rem) !important;
}
.download-apk-btn {
  font-size: clamp(0.88rem, 0.84rem + 0.25vw, 1.05rem) !important;
}
.footnote {
  font-size: clamp(0.7rem, 0.66rem + 0.15vw, 0.8rem) !important;
}
.team-name {
  font-size: clamp(0.88rem, 0.84rem + 0.2vw, 1rem) !important;
}
.team-role {
  font-size: clamp(0.72rem, 0.68rem + 0.15vw, 0.85rem) !important;
}

/* Search bar */
.store-search {
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem) !important;
}
.store-search-btn {
  font-size: clamp(0.8rem, 0.75rem + 0.2vw, 0.9rem) !important;
}

/* Auth / compte */
.auth-card h1 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.65rem) !important;
}
.auth-card label,
.auth-card input,
.auth-card button,
.confirm-btn {
  font-size: clamp(0.88rem, 0.84rem + 0.2vw, 1rem) !important;
}

/* Footer */
.footer,
.footer span,
.footer a {
  font-size: clamp(0.72rem, 0.68rem + 0.15vw, 0.85rem) !important;
}

/* Mobile : un cran plus compact mais toujours lisible */
@media (max-width: 600px) {
  body {
    font-size: clamp(0.9rem, 2.7vw, 1rem);
  }
  .nav-btn span,
  .auth-btn span {
    font-size: inherit;
  }
  .hero-content h1,
  .layout .hero-slide h1 {
    font-size: clamp(1.25rem, 5.5vw, 1.75rem) !important;
  }
  .catalog-card-title {
    font-size: clamp(0.9rem, 3.2vw, 1.05rem) !important;
  }
  .gd-title {
    font-size: clamp(1.2rem, 5vw, 1.55rem) !important;
  }
}

/* ===== Feedback compte joueur (toasts + messages explicites) ===== */
.account-feedback {
  margin-top: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius, 12px);
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid transparent;
}
.account-feedback.is-success {
  background: color-mix(in srgb, #2bb673 18%, var(--surface, #3d3027));
  border-color: color-mix(in srgb, #2bb673 45%, transparent);
  color: #b8f0d0;
}
.account-feedback.is-error {
  background: color-mix(in srgb, #e55a5a 16%, var(--surface, #3d3027));
  border-color: color-mix(in srgb, #e55a5a 45%, transparent);
  color: #ffc9c9;
}
.account-feedback.is-info {
  background: color-mix(in srgb, #0073d2 16%, var(--surface, #3d3027));
  border-color: color-mix(in srgb, #0073d2 40%, transparent);
  color: #b8d9f5;
}

.form-error {
  color: #ffc9c9;
  background: color-mix(in srgb, #e55a5a 14%, var(--surface, #3d3027));
  border: 1px solid color-mix(in srgb, #e55a5a 40%, transparent);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius, 12px);
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
}

.account-toast-root {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}
.account-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  border: 1px solid transparent;
}
.account-toast--in {
  opacity: 1;
  transform: translateY(0);
}
.account-toast--out {
  opacity: 0;
  transform: translateY(-6px);
}
.account-toast--success {
  background: #1e3d2e;
  border-color: #2bb673;
  color: #d4f5e4;
}
.account-toast--error {
  background: #3d1e1e;
  border-color: #e55a5a;
  color: #ffd4d4;
}
.account-toast--info {
  background: #1a2f45;
  border-color: #0073d2;
  color: #cfe6f8;
}
.account-toast-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}
.account-toast-text {
  flex: 1;
}
.account-toast-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0 0.15rem;
}
.account-toast-close:hover {
  opacity: 1;
}

.support-ticket-detail {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius, 12px);
  background: var(--surface, #3d3027);
  border: 1px solid var(--border, #4f3e33);
}
.support-ticket-card h3 {
  font-family: inherit;
}
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.25rem 0;
}
.support-msg {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
}
.support-msg--me {
  background: color-mix(in srgb, var(--primary, #e6ad00) 12%, var(--muted, #362b24));
  border: 1px solid color-mix(in srgb, var(--primary, #e6ad00) 28%, transparent);
  align-self: flex-end;
  max-width: 92%;
}
.support-msg--staff {
  background: color-mix(in srgb, var(--wave, #0073d2) 12%, var(--muted, #362b24));
  border: 1px solid color-mix(in srgb, var(--wave, #0073d2) 28%, transparent);
  align-self: flex-start;
  max-width: 92%;
}
.support-msg-meta {
  font-size: 0.78rem;
  color: var(--muted-fg, #ab9c8b);
  margin-bottom: 0.25rem;
}
.support-msg-body {
  white-space: pre-wrap;
  word-break: break-word;
}
#support-ticket-form textarea,
#support-reply-form textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, #4f3e33);
  background: var(--muted, #362b24);
  color: var(--fg, #f2eee7);
}
#support-ticket-form select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, #4f3e33);
  background: var(--muted, #362b24);
  color: var(--fg, #f2eee7);
  font-size: 0.95rem;
}

/* Badges statut (commandes / tickets) sur l'espace joueur */
.player-shell .badge,
.account-page .badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.player-shell .badge-pending,
.account-page .badge-pending {
  background: #6b4b1a;
  color: #ffd98a;
  border-color: #8a611f;
}
.player-shell .badge-approved,
.account-page .badge-approved {
  background: #1f5a3d;
  color: #8ee6b4;
  border-color: #2b7a52;
}
.player-shell .badge-rejected,
.account-page .badge-rejected {
  background: #5a1f1f;
  color: #ffb0b0;
  border-color: #7a2b2b;
}

/* =========================================================
   MOBILE — onglets compte (joueur) + formulaires
   Barre horizontale compacte, scroll tactile, contenu lisible
   ========================================================= */
@media (max-width: 860px) {
  .player-shell .player-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    background: color-mix(in srgb, var(--card) 94%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .player-sidebar-brand { display: none !important; }
  .player-sidebar-nav {
    flex: 1 1 auto;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.35rem;
    padding: 0.5rem 0.6rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .player-sidebar-nav::-webkit-scrollbar { display: none; }
  .player-sidebar-foot {
    flex: 0 0 auto;
    border-top: none;
    border-left: 1px solid var(--border);
    padding: 0.45rem 0.55rem;
    display: flex;
    align-items: center;
  }
  .player-shell .player-sidebar .account-tab {
    flex: 0 0 auto;
    width: auto !important;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
    white-space: nowrap;
    text-align: center;
    scroll-snap-align: start;
    border-radius: 999px;
  }
  .player-shell .player-sidebar .account-tab.active {
    background: var(--primary);
    color: var(--primary-fg);
  }
  .player-shell .account-hero,
  .player-shell .account-content {
    margin-left: 0.85rem !important;
    margin-right: 0.85rem !important;
    max-width: none !important;
    width: auto !important;
  }
  .player-shell .account-hero {
    margin-top: 0.85rem;
    padding: 1.1rem 1rem;
  }
  .player-shell .account-panel {
    padding: 1.1rem 0.95rem;
  }
  .player-shell .account-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .player-shell .account-item .confirm-btn,
  .player-shell .account-item .small-btn,
  .player-shell .account-form .confirm-btn {
    width: 100%;
    min-height: 48px;
  }
  .account-grid:not(.player-shell *) {
    grid-template-columns: 1fr;
  }
  .account-sidebar:not(.player-sidebar):not(.admin-sidebar) {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem;
    padding: 0.5rem;
  }
  .account-sidebar:not(.player-sidebar):not(.admin-sidebar)::-webkit-scrollbar { display: none; }
  .account-sidebar:not(.player-sidebar):not(.admin-sidebar) .account-tab {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    min-height: 44px;
    border-radius: 999px;
    text-align: center;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .player-shell .account-summary {
    grid-template-columns: 1fr !important;
  }
  .player-shell .account-hero h1 {
    font-size: 1.3rem;
  }
  .player-shell .player-sidebar .account-tab {
    font-size: 0.72rem;
    padding: 0.5rem 0.7rem;
  }
}
