/* Navigation à gauche - Menu vertical compact */
.compact-nav {
  position: fixed;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.menu-trigger {
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  margin-bottom: 15px;
  position: relative;
}

.menu-trigger:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(79, 172, 254, 0.5);
  background: linear-gradient(135deg, #3d8bfe, #00d4fe);
}

.menu-trigger.open {
  background: linear-gradient(135deg, #00d4fe, #4facfe);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6);
}

.trigger-icon {
  transition: all 0.3s ease;
}

.menu-trigger:hover .trigger-icon {
  transform: rotate(360deg) scale(1.2);
}

.menu-trigger.open .trigger-icon {
  transform: rotate(180deg);
}

.menu-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  transition: all 0.4s ease;
  pointer-events: none;
}

.menu-items.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.nav-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  text-decoration: none;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  outline: none;
}

.nav-icon:hover {
  background: white;
  transform: translateX(5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-icon:active {
  transform: translateX(3px);
}

/* Icône spéciale pour home */
.nav-icon.home {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.nav-icon.home:hover {
  background: linear-gradient(135deg, #3d8bfe, #00d4fe);
  transform: translateX(5px) scale(1.05);
}

/* Timer display */
.timer-display {
  width: 55px;
  height: 50px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(52, 211, 153, 0.3);
  position: relative;
  cursor: default;
}

.timer-display:hover {
  transform: translateX(3px);
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.2);
}

.timer-minutes {
  font-size: 11px;
  line-height: 1;
  color: #059669;
  font-family: 'Courier New', monospace;
  letter-spacing: -0.5px;
}

.timer-label {
  font-size: 7px;
  color: #6b7280;
  margin-top: 1px;
}

/* Tooltips - Positionnés à droite du menu */
.nav-icon::after, 
.timer-display::after, 
.menu-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
  pointer-events: none;
  font-family: Arial, sans-serif;
}

.nav-icon:hover::after, 
.timer-display:hover::after, 
.menu-trigger:hover::after {
  opacity: 1;
  visibility: visible;
  left: 65px;
}

/* Animation d'entrée depuis la gauche */
.compact-nav {
  animation: slideInFromLeft 0.6s ease-out;
}

@keyframes slideInFromLeft {
  from {
    transform: translateY(-50%) translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
}

/* Animation des icônes individuelles */
.nav-icon {
  opacity: 0;
  animation: fadeInLeft 0.6s ease forwards;
}

.nav-icon:nth-child(1) { animation-delay: 0.2s; }
.nav-icon:nth-child(2) { animation-delay: 0.4s; }
.timer-display { 
  opacity: 0;
  animation: fadeInLeft 0.6s ease 0.6s forwards;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* États de focus pour l'accessibilité */
.menu-toggle:focus,
.nav-icon:focus {
  outline: 2px solid #4facfe;
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .compact-nav {
    left: 10px;
  }
  
  .menu-trigger, .nav-icon { 
    width: 45px; 
    height: 45px; 
    font-size: 18px; 
  }
  
  .timer-display { 
    width: 50px; 
    height: 45px; 
  }
  
  .timer-minutes {
    font-size: 10px;
  }
  
  .timer-label {
    font-size: 6px;
  }
  
  /* Tooltips plus petits sur mobile */
  .nav-icon::after, 
  .timer-display::after, 
  .menu-trigger::after {
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .compact-nav {
    left: 5px;
  }
  
  .menu-trigger, .nav-icon { 
    width: 40px; 
    height: 40px; 
    font-size: 16px; 
  }
  
  .timer-display { 
    width: 45px; 
    height: 40px; 
  }
  
  .timer-minutes {
    font-size: 9px;
  }
  
  .timer-label {
    font-size: 5px;
  }
  
  .menu-items {
    gap: 8px;
  }
  
  /* Tooltips encore plus petits sur très petit écran */
  .nav-icon::after, 
  .timer-display::after, 
  .menu-trigger::after {
    font-size: 10px;
    padding: 5px 8px;
  }
}

/* Adaptation pour les écrans très larges */
@media (min-width: 1400px) {
  .compact-nav {
    left: 25px;
  }
  
  .menu-trigger {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  
  .nav-icon {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }
  
  .timer-display {
    width: 60px;
    height: 55px;
  }
  
  .timer-minutes {
    font-size: 12px;
  }
  
  .timer-label {
    font-size: 8px;
  }
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
  .compact-nav,
  .nav-icon,
  .timer-display,
  .menu-items,
  .menu-toggle {
    animation: none;
    transition: none;
  }
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
  .nav-icon {
    background: rgba(45, 45, 45, 0.95);
    color: #e5e5e5;
  }
  
  .nav-icon:hover {
    background: rgba(60, 60, 60, 0.95);
  }
  
  .timer-display {
    background: rgba(45, 45, 45, 0.95);
    color: #e5e5e5;
    border-color: rgba(52, 211, 153, 0.4);
  }
  
  .timer-minutes {
    color: #10b981;
  }
  
  .timer-label {
    color: #9ca3af;
  }
}