/* =====================================================
   tonight.css — Mode "Ce soir ?"
   Regarde Movie
===================================================== */

/* =====================================================
   BOUTON FLOTTANT (FAB)
===================================================== */
.tonight-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 7000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #e50914, #ff416c);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(229,9,20,0.45), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fabPulse 3s ease-in-out infinite;
}

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(229,9,20,0.45), 0 2px 8px rgba(0,0,0,0.3); }
  50%       { box-shadow: 0 8px 48px rgba(229,9,20,0.7),  0 2px 8px rgba(0,0,0,0.3); }
}

.tonight-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 48px rgba(229,9,20,0.6), 0 4px 16px rgba(0,0,0,0.3);
  animation: none;
}

.tonight-fab-icon { font-size: 1.2rem; }
.tonight-fab-label { letter-spacing: 0.3px; }

@media (max-width: 600px) {
  .tonight-fab { bottom: 20px; right: 16px; padding: 12px 16px; }
  .tonight-fab-label { display: none; }
  .tonight-fab { border-radius: 50%; width: 52px; height: 52px; justify-content: center; }
  .tonight-fab-icon { font-size: 1.4rem; }
}

/* =====================================================
   MODAL OVERLAY
===================================================== */
.tonight-modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tonight-modal.hidden { display: none; }

.tonight-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(10px);
}

/* =====================================================
   PANNEAU
===================================================== */
.tonight-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tonight-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =====================================================
   ÉTAPES
===================================================== */
.tonight-step { animation: stepIn 0.35s ease both; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tonight-step.hidden { display: none; }

/* En-tête étape */
.tonight-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.tonight-progress {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.tonight-progress-bar {
  height: 100%;
  background: linear-gradient(to right, #e50914, #ff416c);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.tonight-step-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Question */
.tonight-question {
  text-align: center;
  margin-bottom: 28px;
}

.tonight-emoji { font-size: 2.8rem; margin-bottom: 12px; line-height: 1; }

.tonight-question h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 6px;
}

.tonight-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =====================================================
   CHOIX
===================================================== */
.tonight-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.tonight-choices--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tonight-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  font-family: var(--font-body);
}

.tonight-choices--grid .tonight-choice {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 12px;
  gap: 8px;
}

.tonight-choice:hover {
  border-color: var(--accent);
  background: rgba(229,9,20,0.06);
  transform: translateY(-2px);
}

.tonight-choice.selected {
  border-color: var(--accent);
  background: rgba(229,9,20,0.1);
}

.choice-icon  { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.choice-label { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.choice-sub   { font-size: 0.75rem; color: var(--text-muted); }

/* =====================================================
   BOUTON FERMER
===================================================== */
.tonight-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.tonight-close:hover { background: var(--bg-surface); color: var(--text); }

/* =====================================================
   LOADING
===================================================== */
.tonight-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 20px;
  min-height: 300px;
}

.tonight-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

#tonight-loading-text {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: opacity 0.3s;
}

/* =====================================================
   RÉSULTAT
===================================================== */
.tonight-result-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 20px;
}

.tonight-result-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Poster */
.tonight-result-poster {
  flex-shrink: 0;
  width: 140px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  position: relative;
}
.tonight-result-poster img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}
.tonight-result-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* Infos résultat */
.tonight-result-info { flex: 1; min-width: 0; }

.tonight-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.meta-badge {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}
[data-theme="light"] .meta-badge { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }

.tonight-vote-badge { color: #f5c518 !important; background: rgba(245,197,24,0.1) !important; border-color: rgba(245,197,24,0.25) !important; }

.tonight-result-info h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.1;
}

.tonight-result-overview {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.tonight-result-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tonight-genre-tag {
  background: rgba(229,9,20,0.1);
  border: 1px solid rgba(229,9,20,0.22);
  color: #ff8080;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
}
[data-theme="light"] .tonight-genre-tag { color: #c0392b; }

/* Actions résultat */
.tonight-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tonight-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.tonight-btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.tonight-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 10px 14px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.tonight-btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-1px);
}

/* Bouton recommencer */
.tonight-restart {
  display: block;
  margin: 20px auto 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
}
.tonight-restart:hover { color: var(--text); }

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 520px) {
  .tonight-panel { padding: 24px 20px; border-radius: 20px; }
  .tonight-question h2 { font-size: 1.5rem; }
  .tonight-choices--grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tonight-result-card { flex-direction: column; align-items: center; }
  .tonight-result-poster { width: 120px; }
  .tonight-result-info { width: 100%; }
  .tonight-result-actions { justify-content: center; }
}

/* =====================================================
   Étape 0 — Toggle Film / Série
===================================================== */
.tonight-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 20px 28px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  flex: 1;
}
.tonight-type-btn:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.tonight-type-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.tonight-type-btn .choice-icon { font-size: 2rem; }
.tonight-type-btn .choice-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.tonight-type-btn .choice-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
