/**
 * Styles CSS pour le module de recommandation
 */

.recommendation-container {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recommendation-header {
    text-align: center;
    margin-bottom: 30px;
}

.recommendation-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.recommendation-title .material-icons {
    font-size: 32px;
    color: #007bff;
}

.recommendation-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Loading */
.recommendation-loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grille de produits */
.recommendation-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Carte produit */
.recommendation-product {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.recommendation-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recommendation-product-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recommendation-product-brand {
    font-size: 18px;
    font-weight: 700;
    color: #007bff;
    margin: 0 0 5px 0;
}

.recommendation-product-model {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.recommendation-product-specs {
    flex-grow: 1;
    margin-bottom: 15px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.spec-label {
    color: #666;
}

.spec-value {
    font-weight: 600;
    color: #333;
}

.recommendation-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.recommendation-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #28a745;
}

.price-value {
    font-size: 24px;
}

.recommendation-product-score {
    display: flex;
    align-items: center;
    gap: 5px;
}

.score-label {
    font-size: 12px;
    color: #666;
}

.score-value {
    font-size: 16px;
    font-weight: 700;
    color: #007bff;
    background: #e7f3ff;
    padding: 4px 8px;
    border-radius: 4px;
}

.recommendation-product-popularity {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.popularity-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.popularity-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.5s ease;
}

.popularity-text {
    font-size: 12px;
    color: #666;
}

/* Erreur */
.recommendation-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .recommendation-container {
        padding: 20px;
    }

    .recommendation-title {
        font-size: 24px;
    }

    .recommendation-products {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .recommendation-product-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

