/* Styles pour la page d'administration */

/* Sections Admin */
.admin-section {
    padding: 60px 0;
}

.admin-section h2 {
    margin-bottom: 30px;
    color: #1f2937;
}

/* Formulaires */
.admin-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4b5563;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Boutons */
.btn {
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #d1d5db;
    color: #4b5563;
}

.btn-outline:hover {
    border-color: #9ca3af;
    color: #1f2937;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-actions {
    margin-bottom: 20px;
}

/* Table des outils */
.tools-table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 20px;
}

.tools-table {
    width: 100%;
    border-collapse: collapse;
}

.tools-table th,
.tools-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.tools-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #4b5563;
}

.tools-table tbody tr:hover {
    background-color: #f9fafb;
}

.tools-table td img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #4b5563;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: #2563eb;
}

.action-btn.delete:hover {
    color: #ef4444;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.confirm-modal-content {
    max-width: 400px;
    padding: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #1f2937;
}

/* Image preview */
.image-upload-container {
    display: flex;
    flex-direction: column;
}

.image-preview {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

/* Messages */
.error-message {
    color: #ef4444;
    margin-top: 10px;
    font-size: 0.9rem;
}

.feedback-message {
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 0.9rem;
}

.feedback-message.success {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.feedback-message.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    background-color: #1f2937;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(10px);
    opacity: 0;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    background-color: #047857;
}

.notification.error {
    background-color: #b91c1c;
}

/* Utilitaires */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .tools-table {
        display: block;
        overflow-x: auto;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}