/* ========================================
   SMARTLOCKER WEB APP - HUD DASHBOARD
   Style harmonisé avec style.css
   ======================================== */

/* 1. IMPORT DES POLICES (Comme sur style.css) */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
  /* Backgrounds */
  --bg-dark: #02040a;
  --bg-panel: #0b101b;
  --bg-card: rgba(13, 19, 30, 0.85);
  
  /* Accents */
  --primary: #00ff9d;       /* Vert Néon */
  --secondary: #00f0ff;     /* Cyan électrique */
  --accent: #7000ff;        /* Violet profond */
  --danger: #ff2a6d;        /* Rouge Cyber */
  
  /* Text */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  
  /* Effects */
  --glow-primary: 0 0 10px rgba(0, 255, 157, 0.4);
  --border-tech: 1px solid rgba(0, 255, 157, 0.2);
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Rajdhani', sans-serif;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

/* Grille de fond (Adaptée pour matcher style.css) */
.cyber-grid {
  position: fixed; inset: 0; z-index: -1;
  background: 
    linear-gradient(rgba(0, 255, 157, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 157, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
/* Ajout du dégradé radial sombre comme sur style.css */
.cyber-grid::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, var(--bg-dark) 90%);
}

/* ========================================
   COMPOSANTS APP
   ======================================== */

/* Navbar App (Style unifié) */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 20px;
  background: rgba(2, 4, 10, 0.95);
  border-bottom: 1px solid rgba(0, 255, 157, 0.2);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 100;
}

.nav-logo {
  font-family: 'Orbitron', sans-serif; font-weight: 900; 
  color: white; text-decoration: none; display: flex; align-items: center; gap: 10px;
  text-shadow: var(--glow-primary);
  font-size: 1.2rem;
}
.nav-logo i { color: var(--primary); }

.btn-logout {
  background: transparent; border: 1px solid var(--danger); color: var(--danger);
  padding: 5px 15px; font-family: 'Orbitron'; font-size: 0.8rem;
  cursor: pointer; transition: 0.3s;
  text-transform: uppercase; letter-spacing: 1px;
}
.btn-logout:hover { background: var(--danger); color: white; box-shadow: 0 0 10px var(--danger); }

/* Main Container */
.app-container {
  max-width: 480px; margin: 40px auto; padding: 0 20px;
}

/* Card Style HUD (Look unifié avec .feature-card) */
.app-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem; position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  margin-bottom: 20px;
  /* On garde le clip-path car c'est très cool pour l'app */
  clip-path: polygon(0 0, 100% 0, 100% 95%, 95% 100%, 0 100%);
  transition: 0.3s;
}

.app-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
}

.app-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.card-title {
  font-family: 'Orbitron'; color: white; text-align: center;
  font-size: 1.5rem; margin-bottom: 0.5rem; letter-spacing: 2px;
  text-shadow: var(--glow-primary);
}

.card-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }

/* Form Elements */
.form-group { margin-bottom: 1.2rem; }

.form-input {
  width: 100%; background: rgba(0, 0, 0, 0.3);
  border: 1px solid #2d3748; color: var(--secondary);
  padding: 12px 15px; font-family: 'Rajdhani'; font-size: 1.1rem;
  transition: 0.3s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 10px rgba(0, 255, 157, 0.2); }

/* Boutons (Style unifié avec .btn de style.css) */
.btn {
  width: 100%; padding: 1rem; border: none;
  font-family: 'Orbitron'; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  cursor: pointer; transition: 0.3s; margin-top: 10px;
  display: flex; justify-content: center; align-items: center; gap: 10px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn-primary {
  background: var(--primary); color: #000; box-shadow: var(--glow-primary);
}
.btn-primary:hover { background: #fff; box-shadow: 0 0 20px #fff; }

.btn-success {
  background: rgba(0, 240, 255, 0.1); border: 1px solid var(--secondary); color: var(--secondary);
}
.btn-success:hover { background: var(--secondary); color: black; box-shadow: 0 0 15px var(--secondary); }

.btn-secondary {
  background: transparent; border: 1px solid var(--text-muted); color: var(--text-main);
}

.btn-google {
  background: white; color: black; margin-top: 15px; font-family: sans-serif; font-weight: 600;
  clip-path: none; border-radius: 4px;
}

/* Tabs */
.auth-toggle { display: flex; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.auth-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; color: var(--text-muted); font-family: 'Orbitron'; transition: 0.3s; }
.auth-tab:hover { color: var(--text-main); }
.auth-tab.active { color: var(--primary); border-bottom: 2px solid var(--primary); text-shadow: var(--glow-primary); }

/* Dashboard Specifics */
.dashboard-avatar {
  width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid var(--primary); margin: 0 auto 1.5rem; display: block;
  box-shadow: var(--glow-primary);
  object-fit: cover;
}

.dashboard-name { text-align: center; font-family: 'Orbitron'; margin-bottom: 1rem; color: #fff; }

.status-badge {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 1rem; margin: 1.5rem 0; font-family: 'Orbitron'; font-size: 1.2rem;
  border: 1px solid; background: rgba(0,0,0,0.3);
}

.status-badge.locked { border-color: var(--danger); color: var(--danger); text-shadow: 0 0 10px var(--danger); }
.status-badge.unlocked { border-color: var(--primary); color: var(--primary); text-shadow: 0 0 10px var(--primary); }

/* Choice Grid */
.choice-grid { display: grid; gap: 15px; }
.choice-item {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem; text-align: center; cursor: pointer; transition: 0.3s;
}
.choice-item:hover { border-color: var(--secondary); background: rgba(0, 240, 255, 0.1); transform: translateY(-3px); }
.choice-item i { font-size: 2rem; color: var(--secondary); margin-bottom: 10px; }

/* Utilities */
.hidden { display: none !important; }
.input-error { color: var(--danger); font-size: 0.8rem; margin-top: 5px; display: none; }
.input-error.show { display: block; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--bg-panel); border: 1px solid var(--primary); color: white;
  padding: 10px 20px; border-radius: 4px; z-index: 2000; display: flex; gap: 10px; align-items: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.toast-error { border-color: var(--danger); }

/* Cropper */
#cropper-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 3000; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.modal-content { max-width: 90%; max-height: 70%; overflow: hidden; }
.modal-buttons { margin-top: 20px; display: flex; gap: 10px; }