/**
 * Edit Service - Page Styles
 * Création et modification de services
 */

body {
    background-color: #f5f5f5;
}

.edit-service-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: white;
}

.edit-service-header h1 {
    margin: 0 0 0.4rem 0;
    font-size: 2rem;
    font-weight: bold;
}

.edit-service-header p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Alertes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 500;
}

.alert i {
    margin-top: 0.15rem;
    font-size: 1.1rem;
}

.alert ul {
    margin: 0;
    padding-left: 1.2rem;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Carte formulaire */
.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-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;
}

/* Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.2s;
}

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

.btn-submit {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Image de couverture (intégrée au formulaire) */
.image-section {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.image-section-label {
    font-weight: 600;
    color: #374151;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.image-section-label i {
    color: #667eea;
}

.image-current {
    margin-bottom: 0.75rem;
}

.image-current img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    object-fit: cover;
    display: block;
}

.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #667eea;
    background: #f5f3ff;
}

.upload-zone i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.4rem;
    display: block;
}

.upload-zone p {
    margin: 0 0 0.25rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.upload-zone span {
    font-size: 0.8rem;
    color: #9ca3af;
}

.upload-zone input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.upload-preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.btn-delete-image {
    padding: 0.5rem 1rem;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s;
    margin-right: auto;
}

.btn-delete-image:hover {
    background: #fee2e2;
}

/* Responsive */
@media (max-width: 768px) {
    .edit-service-container {
        padding: 1rem 0.5rem;
    }

    .edit-service-header {
        padding: 1.5rem;
    }

    .edit-service-header h1 {
        font-size: 1.5rem;
    }

    .form-body {
        padding: 1.25rem;
    }

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

    .form-actions {
        flex-direction: column;
        padding: 1rem 1.25rem;
    }

    .btn-cancel,
    .btn-submit {
        justify-content: center;
    }
}
