/* ===================================================================
   📝 APPOINTMENT.CSS - Styles pour le système de rendez-vous
   =================================================================== */

/* Erreurs de formulaire */
.form-error {
  display: none;
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

.form-error.show {
  display: block !important;
  animation: slideIn 0.3s ease-out;
}

.form-error.hidden {
  display: none !important;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Champs en erreur */
.border-red-500 {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px #ef4444;
}

.border-red-500:focus {
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}


/* ===================================================================
   🔔 NOTIFICATIONS.CSS - Système de notifications push global
   =================================================================== */

/* Container des notifications (fixé en haut à droite) */
.notification-container,
#notification-container {
    position: fixed;
    top: 80px; /* Ajuster selon votre header */
    right: 20px;
    z-index: 10000;
    pointer-events: none; /* Permet de cliquer à travers le container */
    max-width: 400px;
    width: 100%;
}

/* Notification individuelle */
.notification {
    pointer-events: auto; /* Réactive les interactions sur la notification */
    margin-bottom: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* Animation d'entrée */
.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Animation de sortie */
.notification.hide {
    opacity: 0;
    transform: translateX(100%);
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    max-height: 0;
}

/* Types de notifications avec dégradés modernes */
.notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.notification.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Contenu de la notification */
.notification-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.notification-icon {
    margin-right: 12px;
    font-size: 18px;
    opacity: 0.9;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

/* Support du HTML dans les messages */
.notification-message a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.9;
}

.notification-message a:hover {
    opacity: 1;
}

.notification-message button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    margin-left: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.notification-message button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Bouton de fermeture */
.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    margin-left: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Barre de progression (pour l'auto-disparition) */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    transition: width linear;
    border-radius: 0 0 12px 12px;
}

/* Effet de pulsation pour les notifications importantes */
.notification.urgent {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    }
    100% {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
}

/* Responsive mobile */
@media (max-width: 640px) {
    .notification-container,
    #notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 70px; /* Ajuster pour mobile */
    }

    .notification {
        padding: 14px 16px;
        border-radius: 8px;
    }

    .notification-message {
        font-size: 13px;
    }

    .notification-icon {
        font-size: 16px;
        margin-right: 10px;
    }
}

/* Support pour les modes sombres */
@media (prefers-color-scheme: dark) {
    .notification {
        border-color: rgba(255, 255, 255, 0.2);
    }

    .notification.success {
        background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    }

    .notification.error {
        background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
    }

    .notification.warning {
        background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
    }

    .notification.info {
        background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    }
}
