/* css/favoris.css - Styles pour la page des favoris */

.favorites-header {
    max-width: 1440px;
    margin: 2rem auto 1rem;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.favorites-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #121212;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.favorites-count-badge {
    background: #f0f0f0;
    color: #121212;
    font-size: 1.2rem;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-weight: 600;
}

.clear-favorites-btn {
    background: none;
    border: 2px solid #ff3b5c;
    color: #ff3b5c;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-favorites-btn:hover {
    background: #ff3b5c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 59, 92, 0.3);
}

.clear-favorites-btn:active {
    transform: translateY(0);
}

/* Conteneur des favoris */
.favorites-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    min-height: 400px;
}

/* Grille des favoris */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Carte produit dans les favoris */
.favorite-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 20px -8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
    position: relative;
    animation: cardAppear 0.5s ease forwards;
}

.favorite-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 40px -15px rgba(0,0,0,0.2);
}

.favorite-card .img-wrapper {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f0f0f0;
}

.favorite-card .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.favorite-card:hover .img-wrapper img {
    transform: scale(1.08);
}

/* Badge "Favori" */
.favorite-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 59, 92, 0.9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10;
    backdrop-filter: blur(4px);
    border: 2px solid white;
}

/* Bouton de suppression individuelle */
.remove-favorite-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ff3b5c;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 10;
    backdrop-filter: blur(4px);
    border: 2px solid white;
}

.remove-favorite-btn:hover {
    background: #ff3b5c;
    color: white;
    transform: scale(1.1) rotate(90deg);
}

.remove-favorite-btn:active {
    transform: scale(0.9);
}

/* Infos produit */
.favorite-card .product-info {
    padding: 1.2rem 1rem 1.5rem;
    background: white;
}

.favorite-card .product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.favorite-card .product-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0.3rem 0;
    line-height: 1.3;
    color: #121212;
}

.favorite-card .product-price {
    font-weight: 700;
    font-size: 1.3rem;
    color: #121212;
    margin-bottom: 1rem;
}

/* Bouton commander */
.favorite-card .order-btn {
    background: #121212;
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.8rem 0;
    border-radius: 50px;
    width: 100%;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #121212;
}

.favorite-card .order-btn:hover {
    background: white;
    color: #121212;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.favorite-card .order-btn i {
    font-size: 1.1rem;
}

/* État vide - Version améliorée */
.empty-favorites {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    animation: fadeIn 0.5s ease;
    max-width: 500px;
    margin: 2rem auto;
}

.empty-favorites i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-favorites h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 8px;
}

.empty-favorites p {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.empty-favorites .browse-btn {
    background: #121212;
    color: white;
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 1px solid #121212;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.empty-favorites .browse-btn i {
    font-size: 0.9rem;
    color: white;
    margin: 0;
}

.empty-favorites .browse-btn:hover {
    background: white;
    color: #121212;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.empty-favorites .browse-btn:hover i {
    color: #121212;
}

.empty-favorites .browse-btn:active {
    transform: translateY(0);
}

/* Responsive pour très petits écrans */
@media (max-width: 480px) {
    .empty-favorites {
        padding: 40px 15px;
        margin: 1rem auto;
    }
    
    .empty-favorites i {
        font-size: 3rem;
    }
    
    .empty-favorites h2 {
        font-size: 1.2rem;
    }
    
    .empty-favorites p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .empty-favorites .browse-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Option alternative - bouton plus compact */
.empty-favorites .browse-btn.compact {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

/* Loader */
.favorites-loader {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.favorites-loader .loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #121212;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.favorites-loader .loader-text {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Toast personnalisé */
.favorite-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #1e1e1e;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 60px;
    font-weight: 500;
    box-shadow: 0 15px 30px -10px black;
    z-index: 200;
    transform: translateY(150%);
    opacity: 0;
    transition: 0.3s;
    border: 1px solid #3d3d3d;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.favorite-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.favorite-toast i {
    color: #4CAF50;
    font-size: 1.2rem;
}

/* Mode confirmation */
.favorite-toast.warning i {
    color: #ff3b5c;
}

/* Modal de confirmation */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.confirm-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.confirm-modal-content {
    background: white;
    border-radius: 30px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: modalAppear 0.3s ease;
}

.confirm-modal-content i {
    font-size: 4rem;
    color: #ff3b5c;
    margin-bottom: 1rem;
}

.confirm-modal-content h3 {
    font-size: 1.5rem;
    color: #121212;
    margin-bottom: 1rem;
}

.confirm-modal-content p {
    color: #666;
    margin-bottom: 2rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.modal-btn.confirm {
    background: #ff3b5c;
    color: white;
}

.modal-btn.confirm:hover {
    background: #e62e4d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 59, 92, 0.3);
}

.modal-btn.cancel {
    background: #f0f0f0;
    color: #333;
}

.modal-btn.cancel:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* Animations */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1200px) {
    .favorites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .favorites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .favorites-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .favorites-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 1rem;
    }
    
    .favorites-header h1 {
        font-size: 1.3rem;
        width: 100%;
        justify-content: space-between;
    }
    
    .clear-favorites-btn {
        width: 100%;
        justify-content: center;
    }
    
    .favorites-container {
        padding: 0 1rem 2rem;
    }
    
    .favorites-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .favorite-card .product-title {
        font-size: 0.9rem;
    }
    
    .favorite-card .product-price {
        font-size: 1.1rem;
    }
    
    .favorite-badge,
    .remove-favorite-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .favorites-grid {
        grid-template-columns: 1fr;
    }
    
    .favorites-count-badge {
        font-size: 1rem;
    }
}