/* ===============================================================
   MAISON21 — page d'accueil / lobby du casino.
   Feuille de styles autonome (ne dépend d'aucun fichier hors de la
   racine) : mêmes tokens visuels que les 3 jeux (feutre vert, or,
   crème, Playfair Display + Inter) pour une identité cohérente.
   =============================================================== */

/* ===== Design tokens (identiques aux 3 jeux) ===== */
:root {
  --felt-1: #0b4d3a;
  --felt-2: #0a3d2e;
  --felt-3: #073023;
  --felt-edge: #3a1f12;
  --wood: #5c3a21;
  --wood-dark: #3e2716;
  --gold: #d4af5a;
  --gold-bright: #f1cd7c;
  --cream: #f4ead9;
  --ink: #0d1410;
  --red: #c0392b;
  --red-bright: #e74c3c;
  --green-win: #35c26b;
  --amber-push: #e0a83c;
  --panel-bg: rgba(8, 20, 15, 0.72);
  --panel-border: rgba(212, 175, 90, 0.35);
  --shadow-deep: 0 20px 50px rgba(0, 0, 0, 0.55);
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--felt-3);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ===== Ambiance générale ===== */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  box-shadow: inset 0 0 20vw rgba(0, 0, 0, 0.65);
}

.hall {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 140% 60% at 50% -10%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(ellipse 130% 90% at 50% 30%, var(--felt-1) 0%, var(--felt-2) 55%, var(--felt-3) 100%);
}
.hall::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 3px);
}

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 16px 22px;
  background: linear-gradient(180deg, rgba(4, 12, 9, 0.85), rgba(4, 12, 9, 0.35));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(212, 175, 90, 0.16);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--cream);
}
.brand-icon { color: var(--gold-bright); font-size: 1.6rem; line-height: 1; }
.accent { color: var(--gold-bright); }
.brand-sub {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.55);
  align-self: center;
  border-left: 1px solid var(--panel-border);
  padding-left: 9px;
  margin-left: 2px;
}

.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  color: var(--cream);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.icon-btn:hover { background: rgba(212, 175, 90, 0.18); transform: scale(1.06); }

/* ===== Menu inter-jeux (identique sur les 4 pages du site) ===== */
.game-menu { position: relative; }
.game-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 230px;
  background: linear-gradient(160deg, #12261d, #0b1a13);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: var(--shadow-deep);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 150;
  transform-origin: top right;
  animation: gameMenuIn 0.16s cubic-bezier(.2,.9,.3,1.1) both;
}
@keyframes gameMenuIn {
  from { opacity: 0; transform: scale(0.94) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.game-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s ease;
}
a.game-menu-item:hover { background: rgba(212,175,90,0.14); }
.game-menu-item .gm-icon { font-size: 1.15rem; width: 22px; text-align: center; flex-shrink: 0; }
.game-menu-item.current { color: var(--gold-bright); background: rgba(212,175,90,0.08); cursor: default; }
.game-menu-sep { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 6px; }

/* ===== Contenu principal ===== */
.hall-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 46px;
  padding: 48px 20px 30px;
}

/* ===== Hero / accueil du maître de maison ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
}
.hero-kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(244, 234, 217, 0.5);
}
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  letter-spacing: 0.01em;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.hero-tagline {
  margin: 10px 0 0;
  font-size: 1.02rem;
  color: rgba(244, 234, 217, 0.75);
  max-width: 480px;
}

.host-note {
  position: relative;
  margin-top: 28px;
  max-width: 560px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 22px 26px 20px;
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(6px);
}
.host-avatar {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}
.host-text {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--cream);
}
.host-sign {
  display: block;
  margin-top: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--gold-bright);
  font-weight: 700;
}

/* ===== Rangée des jeux ===== */
.game-hall {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--cream);
  background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18)), var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1.1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.game-card:hover, .game-card:focus-visible {
  transform: translateY(-8px);
  border-color: var(--gold-bright);
  box-shadow: 0 26px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,90,0.4);
}
.game-card:focus-visible { outline: none; }

.game-card-art {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(255,255,255,0.08), transparent 65%),
    linear-gradient(180deg, var(--felt-1), var(--felt-2));
  border-bottom: 1px solid rgba(212,175,90,0.2);
  overflow: hidden;
}
.game-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 4px);
}

.art-suit {
  font-size: 3.6rem;
  color: rgba(212,175,90,0.28);
  line-height: 1;
}

.art-card {
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 78px;
  border-radius: 8px;
  background: linear-gradient(160deg, #fffef9, #f2ede1);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 22px rgba(0,0,0,0.4);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 6px 0 0 8px;
}
.card-art-poker .art-card { color: var(--red); }
.art-card-1 { transform: translate(-72%, -58%) rotate(-12deg); z-index: 2; }
.art-card-2 { transform: translate(6%, -46%) rotate(9deg); z-index: 1; }

/* Roue de roulette miniature, en pur CSS (conic-gradient), pas d'image */
.art-wheel {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: conic-gradient(
    #7a1f2b 0deg 16deg, #161616 16deg 32deg, #7a1f2b 32deg 48deg, #161616 48deg 64deg,
    #7a1f2b 64deg 80deg, #161616 80deg 96deg, #7a1f2b 96deg 112deg, #161616 112deg 128deg,
    #7a1f2b 128deg 144deg, #161616 144deg 160deg, #7a1f2b 160deg 176deg, #0e4530 176deg 192deg,
    #7a1f2b 192deg 208deg, #161616 208deg 224deg, #7a1f2b 224deg 240deg, #161616 240deg 256deg,
    #7a1f2b 256deg 272deg, #161616 272deg 288deg, #7a1f2b 288deg 304deg, #161616 304deg 320deg,
    #7a1f2b 320deg 336deg, #161616 336deg 352deg, #7a1f2b 352deg 360deg
  );
  border: 3px solid var(--cream);
  box-shadow: 0 10px 26px rgba(0,0,0,0.45), inset 0 0 0 6px rgba(0,0,0,0.35);
  position: relative;
  animation: wheelSpinSlow 22s linear infinite;
}
.art-wheel::after {
  content: "21";
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, var(--gold-bright), var(--gold) 70%);
  border-radius: 50%;
  width: 34px; height: 34px;
  margin: auto;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: #2a1c04;
  animation: wheelSpinSlow 22s linear infinite reverse;
}
@keyframes wheelSpinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.game-card:hover .art-wheel,
.game-card:hover .art-wheel::after { animation-duration: 3.2s; }

.game-card-body {
  padding: 20px 22px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.game-card-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--cream);
}
.game-card-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(244, 234, 217, 0.75);
}
.game-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(212, 175, 90, 0.12);
  border: 1px solid rgba(212, 175, 90, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
}

.game-card-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 22px 20px;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #2a1c04;
  font-weight: 700;
  font-size: 0.88rem;
  justify-content: center;
  box-shadow: 0 4px 0 rgba(0,0,0,0.25), 0 6px 14px rgba(0,0,0,0.3);
  transition: filter 0.15s ease, transform 0.12s ease;
}
.game-card:hover .game-card-cta { filter: brightness(1.08); }
.cta-arrow { transition: transform 0.18s ease; }
.game-card:hover .cta-arrow { transform: translateX(4px); }

/* ===== Pied de page ===== */
.hall-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 18px 20px 26px;
  font-size: 0.76rem;
  color: rgba(244, 234, 217, 0.45);
}
.hall-footer p { margin: 0; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hall-main { gap: 34px; padding: 34px 16px 24px; }
  .host-note { padding: 20px 18px 16px; }
  .host-text { font-size: 0.94rem; }
}

@media (max-width: 480px) {
  .topbar { padding: 12px 14px; }
  .brand-sub { display: none; }
  .brand { font-size: 1.15rem; }
  .icon-btn { width: 32px; height: 32px; font-size: 0.95rem; }
  .game-menu-panel { min-width: 190px; right: -6px; }
  .hero-tagline { font-size: 0.92rem; }
  .game-card-art { height: 130px; }
  .art-suit { font-size: 3rem; }
  .art-wheel { width: 78px; height: 78px; }
}
