@import url('https://fonts.googleapis.com/css2?family=Special+Elite&display=swap');

/* =======================
Reset minimal & Anti-sélection Globale
======================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  
  /* ✨ Bloque la sélection, le menu copier/coller et la recherche Google sur mobile */
  -webkit-touch-callout: none; 
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  
  /* ✨ Retire le petit flash gris/bleu très moche quand on tapote un bouton sur Android */
  -webkit-tap-highlight-color: transparent; 
}

/* ✨ On réautorise UNIQUEMENT pour les champs où l'on tape du texte */
input, textarea {
  -webkit-user-select: auto !important;
  -moz-user-select: auto !important;
  -ms-user-select: auto !important;
  user-select: auto !important;
}

/* =======================
Variables globales
======================= */
:root {
  --bg: #020617;
  --bg-card: #0f172a;
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.1);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2937;
  --danger: #ef4444;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.6);
}

/* =======================
Base
======================= */
html,
body {
  height: 100%;
  background: radial-gradient(
    circle at top,
    #111827 0%,
    #020617 55%,
    #000000 100%
  );
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Roboto", sans-serif;
}

/* Utilitaire pour masquer */
.hidden {
  display: none !important;
}

.secret-pseudo {
    font-family: 'Special Elite', monospace !important;
    color: #fde047 !important; 
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(253, 224, 71, 0.4);
    text-transform: none;
}

/* Layout général */
#app {
  min-height: 100dvh; /* ✨ dvh remplace vh pour éviter la barre noire sur mobile */
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 16px;
  background: radial-gradient(
    circle at top,
    #111827 0%,
    #020617 55%,
    #000000 100%
  );
}

/* Container principal */
.shell {
  width: 100%;
  max-width: 480px;
  margin: auto;
}

/* Card principale */
.card {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.92)
  );
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px 18px;
}

/* =======================
Header jeu
======================= */
.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.game-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    var(--accent) 0%,
    #f97316 50%,
    #991b1b 100%
  );
}

.game-title {
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
}

.game-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =======================
Hero / visuel
======================= */
.hero-visual {
  position: relative;
  margin-top: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  background: radial-gradient(
    circle at top,
    rgba(148, 163, 184, 0.15),
    transparent 55%
  );
  padding: 10px 10px 12px;
}

.hero-tagline {
  font-size: 13px;
  font-weight: 500;
}

.hero-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.hero-meta strong {
  color: var(--accent);
}

/* =======================
Sections
======================= */
.section {
  margin-top: 16px;
}

.section-title {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.section-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.section-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.section-bullet {
  margin-top: 4px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

/* =======================
Notice / alerte
======================= */
.notice-card {
  margin-top: 14px;
  padding: 10px 10px 9px;
  border-radius: var(--radius-lg);
  background: radial-gradient(
    circle at left,
    rgba(239, 68, 68, 0.18),
    rgba(15, 23, 42, 0.95)
  );
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.notice-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fecaca;
  margin-bottom: 4px;
}

.notice-text {
  font-size: 11px;
  color: #fee2e2;
}

/* =======================
Boutons / CTA
======================= */
.cta-block {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  width: 100%;
  border-radius: 999px;
  padding: 11px 16px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #111827;
  box-shadow: 0 10px 30px rgba(248, 181, 55, 0.45);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 15px rgba(248, 181, 55, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--text-main);
}

.btn-sm {
  padding-block: 8px;
  font-size: 12px;
}

.cta-subtext {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* =======================
   États des Boutons d'Action & Vote
   ======================= */
.btn-disabled {
  opacity: 0.4 !important;
  pointer-events: none !important;
  background: transparent !important;
  border-color: rgba(148, 163, 184, 0.4) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
}

.btn-selected {
  background: #eab308 !important; /* Jaune brillant */
  border-color: #ca8a04 !important;
  color: #020617 !important;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.4) !important;
}

/* =======================
Footer
======================= */
.footer {
  margin-top: 10px;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
}

/* =======================
Login / formulaires
======================= */
.login-title {
  font-size: 20px;
  font-weight: 600;
  margin-top: 12px;
}

.login-description {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.form {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.label {
  font-size: 12px;
  color: var(--text-muted);
}

.input {
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 14px;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
}

/* =======================
Labels de statut génériques
======================= */
.status-pill {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  z-index: 2;
}

.status-pill--dead {
  color: #fca5a5;
}

.status-pill--wounded {
  color: #fed7aa;
}

/* =======================
Popup chasseur LG
======================= */
.popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  z-index: 1000;
}

.popup-content {
  max-width: 420px;
  width: 90%;
  border-radius: 18px;
  padding: 16px 14px 14px;
  background: radial-gradient(
    circle at top,
    #020617 0,
    #020617 30%,
    #020617 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  color: #e5e7eb;
}

.popup-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}

/* Cartes de choix du chasseur */
.hunter-choice-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.choice-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, outline 0.2s ease;
}

.choice-card img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.choice-card span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Effets hover / active */
.choice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.choice-card:active {
  transform: translateY(-1px) scale(0.98);
}

/* =======================
Responsive basique
======================= */
@media (min-width: 600px) {
  #app {
    padding: 24px;
  }

  .card {
    padding: 22px 20px 18px;
  }

  .game-title {
    font-size: 28px;
  }

  .popup-content {
    max-width: 440px;
  }
}

/* =======================
   Village / Cards
   ======================= */

/* Grilles dynamiques (pilotées par --grid-cols depuis le JS) */
#village-alive-grid,
#village-dead-grid,
#village-victims-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 5), minmax(0, 1fr));
  gap: 8px 6px;
}

/* Wrapper de chaque carte */
.village-card-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
}

/* Carte */
.village-card {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Zone image */
.village-card-image-wrapper {
  position: relative;
  width: 100%;
}

.village-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  background: rgba(2, 6, 23, 0.6);
}

/* Overlay "mort" */
.village-card-dead-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.6),
    rgba(15, 23, 42, 0.95)
  );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fecaca;
}

/* Contenu texte (nom + statuts) */
.village-card-text {
  padding: 6px 6px 7px;
}

.village-card-name {
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.village-card-status-container {
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  justify-content: center;
}

.village-card-status {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 1px 6px 2px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
}

.village-card-status.victim {
  border-color: #fb7185;
  color: #fecaca;
}

.village-card-status.wounded {
  border-color: #f97316;
  color: #fed7aa;
}

.village-card-status.healed {
  border-color: #22c55e;
  color: #bbf7d0;
}

.village-card-status.enso-immune {
  border-color: #38bdf8;
  color: #bae6fd;
}

.village-card-status.lovers {
  border-color: #e879f9;
  color: #f5d0fe;
}

/* Badge de jetons occultes : disque violet avec chiffre blanc */
.occult-tokens-badge {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
  pointer-events: none;
  z-index: 3;
}

.occult-tokens-badge span {
  font-size: 11px;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1;
}

/* Jeton occulte bloqué / échoué (barré en rouge) */
.occult-tokens-badge.is-blocked {
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}

.occult-tokens-badge.is-blocked span {
  color: #fca5a5;
  text-decoration: line-through;
}

/* Carte morte : désaturation + opacité */
.village-card.is-dead {
  transform: none !important;
}

.village-card.is-dead.selectable {
  cursor: default;
}

/* =======================
   Badges d'Action Dynamiques (Nuit)
   ======================= */
.dynamic-action-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
  pointer-events: none;
}

/* Couleurs par défaut (fallback) */
.dynamic-action-badge { background: rgba(148,163,184,0.85); border: 1px solid #94a3b8; }

/* === Classes utilitaires pour les couleurs (Halos + Badges) === */
/* Danger (Loups, Mort, Sacrifice, Potion de mort) */
.village-card.card-danger { box-shadow: 0 0 0 2px #f97373, 0 0 12px rgba(220,38,38,0.6); border-color: #f97373; }
.village-card.card-danger .dynamic-action-badge { background: rgba(220,38,38,0.85); border-color: #f97373; }

/* Sang/Assassinat (Petite fille) */
.village-card.card-blood { box-shadow: 0 0 0 2px #7f1d1d, 0 0 12px rgba(185,28,28,0.6); border-color: #7f1d1d; }
.village-card.card-blood .dynamic-action-badge { background: rgba(185,28,28,0.9); border-color: #7f1d1d; }

/* Magie Bleue (Maire, Protégé, Béni) */
.village-card.card-magic-blue { box-shadow: 0 0 0 2px #3b82f6, 0 0 12px rgba(59,130,246,0.6); border-color: #3b82f6; }
.village-card.card-magic-blue .dynamic-action-badge { background: rgba(59,130,246,0.85); border-color: #3b82f6; }

/* Magie Verte (Soin, Équipé) */
.village-card.card-magic-green { box-shadow: 0 0 0 2px #22c55e, 0 0 12px rgba(34,197,94,0.6); border-color: #22c55e; }
.village-card.card-magic-green .dynamic-action-badge { background: rgba(34,197,94,0.85); border-color: #22c55e; }

/* Magie Violette (Jeton Occulte, Politicien) */
.village-card.card-magic-purple { box-shadow: 0 0 0 2px #a855f7, 0 0 12px rgba(168,85,247,0.6); border-color: #a855f7; }
.village-card.card-magic-purple .dynamic-action-badge { background: rgba(168,85,247,0.85); border-color: #a855f7; }

/* Magie Indigo (Politicien alternatif) */
.village-card.card-magic-indigo { box-shadow: 0 0 0 2px #6366f1, 0 0 12px rgba(79,70,229,0.6); border-color: #6366f1; }
.village-card.card-magic-indigo .dynamic-action-badge { background: rgba(79,70,229,0.85); border-color: #6366f1; }

/* Magie Rose (Lié - Amoureux) */
.village-card.card-magic-pink { box-shadow: 0 0 0 2px #f472b6, 0 0 12px rgba(244,114,182,0.6); border-color: #f472b6; }
.village-card.card-magic-pink .dynamic-action-badge { background: rgba(244,114,182,0.85); border-color: #f472b6; }

/* Magie Jaune (Sondé, Logé) */
.village-card.card-magic-yellow { box-shadow: 0 0 0 2px #facc15, 0 0 12px rgba(202,138,4,0.6); border-color: #facc15; }
.village-card.card-magic-yellow .dynamic-action-badge { background: rgba(202,138,4,0.85); border-color: #facc15; }

/* Magie Orange (Vaudou) */
.village-card.card-magic-orange { box-shadow: 0 0 0 2px #f59e0b, 0 0 12px rgba(245,158,11,0.6); border-color: #f59e0b; }
.village-card.card-magic-orange .dynamic-action-badge { background: rgba(245,158,11,0.85); border-color: #f59e0b; }

/* Badge de vote des Morts (Gris) */
.village-card.card-dead-vote { box-shadow: 0 0 0 2px #6b7280, 0 0 12px rgba(107,114,128,0.6); border-color: #6b7280; }
.village-card.card-dead-vote .dynamic-action-badge { background: rgba(75, 85, 99, 0.9); border-color: #9ca3af; }
.dead-vote-live-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  padding: 2px 6px;
  font-weight: bold;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =======================
   Conversion occulte & Badges
   ======================= */

.village-card-status.occult {
  border-color: #a855f7;
  color: #e9d5ff;
}

.village-card.is-occult-preview {
  box-shadow: 0 0 0 2px #a855f7, 0 0 12px rgba(168, 85, 247, 0.6);
  border-color: #a855f7;
}

.village-card.is-occult-converted {
  box-shadow: 0 0 0 2px #7c3aed, 0 0 16px rgba(124, 58, 237, 0.7);
  border-color: #7c3aed;
}

/* Badge Prêtre (bénédiction) : disque bleu */
.blessed-badge {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.7);
  pointer-events: none;
  z-index: 3;
  transition: all 0.3s ease;
}

.blessed-badge span {
  color: #f9fafb;
  font-size: 14px;
  line-height: 1;
  transform: translateY(-1px);
  display: block;
}

/* Bénédiction échouée sur un Occulte (Croix à l'envers, cercle violet) */
.blessed-badge.is-failed {
  border-color: #a855f7; 
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
}

.blessed-badge.is-failed span {
  transform: rotate(180deg) translateY(-1px);
  color: #e9d5ff;
}

/* =======================
   Animations & Loader
   ======================= */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =======================
Loader de Boutons
======================= */
.btn-loading {
  position: relative !important;
  pointer-events: none !important; /* Empêche de cliquer deux fois */
  opacity: 0.6 !important;
  color: transparent !important; /* Cache le texte existant */
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* =======================
   Loader de Page Universel
   ======================= */
.page-loader-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50dvh; /* Centre le loader au milieu de la carte */
  gap: 16px;
  color: var(--text-muted);
  animation: fadeIn 0.3s ease-out;
}

.page-loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(148, 163, 184, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* =======================
   Home Menu (Accueil)
   ======================= */
.menu-container { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: 100%; width: 100%; padding: 8vh 20px 20px 20px; box-sizing: border-box; }
.menu-title { font-size: 42px; font-weight: 900; margin-bottom: 40px; text-transform: uppercase; letter-spacing: 4px; color: #e2e8f0; text-align: center; text-shadow: 0 4px 15px rgba(0,0,0,0.8); }
.mode-card { width: 100%; max-width: 320px; background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 16px; padding: 20px; margin-bottom: 16px; cursor: pointer; transition: all 0.2s ease; text-align: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mode-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.8); background: rgba(30, 41, 59, 0.85); }
.mode-card.primary { border-color: #38bdf8; box-shadow: 0 0 15px rgba(56, 189, 248, 0.2); }
.mode-card.primary:hover { border-color: #7dd3fc; box-shadow: 0 0 20px rgba(56, 189, 248, 0.5); }
.mode-card.tutorial { border-color: #a855f7; box-shadow: 0 0 15px rgba(168, 85, 247, 0.2); }
.mode-card.tutorial:hover { border-color: #d8b4fe; box-shadow: 0 0 20px rgba(168, 85, 247, 0.5); }
.wip-card { opacity: 0.6; cursor: pointer; border-style: dashed; filter: grayscale(80%); background: rgba(15, 23, 42, 0.7); }
.wip-card:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.mode-icon { font-size: 36px; margin-bottom: 8px; }
.mode-name { font-size: 18px; font-weight: bold; margin-bottom: 6px; color: #f1f5f9; }
.mode-desc { font-size: 12px; color: #94a3b8; line-height: 1.4; }
.ranked-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; border-style: dashed; filter: grayscale(80%); }
.btn-back { position: absolute; top: 20px; left: 20px; background: rgba(30, 41, 59, 0.7); border: 1px solid rgba(148, 163, 184, 0.4); color: #e2e8f0; border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: bold; cursor: pointer; transition: background 0.2s; backdrop-filter: blur(4px); }
.btn-back:hover { background: rgba(51, 65, 85, 1); }
.top-right-actions { position: absolute; top: 20px; right: 20px; display: flex; gap: 8px; z-index: 45; }
.btn-icon-top { width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(148,163,184,0.5); background: rgba(15,23,42,0.8); display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; backdrop-filter: blur(4px); transition: all 0.2s; }
.btn-icon-top:hover { background: rgba(30, 41, 59, 1); }
#settings-panel-home { position: fixed; top: 0; right: 0; height: 100%; width: 280px; background: rgba(15,23,42,0.98); box-shadow: -4px 0 16px rgba(0,0,0,0.5); transform: translateX(100%); transition: transform 0.2s ease-out; z-index: 60; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
#settings-backdrop-home { position: fixed; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity 0.2s ease-out; z-index: 50; }



/* =======================
   Lobby UI
   ======================= */
.top-header { 
  width: 100%; height: 60px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; 
  padding: env(safe-area-inset-top, 0) 16px 0 16px; background: rgba(2,6,23,0.95); 
  border-bottom: 1px solid rgba(148,163,184,0.1); backdrop-filter: blur(10px); z-index: 40; flex-shrink: 0; box-sizing: border-box; 
}
.app-mockup { 
  width: 100%; max-width: 1000px; height: 100%; height: 100dvh; 
  display: flex; flex-direction: column; position: relative; overflow: hidden; box-sizing: border-box; margin: 0 auto; 
}
.icon-btn { 
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(148,163,184,0.3); 
  background: rgba(30,41,59,0.8); color: white; display: flex; align-items: center; justify-content: center; 
  font-size: 14px; cursor: pointer; transition: 0.2s; position: relative; 
}
.icon-btn:hover { background: #334155; }
.scroll-content { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.bottom-footer { 
  padding: 12px 16px max(16px, env(safe-area-inset-bottom)) 16px; background: rgba(2,6,23,0.95); 
  border-top: 1px solid rgba(148,163,184,0.1); backdrop-filter: blur(10px); z-index: 40; flex-shrink: 0; 
  display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; 
}
.btn-mj-message { 
  width: 100%; padding: 14px 16px; border-radius: 12px; background: rgba(56, 189, 248, 0.1); 
  border: 1px solid rgba(56, 189, 248, 0.3); color: #38bdf8; font-weight: bold; font-size: 14px; 
  cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; position: relative; 
}
.btn-mj-message:hover { background: rgba(56, 189, 248, 0.2); }


/* =======================
   Custom Menu (Lobbies)
   ======================= */
.tabs-container { display: flex; background: rgba(30,41,59,0.5); margin: 16px 16px 0 16px; border-radius: 12px; padding: 4px; flex-shrink: 0; }
.tab-btn { flex: 1; padding: 10px 0; text-align: center; border-radius: 8px; font-size: 14px; font-weight: bold; color: #94a3b8; cursor: pointer; transition: 0.3s; }
.tab-btn.active { background: #38bdf8; color: #020617; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.rotate-anim { transition: transform 0.4s ease; transform: rotate(180deg); }


/* =======================
   Vues Globales (App)
   ======================= */
.dynamic-view-container {
    position: fixed; inset: 0; width: 100%; height: 100%; overflow-y: auto; 
    z-index: 25; 
    background-image: linear-gradient(rgba(2, 6, 23, 0.4), rgba(2, 6, 23, 0.85)), url('./assets/village/nuit.webp');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-color: #020617; /* Fallback au cas où l'image met du temps à charger */
    display: flex; justify-content: center;
}

/* Auth / Survey Container */
.auth-container { margin: auto; width: 100%; max-width: 480px; padding: 16px; }

/* Rules / RGPD Text */
.text-view-content { font-size: 13px; color: #cbd5e1; line-height: 1.5; margin-top: 16px; }
.text-view-content strong { color: #f8fafc; }
.text-view-content a { color: #38bdf8; text-decoration: none; }

/* =======================
   Styles Spécifiques au Profil
   ======================= */
.profile-container { padding: 10px 0; max-width: 500px; margin: 0 auto; padding-bottom: 40px; }
.profile-card { background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.profile-input-field { width: 100%; padding: 12px; background: rgba(2, 6, 23, 0.6); border: 1px solid rgba(148, 163, 184, 0.4); color: white; border-radius: 8px; margin-top: 8px; box-sizing: border-box; outline: none; }
.profile-input-field:focus { border-color: #38bdf8; }
.profile-btn-primary { width: 100%; background: #38bdf8; color: #020617; font-weight: bold; border: none; padding: 14px; border-radius: 8px; margin-top: 16px; cursor: pointer; transition: 0.2s; text-transform: uppercase; letter-spacing: 1px; }
.profile-btn-primary:hover { background: #7dd3fc; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(56,189,248,0.4); }

/* =======================
   Matchmaking UI
   ======================= */
.spinner-mm { 
  width: 60px; 
  height: 60px; 
  border: 6px solid rgba(56, 189, 248, 0.2); 
  border-top-color: #38bdf8; 
  border-radius: 50%; 
  animation: spin 1s linear infinite; 
  margin-bottom: 24px; 
}

.btn-cancel-mm { 
  background: transparent; 
  border: 1px solid #ef4444; 
  color: #ef4444; 
  padding: 10px 24px; 
  border-radius: 8px; 
  font-weight: bold; 
  cursor: pointer; 
  margin-top: 20px; 
  transition: all 0.2s; 
}

.btn-cancel-mm:hover { 
  background: rgba(239, 68, 68, 0.1); 
}