/* ======================================
   ZECA95 Dashboard - Redesign Glassmorphism
   Modern Dark Theme with Subtle Cyan
   ====================================== */

:root {
  /* Dégradé Background */
  --gradient-bg: linear-gradient(135deg, #0a1428 0%, #1a2a52 100%);
  
  /* Palettes */
  --bg-primary: #0a1428;
  --bg-secondary: #1a2a52;
  --bg-tertiary: #2d3e66;
  
  /* Accents discrets */
  --cyan-primary: rgba(34, 211, 238, 0.2);
  --cyan-hover: rgba(34, 211, 238, 0.4);
  --cyan-glow: rgba(34, 211, 238, 0.1);
  
  /* Status Colors */
  --status-ok: #22c55e;
  --status-warning: #f97316;
  --status-error: #ef4444;
  
  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Fonts */
  --font-mono: 'Courier New', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--status-ok);
}

/* ======================================
   Canvas Particules
   ====================================== */

.particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
}

/* ======================================
   Container
   ====================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ======================================
   Header & Navigation
   ====================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 20, 40, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

/* Logo */
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.logo:hover {
  color: var(--status-ok);
}

.logo-text {
  display: inline-block;
}

.logo-glow {
  display: none;
}

/* Navigation */
.nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all var(--transition-normal);
  position: relative;
  display: inline-block;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--cyan-hover);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--status-ok);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.nav-link:hover::after {
  opacity: 1;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 6px;
  padding: 0;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ======================================
   Sections
   ====================================== */

.section {
  padding: 4rem 0;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ======================================
   Cards Grid
   ====================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* ======================================
   Glassmorphism Card
   ====================================== */

.card {
  background: rgba(26, 42, 82, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 211, 238, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.card:hover {
  background: rgba(26, 42, 82, 0.6);
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(34, 211, 238, 0.1);
}

.card-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  transition: opacity var(--transition-normal);
}

.card:hover .card-image {
  opacity: 0.8;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-description {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.card-link {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: var(--cyan-hover);
  color: var(--text-primary);
  border-radius: 0.375rem;
  transition: all var(--transition-normal);
  font-weight: 500;
}

.card-link:hover {
  background: var(--cyan-primary);
  color: var(--status-ok);
}

/* ======================================
   Status Badges
   ====================================== */

.status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition-normal);
}

.badge-ok {
  background: rgba(34, 197, 94, 0.2);
  color: var(--status-ok);
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.badge-warning {
  background: rgba(249, 115, 22, 0.2);
  color: var(--status-warning);
  border: 1px solid rgba(249, 115, 22, 0.5);
}

.badge-error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--status-error);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

/* ======================================
   Progress Bars
   ====================================== */

.progress-container {
  margin: 1rem 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(45, 62, 102, 0.6);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399 0%, #22c55e 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

/* ======================================
   Charts Container
   ====================================== */

.chart-container {
  background: rgba(26, 42, 82, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 211, 238, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: all var(--transition-normal);
}

.chart-container:hover {
  border-color: rgba(34, 211, 238, 0.2);
}

.chart-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-wrapper {
  position: relative;
  height: 300px;
  width: 100%;
}

/* ======================================
   Statuts Services Grid
   ====================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.service-card {
  background: rgba(26, 42, 82, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 211, 238, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-normal);
}

.service-card:hover {
  background: rgba(26, 42, 82, 0.6);
  border-color: rgba(34, 211, 238, 0.2);
}

.service-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.service-status {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ======================================
   Dashboard Lock Button
   ====================================== */

.lock-btn {
  padding: 0.75rem 1.5rem;
  background: var(--cyan-hover);
  color: var(--text-primary);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-normal);
  font-size: 0.95rem;
}

.lock-btn:hover {
  background: var(--cyan-primary);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

/* ======================================
   Auth Modal
   ====================================== */

.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.auth-modal.hidden {
  display: none;
  opacity: 0;
}

.auth-modal-content {
  background: rgba(26, 42, 82, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.1);
}

.auth-modal-header h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0;
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-normal);
  padding: 0;
}

.auth-modal-close:hover {
  color: var(--text-primary);
}

.auth-modal-body {
  padding: 1.5rem;
}

.auth-modal-body p:first-child {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(10, 20, 40, 0.5);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 0.375rem;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: all var(--transition-normal);
}

.auth-input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.1);
  background: rgba(10, 20, 40, 0.8);
}

.auth-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--cyan-hover);
  color: var(--text-primary);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal);
}

.auth-btn:hover {
  background: var(--cyan-primary);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

.auth-error {
  color: var(--status-error);
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  display: block;
}

.auth-error.hidden {
  display: none;
}

/* ======================================
   Dashboard Content (Locked State)
   ====================================== */

.dashboard-locked {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 42, 82, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 211, 238, 0.1);
  border-radius: 1rem;
}

.dashboard-unlocked {
  min-height: auto;
  background: transparent;
  border: none;
}

/* ======================================
   Footer
   ====================================== */

.footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ======================================
   Responsive Design
   ====================================== */

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(34, 211, 238, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
  }

  .nav.active {
    max-height: 400px;
  }

  .nav-link {
    padding: 1rem;
    border-bottom: 1px solid rgba(34, 211, 238, 0.05);
  }

  .section-title {
    font-size: 2rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-wrapper {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .chart-wrapper {
    height: 200px;
  }

  .auth-modal-content {
    width: 95%;
  }
}
