/**
 * Mes Services - Page Styles
 * Gestion, création et marketplace de services professionnels
 */

body {
    background-color: #f5f5f5;
}

.services-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.services-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.services-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: bold;
}

.services-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

.header-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat-box {
    background: rgba(255,255,255,0.2);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* Onglets principaux */
.main-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.main-tab {
    flex: 1;
    padding: 1rem 2rem;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.main-tab:hover {
    background: #e5e7eb;
}

.main-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Actions rapides */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 200px;
    padding: 1.5rem;
    background: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.action-btn i {
    font-size: 2rem;
}

.action-btn.create {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.action-btn.discover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.action-btn.stats {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.action-btn-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.action-btn-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Section de contenu */
.content-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
}

/* Grille de services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Carte service */
.service-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.service-thumbnail {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.service-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.service-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
}

.service-price {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.service-content {
    padding: 1.5rem;
}

.service-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.service-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.service-provider {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.service-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

.service-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.service-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.service-rating-text {
    color: #6b7280;
    font-size: 0.9rem;
}

.stars {
    color: #fbbf24;
}

.service-footer {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.service-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.service-btn.primary {
    background: #667eea;
    color: white;
}

.service-btn.primary:hover {
    background: #5568d3;
}

.service-btn.secondary {
    background: #f3f4f6;
    color: #1f2937;
}

.service-btn.secondary:hover {
    background: #e5e7eb;
}

.btn-new-service {
    flex: none;
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

/* Section suggestions */
.suggestions-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.suggestions-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Section statistiques */
.stats-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    color: #6b7280;
    font-size: 0.9rem;
}

.stat-card-trend {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

/* Graphique */
.chart-container {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.chart-title {
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
}

.chart-placeholder {
    height: 300px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    border: 2px dashed #e5e7eb;
}

.chart-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.empty-state-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

.empty-state-btn:hover {
    transform: scale(1.05);
}

/* Bouton flottant */
.btn-create-service {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
}

.btn-create-service:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Modal création de service */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header-custom h2 {
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

.modal-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-group label i {
    color: #667eea;
    width: 16px;
    text-align: center;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-footer-custom {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 15px 15px;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.modal-btn.cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.modal-btn.cancel:hover {
    background: #e5e7eb;
}

.modal-btn.submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modal-btn.submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.toast-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.success {
    background: #10b981;
    color: white;
}

.toast-notification.error {
    background: #ef4444;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .services-header h1 {
        font-size: 1.75rem;
    }

    .header-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .main-tabs {
        flex-direction: column;
    }

    .quick-actions {
        flex-direction: column;
    }

    .action-btn {
        min-width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-footer-custom {
        flex-direction: column;
    }

    .modal-btn {
        justify-content: center;
    }
}
