/* ========================================
   MEDILIB - POPUP DE CONNEXION
   ======================================== */

/* Blocage du scroll simple */
body.modal-open {
  overflow: hidden;
}

/* ========================================
   POPUP CENTRE D'AIDE AVEC CAROUSEL
   ======================================== */

/* Overlay pour le popup d'aide */
.help-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-popup-overlay.show {
  opacity: 1;
}

/* Popup d'aide avec design glassmorphism */
.help-popup {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 0;
  width: 90%;
  max-width: 550px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  transform: scale(0.85) translateY(40px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.help-popup-overlay.show .help-popup {
  transform: scale(1) translateY(0);
}

.help-content {
  padding: 30px;
  text-align: center;
  position: relative;
}

/* Header avec compteur */
.help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 165, 167, 0.1);
}

.help-header h2 {
  color: #00A5A7;
  font-size: 1.5em;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-header h2 i {
  font-size: 1.3em;
}

.help-counter {
  background: rgba(0, 165, 167, 0.1);
  color: #00A5A7;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  border: 1px solid rgba(0, 165, 167, 0.2);
}

/* Navigation gauche/droite */
.help-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 165, 167, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  color: #00A5A7;
  font-size: 1.1em;
}

.help-nav:hover {
  background: rgba(0, 165, 167, 0.1);
  border-color: rgba(0, 165, 167, 0.3);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 165, 167, 0.2);
}

.help-nav-left {
  left: -20px;
}

.help-nav-right {
  right: -20px;
}

/* Carousel */
.help-carousel {
  position: relative;
  height: 280px;
  overflow: hidden;
  margin-bottom: 25px;
}

.help-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.help-slide.prev {
  transform: translateX(-100%);
}

.help-slide-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.help-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #00A5A7, #00898b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(0, 165, 167, 0.3);
  animation: float 3s ease-in-out infinite;
}

.help-icon i {
  font-size: 2em;
  color: white;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.help-slide-content h3 {
  color: #00A5A7;
  font-size: 1.3em;
  font-weight: 700;
  margin: 0 0 15px 0;
  line-height: 1.3;
}

.help-slide-content p {
  color: #666;
  font-size: 1em;
  line-height: 1.5;
  margin: 0 0 20px 0;
  max-width: 400px;
}

.help-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #00A5A7;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  padding: 12px 20px;
  background: rgba(0, 165, 167, 0.1);
  border: 1px solid rgba(0, 165, 167, 0.2);
  border-radius: 25px;
  transition: all 0.3s ease;
}

.help-link:hover {
  background: rgba(0, 165, 167, 0.15);
  border-color: rgba(0, 165, 167, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 165, 167, 0.2);
}

/* Indicateurs de pagination */
.help-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

.help-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 165, 167, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.help-dot.active {
  background: #00A5A7;
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0, 165, 167, 0.4);
}

.help-dot:hover {
  background: rgba(0, 165, 167, 0.6);
  transform: scale(1.1);
}

/* Footer */
.help-footer {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 165, 167, 0.1);
}

.stay-here {
  color: #00A5A7;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(0, 165, 167, 0.1);
  border: 1px solid rgba(0, 165, 167, 0.2);
  border-radius: 25px;
  transition: all 0.3s ease;
}

.stay-here:hover {
  background: rgba(0, 165, 167, 0.15);
  border-color: rgba(0, 165, 167, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 165, 167, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .help-popup {
    width: 95%;
    max-width: 450px;
  }
  
  .help-content {
    padding: 25px 20px;
  }
  
  .help-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .help-header h2 {
    font-size: 1.4em;
  }
  
  .help-nav {
    width: 35px;
    height: 35px;
    font-size: 1em;
  }
  
  .help-nav-left {
    left: -17px;
  }
  
  .help-nav-right {
    right: -17px;
  }
  
  .help-carousel {
    height: 250px;
  }
  
  .help-icon {
    width: 70px;
    height: 70px;
  }
  
  .help-icon i {
    font-size: 1.8em;
  }
  
  .help-slide-content h3 {
    font-size: 1.2em;
  }
  
  .help-slide-content p {
    font-size: 0.95em;
  }
}

@media (max-width: 480px) {
  .help-popup {
    width: 98%;
    max-width: 380px;
  }
  
  .help-content {
    padding: 20px 15px;
  }
  
  .help-carousel {
    height: 220px;
  }
  
  .help-icon {
    width: 60px;
    height: 60px;
  }
  
  .help-icon i {
    font-size: 1.5em;
  }
  
  .help-slide-content h3 {
    font-size: 1.1em;
  }
  
  .help-slide-content p {
    font-size: 0.9em;
  }
}

/* Overlay avec effet de flou */
.login-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow-y: auto;
  display: none;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-popup-overlay.show {
  opacity: 1;
}

/* Overlay de fond sombre */
.login-popup-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  transition: opacity 0.3s ease;
}

.login-popup-overlay.show::before {
  opacity: 1;
}

/* Popup principal */
.login-popup {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 420px;
  min-height: 500px;
  position: relative;
  transform: scale(0.8) translateY(30px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  text-align: center;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
}

.login-popup-overlay.show .login-popup {
  transform: scale(1) translateY(0);
}

/* Bouton de fermeture supprimé */

/* Contenu du popup */
.popup-content {
  padding: 40px 35px 35px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Header du popup */
.popup-header {
  text-align: center;
  margin-bottom: 25px;
}

.popup-header h2 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 18px 0;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.popup-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9em;
  line-height: 1.4;
  margin: 0;
  padding: 0 10px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Actions du popup */
.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 15px;
}

/* Bouton de connexion principal */
.btn-login-primary {
  width: 100%;
  background: linear-gradient(135deg, #00A5A7 0%, #00898b 100%);
  color: white;
  border: none;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-login-primary::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 ease;
}

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

.btn-login-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 165, 167, 0.4);
  background: linear-gradient(135deg, #00898b 0%, #007a7c 100%);
}

.btn-login-primary:active {
  transform: translateY(0);
}

.btn-login-primary i {
  font-size: 1.1em;
}

/* Bouton d'inscription secondaire */
.btn-register-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-register-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-register-secondary:active {
  transform: translateY(0);
}

.btn-register-secondary i {
  font-size: 1.1em;
  color: #ffffff;
}

/* Footer du popup */
.popup-footer {
  text-align: center;
  margin-top: 0;
}

.stay-logged-out {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85em;
  cursor: pointer;
  padding: 14px 24px; /* même padding que le hover */
  border-radius: 12px;
  width: 100%; /* même largeur que le hover */
  display: flex; /* déjà en flex */
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stay-logged-out:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
  .login-popup {
    width: 95%;
    max-width: 380px;
    margin: 20px;
  }
  
  .popup-content {
    padding: 30px 25px 25px;
  }
  
  .popup-header h2 {
    font-size: 1.6em;
  }
  
  .popup-header p {
    font-size: 0.95em;
    padding: 0 5px;
  }
  
  .btn-login-primary,
  .btn-register-secondary {
    padding: 14px 20px;
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .login-popup {
    width: 98%;
    max-width: 350px;
  }
  
  .popup-content {
    padding: 25px 20px 20px;
  }
  
  .popup-header h2 {
    font-size: 1.5em;
  }
  
  .popup-header p {
    font-size: 0.9em;
  }
  
  .btn-login-primary,
  .btn-register-secondary {
    padding: 12px 18px;
    font-size: 0.95em;
  }
}

/* Animation d'entrée */
@keyframes popupSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes popupSlideOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
}

/* Effet de particules flottantes (optionnel) */
.login-popup::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 165, 167, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: float 20s linear infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-20px, -20px) rotate(360deg); }
}
