/* Récapitulatif page specific styles */

.date-selector {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.date-selector label {
    font-weight: 600;
    color: #495057;
}

.date-selector select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 120px;
}

.date-selector select:focus {
    outline: none;
    border-color: #007ca1;
    box-shadow: 0 0 0 2px rgba(0, 124, 161, 0.1);
}

.btn-actualiser {
    background: linear-gradient(135deg, #007ca1, #005f7a);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-actualiser:hover {
    background: linear-gradient(135deg, #005f7a, #004054);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 161, 0.3);
}

.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007ca1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2em;
    color: #007ca1;
    font-weight: 600;
    margin-bottom: 15px;
}

.loading-progress {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007ca1, #00a8d6);
    border-radius: 4px;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 10%; }
    50% { width: 80%; }
    100% { width: 95%; }
}

.recap-table {
    margin: 20px 0;
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.recap-table th {
    background: linear-gradient(135deg, #007ca1, #005f7a);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.recap-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.recap-table tbody tr:hover {
    background-color: #f8f9fa;
}

.employee-name {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    font-weight: 600;
    font-size: 1.1em;
}

.ligne-cp {
    background-color: #e8f5e8 !important;
}

.ligne-recovery {
    background-color: #fff8e1 !important;
}

.ligne-am {
    background-color: #f3e5f5 !important;
}

.ligne-formation {
    background-color: #e3f2fd !important;
}

/* ✅ NOUVEAU : Styles pour les nouveaux types d'absences dynamiques */
.ligne-absence-default {
    background-color: #f8f9fa !important;
}

/* Styles spécifiques pour les nouveaux types d'absences */
.ligne-child_care {
    background-color: #fff3cd !important; /* Jaune clair pour garde d'enfant */
}

.ligne-parental_leave {
    background-color: #f8d7da !important; /* Rose clair pour congé parental */
}

.ligne-medical_visit {
    background-color: #d1ecf1 !important; /* Bleu clair pour visite médicale */
}

.heures-sup-corriges {
    color: #007ca1 !important;
    font-weight: 600;
    font-size: 1.05em;
}

/* ✅ NOUVEAU : Style pour le coefficient et tooltip */
.coeff-display {
    color: #666;
    font-weight: normal;
    margin-left: 5px;
    font-size: 0.9em;
}

.heures-sup-with-tooltip {
    position: relative;
    cursor: help;
}

.heures-sup-with-tooltip:hover .tooltip-majoration {
    display: block;
}

.tooltip-majoration {
    display: none;
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: normal;
    max-width: 200px;
    z-index: 1000;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    line-height: 1.3;
    text-align: center;
}

.tooltip-majoration::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.validation-details {
    background: #f8f9fa;
    border-left: 4px solid #007ca1;
    padding: 12px;
    margin: 8px 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.9em;
    line-height: 1.4;
}

.validation-details.valide {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.validation-details.erreur_signalee {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.validation-details.en_attente {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.validation-valide {
    background-color: #d4edda !important;
    color: #155724 !important;
}

.validation-erreur {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

.validation-attente {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

.validation-aucune {
    background-color: #e2e3e5 !important;
    color: #6c757d !important;
}

.validation-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.btn-historique {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8em;
    transition: background 0.2s;
}

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

.btn-historique-global {
    background: linear-gradient(135deg, #007ca1, #005f7a);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-historique-global:hover {
    background: linear-gradient(135deg, #005f7a, #004054);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 161, 0.3);
    text-decoration: none;
    color: white;
}

@media (max-width: 768px) {
    .date-selector {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .date-selector label {
        margin-bottom: 5px;
    }

    .recap-table {
        font-size: 0.8em;
    }

    .recap-table th,
    .recap-table td {
        padding: 8px;
    }
}
