/**
 * Styles pour le système de recommandations
 */

/* Section générale des recommandations */
.recommendations-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.recommendations-section h3 {
    color: #2c5530;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recommendations-section h3 i {
    color: #28a745;
}

/* Section des traitements */
.treatment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.treatment-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    border-top: 3px solid #28a745;
}

.treatment-card.natural {
    border-top-color: #28a745;
}

.treatment-card.chemical {
    border-top-color: #ffc107;
}

.treatment-card.preventive {
    border-top-color: #17a2b8;
}

.treatment-card h4 {
    color: #2c5530;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.treatment-card p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.treatment-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.treatment-card.chemical .treatment-badge {
    background: #ffc107;
    color: #333;
}

.treatment-card.preventive .treatment-badge {
    background: #17a2b8;
}

/* Section des produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-header {
    padding: 15px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-header h4 {
    margin: 0;
    font-size: 1.1em;
}

.product-price {
    font-weight: bold;
    font-size: 1.2em;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

.product-description {
    padding: 15px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.product-actions {
    padding: 15px;
    border-top: 1px solid #eee;
}

/* Section des services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.service-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
}

.service-header {
    padding: 15px;
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-header h4 {
    margin: 0;
    font-size: 1.1em;
}

.service-price {
    font-weight: bold;
    font-size: 1.1em;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

.service-description {
    padding: 15px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.service-duration {
    padding: 0 15px;
    color: #888;
    font-size: 0.9em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.service-actions {
    padding: 15px;
    border-top: 1px solid #eee;
}

/* Section de personnalisation */
.personalization-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left-color: #6f42c1;
}

.personalization-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
}

.personalization-message {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    margin-bottom: 15px;
}

.personalization-tips h4 {
    color: #6f42c1;
    margin-bottom: 10px;
}

.expertise-level {
    margin-top: 15px;
}

.level-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: capitalize;
}

.level-badge.level-debutant {
    background: #d4edda;
    color: #155724;
}

.level-badge.level-intermediaire {
    background: #fff3cd;
    color: #856404;
}

.level-badge.level-expert {
    background: #f8d7da;
    color: #721c24;
}

/* Section des liens */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: white;
    color: #28a745;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid #28a745;
    transition: all 0.2s ease;
}

.category-link:hover {
    background: #28a745;
    color: white;
    text-decoration: none;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: #28a745;
    color: white;
}

.btn-primary:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
}

.btn-disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Formulaire de profil */
.profile-form-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.profile-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c5530;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #28a745;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-actions {
    margin-top: 25px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #28a745;
    color: #155724;
}

.notification-error {
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.notification-info {
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.notification i {
    font-size: 1.2em;
}

/* Responsive */
@media (max-width: 768px) {
    .treatment-cards,
    .products-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .product-header,
    .service-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .recommendations-section {
        margin: 15px 0;
        padding: 15px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

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

.recommendations-section {
    animation: fadeInUp 0.5s ease;
}

.product-card,
.service-card {
    animation: fadeInUp 0.5s ease;
}

/* États de chargement */
.loading-recommendations {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-recommendations i {
    font-size: 2em;
    color: #28a745;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}