/* Style pour le tableau de bord administratif */
.dashboard-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    height: 100%;
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card h3 {
    color: #3b82f6;
    margin-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.dashboard-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e40af;
}

.stat-card .label {
    font-size: 0.9rem;
    color: #6b7280;
}

.seance-table {
    width: 100%;
    border-collapse: collapse;
}

.seance-table th,
.seance-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.seance-table th {
    background-color: #f3f4f6;
    font-weight: 600;
}

.seance-table tr:hover {
    background-color: #f9fafb;
}

.seance-table .actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.badge {
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Styles pour la page de génération des séances */
.form-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.form-title {
    color: #3b82f6;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.form-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h4 {
    margin-bottom: 15px;
    color: #4b5563;
}

.date-range-info {
    background-color: #f3f4f6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.checkbox-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group .form-check {
    background-color: #f3f4f6;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 0;
}

.checkbox-group .form-check-input:checked + .form-check-label {
    font-weight: 600;
    color: #1e40af;
}

/* Styles pour le suivi des présences */
.stats-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-form {
    background-color: #f0f9ff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.filter-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-form .form-group {
    flex: 1;
    min-width: 200px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th, .stats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.stats-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.stats-table tr:hover {
    background-color: #f1f5f9;
}

.presence-bar {
    height: 10px;
    border-radius: 5px;
    background-color: #e2e8f0;
    overflow: hidden;
    width: 100%;
}

.presence-value {
    height: 100%;
    background-color: #3b82f6;
}

.excellent .presence-value {
    background-color: #10b981;
}

.good .presence-value {
    background-color: #3b82f6;
}

.average .presence-value {
    background-color: #f59e0b;
}

.poor .presence-value {
    background-color: #ef4444;
}

.module-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.module-nav-item {
    padding: 10px 20px;
    background-color: #f8fafc;
    border-radius: 5px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.module-nav-item:hover {
    background-color: #e0f2fe;
    color: #1e40af;
}

.module-nav-item.active {
    background-color: #3b82f6;
    color: white;
}

.periode-badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: #e0f2fe;
    color: #1e40af;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Styles pour l'attribution des groupes */
.card-encadrant {
    cursor: move;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card-encadrant .card-body {
    padding: 10px;
    display: flex;
    align-items: center;
}

.card-encadrant img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.card-encadrant.principal {
    border-left: 4px solid #10b981;
}

.card-encadrant.assistant {
    border-left: 4px solid #3b82f6;
}

/* Styles pour indiquer les licenciés */
.card-encadrant[data-source-type="licence"] {
    border-right: 4px solid #06b6d4; /* Couleur cyan pour les licenciés */
}

.badge.bg-info {
    background-color: #06b6d4 !important;
    color: white;
    font-size: 0.7rem;
    padding: 3px 6px;
    border-radius: 4px;
}

.dropzone {
    min-height: 150px;
    padding: 10px;
    margin-bottom: 20px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
}

.dropzone.highlight {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.dropzone.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-style: italic;
}

.groupe-card {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.groupe-header {
    padding: 10px 15px;
    background-color: #4b5563;
    color: white;
    font-weight: 600;
}

.roles-container {
    padding: 15px;
    background-color: white;
}

.role-section {
    margin-bottom: 15px;
}

.role-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
}

/* Style pour les lignes du tableau avec tooltip */
.seance-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.seance-row:hover {
    background-color: #f0f9ff !important;
}

/* Style pour le tooltip Bootstrap */
.tooltip-inner {
    max-width: 300px;
    text-align: left;
    padding: 10px;
    background-color: rgba(255, 183, 0, 1);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Style pour le tooltip qui suit le curseur */
.tooltip-custom .tooltip-inner {
    max-width: 300px;
    min-width: 200px;
    text-align: left;
    padding: 10px;
    background-color: rgba(33, 37, 41, 0.95); /* Couleur de fond */
    color: #ffffff; /* Couleur du texte - modifiez cette valeur */
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Style pour le titre du tooltip (si nécessaire) */
.tooltip-custom .tooltip-inner strong {
    color: #4ade80; /* Couleur pour le texte en gras (comme le titre "Encadrants présents :") */
    font-weight: bold;
}

/* Style amélioré pour les cartes statistiques */
.stats-summary {
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    background-color: #f0f8ff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.5rem;
    color: #0d6efd;
}

.stat-content {
    flex-grow: 1;
}

.stat-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #6c757d;
    font-weight: 500;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #343a40;
}

/* Couleurs spécifiques pour chaque type de statistique */
.stat-card:nth-child(1) .stat-icon i {
    color: #0d6efd; /* Bleu pour le taux */
}

.stat-card:nth-child(2) .stat-icon i {
    color: #6f42c1; /* Violet pour le nombre d'encadrants */
}

.stat-card:nth-child(3) .stat-icon i {
    color: #198754; /* Vert pour les présences */
}

.stat-card:nth-child(4) .stat-icon i {
    color: #dc3545; /* Rouge pour les absences */
}

/* Styles pour indiquer le type de l'encadrant dans les tableaux de stats */
.table .licence-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #06b6d4;
    margin-right: 5px;
}

/* Style pour le badge licencié dans les listes */
.badge-licence {
    background-color: #06b6d4;
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
    display: inline-block;
}

/* Style pour améliorer l'affichage des encadrants dans le tooltip */
.tooltip-custom .encadrant-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.tooltip-custom .encadrant-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.tooltip-custom .encadrant-badge.licence {
    background-color: #06b6d4;
}

.tooltip-custom .encadrant-badge.user {
    background-color: #3b82f6;
}

/* Style pour différencier les licenciés dans les stats */
.stats-table tr[data-type="licence"] td:first-child {
    position: relative;
    padding-left: 20px; /* Ajouter de l'espace pour l'indicateur */
}

.stats-table tr[data-type="licence"] td:first-child::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #06b6d4;
}

/* Style pour les boutons d'action uniformisés */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn {
    height: 100%;
    min-height: 31px; /* Hauteur minimale pour le btn-sm */
    white-space: nowrap;
    flex: 1; /* Permet aux boutons de s'étendre uniformément */
}

/* Assurez-vous que les icônes sont bien alignées verticalement */
.action-buttons .btn i {
    display: inline-flex;
    align-items: center;
}

/* Maintenir l'espace entre les boutons */
.action-buttons .btn.me-2 {
    margin-right: 8px !important;
}

/* Ajustements pour les petits écrans si nécessaire */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        margin-bottom: 4px;
        margin-right: 0 !important;
    }
    
    .action-buttons .btn:last-child {
        margin-bottom: 0;
    }
}

/* -----------------------------------------Styles pour aligner verticalement les boutons --------------------------------------------------*/

.action-buttons-container {
    display: flex;
    align-items: center;  /* Aligne les éléments verticalement au centre */
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action i {
    margin-right: 5px;
}

/* Styles pour l'en-tête avec titre en blanc et icône sans bordure */
.account-heading-with-icon {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 15px;
    color: white;
}

.heading-icon {
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    /* Arrière-plan complètement transparent */
    background-color: transparent;
}

.heading-icon i {
    font-size: 28px;
    color: white;
}

.heading-text h1 {
    color: white !important;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
}

.heading-text p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 400;
}

/* Fix pour la modal de suppression  */
.modal-backdrop {
    z-index: 1040 !important;
}

#deleteConfirmModal {
    z-index: 1055 !important;
}

#deleteConfirmModal .modal-dialog {
    z-index: 1055 !important;
    margin: 1.75rem auto;
}

#deleteConfirmModal .modal-content {
    z-index: 1056 !important;
    position: relative;
}