/* ============================================
   RESET & UTILITAIRES
   ============================================ */

[x-cloak] {
    display: none !important;
}


/* ============================================
   1. ANIMATIONS — KEYFRAMES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
    100% {
        opacity: 0;
        transform: translateY(20px) translateX(-50%);
    }
}

@keyframes shine {
    0% {
        left: -50%;
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        left: 150%;
        opacity: 0;
    }
}

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

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


/* ============================================
   2. CLASSES D'ANIMATION
   ============================================ */

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.pulse {
    animation: pulse 3s ease-in-out infinite;
}

.gradient-text {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gradient 5s ease infinite;
}


/* ============================================
   3. NAVIGATION
   ============================================ */

.nav-link {
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.category-active {
    border-bottom: 3px solid #3b82f6;
    color: #3b82f6;
}


/* ============================================
   4. RECHERCHE
   ============================================ */

.search-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}


/* ============================================
   5. CARTES
   ============================================ */

.card-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.glow-hover {
    transition: all 0.3s ease;
}

.glow-hover:hover {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.member-card {
    transition: all 0.3s ease;
}

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

.association-card-image {
    transition: transform 0.5s ease;
}

.association-card:hover .association-card-image {
    transform: scale(1.05);
}

.category-chip {
    transition: all 0.3s ease;
}

.category-chip:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


/* ============================================
   6. FLIP CARD
   ============================================ */

.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}


/* ============================================
   7. TESTIMONIAL CARD
   ============================================ */

.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.testimonial-card:hover::before {
    animation: shine 1.5s;
}


/* ============================================
   8. ONGLETS (GÉNÉRIQUE)
   ============================================ */

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}


/* ============================================
   9. GALERIE
   ============================================ */

.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}


/* ============================================
   10. MENU DÉROULANT
   ============================================ */

.account-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 200px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.account-dropdown.show {
    display: block;
}


/* ============================================
   11. NOTIFICATIONS
   ============================================ */

.notification {
    animation: slideIn 0.3s forwards;
}

.notification.hide {
    animation: slideOut 0.3s forwards;
}


/* ============================================
   12. SCROLL INDICATOR
   ============================================ */

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 15px;
}

.scroll-down::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s infinite;
}


/* ============================================
   13. EFFETS VISUELS
   ============================================ */

.blob {
    position: absolute;
    filter: blur(60px);
    opacity: 0.15;
    z-index: 0;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@supports not (backdrop-filter: blur(10px)) {
    .glass-effect {
        background: rgba(255, 255, 255, 0.85);
    }
}

.wave-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-shape svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.wave-shape .shape-fill {
    fill: #ffffff;
}

.radial-gradient {
    background: radial-gradient(
        circle at 50% 50%,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(255, 255, 255, 0) 70%
    );
}

.parallax-bg {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

@supports (-webkit-touch-callout: none) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}


/* ============================================
   14. SCROLLBAR PERSONNALISÉE
   ============================================ */

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}


/* ============================================
   15. ACCESSIBILITÉ — REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating,
    .pulse,
    .gradient-text {
        animation: none;
    }

    .card-hover:hover,
    .member-card:hover,
    .category-chip:hover,
    .gallery-item:hover {
        transform: none;
    }

    .flip-card:hover .flip-card-inner {
        transform: none;
    }

    .parallax-bg {
        background-attachment: scroll;
    }
}