/* ----------------------------------------------------------------------------
   0) FONT
   ---------------------------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Urbanist:wght@300;400;500;600;700;800&display=swap");

/* ============================================================================
   1) VARIABLES DE THÈME
   ========================================================================== */
:root {
  /* fonds */
  --bg: #0d1a12; /* fond global très sombre vert */
  --bg-2: #0b140f; /* gradient top/bottom */
  --panel: #12291e; /* panneaux */
  --panel-2: #13261b; /* variante panel */
  --glass: rgba(255, 255, 255, 0.06);

  /* lignes/bordures */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(104, 104, 104, 0.3);

  /* accents verts */
  --accent: #252525;
  --accent-2: #5c5c5c;
  --accent-light: #5dff17;
  --accent-gold: #d6bb71;

  /* texte & boutons */
  --text: #e6f2eb;
  --muted: #9ab5a5;
  --btn-green: linear-gradient(0deg, #09be5b, #00c539);
  --btn-blue: linear-gradient(0deg, #4765d2, #007ac5);

  /* états */
  --danger: #e25757;
  --ok: #38d483;

  /* rayons / ombres */
  --radius: 16px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.35);

  --shadow-orange: 0 0 15px rgb(255 140 18);

  --bg-green: linear-gradient(180deg, #7dff00, #008c02);

  --green: #99ff00;

  --btn-orange: linear-gradient(359deg, #ff7600, #cb8800);

  --btn-blue: linear-gradient(359deg, #007bff, #000dca);

  --btn-black: linear-gradient(rgb(27, 27, 27), rgb(0, 0, 0));

  /* === NOUVEAUX TOKENS RÉUTILISABLES ===
     Ces variables encapsulent des motifs communs de design :
     - Un fond dégradé sombre translucide pour la plupart des cartes/panneaux.
     - Une bordure douce translucide pour les composants contrastés.
     - Une ombre légère pour donner de la profondeur.
     En regroupant ces valeurs ici, on simplifie la maintenance
     et on assure une cohérence visuelle dans tout le tableau de bord.
   */
  --card-gradient: linear-gradient(
    135deg,
    rgba(22, 22, 22, 0.666),
    rgba(17, 16, 16, 0.763)
  );
  --card-border: 1px solid var(--green);
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
};

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

body {
  margin: 0;
  font-family: "Urbanist", Inter, system-ui, Arial, sans-serif;
  background: linear-gradient(rgb(0 0 0 / 20%), rgb(0 0 0 / 15%)), 
  url(/assets/images/background.png) no-repeat center center fixed;
  background-size: cover;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  position: relative; /* obligatoire pour ::before */
}

/* ================================
   💎 Image en transparence via ::before
   ================================ */
body::before {
  content: "";
  position: fixed; /* reste collée au viewport */
  top: 50;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../assets/images/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  opacity: 0.05; /* transparence : ajuste entre 0.05 et 0.3 */
  pointer-events: none; /* laisse tout clickable */

  z-index: 1; /* reste derrière ton contenu */
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
  text-align: center;
}

.header-login {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
  flex-direction: column;
}

.header-login img.logo {
 border-radius: 12px;
  width: 250px;
  height: 250px;
  object-fit: contain;

  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, filter;

  /* 🔥 Animations combinées */
  animation:
    fireFloat3D 6s ease-in-out infinite,
    fireGlow 2.6s ease-in-out infinite,
    heatWave 4.2s ease-in-out infinite;
}

/* ============================================================
   🧱 FLOTTEMENT 3D CINÉMATIQUE
   ============================================================ */
@keyframes fireFloat3D {
  0% {
    transform:
      perspective(700px)
      rotateX(0deg)
      rotateY(0deg)
      translateY(0);
  }

  25% {
    transform:
      perspective(700px)
      rotateX(10deg)
      rotateY(-12deg)
      translateY(-3px);
  }

  50% {
    transform:
      perspective(700px)
      rotateX(-8deg)
      rotateY(14deg)
      translateY(1px);
  }

  75% {
    transform:
      perspective(700px)
      rotateX(6deg)
      rotateY(-6deg)
      translateY(-2px);
  }

  100% {
    transform:
      perspective(700px)
      rotateX(0deg)
      rotateY(0deg)
      translateY(0);
  }
}

/* ============================================================
   🔥🔥 GLOW FIRE RÉEL (RESPIRATION LUMINEUSE)
   drop-shadow = suit la transparence du logo
   ============================================================ */
@keyframes fireGlow {
  0% {
    filter:
      drop-shadow(0 0 8px rgba(255, 80, 0, 0.55))
      drop-shadow(0 0 16px rgba(255, 140, 0, 0.4))
      drop-shadow(0 0 26px rgba(255, 60, 0, 0.25));
  }

  50% {
    filter:
      drop-shadow(0 0 18px rgba(255, 60, 0, 0.95))
      drop-shadow(0 0 36px rgba(255, 130, 0, 0.85))
      drop-shadow(0 0 60px rgba(255, 200, 0, 0.6))
      drop-shadow(0 0 90px rgba(255, 80, 0, 0.4));
  }

  100% {
    filter:
      drop-shadow(0 0 8px rgba(255, 80, 0, 0.55))
      drop-shadow(0 0 16px rgba(255, 140, 0, 0.4))
      drop-shadow(0 0 26px rgba(255, 60, 0, 0.25));
  }
}

/* ============================================================
   🌡️ DISTORSION THERMIQUE SUBTILE
   ============================================================ */
@keyframes heatWave {
  0% {
    filter: hue-rotate(0deg);
  }

  50% {
    filter: hue-rotate(5deg);
  }

  100% {
    filter: hue-rotate(0deg);
  }
}

/* ============================================================
   💥 POWER-UP AU SURVOL (OPTIONNEL)
   ============================================================ */
.app-logo:hover {
  animation-duration: 3.5s, 1.6s, 2.8s;
  transform: scale(1.12);
}


h1 {
  margin: 0.8rem 0 0.3rem;
  color: var(--accent-light);
  font-size: 2rem !important;
  letter-spacing: 0.5px;
  z-index: 2;
  position: relative;
   will-change: transform, filter;

  /* 🔥 Animations combinées */
  animation:
    fireFloat3D 6s ease-in-out infinite,
    fireGlow 2.6s ease-in-out infinite,
    heatWave 4.2s ease-in-out infinite;
}

/* ============================================================
   🧱 FLOTTEMENT 3D CINÉMATIQUE
   ============================================================ */
@keyframes fireFloat3D {
  0% {
    transform:
      perspective(700px)
      rotateX(0deg)
      rotateY(0deg)
      translateY(0);
  }

  25% {
    transform:
      perspective(700px)
      rotateX(10deg)
      rotateY(-12deg)
      translateY(-3px);
  }

  50% {
    transform:
      perspective(700px)
      rotateX(-8deg)
      rotateY(14deg)
      translateY(1px);
  }

  75% {
    transform:
      perspective(700px)
      rotateX(6deg)
      rotateY(-6deg)
      translateY(-2px);
  }

  100% {
    transform:
      perspective(700px)
      rotateX(0deg)
      rotateY(0deg)
      translateY(0);
  }
}

/* ============================================================
   🔥🔥 GLOW FIRE RÉEL (RESPIRATION LUMINEUSE)
   drop-shadow = suit la transparence du logo
   ============================================================ */
@keyframes fireGlow {
  0% {
    filter:
      drop-shadow(0 0 8px rgba(255, 80, 0, 0.55))
      drop-shadow(0 0 16px rgba(255, 140, 0, 0.4))
      drop-shadow(0 0 26px rgba(255, 60, 0, 0.25));
  }

  50% {
    filter:
      drop-shadow(0 0 18px rgba(255, 60, 0, 0.95))
      drop-shadow(0 0 36px rgba(255, 130, 0, 0.85))
      drop-shadow(0 0 60px rgba(255, 200, 0, 0.6))
      drop-shadow(0 0 90px rgba(255, 80, 0, 0.4));
  }

  100% {
    filter:
      drop-shadow(0 0 8px rgba(255, 80, 0, 0.55))
      drop-shadow(0 0 16px rgba(255, 140, 0, 0.4))
      drop-shadow(0 0 26px rgba(255, 60, 0, 0.25));
  }
}

/* ============================================================
   🌡️ DISTORSION THERMIQUE SUBTILE
   ============================================================ */
@keyframes heatWave {
  0% {
    filter: hue-rotate(0deg);
  }

  50% {
    filter: hue-rotate(5deg);
  }

  100% {
    filter: hue-rotate(0deg);
  }
}

.header-login span {
  font-size: 1rem !important;
  color: #ffffff;
}
.subtitle {
  color: var(--muted);
  font-size: 0.85rem;
}

/* === Carte === */
.login-card {
  background: var(--card-gradient);
  border: var(--card-border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1.2rem;
  margin-top: 1rem;
  text-align: left;
  position: relative;
  z-index: 2;
}

.login-card form {
  width: 100%;
  box-sizing: border-box;
  display: block;
}

/* === Onglets === */
.login-tabs {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.login-tabs button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.5rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}
.login-tabs button.active {
  color: var(--accent-light);
  border-color: var(--accent);
}

/* === Inputs === */
.input-group {
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
}
.input-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: var(--accent-light);
}
.input-group input {
  width: 100%;
  box-sizing: border-box;
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #ffffff;
  color: #000000;
  font-size: 0.95rem;
}
.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(58, 168, 107, 0.25);
}

/* Bouton œil dans le champ */
.toggle-password-btn {
  display: flex;
  position: absolute;
  align-items: center;
  right: 10px;
  bottom: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #393939ff;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.toggle-password-btn:hover {
  opacity: 1;
  color: var(--accent-light);
}

/* === Boutons === */
.buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
}
.btn {
  border: 1px solid var(--card-border);
  background: var(--btn-orange);
  color: #fff;
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn.primary {
  border: none;
  background: var(--btn-orange);
  color: #ffffff;
}
.btn.primary:hover {
  background: var(--accent-light);
}
.btn.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-orange);
  border: 1px solid var(--card-border);
  color: #ffffff;
  transition: transform 0.25s ease, text-shadow 0.25s ease;
  border: none;
}

.btn-success {
  background: var(--bg-green);
  color: #0e1a12;
}

/* === Icône Telegram stylisée === */
.btn.secondary i.fa-telegram {
  color: #ffffff;
  font-size: 1.1rem;
  margin-right: 4px;
  vertical-align: middle;
}

.btn.secondary:hover {
  background: rgba(43, 184, 255, 0.8);
}

/* État actif (onglet sélectionné) */
.btn-warning {
  color: var(--accent-light) !important;
  border-bottom: 2px solid var(--accent);
}

/* État inactif (onglet non sélectionné) */
.btn-outline-light {
  color: var(--muted) !important;
  border-bottom: 2px solid transparent;
}

.info-text {
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 1rem;
}

footer {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* === Responsive === */
@media (max-width: 480px) {
  .login-card {
    padding: 1.2rem;
  }
  .header-login h1 {
    font-size: 1.3rem;
  }
  .buttons {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* Pop-up majorité */
.age-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
}
.age-modal.hidden {
  display: none;
}
.age-card {
  background: #0e0e0ed1;
  backdrop-filter: blur(12px);
  color: var(--text, #fff);
  border: var(--card-border);
  border-radius: 18px;
  width: min(90vw, 420px);
  margin: 1rem;
  text-align: center;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.age-card h2 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #0dff00;
}
.age-card p {
  margin: 0.8rem 0 1.2rem 0;
  line-height: 1.4;
}
.age-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}
.btn.grey {
  background: var(--glass, rgba(255, 255, 255, 0.1));
  border: 1px solid var(--line, #444);
  color: var(--text, #fff);
}

.btn.grey,
.btn.primary {
  border-radius: 12px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.btn.primary:hover {
  opacity: 0.9;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 0;
}
/* =======================================================================
   TOAST NOTIFICATIONS — VERSION COLORÉE & PREMIUM
   ======================================================================= */

#toast-container {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 9999;
}

/* Base du toast */
.toast-notif {
  min-width: 230px;
  max-width: 320px;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Apparition */
.toast-notif.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Texte */
.toast-notif p {
  margin: 0;
  line-height: 1.4;
}

/* ===== Couleurs premium ===== */

/* 🟥 Erreur */
.toast-error {
  background: linear-gradient(135deg, #ff4e4e, #d63232);
}

/* 🟩 Succès */
.toast-success {
  background: linear-gradient(135deg, #2ecc71, #1fa355);
}

/* 🟦 Info */
.toast-info {
  background: linear-gradient(135deg, #3498db, #237fc2);
}

/* 🟨 Warning */
.toast-warning {
  background: linear-gradient(135deg, #f1c40f, #d9ac07);
}

/* Mobile responsive */
@media (max-width: 480px) {
  #toast-container {
    right: 0.8rem;
    bottom: 0.8rem;
  }
  .toast-notif {
    min-width: 200px;
    max-width: 90vw;
  }
}
