/* =============================================================================
   TRANSITIONS DE PAGE & ANIMATIONS UX
   ============================================================================= */

/* Fade in animation pour le chargement de page */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation au chargement de la page */
/* Désactivé pour éviter le flash de la navigation */
/* body {
    animation: fadeIn 0.5s ease-out;
} */

main {
    animation: fadeIn 0.6s ease-out 0.1s both;
}

/* Désactiver les animations de page sur les écrans qui utilisent .no-page-animation (ex: galerie) */
.no-page-animation main {
    animation: none !important;
}

.no-page-animation .bg-white {
    animation: none !important;
}

/* Animation pour les cartes */
.bg-white {
    animation: slideInFromRight 0.6s ease-out both;
}

.bg-white:nth-child(1) { animation-delay: 0.1s; }
.bg-white:nth-child(2) { animation-delay: 0.2s; }
.bg-white:nth-child(3) { animation-delay: 0.3s; }

/* =============================================================================
   AMÉLIORATIONS HOVER
   ============================================================================= */

/* Effet hover sur les liens de navigation */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #0f172a;
    transition: width 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Effet hover sur les cartes */
.rounded-2xl, .rounded-xl {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Désactivé pour éviter le mouvement des boutons */
/* .rounded-2xl:hover, .rounded-xl:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
} */

/* Effet hover global sur les boutons désactivé : les styles sont gérés par btn-primary / btn-secondary */

/* =============================================================================
   BREADCRUMB STYLES
   ============================================================================= */

nav[aria-label="Breadcrumb"] a {
    transition: all 0.2s ease;
}

nav[aria-label="Breadcrumb"] a:hover {
    transform: none;
}

/* =============================================================================
   LOADING SPINNER
   ============================================================================= */

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(253, 230, 138, 0.3);
    border-radius: 50%;
    border-top-color: #fde68a;
    animation: spin 0.8s linear infinite;
}

/* =============================================================================
   TOAST NOTIFICATIONS
   ============================================================================= */

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutToTop {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-100%);
    }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: slideInFromTop 0.3s ease-out;
}

.toast.hiding {
    animation: slideOutToTop 0.3s ease-out forwards;
}

.toast-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.toast-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.toast-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.toast-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* =============================================================================
   SMOOTH SCROLL
   ============================================================================= */

/* Désactivé pour éviter les conflits avec les ancres */
/* html {
    scroll-behavior: smooth;
} */

/* =============================================================================
   MENU ITEM ACTIVE STATE
   ============================================================================= */

.menu-item.active {
    background-color: #fde68a;
    color: #0f172a;
}

.menu-item:not(.active):hover {
    background-color: rgba(253, 230, 138, 0.1);
}
