/* ================================================
   CRÉATIONS - VERSION OPTIMISÉE POUR PERFORMANCE
   Améliorations: GPU, mobile, réduction effets coûteux
   ================================================ */

/* Canvas ivoire « galerie » (cohérent avec la DA globale) */
body {
    background: var(--surface-page);
}

/* ========== BLOBS - DÉSACTIVÉS POUR PERFORMANCE ========== */
/* Blobs complètement désactivés (trop coûteux même avec optimisations) */
.creations-blob {
    display: none !important;
}

/* Blobs styles commentés (désactivés)
.creations-blob-1 {
    width: 500px;
    height: 500px;
    background: rgba(132, 79, 192, 0.6);
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.creations-blob-2 {
    width: 450px;
    height: 450px;
    background: rgba(73, 182, 160, 0.6);
    top: 40%;
    right: -10%;
    animation-delay: 10s;
}

.creations-blob-3 {
    width: 400px;
    height: 400px;
    background: rgba(255, 67, 101, 0.6);
    bottom: 10%;
    left: 20%;
    animation-delay: 20s;
}

@keyframes float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(20px, -30px, 0);
    }
}
*/

/* ========== HERO CARD - OPTIMISÉ ========== */
.creations-hero-card {
    background: linear-gradient(135deg,
        rgba(132, 79, 192, 0.9) 0%,
        rgba(255, 67, 101, 0.85) 50%,
        rgba(132, 79, 192, 0.9) 100%
    );
    border-radius: var(--radius-2xl, 1rem);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px 0 rgba(132, 79, 192, 0.3);
    padding: 3rem;
    text-align: center;
    animation: slideIn 0.6s ease-out;
    position: relative;
    z-index: 1;
    overflow: hidden;
    will-change: opacity, transform;
}

/* Desktop: backdrop-filter DÉSACTIVÉ pour perf maximale */
/* @media (min-width: 1024px) {
    .creations-hero-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
} */

/* Mobile: PAS de backdrop-filter, fond solide */
@media (max-width: 1023px) {
    .creations-hero-card {
        background: linear-gradient(135deg,
            rgba(132, 79, 192, 0.95) 0%,
            rgba(255, 67, 101, 0.9) 50%,
            rgba(132, 79, 192, 0.95) 100%
        );
        /* PAS de backdrop-filter */
    }
}

/* Effet shimmer DÉSACTIVÉ même sur desktop pour perf */
/* L'animation constante est trop coûteuse, même sur PC */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Titre du hero */
.creations-hero-card h1 {
    font-family: var(--font-family-display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}
.creations-hero-card h1 i { font-size: 0.9em; }

/* Animation palette DÉSACTIVÉE pour perf */
@media (min-width: 768px) {
    .creations-hero-card h1 i {
        margin-right: 15px;
        /* animation: paletteFloat 3s ease-in-out infinite; - Désactivé pour perf */
    }

    /* @keyframes paletteFloat {
        0%, 100% { transform: translateY(0) rotate(0deg); }
        25% { transform: translateY(-5px) rotate(-5deg); }
        75% { transform: translateY(-5px) rotate(5deg); }
    } */
}

.creations-hero-card p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Container principal */
.container {
    position: relative;
    z-index: 1;
}

/* ========== PRODUCT CARDS - OPTIMISÉES ========== */
.creations-product-card {
    background: rgba(255, 255, 255, 0.98) !important; /* Opacité augmentée */
    border: 1px solid rgba(132, 79, 192, 0.1);
    border-radius: var(--radius-xl, 0.75rem);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    will-change: transform; /* GPU acceleration */
}

/* Desktop: backdrop-filter DÉSACTIVÉ pour perf maximale */
/* @media (min-width: 1024px) {
    .creations-product-card {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
} */

/* Mobile: PAS de backdrop-filter */
@media (max-width: 1023px) {
    .creations-product-card {
        background: white !important;
        /* PAS de backdrop-filter */
    }
}

.creations-product-card:hover {
    transform: translate3d(0, -8px, 0); /* translate3d pour GPU */
    box-shadow: 0 12px 32px 0 rgba(132, 79, 192, 0.2) !important;
    border-color: rgba(132, 79, 192, 0.3);
}

/* Image container */
.creations-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius-xl, 0.75rem) var(--radius-xl, 0.75rem) 0 0;
}

.creations-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform; /* GPU acceleration */
}

.creations-product-card:hover .creations-image-container img {
    transform: scale3d(1.05, 1.05, 1); /* scale3d pour GPU */
}

/* Overlay optimisé */
.creations-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top,
        rgba(132, 79, 192, 0.75) 0%,
        rgba(255, 67, 101, 0.75) 60%,
        transparent 100%
    );
    padding: 0 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    will-change: opacity;
}

.creations-product-card:hover .creations-overlay {
    opacity: 1;
}

.creations-overlay h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: white;
    text-align: center;
}

.creations-overlay p {
    font-size: 1.1rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    font-weight: 600;
}

/* ========== WISHLIST BUTTON ========== */
.creations-wishlist-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.creations-wishlist-btn .wishlist-btn {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(132, 79, 192, 0.2) !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    gap: 0 !important;
    will-change: transform;
}

/* Desktop: backdrop-filter sur wishlist DÉSACTIVÉ pour perf */
/* @media (min-width: 1024px) {
    .creations-wishlist-btn .wishlist-btn {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
} */

.creations-wishlist-btn .wishlist-btn:hover {
    background: #ff4343 !important;
    border-color: transparent !important;
    transform: scale(1.1) rotate(5deg) !important;
}

.creations-wishlist-btn .wishlist-btn i {
    font-size: 1.2rem !important;
    transition: color 0.3s ease !important;
    color: var(--color-secondary, #844FC0) !important;
}

.creations-wishlist-btn .wishlist-btn:hover i,
.creations-wishlist-btn .wishlist-btn.in-wishlist i {
    color: white !important;
}

.creations-wishlist-btn .wishlist-btn.in-wishlist {
    background: #ff4343 !important;
    border-color: transparent !important;
}

.creations-wishlist-btn .wishlist-text {
    display: none !important;
}

/* ========== FILTRE COMPACT (barre sur une ligne) ========== */
.creations-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(132, 79, 192, 0.18);
    border-radius: var(--radius-lg, 0.6rem);
    padding: 0.65rem 1rem;
    box-shadow: 0 4px 14px 0 rgba(132, 79, 192, 0.08);
    position: relative;
    z-index: 1;
}

.creations-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #844FC0;
    font-size: 0.95rem;
    white-space: nowrap;
}

.creations-filter-select {
    flex: 1 1 220px;
    min-width: 170px;
    max-width: 320px;
    background: white !important;
    border: 1.5px solid rgba(132, 79, 192, 0.2) !important;
    border-radius: var(--radius-md, 0.45rem) !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.92rem !important;
    color: #333 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.creations-filter-select:focus {
    border-color: #844FC0 !important;
    box-shadow: 0 0 0 0.2rem rgba(132, 79, 192, 0.15) !important;
    outline: none;
}

.creations-filter-apply-btn {
    background: linear-gradient(135deg, #844FC0, #FF4365) !important;
    border: none !important;
    color: white !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius-md, 0.45rem) !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    white-space: nowrap;
    box-shadow: 0 3px 10px 0 rgba(132, 79, 192, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.creations-filter-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px 0 rgba(132, 79, 192, 0.38) !important;
}

.creations-filter-count {
    margin-left: auto;
    color: #6b6b6b;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.creations-filter-reset-btn {
    background: transparent !important;
    border: 1.5px solid rgba(132, 79, 192, 0.25) !important;
    color: #844FC0 !important;
    padding: 0.45rem 0.9rem !important;
    border-radius: var(--radius-md, 0.45rem) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.creations-filter-reset-btn:hover {
    background: #844FC0 !important;
    border-color: #844FC0 !important;
    color: white !important;
}

/* Mobile : la barre s'empile proprement, le select prend toute la largeur */
@media (max-width: 575px) {
    .creations-filter-select {
        flex: 1 1 100%;
        max-width: none;
    }
    .creations-filter-apply-btn {
        flex: 1 1 auto;
        text-align: center;
    }
    .creations-filter-count {
        margin-left: 0;
    }
}

/* ========== CARROUSELS MOBILES PAR CATÉGORIE ========== */
.creations-category-section {
    margin-bottom: 3rem;
}

.creations-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #844FC0;
    margin-bottom: 1.25rem;
    padding-left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.creations-category-title i {
    font-size: 1.3rem;
}

.creations-category-title .badge {
    background: linear-gradient(135deg, #844FC0, #FF4365);
    color: white;
    font-size: 0.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Carrousel horizontal scrollable */
.creations-carousel {
    overflow: hidden;
    position: relative;
}

/* Indicateur visuel "plus de contenu à droite" */
.creations-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, white);
    pointer-events: none;
    z-index: 1;
}

@media (min-width: 768px) {
    .creations-carousel::after {
        display: none; /* Désactivé sur desktop */
    }
}

.creations-carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.25rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(132, 79, 192, 0.3) transparent;
}

/* Webkit scrollbar styling */
.creations-carousel-track::-webkit-scrollbar {
    height: 6px;
}

.creations-carousel-track::-webkit-scrollbar-track {
    background: rgba(132, 79, 192, 0.08);
    border-radius: 10px;
}

.creations-carousel-track::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #844FC0, #FF4365);
    border-radius: 10px;
}

.creations-carousel-track::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7341A8, #E63C5D);
}

/* Items du carrousel */
.creations-carousel-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    max-width: 280px;
}

@media (max-width: 480px) {
    .creations-carousel-item {
        flex: 0 0 250px;
        max-width: 250px;
    }
}

.creations-carousel-item .creations-product-card {
    height: 100%;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1023px) {
    .position-relative.py-5.mb-5 {
        margin-top: 160px !important;
    }

    .creations-hero-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 767px) {
    .position-relative.py-5.mb-5,
    .position-relative.py-5.mb-4 {
        margin-top: var(--navbar-offset, 226px) !important;
    }

    .creations-hero-card {
        padding: 1.5rem 1rem;
    }

    .creations-wishlist-btn .wishlist-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .creations-wishlist-btn .wishlist-btn i {
        font-size: 1rem !important;
    }

    .creations-filter-card {
        padding: 1.5rem;
    }

    .creations-filter-apply-btn {
        width: 100%;
        margin-top: 1rem;
    }

    /* Réduire animations sur mobile */
    .creations-product-card:hover {
        transform: translate3d(0, -4px, 0); /* Réduit de -8px à -4px */
    }

    /* Titres de catégorie centrés en mobile */
    .creations-category-title {
        justify-content: center;
        padding-left: 0;
        text-align: center;
    }
}

/* ========== OPTIMISATIONS GPU GLOBALES ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
