/* ─── Bannière serveur test ─────────────────────────────────────────────────── */
.test-banner {
  width: 100%;
  background: #c0392b;
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* ─── Variables & Reset ────────────────────────────────────────────────────── */
:root {
  --honey:      #f59e0b;
  --honey-dark: #d97706;
  --honey-light:#fde68a;
  --wax:        #92400e;
  --wax-light:  #fef3c7;
  --black:      #1c1917;
  --dark:       #292524;
  --mid:        #57534e;
  --light:      #d6d3d1;
  --white:      #fafaf9;
  --success:    #16a34a;
  --danger:     #dc2626;
  --info:       #2563eb;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(0,0,0,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
}

/* ─── Thèmes saisonniers (landing page) ─────────────────────────────────────── */
body[data-season="SUMMER"] {
  background: radial-gradient(ellipse 90% 60% at 50% -5%, #3d2000 0%, #231400 40%, #1a0f00 100%);
}
body[data-season="SUMMER"]::before {
  content: '';
  position: fixed;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.13) 0%, rgba(245,158,11,0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: sunPulse 5s ease-in-out infinite;
}
@keyframes sunPulse {
  0%,100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}
body[data-season="WINTER"] {
  background: linear-gradient(180deg, #060d1a 0%, #091424 35%, #0c1c38 65%, #091828 100%);
}
body[data-season="SPRING"] {
  background: linear-gradient(180deg, #060f06 0%, #0a180a 40%, #0d1a0d 100%);
}
body[data-season="AUTUMN"] {
  background: linear-gradient(180deg, #130600 0%, #200a00 40%, #1a0700 100%);
}

/* ─── Flocons de neige (partagé landing + jeu) ───────────────────────────────── */
.snowflakes-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.snowflake {
  position: absolute;
  top: -30px;
  left: var(--x);
  font-size: var(--size);
  color: rgba(200, 230, 255, 0.75);
  animation: snowfall var(--duration) var(--delay) linear infinite;
  user-select: none;
  filter: blur(0.3px);
}
@keyframes snowfall {
  0%   { transform: translateY(-30px)      translateX(0)          rotate(0deg);   opacity: 0; }
  5%   { opacity: 0.85; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(100vh) translateX(var(--drift)) rotate(var(--rot)); opacity: 0; }
}

a { color: var(--honey); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Typography ───────────────────────────────────────────────────────────── */
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { opacity: 0.85; transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary { background: var(--honey); color: var(--black); }
.btn-secondary { background: var(--mid); color: var(--white); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--honey); color: var(--honey); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--dark);
  border: 1px solid #3a3633;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--honey); margin-bottom: 12px; }

/* ─── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.85rem; color: var(--light); margin-bottom: 6px; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: #1c1917;
  border: 1px solid #3a3633;
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--honey); }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 4px; }

/* ─── Progress bar ─────────────────────────────────────────────────────────── */
.progress {
  height: 8px;
  background: #3a3633;
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--honey);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ─── Badge ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-honey { background: var(--honey); color: var(--black); }
.badge-wax   { background: var(--wax-light); color: var(--wax); }
.badge-info  { background: rgba(37,99,235,0.2); color: #93c5fd; }

/* ─── Notification toast ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--dark);
  border-left: 4px solid var(--honey);
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  max-width: 320px;
  font-size: 0.9rem;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.info    { border-color: var(--info); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: var(--dark);
  border: 1px solid #3a3633;
  border-radius: 12px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-close { background: none; border: none; color: var(--mid); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--white); }

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #3a3633; margin-bottom: 16px; }
.tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--mid);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--light); }
.tab-btn.active { color: var(--honey); border-bottom-color: var(--honey); }

/* ─── Resource icons ───────────────────────────────────────────────────────── */
.res { display: inline-flex; align-items: center; gap: 4px; }
.res-nectar  { color: #fbbf24; }
.res-pollen  { color: #a3e635; }
.res-honey   { color: #f59e0b; }
.res-wax     { color: #c4a25a; }
.res-royal   { color: #c084fc; }

/* ─── Timer countdown ──────────────────────────────────────────────────────── */
.countdown {
  font-size: 0.8rem;
  color: var(--honey);
  font-variant-numeric: tabular-nums;
}

/* ─── Loader ───────────────────────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid #3a3633;
  border-top-color: var(--honey);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Utilities ────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-honey  { color: var(--honey); }
.text-muted  { color: var(--mid); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.hidden { display: none !important; }
.w-full { width: 100%; }
