/* ─── PokerClock — Theme ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #3b82f6;
  --primary-dark: #2563eb;
  --gold:         #fbbf24;
  --surface:      #141d2b;
  --surface-2:    #1a2537;
  --surface-3:    #1e2d40;
  --border:       #2a3a52;
  --text:         #e2e8f0;
  --muted:        #64748b;
  --bg:           #0d1520;
  --radius:       0.5rem;
  --radius-sm:    0.35rem;
  --radius-pill:  9999px;
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
  --success:      #34d399;
  --warning:      #f59e0b;
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT ────────────────────────────────────────── */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.app-header {
  background: linear-gradient(90deg, #0d1520, #111b2e);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-suit {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(251,191,36,0.4));
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: white;
  letter-spacing: -0.02em;
}
.brand-tagline {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-main { flex: 1; max-width: 960px; width: 100%; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.footer-brand { font-weight: 700; color: var(--gold); }

/* ─── TABS ──────────────────────────────────────────── */
.pk-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem;
}

/* ─── CARDS / SECTIONS ──────────────────────────────── */
.pk-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.pk-card-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* ─── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
  background: var(--primary);
  color: white;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }

.btn.secondary {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border);
}
.btn.secondary:hover { background: var(--surface-2); border-color: var(--primary); }

/* ─── FORMS ─────────────────────────────────────────── */
.tool-form { display: flex; flex-direction: column; gap: 0; }

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

input[type="checkbox"] {
  width: 1rem; height: 1rem; cursor: pointer; accent-color: var(--primary);
}

/* ─── OUTPUT / BADGES ───────────────────────────────── */
.output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.output div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.output div:last-child { border-bottom: none; padding-bottom: 0; }

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
}
.badge-success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); color: #34d399; }
.badge-danger  { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.25); color: #f87171; }
.badge-muted   { background: var(--surface-3); border-color: var(--border); color: var(--muted); }

/* ─── TABLE ─────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th { padding: 0.4rem 0.5rem; text-align: left; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--border); }
td { padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* table inputs */
td input[type="number"] { padding: 0.25rem 0.4rem; font-size: 0.8rem; }


/* ─── SETUP SUB-NAV ──────────────────────────────────── */
.setup-nav {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  margin-bottom: 0.75rem;
  scrollbar-width: none;
}
.setup-nav::-webkit-scrollbar { display: none; }

.snav {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s;
}
.snav:hover { border-color: var(--primary); color: var(--text); }
.snav.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 700;
}

/* ─── AD UNITS ──────────────────────────────────────── */
.pk-ad {
  text-align: center;
  overflow: hidden;
  min-height: 0;
}
.pk-ad-lbl {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.3;
  margin-bottom: 2px;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}
/* Fullscreen bottom strip — masquée par défaut, affichée via JS en plein écran */
.pk-ad-fs-bar,
#pk-ad-fs {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 1rem 6px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 5;
  max-height: 90px;
  overflow: hidden;
}
/* Landing page ad wrapper */
.lp-ad-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}
/* Hide if ad blocked or empty — avoids dead whitespace */
.pk-ad ins[data-ad-status="unfilled"],
.pk-ad:empty { display: none !important; }

/* ─── FULLSCREEN ─────────────────────────────────────── */
#pk-fullscreen-wrap:fullscreen,
#pk-fullscreen-wrap:-webkit-full-screen,
#pk-fullscreen-wrap:-moz-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 600px) {
  .app-main { padding: 1rem 0.75rem 2rem; }
  .app-header { padding: 0.65rem 1rem; }
  .brand-tagline { display: none; }
}
