/* Refonte graphique des pages du site (étape 45) — accueil, cash game (lobby), Spins, compte,
   admin, contact, confidentialité. Chargée APRÈS ui.css et auth.css, uniquement sur les pages
   portant `body.site` : la table de jeu n'est pas concernée. Mêmes codes que les pages de
   connexion (css/login.css) : fond vert profond, cartes vitrées, gros boutons et champs.
   Au téléphone, la navigation devient une barre d'onglets en bas de l'écran (comme une appli). */

body.site {
  --bg-0: #072217;
  --bg-1: #0d3a26;
  --card-bg: rgba(10, 40, 26, 0.72);
  --card-line: rgba(240, 199, 94, 0.2);
  --muted: #b9cbbf;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(42, 154, 92, 0.45) 0%, transparent 60%),
    radial-gradient(90% 50% at 50% 110%, rgba(216, 161, 44, 0.1) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%) fixed;
}
body.site:not(.shell) { padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); }
body.site .note { color: var(--muted); line-height: 1.5; }
body.site h2 { margin-top: 0; }

/* ---------------------------------------------------------------- cartes */
body.site section,
body.site .panel,
body.site .hero,
body.site .spins-intro {
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}
body.site section { padding: 18px; }
body.site .panel { margin-top: 2vh; padding: 22px 20px; }
body.site .panel::before { border-radius: 18px 18px 0 0; }
body.site .panel section { background: rgba(0, 0, 0, 0.22); box-shadow: none; backdrop-filter: none; }

/* ---------------------------------------------------------------- boutons et champs */
body.site button.primary,
body.site .tc-join {
  min-height: 46px; border-radius: 12px; padding: 10px 18px;
}
body.site button.ghost,
body.site a.ghost {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; padding: 9px 16px; border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.22);
}
body.site input:not([type]), body.site input[type='email'], body.site input[type='password'],
body.site input[type='text'], body.site input[type='number'], body.site input[type='tel'],
body.site select, body.site textarea {
  min-height: 48px; border-radius: 12px; font-size: 16px; border-width: 1.5px;
}
body.site input:focus, body.site select:focus, body.site textarea:focus {
  border-color: var(--accent-bright); box-shadow: 0 0 0 4px rgba(240, 199, 94, 0.2);
}
body.site .msg:empty { display: none; }
body.site .msg.error, body.site .msg.ok { padding: 10px 14px; border-radius: 12px; }
body.site .msg.error { background: rgba(212, 85, 63, 0.16); border: 1px solid rgba(212, 85, 63, 0.45); }
body.site .msg.ok { background: rgba(76, 201, 122, 0.12); border: 1px solid rgba(76, 201, 122, 0.4); }

/* ---------------------------------------------------------------- en-tête de page */
body.site .app-topbar { gap: 12px; margin-bottom: 20px; }
body.site .app-topbar::before {
  content: ''; flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: url('/assets/icons/icon-192.png') center / cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(240, 199, 94, 0.3);
}
body.site .app-topbar h1 { font-size: clamp(1.5rem, 5.5vw, 1.9rem); }

/* ---------------------------------------------------------------- accueil */
body.site .hero {
  position: relative; overflow: hidden; padding: 24px 22px; margin-bottom: 20px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(240, 199, 94, 0.16) 0%, transparent 55%),
    var(--card-bg);
}
body.site .hero::after {
  /* éventail de cartes décoratif, discret, dans le coin */
  content: '♠'; position: absolute; right: -10px; bottom: -40px;
  font-size: 180px; line-height: 1; color: rgba(240, 199, 94, 0.07); pointer-events: none;
}
body.site .hero .cta a:first-child {
  background: var(--gold-grad); color: var(--ink); border-color: transparent; font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
body.site .hero .cta a { min-height: 48px; padding: 10px 20px; }
body.site .news-date, body.site .event-date {
  align-self: flex-start; padding: 3px 8px; border-radius: 999px; min-width: 0;
  background: rgba(240, 199, 94, 0.12); border: 1px solid rgba(240, 199, 94, 0.25);
  font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
}

/* ---------------------------------------------------------------- cash game / spins */
body.site .table-card, body.site .level-card {
  background: var(--card-bg); border: 1px solid var(--card-line); border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, border-color 0.15s;
}
body.site .table-card:hover, body.site .level-card:hover { transform: translateY(-2px); border-color: rgba(240, 199, 94, 0.45); }
body.site .tc-join { display: inline-flex; align-items: center; justify-content: center; }

/* ---------------------------------------------------------------- navigation */
body.site.shell .side-nav {
  background: linear-gradient(180deg, rgba(10, 40, 26, 0.96) 0%, rgba(6, 26, 17, 0.98) 100%);
  border-right: 1px solid var(--card-line);
}
body.site .side-brand { display: flex; align-items: center; gap: 10px; }
body.site .side-brand::before {
  content: ''; width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: url('/assets/icons/icon-192.png') center / cover;
}
body.site .side-brand .brand-suit { display: none; }
body.site .nav-item { min-height: 46px; border-radius: 12px; }
body.site .nav-item:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }

@media (max-width: 760px) {
  body.site.shell .side-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40;
    width: auto; height: auto; flex-direction: row; align-items: stretch; gap: 0; overflow: visible;
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--card-line);
    background: rgba(6, 26, 17, 0.96); backdrop-filter: blur(10px);
  }
  body.site .side-brand { display: none; }
  body.site .side-links { flex: 1; flex-direction: row; justify-content: space-around; gap: 0; }
  body.site .side-foot { margin: 0; padding: 0; display: flex; }
  body.site .side-nav .nav-item {
    position: relative; flex: 1; flex-direction: column; justify-content: center; align-items: center;
    gap: 3px; width: auto; min-width: 64px; min-height: 56px; padding: 4px 6px;
    background: none; border: 0; color: var(--muted); font-size: 0.72rem; font-weight: 600;
  }
  body.site .side-nav .nav-item span:not(.nav-soon) { display: inline; }
  body.site .side-nav .nav-item svg { width: 50px; height: 28px; padding: 4px 13px; border-radius: 999px; opacity: 1; }
  body.site .side-nav .nav-item.active { color: var(--accent-bright); background: none; }
  body.site .side-nav .nav-item.active svg { background: var(--gold-grad); color: var(--ink); }
  body.site .side-nav .nav-soon {
    position: absolute; top: 0; right: 4px; margin: 0; font-size: 0.52rem; padding: 1px 5px;
  }
  body.site .shell-main { padding: max(16px, env(safe-area-inset-top)) 16px calc(88px + env(safe-area-inset-bottom)); }
  /* Pastilles fixes (joueurs en ligne, notifications) au-dessus de la barre d'onglets. */
  body.site .online-badge, body.site .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  body.site .table-card, body.site .level-card { transition: none; }
}

/* ---------------------------------------------------------------- retouches */
body.site .panel > .rowline:first-child { gap: 10px; margin-bottom: 6px; }
body.site .panel > .rowline:first-child + .note { margin-top: 10px; }
body.site .shell-main > .note:last-of-type, body.site .shell-main > .msg + .note { margin-top: 22px; }
body.site .tables-grid { margin-bottom: 8px; }
@media (max-width: 760px) {
  body.site .side-nav .nav-item.active .nav-soon { display: none; }
}

/* Carte « Installer l'appli » (même rendu que sur la page de connexion). */
body.site .install-card {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  padding: 12px 14px; border-radius: 16px;
  background: var(--card-bg); border: 1px solid var(--card-line);
}
body.site .install-card img { flex: none; border-radius: 11px; }
body.site .install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; color: var(--muted); line-height: 1.4; }
body.site .install-text > b { color: var(--paper); font-size: 0.95rem; }
body.site .install-text svg { vertical-align: -3px; color: var(--accent-bright); }
body.site .install-btn {
  flex: none; font: inherit; font-weight: 700; min-height: 44px; padding: 8px 16px; border: 0;
  border-radius: 12px; background: var(--gold-grad); color: var(--ink); cursor: pointer;
}
/* Sur ordinateur, le logo est déjà dans la barre latérale : pas de doublon près du titre. */
@media (min-width: 761px) {
  body.site.shell .app-topbar::before { display: none; }
}
