/* Styles généraux */
:root {
  --primary-color: #4a6cf7;
  --primary-hover: #3e5ad3;
  --secondary-color: #6c757d;
  --background-color: #f7f9fc;
  --sidebar-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #6c757d;
  --border-color: #e1e5eb;
  --success-color: #28a745;
  --warning-color: #f2994a;
  --danger-color: #e74c3c;
  --light-gray: #f8f9fa;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Mode sombre */
html.dark-mode,
body.dark-mode {
  --primary-color: #5872e7;
  --primary-hover: #4a6cf7;
  --background-color: #1a1d23;
  --sidebar-bg: #242731;
  --text-primary: #ffffff;
  --text-secondary: #b0b7c3;
  --border-color: #363a45;
  --light-gray: #2c2f37;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* S'assurer que html utilise aussi les variables en mode sombre */
html.dark-mode {
  background-color: var(--background-color);
  color: var(--text-primary);
}

/* Styles pour les noms de propriétaires de réseaux */
.network-owner-name {
  color: #666;
  font-weight: 500;
}

body.dark-mode .network-owner-name,
body[data-theme="dark"] .network-owner-name {
  color: #b0b7c3;
}

.network-owner-unknown {
  color: #999;
  font-style: italic;
}

body.dark-mode .network-owner-unknown,
body[data-theme="dark"] .network-owner-unknown {
  color: #6c757d;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Structure de base */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg) !important;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: fixed;
  height: 100vh;
  z-index: 10;
}

/* Bouton hamburger - caché par défaut sur desktop */
.hamburger-menu {
  display: none;
}

/* S'assurer que la sidebar utilise toujours la bonne couleur, même sur mobile */
@media (max-width: 768px) {
  .sidebar,
  .sidebar.sidebar-open,
  .sidebar.sidebar-hidden.sidebar-open {
    background-color: var(--sidebar-bg) !important;
  }
}

.sidebar-header {
  padding: 20px 15px;
  border-bottom: 1px solid var(--border-color);
  min-height: 80px;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0; /* Permet la compression du flex item */
}

.logo {
  height: 48px;
  width: 48px;
  margin-right: 12px;
  object-fit: contain;
  flex-shrink: 0; /* Le logo ne se réduit pas */
}

.brand-text {
  min-width: 0; /* Permet la compression du texte */
  flex: 1;
  overflow: hidden;
}

.brand-text h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  line-height: 1.2;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.nav-item i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.nav-item.active {
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
}

/* Contenu principal */
.content {
  flex: 1;
  margin-left: 250px;
  overflow-x: hidden;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background-color: var(--sidebar-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 5;
}

.search-container {
  display: flex;
  align-items: center;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 15px;
  width: 300px;
  flex-shrink: 0; /* Empêche la compression */
}

.search-container i {
  color: var(--text-secondary);
  margin-right: 10px;
}

.search-container input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  color: var(--text-primary);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto; /* Force l'alignement à droite */
}

/* Gestion spéciale pour les pages sans barre de recherche */
.top-header:not(:has(.search-container)) {
  justify-content: flex-end;
}

.top-header:not(:has(.search-container)) .user-profile {
  margin-left: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 8px;
  text-align: right;
}

#username-display {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.logout-btn:hover {
  color: var(--danger);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a6cf7, #5872e7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
  flex-shrink: 0; /* Garde la taille fixe */
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.avatar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.avatar:hover::before {
  opacity: 1;
}

.theme-toggle {
  margin-left: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
}

.main-content {
  padding: 25px;
}

/* Page d'accueil */
.welcome-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.75)), url('../img/background.jpg');
  background-size: cover;
  background-position: center;
  margin: -25px;
  margin-bottom: 0;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
}

/* Animation de nuages améliorée */
.welcome-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 35%, rgba(74, 108, 247, 0.3) 0%, rgba(255, 255, 255, 0) 25%),
    radial-gradient(circle at 80% 20%, rgba(74, 108, 247, 0.25) 0%, rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 40% 80%, rgba(74, 108, 247, 0.2) 0%, rgba(255, 255, 255, 0) 30%),
    radial-gradient(circle at 70% 65%, rgba(74, 108, 247, 0.15) 0%, rgba(255, 255, 255, 0) 25%);
  animation: cloud-movement 50s linear infinite;
  pointer-events: none;
}

/* Étoiles scintillantes en arrière-plan */
.welcome-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1px 1px at 25% 15%, rgba(255, 255, 255, 0.9) 50%, transparent 100%),
    radial-gradient(1px 1px at 50% 45%, rgba(255, 255, 255, 0.7) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 75% 25%, rgba(255, 255, 255, 0.8) 50%, transparent 100%),
    radial-gradient(1px 1px at 35% 65%, rgba(255, 255, 255, 0.9) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 85%, rgba(255, 255, 255, 0.7) 50%, transparent 100%),
    radial-gradient(1px 1px at 15% 80%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
  animation: twinkle 8s ease-in-out infinite alternate;
  opacity: 0.4;
  pointer-events: none;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes cloud-movement {
  0% {
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
  100% {
    background-position: 120% 0%, 120% 0%, 120% 0%, 120% 0%;
  }
}

/* Conteneur pour les éléments flottants */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Amélioration des serveurs flottants */
.floating-server {
  position: absolute;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(74, 108, 247, 0.3);
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(74, 108, 247, 0.4);
  animation: float-animation 15s ease-in-out infinite;
  transition: all 0.5s ease;
}

.floating-server::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 30px;
  height: 5px;
  background-color: rgba(74, 108, 247, 0.6);
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(74, 108, 247, 0.6);
}

.floating-server::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 5px;
  width: 20px;
  height: 5px;
  background-color: rgba(74, 108, 247, 0.4);
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(74, 108, 247, 0.6);
}

/* Ajout de LED sur les serveurs */
.floating-server .led {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: #5fff4b;
  bottom: 5px;
  right: 5px;
  animation: led-blink 2s infinite;
}

@keyframes led-blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.floating-server:nth-child(1) {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.floating-server:nth-child(2) {
  top: 25%;
  left: 85%;
  animation-delay: -2s;
  animation-duration: 18s;
}

.floating-server:nth-child(3) {
  top: 65%;
  left: 20%;
  animation-delay: -5s;
  animation-duration: 20s;
}

.floating-server:nth-child(4) {
  top: 70%;
  left: 75%;
  animation-delay: -8s;
  animation-duration: 17s;
}

.floating-server:nth-child(5) {
  top: 40%;
  left: 50%;
  animation-delay: -12s;
  animation-duration: 22s;
}

@keyframes float-animation {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    filter: brightness(1);
  }
  25% {
    transform: translateY(-15px) rotate(3deg) scale(1.05);
    filter: brightness(1.15);
  }
  50% {
    transform: translateY(-25px) rotate(5deg) scale(1);
    filter: brightness(1.3);
  }
  75% {
    transform: translateY(-10px) rotate(2deg) scale(0.95);
    filter: brightness(1.1);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    filter: brightness(1);
  }
}

/* Amélioration des données flottantes */
.floating-data {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(74, 108, 247, 0.25);
  box-shadow: 0 0 18px rgba(74, 108, 247, 0.7);
  animation: data-animation 10s linear infinite;
}

.floating-data:nth-child(6) {
  top: 35%;
  left: 15%;
  width: 15px;
  height: 15px;
}

.floating-data:nth-child(7) {
  top: 25%;
  left: 60%;
  animation-delay: -3s;
  width: 25px;
  height: 25px;
}

.floating-data:nth-child(8) {
  top: 60%;
  left: 80%;
  animation-delay: -6s;
  width: 18px;
  height: 18px;
}

@keyframes data-animation {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.2;
    box-shadow: 0 0 15px rgba(74, 108, 247, 0.6);
  }
  25% {
    transform: translate(50px, -25px) scale(1.2);
    opacity: 0.5;
    box-shadow: 0 0 20px rgba(74, 108, 247, 0.7);
  }
  50% {
    transform: translate(100px, -50px) scale(1.5);
    opacity: 0.8;
    box-shadow: 0 0 25px rgba(74, 108, 247, 0.8);
  }
  75% {
    transform: translate(150px, -25px) scale(1.2);
    opacity: 0.5;
    box-shadow: 0 0 20px rgba(74, 108, 247, 0.7);
  }
  100% {
    transform: translate(200px, 0) scale(1);
    opacity: 0.2;
    box-shadow: 0 0 15px rgba(74, 108, 247, 0.6);
  }
}

/* Connexions entre les serveurs */
.floating-connection {
  position: absolute;
  background: linear-gradient(to right, rgba(74, 108, 247, 0.05), rgba(74, 108, 247, 0.3), rgba(74, 108, 247, 0.05));
  height: 1px;
  width: 200px;
  opacity: 0.5;
  animation: connection-pulse 4s infinite;
}

.floating-connection:nth-child(9) {
  top: 20%;
  left: 15%;
  width: 70%;
  transform: rotate(25deg);
  animation-delay: 0.5s;
}

.floating-connection:nth-child(10) {
  top: 65%;
  left: 20%;
  width: 60%;
  transform: rotate(-15deg);
  animation-delay: 1.5s;
}

.floating-connection:nth-child(11) {
  top: 40%;
  left: 10%;
  width: 80%;
  transform: rotate(8deg);
  animation-delay: 2.5s;
}

@keyframes connection-pulse {
  0%, 100% {
    opacity: 0.2;
    height: 1px;
    box-shadow: 0 0 5px rgba(74, 108, 247, 0.3);
  }
  50% {
    opacity: 0.6;
    height: 1.5px;
    box-shadow: 0 0 15px rgba(74, 108, 247, 0.6);
  }
}

/* Globe pour symboliser le cloud */
.floating-globe {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 30% 30%, rgba(74, 108, 247, 0.1) 0%, rgba(20, 30, 48, 0.3) 80%);
  border: 1px solid rgba(74, 108, 247, 0.2);
  box-shadow: 0 0 30px rgba(74, 108, 247, 0.4);
  opacity: 0.7;
  animation: globe-rotation 40s linear infinite;
  pointer-events: none;
}

.floating-globe::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(74, 108, 247, 0.5) 0%, transparent 7%),
    radial-gradient(circle at 80% 30%, rgba(74, 108, 247, 0.3) 0%, transparent 7%),
    radial-gradient(circle at 20% 50%, rgba(74, 108, 247, 0.4) 0%, transparent 6%),
    radial-gradient(circle at 70% 70%, rgba(74, 108, 247, 0.3) 0%, transparent 8%);
  animation: globe-points 20s linear infinite;
}

.floating-globe::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 20px rgba(74, 108, 247, 0.3);
  animation: globe-glow 8s ease-in-out infinite alternate;
  opacity: 0.5;
}

@keyframes globe-rotation {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes globe-points {
  0% {
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
  100% {
    background-position: 200% 200%, 200% 200%, 200% 200%, 200% 200%;
  }
}

@keyframes globe-glow {
  0%, 100% {
    opacity: 0.4;
    box-shadow: inset 0 0 20px rgba(74, 108, 247, 0.3);
  }
  50% {
    opacity: 0.7;
    box-shadow: inset 0 0 30px rgba(74, 108, 247, 0.5);
  }
}

/* Virus qui attaquent les serveurs et données */
.floating-virus {
  position: absolute;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 30% 30%, rgba(74, 108, 247, 0.4), rgba(74, 108, 247, 0.7));
  border-radius: 50%;
  border: 1px solid rgba(74, 108, 247, 0.3);
  box-shadow: 
    0 0 8px rgba(74, 108, 247, 0.3),
    inset 0 0 6px rgba(74, 108, 247, 0.2);
  animation: virus-attack-random 12s ease-in-out infinite;
  cursor: pointer;
  pointer-events: all;
  z-index: 10;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.floating-virus::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: rgba(74, 108, 247, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(74, 108, 247, 0.5);
  animation: virus-pulse 2s ease-in-out infinite;
}

.floating-virus::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(74, 108, 247, 0.3);
  animation: virus-scan 3s linear infinite;
}

/* Positionnement des virus avec mouvements aléatoires */
.floating-virus:nth-child(13) {
  top: 15%;
  left: 8%;
  animation-delay: 0s;
  animation-duration: 14s;
  animation-name: virus-random-path-1;
}

.floating-virus:nth-child(14) {
  top: 35%;
  left: 85%;
  animation-delay: -2.5s;
  animation-duration: 16s;
  animation-name: virus-random-path-2;
}

.floating-virus:nth-child(15) {
  top: 75%;
  left: 12%;
  animation-delay: -5s;
  animation-duration: 18s;
  animation-name: virus-random-path-3;
}

.floating-virus:nth-child(16) {
  top: 45%;
  left: 78%;
  animation-delay: -7.5s;
  animation-duration: 15s;
  animation-name: virus-random-path-4;
}

.floating-virus:nth-child(17) {
  top: 25%;
  left: 45%;
  animation-delay: -10s;
  animation-duration: 20s;
  animation-name: virus-random-path-5;
}

/* Animations aléatoires pour chaque virus */
@keyframes virus-random-path-1 {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.8); opacity: 0.4; }
  15% { transform: translate(80px, -40px) rotate(45deg) scale(1); opacity: 0.6; }
  30% { transform: translate(-20px, 60px) rotate(120deg) scale(0.9); opacity: 0.5; }
  45% { transform: translate(150px, 20px) rotate(200deg) scale(1.1); opacity: 0.7; }
  60% { transform: translate(50px, -80px) rotate(280deg) scale(0.8); opacity: 0.6; }
  75% { transform: translate(-60px, 40px) rotate(340deg) scale(1); opacity: 0.5; }
  90% { transform: translate(120px, -20px) rotate(400deg) scale(0.9); opacity: 0.6; }
  100% { transform: translate(0, 0) rotate(450deg) scale(0.8); opacity: 0.4; }
}

@keyframes virus-random-path-2 {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.5; }
  20% { transform: translate(-100px, 80px) rotate(60deg) scale(0.8); opacity: 0.7; }
  35% { transform: translate(40px, -60px) rotate(140deg) scale(1.2); opacity: 0.6; }
  50% { transform: translate(-80px, -20px) rotate(220deg) scale(0.9); opacity: 0.8; }
  65% { transform: translate(160px, 100px) rotate(300deg) scale(1.1); opacity: 0.5; }
  80% { transform: translate(-40px, -100px) rotate(380deg) scale(0.8); opacity: 0.7; }
  95% { transform: translate(20px, 60px) rotate(440deg) scale(1); opacity: 0.6; }
  100% { transform: translate(0, 0) rotate(480deg) scale(1); opacity: 0.5; }
}

@keyframes virus-random-path-3 {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.9); opacity: 0.6; }
  12% { transform: translate(60px, 120px) rotate(30deg) scale(1.1); opacity: 0.4; }
  28% { transform: translate(-120px, -40px) rotate(100deg) scale(0.8); opacity: 0.7; }
  42% { transform: translate(180px, -80px) rotate(180deg) scale(1.2); opacity: 0.5; }
  58% { transform: translate(-60px, 160px) rotate(250deg) scale(0.9); opacity: 0.8; }
  72% { transform: translate(100px, -120px) rotate(320deg) scale(1); opacity: 0.6; }
  88% { transform: translate(-140px, 80px) rotate(400deg) scale(0.8); opacity: 0.5; }
  100% { transform: translate(0, 0) rotate(450deg) scale(0.9); opacity: 0.6; }
}

@keyframes virus-random-path-4 {
  0% { transform: translate(0, 0) rotate(0deg) scale(1.1); opacity: 0.5; }
  18% { transform: translate(-80px, -100px) rotate(70deg) scale(0.8); opacity: 0.7; }
  32% { transform: translate(140px, 60px) rotate(150deg) scale(1.2); opacity: 0.4; }
  48% { transform: translate(-160px, 40px) rotate(240deg) scale(0.9); opacity: 0.8; }
  62% { transform: translate(80px, -140px) rotate(310deg) scale(1.1); opacity: 0.6; }
  78% { transform: translate(-40px, 180px) rotate(390deg) scale(0.8); opacity: 0.5; }
  92% { transform: translate(120px, -60px) rotate(460deg) scale(1); opacity: 0.7; }
  100% { transform: translate(0, 0) rotate(500deg) scale(1.1); opacity: 0.5; }
}

@keyframes virus-random-path-5 {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.8); opacity: 0.7; }
  25% { transform: translate(200px, -120px) rotate(90deg) scale(1.1); opacity: 0.5; }
  40% { transform: translate(-100px, 80px) rotate(160deg) scale(0.9); opacity: 0.8; }
  55% { transform: translate(120px, 140px) rotate(230deg) scale(1.2); opacity: 0.4; }
  70% { transform: translate(-180px, -60px) rotate(300deg) scale(0.8); opacity: 0.6; }
  85% { transform: translate(60px, -180px) rotate(380deg) scale(1); opacity: 0.7; }
  100% { transform: translate(0, 0) rotate(450deg) scale(0.8); opacity: 0.7; }
}

/* Pulsation du cœur du virus */
@keyframes virus-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 1;
  }
}

/* Animation de scan du virus */
@keyframes virus-scan {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: rotate(180deg) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: rotate(360deg) scale(1);
    opacity: 0.6;
  }
}

/* Effet de destruction du virus */
.floating-virus.destroying {
  animation: virus-destroy 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes virus-destroy {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.8);
  }
  50% {
    transform: scale(1.5) rotate(180deg);
    opacity: 0.7;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.9);
  }
  100% {
    transform: scale(0) rotate(360deg);
    opacity: 0;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.3);
  }
}

/* Effet de hover sur les virus */
.floating-virus:hover {
  transform: scale(1.3);
  opacity: 0.9;
  box-shadow: 
    0 0 15px rgba(74, 108, 247, 0.8),
    inset 0 0 10px rgba(74, 108, 247, 0.6);
  border-color: rgba(74, 108, 247, 0.6);
}

/* Animation d'alerte pour les serveurs attaqués */
.floating-server.under-attack {
  animation: server-alert 0.8s ease-in-out infinite;
  border-color: rgba(255, 165, 0, 0.6) !important;
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.4) !important;
}

@keyframes server-alert {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
}

/* Animation d'alerte pour les données attaquées */
.floating-data.under-attack {
  animation: data-alert 0.6s ease-in-out infinite;
  background-color: rgba(255, 165, 0, 0.3) !important;
  box-shadow: 0 0 18px rgba(255, 165, 0, 0.5) !important;
}

@keyframes data-alert {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.8);
  }
}

/* Animation d'explosion pour la destruction des virus */
@keyframes explosion {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* Styles pour le message de victoire */
.victory-message {
  font-family: 'Inter', sans-serif;
}

.victory-content {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.95), rgba(32, 134, 56, 0.95));
  padding: 40px;
  border-radius: 15px;
  text-align: center;
  color: white;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  max-width: 500px;
  animation: victoryPulse 2s ease-in-out infinite;
}

.victory-content i {
  font-size: 60px;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.victory-content h2 {
  font-size: 28px;
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.victory-content p {
  font-size: 16px;
  margin-bottom: 10px;
  opacity: 0.9;
  line-height: 1.5;
}

@keyframes victoryPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

.welcome-card {
  background-color: rgba(40, 44, 52, 0.85);
  padding: 45px;
  border-radius: 12px;
  text-align: center;
  color: white;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: card-appear 1.2s ease-out;
  overflow: hidden;
  border: 1px solid rgba(74, 108, 247, 0.15);
  max-width: 600px;
  width: 90%;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(74, 108, 247, 0.15),
    transparent
  );
  animation: card-shine 8s infinite;
  z-index: -1;
}

@keyframes card-appear {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  50% {
    opacity: 0.8;
    transform: translateY(20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-shine {
  0% {
    left: -100%;
    opacity: 0.8;
  }
  20% {
    left: 100%;
    opacity: 0.8;
  }
  21% {
    opacity: 0;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

.welcome-card h1 {
  font-size: 36px;
  margin-bottom: 18px;
  animation: text-focus 1.2s ease-out;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.welcome-card p {
  font-size: 20px;
  margin-bottom: 35px;
  opacity: 0;
  animation: text-appear 1.5s ease-out forwards;
  animation-delay: 0.5s;
}

.welcome-card .btn-primary {
  opacity: 0;
  animation: btn-appear 1s ease-out forwards;
  animation-delay: 1s;
  position: relative;
  overflow: hidden;
  padding: 12px 25px;
  font-size: 16px;
  border-radius: 30px;
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.4);
}

.welcome-card .btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(45deg);
  transition: all 0.3s;
  opacity: 0;
}

.welcome-card .btn-primary:hover::after {
  opacity: 1;
  animation: btn-shine 2s;
}

@keyframes text-focus {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes text-appear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
  opacity: 0.9;
    transform: translateY(0);
  }
}

@keyframes btn-appear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes btn-shine {
  0% {
    left: -50%;
  }
  100% {
    left: 100%;
  }
}

/* Éléments communs */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 24px;
  display: flex;
  align-items: center;
}

.section-header h2 i {
  margin-right: 10px;
  color: var(--primary-color);
}

/* Boutons */
.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-primary i,
.btn-secondary i,
.btn-danger i {
  margin-right: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.view-options {
  display: flex;
  gap: 5px;
}

.refresh-btn,
.view-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--sidebar-bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.refresh-btn:hover,
.view-btn:hover {
  background-color: var(--light-gray);
  color: var(--primary-color);
}

.view-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Page Instances */
.resource-quotas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.quota-item {
  background-color: var(--sidebar-bg);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  box-shadow: var(--card-shadow);
}

.quota-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 18px;
}

.quota-details {
  flex: 1;
}

.quota-details h4 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.quota-meter {
  width: 100%;
  height: 8px;
  background-color: var(--light-gray);
  border-radius: 4px;
  position: relative;
  margin-bottom: 5px;
}

.quota-meter::before {
  content: '';
  position: absolute;
  height: 100%;
  width: var(--progress, 0%);
  background-color: var(--color, var(--primary-color));
  border-radius: 4px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.quota-value {
  font-size: 14px;
  font-weight: 500;
}

.instances-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.add-instance-card {
  background-color: var(--sidebar-bg);
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.add-instance-card:hover {
  border-color: var(--primary-color);
  background-color: rgba(74, 108, 247, 0.05);
}

.add-instance-content {
  text-align: center;
  color: var(--text-secondary);
}

.add-instance-content i {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
}

.empty-message {
  background-color: var(--sidebar-bg);
  border-radius: 8px;
  padding: 30px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: var(--card-shadow);
}

.empty-message i {
  font-size: 48px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.empty-message p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.5;
}

.instances-stats {
  display: flex;
  gap: 20px;
}

.stat-card {
  background-color: var(--sidebar-bg);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  box-shadow: var(--card-shadow);
  min-width: 200px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 18px;
}

.stat-details h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 0;
}

.modal-content {
  background-color: var(--sidebar-bg);
  border-radius: 10px;
  max-width: 550px;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  margin: auto;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background-color: var(--sidebar-bg);
  z-index: 5;
}

.modal-header h3 {
  font-size: 18px;
  margin: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(85vh - 140px); /* Soustraire la hauteur du header + footer */
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 20px;
  border: 2px solid transparent;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-secondary);
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background-color: var(--sidebar-bg);
  z-index: 5;
}

/* Formulaires */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--sidebar-bg);
  color: var(--text-primary);
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%236C757D' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 35px;
}

.help-text {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Icône d'aide */
.help-icon {
  cursor: pointer;
  color: var(--primary-color);
  transition: all 0.3s ease;
  opacity: 0.7;
}

.help-icon:hover {
  opacity: 1;
  transform: scale(1.1);
  color: var(--primary-hover);
}

input:disabled {
  background-color: var(--light-gray);
  cursor: not-allowed;
}

/* Page Paramètres */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.settings-card {
  background-color: var(--sidebar-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.settings-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.settings-header i {
  margin-right: 12px;
  color: var(--primary-color);
  font-size: 20px;
}

.settings-header h3 {
  font-size: 18px;
  margin: 0;
}

.settings-section {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
  border-bottom: none;
}

/* Carte de configuration IP Failover */
.ip-config-card {
  background-color: var(--sidebar-bg);
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.settings-section h4 {
  font-size: 16px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.settings-section h4 i {
  margin-right: 8px;
  color: var(--primary-color);
}

.setting-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.option-details h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.option-details p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Switch Toggle */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: var(--transition);
  border-radius: 26px;
}

.toggle-switch label:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition);
  border-radius: 50%;
}

.toggle-switch input:checked + label {
  background-color: var(--primary-color);
}

.toggle-switch input:checked + label:before {
  transform: translateX(24px);
}

/* Zone de danger */
.danger-zone .settings-header i {
  color: var(--danger-color);
}

.danger-box {
  border: 1px solid var(--danger-color);
  border-radius: 6px;
  padding: 20px;
}

.danger-box h4 {
  color: var(--danger-color);
  display: flex;
  align-items: center;
}

.danger-box h4 i {
  margin-right: 10px;
  color: var(--danger-color);
}

.warning-text {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.deletion-items {
  list-style: none;
  margin: 15px 0;
}

.deletion-items li {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.deletion-items li i {
  margin-right: 10px;
  color: var(--text-secondary);
  width: 16px;
}

/* Page Stockage */
.storage-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 25px;
}

.tab-btn {
  padding: 12px 25px;
  background: none;
  border: none;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
  color: var(--primary-color);
}

.storage-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 25px;
}

.usage-chart {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-container {
  width: 200px;
  height: 200px;
  position: relative;
}

.donut-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary-color) 0% 0%,
    #e5e5e5 0% 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.inner-circle {
  width: 70%;
  height: 70%;
  background-color: var(--sidebar-bg);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.percentage {
  font-size: 24px;
  font-weight: 600;
}

.label {
  font-size: 14px;
  color: var(--text-secondary);
}

.storage-stats {
  flex: 1;
  min-width: 300px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  align-content: center;
}

.stat-box {
  background-color: var(--sidebar-bg);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
}

.storage-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 25px;
}

.create-volume-form {
  background-color: var(--sidebar-bg);
  border-radius: 8px;
  padding: 25px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--card-shadow);
}

.size-info {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.available-size {
  font-size: 12px;
  color: var(--text-secondary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Éléments de formulaire pour la création d'instance */
.range-with-value {
  display: flex;
  align-items: center;
  width: 100%;
}

.range-with-value input[type="range"] {
  flex: 1;
  height: 5px;
  
  background: var(--border-color);
  outline: none;
  border-radius: 3px;
  margin-right: 15px;
}

.range-with-value input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
}

.range-with-value input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
}

.range-value {
  min-width: 50px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Style pour le résumé de la configuration de VM */
.vm-summary {
  background-color: var(--light-gray);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.vm-summary h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.summary-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.summary-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Notifications */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.notification {
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  animation: slide-in 0.3s ease;
  background-color: var(--sidebar-bg);
  border-left: 4px solid var(--primary-color);
}

.notification.success {
  border-left-color: var(--success-color);
}

.notification.error {
  border-left-color: var(--danger-color);
}

.notification.warning {
  border-left-color: var(--warning-color);
}

.notification i {
  font-size: 20px;
  margin-right: 12px;
}

.notification.success i {
  color: var(--success-color);
}

.notification.error i {
  color: var(--danger-color);
}

.notification.warning i {
  color: var(--warning-color);
}

.notification p {
  flex: 1;
  margin: 0;
  color: var(--text-primary);
}

.close-notification {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.close-notification:hover {
  color: var(--text-primary);
}

/* Mode sombre pour les notifications */
body.dark-mode .notification p,
body[data-theme="dark"] .notification p {
  color: #ffffff;
}

body.dark-mode .notification-message,
body[data-theme="dark"] .notification-message {
  color: #ffffff;
}

.notification.fade-out {
  animation: fade-out 0.3s ease forwards;
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Cartes d'instances */
.instance-card {
  background-color: var(--sidebar-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  margin-bottom: 15px;
  transition: var(--transition);
  overflow: hidden;
}

.instance-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.instance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
}

.instance-name {
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

.instance-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-running {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.status-stopped {
  background-color: rgba(108, 117, 125, 0.1);
  color: var(--text-secondary);
}

.status-starting {
  background-color: rgba(242, 153, 74, 0.1);
  color: var(--warning-color);
}

.status-paused {
  background-color: rgba(52, 152, 219, 0.1);
  color: #3498db;
}

.status-unknown {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--danger-color);
}

.instance-details {
  padding: 15px 20px;
}

.detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.detail-item i {
  width: 20px;
  margin-right: 12px;
  color: var(--text-secondary);
}

.instance-actions {
  display: flex;
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  gap: 10px;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-gray);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.action-btn:disabled {
  background-color: var(--light-gray);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.7;
}

.start-btn:hover {
  background-color: var(--success-color);
}

.stop-btn:hover {
  background-color: var(--danger-color);
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    width: 80px;
    overflow: visible;
  }

  .sidebar-header {
    padding: 15px 10px;
    justify-content: center;
  }

  .brand {
    flex-direction: column;
    align-items: center;
  }

  .logo {
    height: 52px;
    width: 52px;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .brand-text h1 {
    font-size: 16px;
  }

  .brand-text .subtitle {
    display: none;
  }

  .nav-item {
    padding: 12px;
    justify-content: center;
  }

  .nav-item i {
    margin-right: 0;
    font-size: 18px;
  }

  .nav-item span {
    display: none;
  }

  .content {
    margin-left: 80px;
  }

  .search-container {
    width: auto;
  }
}

@media (max-width: 768px) {
  /* Sidebar cachée par défaut sur mobile */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 10000 !important;
    position: fixed !important;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    background-color: var(--sidebar-bg) !important;
    width: 250px !important;
  }

  .sidebar.sidebar-open {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    z-index: 10000 !important;
    background-color: var(--sidebar-bg) !important;
    width: 250px !important;
  }
  
  .sidebar.sidebar-hidden.sidebar-open {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    z-index: 10000 !important;
    background-color: var(--sidebar-bg) !important;
    width: 250px !important;
  }

  /* Contenu principal prend toute la largeur */
  .content {
    margin-left: 0 !important;
    width: 100%;
  }

  /* Ajuster aussi main-content si présent */
  .main-content {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  /* Bouton hamburger pour ouvrir la sidebar - FORCER l'affichage sur mobile */
  .hamburger-menu {
    display: flex !important; /* Forcer l'affichage sur mobile */
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 10002 !important; /* Au-dessus de tout */
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transition: background 0.2s !important;
  }

  .hamburger-menu:hover {
    background: var(--primary-hover) !important;
  }

  .hamburger-menu:active {
    transform: scale(0.95) !important;
  }

  /* Overlay pour fermer la sidebar */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998; /* En dessous de la sidebar (10000) mais au-dessus du contenu */
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* S'assurer que rien ne cache le bouton, même l'overlay */
  .hamburger-menu * {
    pointer-events: none;
  }
  
  /* S'assurer que l'overlay ne bloque pas le bouton */
  .sidebar-overlay.active {
    pointer-events: auto;
  }
  
  /* Le bouton hamburger doit toujours être au-dessus de l'overlay */
  .sidebar-overlay.active ~ .hamburger-menu,
  .hamburger-menu {
    pointer-events: auto !important;
    z-index: 10002 !important;
  }

  .resource-quotas {
    grid-template-columns: 1fr;
  }

  .storage-overview {
    flex-direction: column;
  }

  .storage-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .top-header {
    flex-direction: column;
    gap: 15px;
  }

  .search-container {
    width: 100%;
  }

  .storage-stats {
    grid-template-columns: 1fr;
  }
}

/* Styles pour la page de login */
.login-container {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
}

.login-card {
    max-width: 450px;
    width: 90%;
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

.login-card .card-body {
    background-color: var(--bs-body-bg);
}

body.dark-mode .login-card {
    background-color: #2a2a2a;
}

body.dark-mode .login-card .card-body {
    background-color: #2a2a2a;
    color: #f5f5f5;
}

/* Bandeaux d'avertissement et d'erreur */
.warning-banner, .error-banner {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    position: relative;
}

.warning-banner {
    background-color: rgba(242, 153, 74, 0.15);
    border-left: 4px solid var(--warning-color);
    color: var(--warning-color);
}

.error-banner {
    background-color: rgba(231, 76, 60, 0.15);
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.warning-banner i, .error-banner i {
    margin-right: 10px;
    font-size: 18px;
}

.warning-banner span, .error-banner span {
    flex: 1;
    color: var(--text-primary);
}

.close-banner {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin-left: 15px;
    color: inherit;
    padding: 0;
}

.close-banner:hover {
    opacity: 0.8;
}

/* Indicateur de chargement */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

@keyframes spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Style pour le bouton "Réessayer" */
.retry-btn {
    margin-top: 20px;
    padding: 8px 16px;
}

/* Styles pour les options de console */
.console-option {
  background-color: var(--light-gray);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.console-option:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.preferred-option {
  border: 2px solid var(--primary-color);
  background-color: rgba(74, 108, 247, 0.05);
}

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.option-header h4 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
}

.preferred-badge {
  background-color: var(--primary-color);
  color: white;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 10px;
  font-weight: normal;
}

.console-option p {
  margin-bottom: 15px;
  color: var(--text-secondary);
}

.console-option .btn {
  margin-top: 10px;
}

/* .vm-info pour les pages console uniquement */
.console-container .vm-info {
  background-color: var(--sidebar-bg);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.extra-info {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
}

.extra-info ul {
  margin-left: 20px;
  padding-left: 0;
}

.extra-info li {
  margin-bottom: 5px;
}

/* Spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #007bff;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Network results */
.network-results {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.network-results h4 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.network-results h5 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.network-results pre {
    background-color: var(--code-bg);
    padding: 12px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: monospace;
    color: var(--text-color);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.data-table th, .data-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--bg-light);
    font-weight: bold;
}

.data-table tr:hover {
    background-color: var(--bg-hover);
}

/* Styles pour les sections de formulaire (disques et CD-ROMs) */
.form-section {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: var(--card-bg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.section-header .btn-icon {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
}

.section-header .btn-icon:hover {
    color: var(--primary-hover);
}

/* Styles pour les éléments disque */
.disk-item, .cdrom-item {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-light);
}

.disk-header, .cdrom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.disk-header span, .cdrom-header span {
    font-weight: 500;
    color: var(--text-primary);
}

.remove-disk-btn, .remove-cdrom-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
}

.remove-disk-btn:hover, .remove-cdrom-btn:hover {
    background-color: rgba(var(--danger-color-rgb), 0.1);
}

/* Indicateur de statut de connexion au serveur */
.connection-status {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.connection-status i {
    font-size: 18px;
    margin-right: 10px;
}

.status-text {
    flex: 1;
}

.status-details {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.status-connected {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.status-limited, .status-half-open {
    background-color: rgba(242, 153, 74, 0.1);
    border-left: 4px solid var(--warning-color);
    color: var(--warning-color);
}

.status-error, .status-open {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.status-unknown {
    background-color: rgba(108, 117, 125, 0.1);
    border-left: 4px solid var(--text-secondary);
    color: var(--text-secondary);
}

/* Bouton de rafraîchissement en cours de rotation */
.refresh-btn.refreshing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles pour les snapshots */
.snapshot-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.tab-button {
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s;
    position: relative;
}

.tab-button:hover {
    color: var(--info-color);
}

.tab-button.active {
    color: var(--info-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--info-color);
}

.loading-snapshots {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    color: var(--text-muted);
}

.loading-snapshots i {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--info-color);
}

.empty-snapshots {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
}

.empty-snapshots i {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--info-color);
}

.snapshots-list {
    max-height: 400px;
    overflow-y: auto;
}

.snapshot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
    transition: background-color 0.2s;
}

.snapshot-item:hover {
    background-color: #f9f9f9;
}

.snapshot-item.deleting {
    opacity: 0.5;
    pointer-events: none;
}

.snapshot-info {
    display: flex;
    align-items: center;
}

.snapshot-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(74, 105, 189, 0.1);
    color: var(--info-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.snapshot-icon i {
    font-size: 18px;
}

.snapshot-details h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.snapshot-date {
    margin: 5px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.snapshot-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: none;
    background-color: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

.rollback-snapshot:hover {
    color: var(--info-color);
}

.delete-snapshot:hover {
    color: var(--danger-color);
}

/* Mode sombre pour les snapshots */
body.dark-mode .snapshot-item,
body[data-theme="dark"] .snapshot-item {
    background-color: #2a2d35;
    border-bottom: 1px solid #3a3d45;
}

body.dark-mode .snapshot-item:hover,
body[data-theme="dark"] .snapshot-item:hover {
    background-color: #3a3d45;
}

body.dark-mode .snapshot-details h4,
body[data-theme="dark"] .snapshot-details h4 {
    color: #ffffff;
}

body.dark-mode .snapshot-date,
body[data-theme="dark"] .snapshot-date {
    color: #a0a5b0;
}

body.dark-mode .snapshot-icon,
body[data-theme="dark"] .snapshot-icon {
    background-color: rgba(74, 105, 189, 0.2);
    color: #7a9cff;
}

body.dark-mode .btn-icon:hover,
body[data-theme="dark"] .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Style pour le formulaire de création de snapshot */
#create-snapshot .form-group {
    margin-bottom: 20px;
}

#create-snapshot textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    resize: vertical;
}

.form-actions {
    margin-top: 30px;
}

.error-message {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: rgba(234, 67, 53, 0.1);
    border-radius: 8px;
    color: var(--danger-color);
    margin-bottom: 20px;
}

.error-message i {
    margin-right: 10px;
    font-size: 18px;
}

.snapshot-btn:hover {
    color: var(--info-color);
    background-color: rgba(74, 105, 189, 0.1);
}

/* Style pour le snapshot courant */
.current-snapshot {
    background-color: rgba(74, 105, 189, 0.05);
    border-left: 3px solid var(--info-color);
}

.current-badge {
    background-color: var(--info-color);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: normal;
    display: inline-block;
    vertical-align: middle;
}

.current-snapshot .snapshot-icon {
    background-color: rgba(74, 105, 189, 0.2);
}

/* Désactiver les boutons de rollback pour le snapshot actuel */
button.rollback-snapshot[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.delete-bridge {
    background-color: transparent;
    border: none;
    border-radius: 4px;
    color: var(--danger-color);
    cursor: pointer;
    padding: 6px 10px;
    transition: var(--transition);
}

.delete-bridge:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

.delete-bridge i {
    font-size: 14px;
}

/* Input group pour les préfixes */
.input-group {
    display: flex;
    align-items: center;
}

.input-prefix {
    padding: 10px 12px;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.input-group input {
    border-radius: 0 6px 6px 0;
}

/* Style pour les lignes de formulaire avec séparateurs */
.form-row {
    display: flex;
    align-items: center;
}

.form-row input {
    flex: 1;
    border-radius: 6px 0 0 6px;
}

.separator {
    padding: 0 8px;
    color: var(--text-secondary);
}

.form-row select {
    width: 80px;
    border-radius: 0 6px 6px 0;
}

/* Ajustements pour les actions de réseau */
.network-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 15px 0;
}

.gateway-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(var(--primary-color-rgb), 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.gateway-info h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 16px;
}

.gateway-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gateway-row {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.gateway-row span {
    display: flex;
    align-items: center;
}

.gateway-row .status-badge {
    margin-left: 5px;
}

.gateway-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-start;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.btn-sm i {
    margin-right: 5px;
}

/* Amélioration de l'apparence du sélecteur de réseau */
.form-section .form-group select#network-select-modify {
    width: 100%;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--sidebar-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.form-section .form-group select#network-select-modify:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

.form-section .form-group select#network-select-modify option {
    padding: 10px;
    background-color: var(--sidebar-bg);
    color: var(--text-primary);
}

/* Ajout d'un icône pour le réseau dans la section du résumé */
.summary-row .summary-value#summary-network-modify {
    display: flex;
    align-items: center;
}

.summary-row .summary-value#summary-network-modify:before {
    content: "\f6ff"; /* Code de l'icône network-wired */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 14px;
}

/* Améliorations du sélecteur de réseau pour le modal d'ajout d'instance */
.custom-network-select {
    width: 100%;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--sidebar-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.custom-network-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

.custom-network-select option {
    padding: 10px;
    background-color: var(--sidebar-bg);
    color: var(--text-primary);
}

/* Message pour indiquer qu'aucun réseau n'est disponible */
.network-warning {
    margin-top: 8px;
    font-size: 13px;
    color: var(--warning-color);
    display: flex;
    align-items: center;
}

.network-warning i {
    margin-right: 6px;
}

/* Particules interactives */
.interactive-particle {
  position: absolute;
  width: var(--size, 6px);
  height: var(--size, 6px);
  border-radius: 50%;
  background-color: var(--primary-color);
  opacity: var(--opacity, 0.3);
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px rgba(74, 108, 247, 0.9);
  transition: opacity 0.8s ease, transform 0.5s ease;
  filter: blur(1px);
}

/* Effet d'onde au clic */
.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple 0.8s linear;
  z-index: 0;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Animation au clic du bouton */
.welcome-card .btn-primary.clicked {
  transform: scale(0.95);
  background-color: var(--primary-hover);
  box-shadow: 0 0 25px rgba(74, 108, 247, 0.9);
}

.playlist-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Styles pour les raccourcis clavier */
.keyboard-shortcuts {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.keyboard-shortcuts h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.shortcuts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 175px;
}

.shortcut-key {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    min-width: 40px;
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: monospace;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.shortcut-action {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Amélioration des éléments de la playlist */
.playlist-item {
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.playlist-item.selected {
    border: 2px solid var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(74, 108, 247, 0.15);
}

.playlist-item:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 10px;
}

.playlist-item:hover:after {
    opacity: 1;
}

/* Bouton plein écran */
.fullscreen-btn {
    margin-left: 5px;
}

/* Amélioration du mode plein écran pour le lecteur vidéo */
.video-container:fullscreen {
    padding-bottom: 0;
    height: 100%;
}

.video-container:fullscreen video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Afficher les contrôles vidéo en mode plein écran */
:fullscreen .video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    z-index: 10;
}

/* Amélioration des boutons de chapitre pour les rendre plus visibles */
.chapter-btn {
    position: relative;
    overflow: hidden;
}

.chapter-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.chapter-btn:hover:before {
    left: 100%;
}

.chapter-btn.active:before {
    left: 100%;
}

/* Amélioration visuelle pour le hover des contrôles vidéo */
.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.subtitle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Effet de highlight pour le menu des sous-titres */
.subtitle-options div:hover {
    background-color: rgba(74, 108, 247, 0.1);
}

.subtitle-options div.active {
    background-color: rgba(74, 108, 247, 0.15);
    color: var(--primary-color);
    font-weight: 500;
}

/* Responsive design pour la page d'aide */
@media (max-width: 768px) {
    .video-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .subtitle-selection {
        margin-left: 0;
        width: 100%;
    }
    
    .shortcuts-grid {
        flex-direction: column;
        gap: 10px;
    }
} 

/* Styles pour le bouton de suppression des vidéos */
.delete-video-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.delete-video-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

.video-card:hover .delete-video-btn {
    opacity: 1;
}

.delete-video-btn i {
    font-size: 16px;
}

/* Animation de suppression */
.video-card.deleting {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
} 
 
 / *   S t y l e s   p o u r   l e s   c a r t e s   d e   d e s i g n e r   r � s e a u   * / 
 . d e s i g n e r - t o o l s   { 
         d i s p l a y :   g r i d ; 
         g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( a u t o - f i t ,   m i n m a x ( 3 5 0 p x ,   1 f r ) ) ; 
         g a p :   2 0 p x ; 
         m a r g i n - t o p :   2 0 p x ; 
 } 
 
 . d e s i g n e r - c a r d   { 
         b a c k g r o u n d :   w h i t e ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ; 
         b o r d e r - r a d i u s :   1 2 p x ; 
         p a d d i n g :   2 4 p x ; 
         t r a n s i t i o n :   v a r ( - - t r a n s i t i o n ) ; 
         b o x - s h a d o w :   v a r ( - - c a r d - s h a d o w ) ; 
         p o s i t i o n :   r e l a t i v e ; 
         o v e r f l o w :   h i d d e n ; 
 } 
 
 . d e s i g n e r - c a r d : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
         b o x - s h a d o w :   0   8 p x   2 5 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 1 5 ) ; 
         b o r d e r - c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ; 
 } 
 
 . d e s i g n e r - c a r d : : b e f o r e   { 
         c o n t e n t :   ' ' ; 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   0 ; 
         l e f t :   0 ; 
         r i g h t :   0 ; 
         h e i g h t :   4 p x ; 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 9 0 d e g ,   v a r ( - - p r i m a r y - c o l o r ) ,   v a r ( - - s e c o n d a r y - c o l o r ) ) ; 
         o p a c i t y :   0 ; 
         t r a n s i t i o n :   o p a c i t y   0 . 3 s   e a s e ; 
 } 
 
 . d e s i g n e r - c a r d : h o v e r : : b e f o r e   { 
         o p a c i t y :   1 ; 
 } 
 
 . d e s i g n e r - i c o n   { 
         w i d t h :   6 0 p x ; 
         h e i g h t :   6 0 p x ; 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   v a r ( - - p r i m a r y - c o l o r ) ,   v a r ( - - s e c o n d a r y - c o l o r ) ) ; 
         b o r d e r - r a d i u s :   1 2 p x ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
         m a r g i n - b o t t o m :   1 6 p x ; 
         p o s i t i o n :   r e l a t i v e ; 
         o v e r f l o w :   h i d d e n ; 
 } 
 
 . d e s i g n e r - i c o n   i   { 
         f o n t - s i z e :   2 4 p x ; 
         c o l o r :   w h i t e ; 
         z - i n d e x :   1 ; 
         p o s i t i o n :   r e l a t i v e ; 
 } 
 
 . d e s i g n e r - i n f o   h 5   { 
         f o n t - s i z e :   1 8 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   v a r ( - - t e x t - p r i m a r y ) ; 
         m a r g i n - b o t t o m :   8 p x ; 
 } 
 
 . d e s i g n e r - i n f o   p   { 
         f o n t - s i z e :   1 4 p x ; 
         c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ; 
         l i n e - h e i g h t :   1 . 5 ; 
         m a r g i n - b o t t o m :   1 6 p x ; 
 } 
 
 . d e s i g n e r - f e a t u r e s   { 
         d i s p l a y :   f l e x ; 
         f l e x - w r a p :   w r a p ; 
         g a p :   8 p x ; 
         m a r g i n - b o t t o m :   2 0 p x ; 
 } 
 
 . f e a t u r e - b a d g e   { 
         b a c k g r o u n d :   r g b a ( 7 4 ,   1 0 8 ,   2 4 7 ,   0 . 1 ) ; 
         c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ; 
         p a d d i n g :   4 p x   1 0 p x ; 
         b o r d e r - r a d i u s :   2 0 p x ; 
         f o n t - s i z e :   1 2 p x ; 
         f o n t - w e i g h t :   5 0 0 ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 7 4 ,   1 0 8 ,   2 4 7 ,   0 . 2 ) ; 
 } 
 
 . d e s i g n e r - a c t i o n s   { 
         d i s p l a y :   f l e x ; 
         g a p :   1 0 p x ; 
         m a r g i n - t o p :   a u t o ; 
 } 
 
 . d e s i g n e r - a c t i o n s   . b t n - p r i m a r y , 
 . d e s i g n e r - a c t i o n s   . b t n - s e c o n d a r y   { 
         p a d d i n g :   1 0 p x   2 0 p x ; 
         b o r d e r - r a d i u s :   8 p x ; 
         f o n t - s i z e :   1 4 p x ; 
         f o n t - w e i g h t :   5 0 0 ; 
         t e x t - d e c o r a t i o n :   n o n e ; 
         t r a n s i t i o n :   v a r ( - - t r a n s i t i o n ) ; 
         p o s i t i o n :   r e l a t i v e ; 
         o v e r f l o w :   h i d d e n ; 
 } 
 
 . d e s i g n e r - a c t i o n s   . b t n - p r i m a r y   { 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   v a r ( - - p r i m a r y - c o l o r ) ,   v a r ( - - p r i m a r y - h o v e r ) ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r :   n o n e ; 
 } 
 
 . d e s i g n e r - a c t i o n s   . b t n - s e c o n d a r y   { 
         b a c k g r o u n d :   v a r ( - - s e c o n d a r y - c o l o r ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r :   n o n e ; 
 } 
 
 . d e s i g n e r - a c t i o n s   . b t n - p r i m a r y : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 7 4 ,   1 0 8 ,   2 4 7 ,   0 . 3 ) ; 
 } 
 
 . d e s i g n e r - a c t i o n s   . b t n - s e c o n d a r y : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 1 0 8 ,   1 1 7 ,   1 2 5 ,   0 . 3 ) ; 
 } 
 
 / *   M o d e   s o m b r e   p o u r   l e s   c a r t e s   d e   d e s i g n e r   * / 
 b o d y . d a r k - m o d e   . d e s i g n e r - c a r d   { 
         b a c k g r o u n d :   v a r ( - - s i d e b a r - b g ) ; 
         b o r d e r - c o l o r :   v a r ( - - b o r d e r - c o l o r ) ; 
 } 
 
 b o d y . d a r k - m o d e   . f e a t u r e - b a d g e   { 
         b a c k g r o u n d :   r g b a ( 8 8 ,   1 1 4 ,   2 3 1 ,   0 . 2 ) ; 
         c o l o r :   # 7 c 8 e e 8 ; 
         b o r d e r - c o l o r :   r g b a ( 8 8 ,   1 1 4 ,   2 3 1 ,   0 . 3 ) ; 
 } 
 
 / *   R e s p o n s i v e   d e s i g n   p o u r   l e s   c a r t e s   d e   d e s i g n e r   * / 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . d e s i g n e r - t o o l s   { 
                 g r i d - t e m p l a t e - c o l u m n s :   1 f r ; 
                 g a p :   1 5 p x ; 
         } 
         
         . d e s i g n e r - c a r d   { 
                 p a d d i n g :   2 0 p x ; 
         } 
         
         . d e s i g n e r - a c t i o n s   { 
                 f l e x - d i r e c t i o n :   c o l u m n ; 
         } 
         
         . d e s i g n e r - a c t i o n s   . b t n - p r i m a r y , 
         . d e s i g n e r - a c t i o n s   . b t n - s e c o n d a r y   { 
                 t e x t - a l i g n :   c e n t e r ; 
         } 
 } 
 
 