:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --light-gray: #f4f4f4;
    --soft-bg: #ecf0f1;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: var(--light-gray);
    padding: 0;
    margin: 0;
}

table {
    height: 100%;
    table-layout: fixed;
    width: 100%;
    margin: 20px auto;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

table, th, td {
    border: 1px solid black;
}

th, td {
    padding: 10px;
    text-align: center;
}

th {
    background: #3498db;
    color: white;
}

tr {
    height: 100%; /* Ajuste la hauteur de la ligne du tableau selon tes besoins */
}

td {
    vertical-align: top;
    height: 100%; /* S'assure que la cellule prend la hauteur de la ligne */
}

/* class-cardAjustement global du tableau */
#professorsTable {
table-layout: fixed;
}

#professorsTable th:nth-child(1),
#professorsTable td:nth-child(1) { /* Colonne Nom */
width: 25%;
min-width: 150px;
}

#professorsTable th:nth-child(2),
#professorsTable td:nth-child(2) { /* Colonne Heures */
width: 10%;
min-width: 80px;
}

#professorsTable th:nth-child(3),
#professorsTable td:nth-child(3) {
width: 65%;
min-width: 300px;
padding: 8px;
vertical-align: top; /* Gardez 'top' pour mieux gérer la hauteur */
height: auto;
min-height: 60px;
text-align: center; /* Alignement à gauche pour mieux gérer le contenu */
}

#professorsTable th:nth-child(4),
#professorsTable td:nth-child(4) { /* Colonne Actions */
width: 15%;
min-width: 100px;
}

.dropzone {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 60px; /* Hauteur minimale visible */
    background: #ecf0f1;
}
.actions-cell {
    position: relative; /* Maintient le bouton en place */
    z-index: 2; /* Place au-dessus des autres éléments */
    width: 100px; /* Largeur fixe */
}

.delete-professor-btn {
    position: relative;
    z-index: 3;
    padding: 6px 12px;
    background-color: #3498DB;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-professor-btn:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

#available-tasks {
width: 100%;
margin: 20px auto;
background: white;
padding: 10px;
border: 1px solid black;
}

/* Style spécifique pour les boutons de classe (task) */
.task {
    display: inline-block;
    padding: 5px 5px;
    margin: 5px;
    background-color: var(--primary);
    color: white;
    border-radius: 5px;
    cursor: grab;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s, opacity 0.2s;
    user-select: none;
    border: none;
}
#task-table th:nth-child(3), #task-table td:nth-child(3) {
width: 55%;
}

.task:hover {
    opacity: 0.9;
    background-color: var(--primary-dark);
}

.task:active {
    cursor: grabbing;
    opacity: 0.7;
    transform: scale(1.05);
}

.task-container {
    min-height: 40px;
    background: var(--soft-bg);
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button {
    padding: 10px 15px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: var(--primary-dark);
}

button:focus, .task:focus {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

.alert {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    font-weight: bold;
    margin: 10px auto;
    border-radius: 5px;
}

h1 {
    margin: 20px 0;
    font-size: 2em;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

#task-table {
width: 100%;
border-collapse: collapse;
}

.delete-button {
    color: red;
    cursor: pointer;
    margin-left: 5px;
}

.editable {
    font-weight: 500;
    cursor: pointer;
    margin: 3px 0;
}

#task-list {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: flex-start;
}

#task-list .task {
width: 150px;  /* Ajuste cette largeur selon tes besoins */
margin: 5px;
}

#available-classes {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: flex-start;
border: 2px solid #ccc;
padding: 10px;
margin-top: 20px;
}

.inline-input {
    font-size: 1em;
    padding: 3px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.class-title {
    font-weight: 600;
    color: #111827; /* gris foncé */
}

.class-card {
    display: inline-flex;
    flex-shrink: 0; /* Empêche le rétrécissement */
    align-items: center;
    min-width: 140px; /* Largeur réduite */
    padding: 6px 10px;
    margin: 4px;
    background-color: #3498db;
    color: white; /* Définit la couleur du texte en blanc */
    border-radius: 6px;
    position: relative; /* Pour le positionnement absolu des icônes */
    overflow: visible; /* Pour que les icônes ne soient pas coupées */
}

/* Effet de survol plus sophistiqué */
.class-card:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Effet lors du clic */
.class-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.class-card.assigned {
    box-shadow: none !important;
    border-left: none !important;
    opacity: 1 !important;
    /* Conserver exactement le même style que non-assigné */
}

/* Classes et professeurs assignés */
.professor-card.assigned {
    flex-shrink: 0;
    min-width: 140px; /* Largeur minimale */
    padding: 6px 10px;
    width: calc(25% - 16px); /* Quatre cartes par ligne avec espacement */
    box-sizing: border-box; /* Inclure le padding et la bordure dans la largeur */
}

/* Responsive */
@media (max-width: 768px) {
    .class-card, .class-card.assigned {
        width: calc(50% - 16px); /* Deux cartes par ligne sur les petits écrans */
    }
}

@media (max-width: 480px) {
    .class-card, .class-card.assigned {
        width: 100%; /* Une carte par ligne sur les très petits écrans */
    }
}

/* Style pour le contenu interne */
.class-info {
    flex-grow: 1;
    min-width: 0; /* Permet au text-overflow de fonctionner */
}

/* Nom de la classe */
.class-name {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Heures de la classe */
.class-hours {
    font-size: 16px;
    flex-shrink: 0;
    margin-right: auto; /* Pousse les actions vers la droite */
}

/* Styles de base par catégorie */

.class-card.sixieme, .sixieme-header { background-color: #c1e1c1; } /* Vert très clair */
.class-card.cinquieme, .cinquieme-header { background-color: #a3c9a8; } /* Vert clair */
.class-card.quatrieme, .quatrieme-header { background-color: #69a297; } /* Vert moyen */
.class-card.troisieme, .troisieme-header { background-color: #39603d; } /* Vert foncé */

.class-card.cap { background-color: #e63946; }        /* Rouge corail intense */
.class-card.seconde { background-color: #2a9d8f; }    /* Vert sarcelle doux */
.class-card.premiere { background-color: #f4a261; }   /* Orange sable chaud */
.class-card.terminale { background-color: #e76f51; }  /* Terre cuite vive */
.class-card.autre { background-color: #6a4c93; }      /* Violet profond */

/* Version "attribuée" - plus sombre avec bordure plus nette */
.class-card.cap.assigned { background-color: #e63946; }        /* Rouge foncé */
.class-card.seconde.assigned { background-color: #2a9d8f; }    /* Sarcelle foncé */
.class-card.premiere.assigned { background-color: #f4a261; }   /* Orange brûlé */
.class-card.terminale.assigned { background-color: #e76f51; }  /* Brique foncée */
.class-card.autre.assigned { background-color: #6a4c93; }      /* Violet minéral */

/* Couleurs des en-têtes */
.cap-header { background-color: #e63946; }
.seconde-header { background-color: #2a9d8f; }
.premiere-header { background-color: #f4a261; }
.terminale-header { background-color: #e76f51; }
.autre-header { background-color: #6a4c93; }

/* Hover states */
.class-card:hover {
    filter: brightness(110%);
    transform: translateY(-2px);
}

/* Styles pour le tri */
th[onclick] {
    cursor: pointer;
    position: relative;
    padding-right: 25px;
    user-select: none;
}

th[onclick]:hover {
    background-color: rgba(0,0,0,0.05);
}

th[onclick]::after {
    content: "↕";
    position: absolute;
    right: 8px;
    opacity: 0.5;
    font-size: 12px;
}

th.sorted-asc::after {
    content: "↑";
    opacity: 1;
}

th.sorted-desc::after {
    content: "↓";
    opacity: 1;
}

/* Animation pour le tri */
@keyframes fadeIn {
    from { opacity: 0.5; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

#professorsList tr {
animation: fadeIn 0.3s ease-out;
}

.cap-header { background-color: #e63946; }
.seconde-header { background-color: #2a9d8f; }
.premiere-header { background-color: #f4a261; }
.terminale-header { background-color: #e76f51; }
.autre-header { background-color: #6a4c93; }

/* Styles pour le color picker */

/* Supprimez le style .color-picker-btn flottant et ajoutez : */
.category-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.color-btn, .reset-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.color-btn {
    background-color: #9b59b6;
    color: white;
}

.reset-btn {
    background-color: #e74c3c;
    color: white;
}

/* Adaptez la modale pour qu'elle reste centrée */
.color-picker-modal {
    display: none; /* Assurez-vous que la modale est masquée par défaut */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.modal-hidden {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.centered-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Espace entre les boutons */
    margin-top: 20px; /* Marge pour espacer du contenu précédent */
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.modal.closing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.color-options {
    margin: 20px 0;
}

.color-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.color-picker-button {
    padding: 8px 15px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Styles pour le tri des catégories */
.class-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.no-classes-message {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.class-category {
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
}

.class-category-header {
    font-weight: bold;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    color: white;
    display: inline-block;
}

.classes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Icône de suppression */
.delete {
    font-size: 16px;
    font-weight: bold;
    color: #ffebee;
    margin-left: 8px;
    transition: color 0.2s;
}

.delete:hover {
    color: #ff6b6b;
}

/* Style général pour les cartes de classes et professeurs */
.class-card, .professor-card {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 110px;
    height: 35px;
    margin: 4px;
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Ajout de l'hover effect */
.class-card:hover, .professor-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Contenu des cartes */
.class-info, .professor-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    font-size: 14px;
    width: 100%;
    font-family: Arial, sans-serif;
    color: white;
}

/* Nom de la classe ou du professeur */
.class-name, .professor-name {
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Heures de la classe */
.class-hours {
    font-size: 15px;
    color: #dbe7f2;
}

/* Suppression de la classe */
.delete {
    font-size: 14px;
    color: #e74c3c;
    cursor: pointer;
    margin-left: 5px;
}

/* Drag and drop */
.class-card.dragging, .professor-card.dragging {
    opacity: 0.5;
}

/* Classes disponibles, présentées côte à côte */
#availableClassesList h4 {
margin: 15px 0 5px 0;
padding-bottom: 3px;
border-bottom: 1px solid #3498db;
color: #2c3e50;
font-size: 1.1em;
}

/* Encadré pour la section "Classes disponibles" */
#availableClassesSection {
margin-top: 20px;
padding: 10px;
border: 2px solid #3498db;
border-radius: 5px;
background-color: #f1f1f1;
}

.professor-classes {
    display: inline-flex; /* Changement crucial */
    flex-wrap: wrap;
    gap: 8px;               /* Espacement entre les cartes */
    align-items: center;    /* Alignement vertical au centre */
    padding: 8px;           /* Marge intérieure */
    width: 100%;            /* Prendre toute la largeur */
    min-height: 60px;       /* Hauteur minimale */
    white-space: normal; /* Permet le retour à la ligne */

}

#professorsTable td:first-child {
word-break: break-word;
white-space: normal;
padding-right: 15px; /* Espace supplémentaire */
}

/* Style pour les noms de professeurs éditables */
.professor-name {
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
    display: inline-block;
}

.professor-name:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.edit-input {
    padding: 5px;
    border: 1px solid #3498db;
    border-radius: 3px;
    width: 90%;
    font-size: inherit;
    font-family: inherit;
}

/* Style pour les professeurs en surcharge */
#professorsTable tr.overload-warning {
background-color: #ffebee; /* Rouge très clair */
}

#professorsTable tr.overload-warning td {
border-color: #ef9a9a; /* Bordure rouge clair */
}
#professorsTable tr {
height: auto; /* La hauteur s'adapte au contenu */
}

#professorsTable td {
vertical-align: middle; /* Centrage vertical */
}

/* Animation subtile pour attirer l'attention */
@keyframes pulseWarning {
    0% { background-color: #ffebee; }
    100% { background-color: #ffcdd2; }
}

/* Conservez aussi votre ancien style pour les heures */
.over-limit {
    color: #c62828;
    font-weight: bold;
}

/* Centrage vertical pour toutes les cellules */
#professorsTable td {
vertical-align: middle;
}

/* Centrage général pour toutes les cellules */
#professorsTable td {
vertical-align: middle;  /* Centre verticalement */
text-align: center;     /* Centre horizontalement */
padding: 10px;
display: table-cell;    /* Rétablit le comportement natif des cellules */
}

/* Correction spécifique pour la colonne des classes */
#professorsTable td.professor-classes {
text-align: left; /* Alignement à gauche du contenu */
vertical-align: middle;
}

/* Formulaire pour ajouter un professeur ou une classe */
.add-section button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.add-section button:hover {
    background-color: #2980b9;
}

/* Animation pour le drag and drop */
.class-card.drop-over, .professor-card.drop-over {
    border: 2px dashed #00796b;
    background-color: #e0f2f1;
}

/* Conteneur des actions */
.class-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Style des icônes */
/* Icônes plus visibles */
.duplicate-icon, .delete-icon {
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.2);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duplicate {
    background-color: rgba(255,255,255,0.2);
    color: white;
}

.delete {
    background-color: rgba(255,255,255,0.2);
    color: #ff6b6b;
}

/* Icône Dupliquer */
.duplicate-icon {
    background-color: #f1c40f; /* Jaune vif */
    color: #2c3e50;
}

/* Icône Supprimer */
.delete-icon {
    background-color: #e74c3c; /* Rouge vif */
    color: white;
}

/* Effets au survol */
.duplicate-icon:hover, .delete-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Version SVG encore plus visible */
.class-card svg {
    width: 16px;
    height: 16px;
    pointer-events: none; /* Important pour le drag and drop */
}

/* Effet de pulse pour attirer l'attention */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.class-card:hover .duplicate-icon,
.class-card:hover .delete-icon {
    animation: pulse 1.5s infinite;
}

/* Ombre portée au survol */
.class-card:hover .duplicate-icon {
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.4);
}

.class-card:hover .delete-icon {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.4);
}

.duplicate:hover {
    background-color: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.delete:hover {
    background-color: #c0392b;
    transform: scale(1.1);
}

/* Adaptation de la carte pour inclure les actions */

/* Icônes positionnées absolument */
.card-icon {
    position: absolute;
    cursor: pointer;
    font-size: 12px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s;
}

.card-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Positionnement spécifique */
.duplicate-icon {
    top: 2px;
    right: 2px;
    color: #ffffff;
}

.delete-icon {
    bottom: 2px;
    right: 2px;
    color: #ff9e9e;
}
/* Version pour les cartes attribuées */
.delete-icon.assigned {
    color: #ffcccc;
    font-size: 14px;
}

/* Contenu principal */
.class-info {
    display: flex;
    flex: 1;
    gap: 6px;
    font-size: 14px;
}

/* Style pour le drag and drop */
.class-card.dragging {
    opacity: 0.5;
}

/* Animation au survol de l'élément à déplacer */
.class-card.drop-over {
    border: 2px dashed #00796b;
    background-color: #e0f2f1;
}

/* Style pour la section Controls */
/* Conteneur principal */
.controls {
    margin: 20px 0;
}

/* Bouton Réinitialisation */
button.reset {
    background-color: #e74c3c; /* Rouge vif */
    margin-left: 10px;
}

button.reset:hover {
    background-color: #c0392b;
}

/* Supprime la bordure du dernier élément */
.add-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Style pour les inputs dans la section controls */
.controls input {
    padding: 8px;
    margin-right: 10px;
    border: 1px solid #3498db;
    border-radius: 4px;
}

.controls button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

/* Conteneur principal */
.add-sections-container {
    display: flex;
    gap: 20px; /* Ajustez l'espace entre les sections si nécessaire */
    flex-wrap: wrap; /* Permettre le retour à la ligne si nécessaire */
    justify-content: space-between; /* Alignement des sections */
    margin-top: 20px;
}

/* Sections sans bordure */
.add-section {
    flex: 1 !important; /* Permet aux sections de prendre une largeur égale */
    min-width: 300px; /* Largeur minimale pour éviter un rétrécissement excessif */
    padding: 15px;
    border-radius: 8px;
    background-color: #F1F1F1;
}

.add-section button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-section button:hover {
    background-color: #2980b9;
}

/* Responsive */
@media (max-width: 700px) {
    .add-sections-container {
        flex-direction: column;
    }
    .add-section {
        width: 100%;
    }
}

/* Conteneur principal */
.controls {
    margin: 20px 0;
}

.controls {
    margin: 20px 0;
}

/* Section Professeur (réduite) */
.professor-section {
    width: 250px; /* Largeur fixe réduite */
    flex: 0 0 auto; /* Empêche l'expansion */
}

/* Section Classe (prend le reste) */
.class-section {
    flex: 0.7; /* 70% de l'espace */
    min-width: 300px;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Groupes d'inputs */
.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.input-group input {
    padding: 8px 12px;
    border-radius: 4px;
    flex: 1;
    min-width: 120px;
}

.input-group button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.input-group button:hover {
    background-color: #2980b9;
}

/* Responsive */
@media (max-width: 700px) {
    .add-section {
        min-width: 100%;
    }
}

.controls button:hover {
    background-color: #2980b9;
}

.overload {
    background-color: #fdd !important;
    font-weight: bold;
}

/* Version mobile */
@media (max-width: 600px) {
    .actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .file-upload-wrapper,
    .actions button {
        width: 100%;
        max-width: 250px;
    }
}

.import-btn {
    padding: 10px 15px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-btn:hover {
    background-color: #27ae60;
}

.import-btn i {
    font-size: 0.9em;
}

/* Sur mobile, empiler les boutons */
@media (max-width: 600px) {
    .actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Section Tutoriel */
.tutorial-section {
    background-color: #ffffff;
    padding: 1rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: sans-serif;
    max-width: 700px;
    margin: 1rem auto;
    color: #000;
    text-align: left;
}

.tutorial-section h2 {
    margin-top: 0;
    font-size: 1.4rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
}

.tutorial-section ol {
    padding-left: 1.2rem;
    margin-top: 1rem;
}

.tutorial-section ol li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.tutorial-section strong {
    font-weight: bold;
    color: #222;
}

.tutorial-section .button-ref {
    font-weight: 600;
    color: #1e40af; /* Bleu plus soutenu, mais doux */
    background-color: #e0ecff; /* Bleu pâle pour cohérence */
    padding: 0.25rem 0.5rem; /* Plus respirant mais compact */
    border-radius: 1rem; /* Coin bien arrondi */
    white-space: nowrap;
    font-size: 0.875rem; /* texte base ou sm selon usage */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* ombre légère */
    transition: background-color 0.2s ease;
}

.tutorial-section .button-ref:hover {
    background-color: #d0e4ff;
    color: #1d4ed8;
}

/* Pied de page */
footer {
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
    color: #7f8c8d;
    text-align: left;
    line-height: 1.6;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    table, .task-container, .container {
        width: 100%;
        overflow-x: auto;
    }

    .task {
        display: block;
        width: 100%;
    }

    #task-table th:nth-child(3) {
    width: auto;
    }
}

/* Conteneur principal */
.sections-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    padding: 0 20px;
}
/* Conteneur principal */
.sections-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    padding: 0 20px;
}

/* Section de boutons */
.button-section {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Titre de section */
.section-title {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-align: center;
}

/* Groupe de boutons */
.button-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

/* Style de base des boutons */
.custom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    min-width: 220px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: white;
}

/* Styles spécifiques */
.balance-btn { background-color: #9b59b6; }
.reset-btn { background-color: #e74c3c; }
.import-btn { background-color: #2ecc71; }
.export-btn { background-color: #3498db; }

/* Effets au survol */
.custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    opacity: 0.9;
}

/* Version mobile */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
        align-items: center;
    }

    .custom-btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Style spécifique pour le bouton d'import */
.file-upload-wrapper {
    display: flex;
    justify-content: center;
}

/* Ajouts pour les nouvelles fonctionnalités */
th[onclick] {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}
th[onclick]:hover {
    background-color: rgba(0,0,0,0.1);
}
th[onclick]::after {
    content: "↕";
    position: absolute;
    right: 5px;
    opacity: 0.5;
    font-size: 0.8em;
}
th[onclick].sorted-asc::after {
    content: "↑";
    opacity: 1;
}
th[onclick].sorted-desc::after {
    content: "↓";
    opacity: 1;
}

.export-options {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.balance-btn {
    background-color: #27ae60;
    color: white;
}
.balance-btn:hover {
    background-color: #219653;
}

/* Styles pour le mode collaboratif */
.collab-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    background: #3498db;
    color: white;
    border-radius: 3px;
    font-size: 0.8em;
}

/* Styles pour la sélection par clic */
.selection-feedback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: fadeIn 0.3s ease-out;
}

.selection-feedback.hidden {
    display: none;
}

.cancel-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.class-card.selected {
    outline: 3px solid #3498db;
    transform: scale(1.03);
}

.professor-classes.dropzone.highlight {
    background: rgba(52, 152, 219, 0.1);
    box-shadow: inset 0 0 0 2px #3498db;
}

/* Bouton flottant */
#help-floating-btn {
position: fixed;
bottom: 30px;
right: 30px;
background: #3498db;
color: white;
padding: 12px 20px;
border-radius: 50px;
cursor: pointer;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
z-index: 999;
display: flex;
align-items: center;
gap: 10px;
transition: all 0.3s;
font-weight: bold;
}

#help-floating-btn:hover {
background: #2980b9;
transform: translateY(-3px);
box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

#help-floating-btn span {
font-size: 1.2em;
}

/* Panneau d'aide */
#help-panel {
position: fixed;
bottom: 80px;
right: 30px;
width: 350px;
max-height: 60vh;
background: white;
border-radius: 10px;
box-shadow: 0 5px 25px rgba(0,0,0,0.2);
z-index: 1000;
overflow: hidden;
display: none;
flex-direction: column;
border: 1px solid #e0e0e0;
}

.help-header {
    padding: 15px;
    background: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-header h2 {
    margin: 0;
    font-size: 1.2em;
}

.close-help {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 5px;
}

.help-content {
    padding: 20px;
    overflow-y: auto;
    text-align: left;
}

.help-section {
    margin-bottom: 25px;
}

.help-section h3 {
    color: #2c3e50;
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.9em;
}

.help-table th, .help-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.help-table th {
    background-color: #f8f9fa;
}

.color-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.code-example {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
    overflow-x: auto;
}

.code-example pre {
    margin: 0;
    font-family: monospace;
    font-size: 0.9em;
}

.file-formats {
    display: flex;
    gap: 15px;
    margin: 10px 0;
}

.format {
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
}

kbd {
    background-color: #eee;
    border-radius: 3px;
    border: 1px solid #b4b4b4;
    padding: 2px 5px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 600px) {
    #help-panel {
    width: 90%;
    right: 5%;
    bottom: 70px;
    }
}
.category-config-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.category-list {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 20px;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.category-item:hover {
    background-color: #f0f0f0;
}

.category-name, .category-color, .category-keywords {
    margin-right: 10px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.category-name {
    flex: 2;
}

.category-keywords {
    flex: 3;
}

.category-actions {
    margin-left: auto;
}

.delete-category-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-category-btn:hover {
    background-color: #c0392b;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.save-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.save-btn:hover {
    background-color: #27ae60;
}

.cancel-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-btn:hover {
    background-color: #7f8c8d;
}

.add-category-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
}

.add-category-btn:hover {
    background-color: #2980b9;
}

.new-category {
    animation: highlight 1.5s ease-out;
    border-left: 3px solid #3498db;
}

@keyframes highlight {
    0% { background-color: #d6eaf8; }
    100% { background-color: #f9f9f9; }
}

.color-sample {
    border: 1px solid #ddd;
    border-radius: 4px;
}

.class-card, .cap-header, .seconde-header, .premiere-header, .terminale-header, .autre-header {
    color: white; /* Définit la couleur du texte en blanc */
}


/* Ajouter à votre feuille de style */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    .add-sections-container {
        flex-direction: column;
    }

    .add-section {
        width: 100%;
        margin-bottom: 15px;
    }

    .professor-classes {
        padding: 5px;
    }

    #professorsTable th, #professorsTable td {
    padding: 8px 5px;
    }

    #professorsTable th:nth-child(3),
    #professorsTable td:nth-child(3) {
    min-width: 200px;
    }

    .custom-btn {
        min-width: unset;
        width: 100%;
