/* Custom styles for the Material Request application */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: 600;
}

.card {
    border: none;
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 500;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table-dark th {
    border: none;
}

/* Styles pour le tableau des horaires */
#horaires-table .table {
    margin-bottom: 0;
}

#horaires-table .table td, #horaires-table .table th {
    padding: 0.75rem;
    vertical-align: middle;
}

#horaires-table .form-check {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#horaires-table .form-check-label {
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    margin-left: 0.5rem;
}

#horaires-table .form-check-input:checked + .form-check-label {
    color: #0d6efd;
    font-weight: 600;
}

/* Style pour la section absent */
#absent {
    transform: scale(1.1);
}

.alert-info {
    border-left: 4px solid #0dcaf0;
    background-color: #d1ecf1;
    border-radius: 8px;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0,0,0,0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

.toast {
    border-radius: 8px;
    border: none;
}

/* FullCalendar customizations */
.fc-theme-standard .fc-event {
    border-radius: 6px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fc-theme-standard .fc-event:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.fc-daygrid-event {
    font-size: 0.85em;
    font-weight: 500;
}

/* Loading animation */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.9em;
    }
}

/* Icon enhancements */
.fas, .far {
    opacity: 0.8;
}

/* Success and error states */
.is-valid {
    border-color: #198754;
}

.is-invalid {
    border-color: #dc3545;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Print styles */
@media print {
    .navbar, .btn, .toast-container {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 0.8em;
    }
}

/* Styles pour le suivi des modifications */
.text-addition {
    color: #dc3545 !important; /* Rouge Bootstrap */
    font-weight: 600;
    background-color: rgba(220, 53, 69, 0.1);
    padding: 1px 3px;
    border-radius: 3px;
    display: inline;
}

.text-deletion {
    text-decoration: line-through;
    color: #6c757d !important; /* Gris Bootstrap */
    background-color: rgba(108, 117, 125, 0.1);
    padding: 1px 3px;
    border-radius: 3px;
    display: inline;
    opacity: 0.8;
}

/* Styles pour les éléments modifiés dans les listes */
.modified-field {
    border-left: 3px solid #dc3545;
    padding-left: 8px;
    margin-left: 2px;
}

/* Animation pour attirer l'attention sur les champs modifiés */
@keyframes highlight-change {
    0% { background-color: rgba(220, 53, 69, 0.2); }
    100% { background-color: transparent; }
}

.recently-modified {
    animation: highlight-change 2s ease-out;
}