/* 🎨 Styles SPA Navigation - Barre de Progression */

/* ===================== */
/* BARRE DE PROGRESSION   */
/* ===================== */

.no-products-message {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
    font-size: 18px;
}

#spa-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #8338ec, #ff006e);
    width: 0%;
    opacity: 0;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    animation: progressPulse 1s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    }
    50% { 
        box-shadow: 0 0 20px rgba(0, 212, 255, 1);
    }
}

/* ===================== */
/* BOUTON "VOIR PLUS"    */
/* ===================== */

#load-more-btn {
    grid-column: 1 / -1;
    padding: 15px 40px;
    background: linear-gradient(135deg, #00d4ff 0%, #8338ec 50%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 2rem auto 0;
    width: fit-content;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

#load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

#load-more-btn:active {
    transform: translateY(0);
}

#load-more-btn i {
    transition: transform 0.3s ease;
}

#load-more-btn:hover i {
    transform: translateY(3px);
}

/* ===================== */
/* INDICATEUR CHARGEMENT */
/* ===================== */

#products-loader {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#products-loader p {
    color: #b0b0b0;
    font-weight: 500;
}

/* ===================== */
/* CUSTOM SELECT DROPDOWN */
/* ===================== */

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-button {
    width: 100%;
    padding: 14px 45px 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-light, #ffffff);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    z-index: 10;
}

.custom-select-button::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color, #00d4ff);
    font-size: 0.8rem;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select-button.open::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-button:focus {
    outline: none;
    border-color: var(--primary-color, #00d4ff);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.custom-select-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--darker-bg, #050505);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 5px;
    max-height: 0;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.custom-select-dropdown.open {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Scrollbar pour dropdown */
.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary-color, #00d4ff);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color, #8338ec);
}

.custom-select-option {
    padding: 12px 20px;
    color: var(--text-light, #ffffff);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color, #00d4ff);
    padding-left: 25px;
}

.custom-select-option.selected {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary-color, #00d4ff);
    font-weight: 500;
}

.custom-select-option.selected::before {
    content: '✓';
    position: absolute;
    left: 15px;
    color: var(--primary-color, #00d4ff);
    font-weight: bold;
}

/* ===================== */
/* MESSAGE D'ERREUR      */
/* ===================== */

.error-message {
    grid-column: 1 / -1;
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid #ff006e;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ff006e;
}

.error-message i {
    font-size: 1.5rem;
}

.error-message p {
    margin: 0;
}

/* ===================== */
/* ANIMATIONS           */
/* ===================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease-out forwards;
}
