/* Variables de couleurs */
:root {
    --primary-color: #3f51b5;
    --secondary-color: #ff4081;
    --background-color: #f5f5f5;
    --card-color: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
}

/* Style général */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    font-family: 'Rubik', sans-serif;
}

:is(h1,h2,h3,h4,h5,h6){
    font-family: 'Rubik', sans-serif;
    font-weight: 700!important;
}


/* Layout */
.page-content {
    padding: 24px;
    max-width: 1366px;
    margin: 0 auto;
    width: 100%;
}

.mdl-card, .mdl-card__supporting-text {
    width: 100%;
}

.mdl-card__supporting-text.fullwidth_table {
    padding: 0;
}


/* Header et Navigation */
.mdl-layout__header {
    background-color: var(--primary-color);
}


.mdl-layout__header-row {
    padding: 0 16px 0 72px;
    height: 64px;
}

.mdl-layout-title {
    color: white;
    font-size: 20px;
    font-weight: 500;
}

/* Information utilisateur dans le header */
.user-info-header {
    display: flex !important;
    align-items: center;
    color: white !important;
    padding: 0 16px !important;
}

.user-info-header .material-icons {
    margin-right: 8px;
}

/* Menu latéral */
.mdl-layout__drawer {
    border-right: none;
    background-color: white;
}

.drawer-header {
    padding: 16px;
    height: 64px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
}

.drawer-title {
    color: white;
    font-size: 20px;
    font-weight: 500;
}

/* Information utilisateur dans le drawer */
.user-info {
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.user-info .user-name,
.user-info .user-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.user-info .material-icons {
    font-size: 20px;
    color: var(--primary-color);
}

/* Liens de navigation dans le drawer */
.mdl-layout__drawer .mdl-navigation {
    padding: 8px 0;
}

.mdl-layout__drawer .mdl-navigation__link {
    display: flex !important;
    align-items: center;
    padding: 16px !important;
    color: var(--text-color) !important;
    font-weight: 500;
}

.mdl-layout__drawer .mdl-navigation__link .material-icons {
    margin-right: 32px;
    color: var(--primary-color);
}

.mdl-layout__drawer .mdl-navigation__link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Séparateur */
.drawer-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

/* Section exercice */
.exercise-section {
    margin-bottom: 24px;
    width: 100%;
}

.exercise-section .mdl-card__title {
    background-color: var(--primary-color);
    color: white;
    padding: 24px;
}

.exercise-section .mdl-card__supporting-text {
    padding: 24px;
    font-size: 16px;
    line-height: 1.6;
}

/* Container pour la zone de code */
.code-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
    width: 100%;
}

/* Zone des éditeurs */
.code-editors {
    display: flex;
    gap: 24px;
}

.editor-section {
    flex: 1;
    background-color: var(--card-color);
    border-radius: 4px;
}

.editor-section .mdl-card__title {
    padding: 16px;
    background-color: #f5f5f5;
    color: var(--text-color);
    border-radius: 4px 4px 0 0;
}

.editor-section .mdl-card__title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Éditeurs de code */
.code-editor {
    width: 100%;
    min-height: 400px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 16px;
    border: none;
    background-color: #f8f9fa;
    resize: vertical;
    outline: none;
}

/* Zone de prévisualisation */
.preview-section {
    background-color: var(--card-color);
    border-radius: 4px;
}

.preview-section .mdl-card__title {
    background-color: #f5f5f5;
    padding: 16px;
}

#preview {
    padding: 20px;
    background-color: white;
    border-radius: 0 0 4px 4px;
}

.preview-frame {
    width: 100%;
    min-height: 300px;
    border: 1px solid var(--border-color);
    background: white;
}

/* Boutons */
.button-container {
    display: flex;
    gap: 16px;
    padding: 20px;
}

.mdl-button {
    min-width: 120px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    font-weight: 500;
    padding: 0 16px;
    height: 36px;
    border-radius: 3px;
    font-family: 'Rubik', sans-serif;
}

.mdl-button .material-icons {
    font-size: 20px;
}

.mdl-button--raised {
    background-color: #E0E0E0;
}

.mdl-button--colored {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.mdl-button[disabled] {
    background-color: #BDBDBD !important;
    color: rgba(0, 0, 0, 0.26) !important;
    cursor: not-allowed;
}

/* Messages et alertes */
.alert,
.validation-message {
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    font-family: 'Rubik', sans-serif;
}

.alert.success,
.validation-success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.alert.error,
.validation-error {
    background-color: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.validation-message h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 500;
}

.validation-message ul {
    margin: 8px 0;
    padding-left: 24px;
}

/* Badges de difficulté */
.difficulty-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    margin-left: auto;
}

.difficulty-badge.débutant { background-color: #4CAF50; }
.difficulty-badge.intermédiaire { background-color: #FFC107; }
.difficulty-badge.avancé { background-color: #F44336; }

/* Dialogues */
.mdl-dialog {
    border-radius: 4px;
    padding: 24px;
}

.mdl-dialog__title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 500;
}

.mdl-dialog__content {
    padding-bottom: 24px;
}

.mdl-dialog__actions {
    padding-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Style du bouton menu */
.mdl-layout__drawer-button {
    color: white !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.mdl-layout__drawer-button .material-icons {
    font-size: 24px;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .code-editors {
        flex-direction: column;
    }

    .code-editor {
        min-height: 300px;
    }
}

@media screen and (max-width: 1024px) {
    .mdl-layout__header-row {
        padding-left: 60px;
    }

    .mdl-layout__drawer {
        transform: translateX(-250px);
    }

    .mdl-layout__drawer.is-visible {
        transform: translateX(0);
    }
}

@media screen and (max-width: 768px) {
    .page-content {
        padding: 16px;
    }

    .button-container {
        flex-direction: column;
    }

    .button-container button {
        width: 100%;
    }

    .mdl-dialog {
        width: 95%;
    }
}

/* Styles des parcours */
.track-section {
    margin: 8px 0;
}

.track-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    font-weight: 500;
    font-size: 16px;
}

.track-header .material-icons {
    font-size: 24px;
}

.track-progress {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.8;
}

.chapter-link {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 52px !important;
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.chapter-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.chapter-progress {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.7;
}

/* Style pour le chapitre actif */
.chapter-link.active {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

/* Style pour les chapitres complétés */
.chapter-link.completed {
    color: #4CAF50;
}

.chapter-link.completed::after {
    content: 'done';
    font-family: 'Material Icons';
    margin-left: 8px;
    font-size: 16px;
}

/* Fil d'ariane */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.track-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.track-label .material-icons {
    font-size: 20px;
}

.breadcrumb .material-icons {
    font-size: 20px;
    opacity: 0.7;
}

/* Barre de progression du chapitre */
.chapter-progress-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 16px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f5f5f5;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.progress-step.completed {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.progress-step.current {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.progress-step:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

/* Styles des parcours dans le menu */
.track-section {
    margin: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.track-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
}

.track-header .material-icons {
    font-size: 24px;
}

.track-progress {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.8;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Styles des chapitres dans le menu */
.chapter-link {
    display: flex !important;
    align-items: center;
    padding: 12px 16px 12px 52px !important;
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    transition: background-color 0.2s ease;
    position: relative;
}

.chapter-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.chapter-link.active {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 500;
    border-left: 3px solid var(--primary-color);
}

.chapter-link.completed::after {
    content: 'done';
    font-family: 'Material Icons';
    position: absolute;
    right: 16px;
    color: #4CAF50;
    font-size: 16px;
}

.chapter-progress {
    margin-left: auto;
    margin-right: 24px;
    font-size: 12px;
    opacity: 0.7;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Menu latéral amélioré */
.drawer-header {
    height: 64px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: white;
    font-size: 20px;
    font-weight: 500;
}

/* Information utilisateur dans le menu */
.user-info {
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.user-info .user-name,
.user-info .user-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.user-info .material-icons {
    font-size: 20px;
    color: var(--primary-color);
}

/* Ajustements responsive */
@media screen and (max-width: 768px) {
    .breadcrumb {
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    .chapter-progress-bar {
        padding: 12px;
    }

    .progress-step {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .track-header {
        padding: 12px;
        font-size: 14px;
    }

    .track-header .material-icons {
        font-size: 20px;
    }

    .chapter-link {
        padding: 10px 12px 10px 44px !important;
        font-size: 13px;
    }

    .chapter-progress {
        font-size: 11px;
    }
}

/* Animations */
.track-section .chapter-link {
    opacity: 0.9;
    transition: all 0.2s ease;
}

.track-section .chapter-link:hover {
    opacity: 1;
    padding-left: 56px !important;
}

.track-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Scrollbar personnalisée pour le menu */
.mdl-layout__drawer::-webkit-scrollbar {
    width: 6px;
}

.mdl-layout__drawer::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.mdl-layout__drawer::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.mdl-layout__drawer::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Style du menu déroulant des exercices */
.exercises-dropdown {
    position: relative;
    margin-right: 24px;
}

.exercises-dropdown .mdl-button {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
}

.exercises-dropdown .mdl-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.exercises-dropdown .mdl-button .material-icons {
    margin-right: 8px;
}

/* Style du menu déroulant */
.mdl-menu {
    min-width: 300px;
    max-height: 500px;
    overflow-y: auto;
}

/* En-tête de parcours dans le menu */
.track-menu-header {
    display: flex !important;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    background-color: #f5f5f5;
    pointer-events: none;
    padding: 12px 16px !important;
}

.track-menu-header .material-icons {
    font-size: 20px;
}

/* Style des chapitres dans le menu */
.chapter-menu-item {
    display: flex !important;
    align-items: center;
    justify-content: end;
    padding: 8px 16px 8px 48px !important;
    margin: 10px 0!important;
    cursor: pointer;
    font-family: 'Rubik', 'sans-serif';
}

.mdl-list__item{
    font-family: 'Rubik', 'sans-serif';
}

.chapter-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.chapter-menu-title {
    font-size: 14px;
}

.chapter-menu-progress {
    font-size: 12px;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* Scrollbar personnalisée pour le menu déroulant */
.mdl-menu::-webkit-scrollbar {
    width: 6px;
}

.mdl-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.mdl-menu::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.mdl-menu::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .exercises-dropdown {
        margin-right: 16px;
    }

    .mdl-menu {
        min-width: 280px;
    }
}

/* Ajustement pour éviter le chevauchement avec le menu latéral */
.mdl-menu__container.is-visible .mdl-menu__outline {
    z-index: 999;
}

/* Carte de bienvenue et progression globale */
/* Welcome card et tracks grid */
.welcome-card,
.tracks-grid,
.exercises-history {  /* Nouveau conteneur */
    width: 100%;
    max-width: 100%;
    margin: 0 auto 24px auto;
}

.welcome-card .mdl-card__title {
    background-color: var(--primary-color);
    color: white;
    padding: 24px;
}

.welcome-card .mdl-card__title .material-icons {
    margin-right: 12px;
}

.global-progress {
    padding: 16px 0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.progress-value {
    color: var(--primary-color);
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Grille des parcours */
.tracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

.track-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.track-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.track-card__header {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.track-card__header .material-icons {
    font-size: 48px;
}

.track-card .mdl-card__title {
    padding-top: 16px;
}

.track-card .mdl-card__supporting-text {
    flex: 1;
    width: auto;
    color: var(--text-color);
}

.track-card p {
    margin-top: 0;
    margin-bottom: 16px;
}

.track-progress {
    margin: 16px 0;
}

.track-progress .progress-bar {
    height: 6px;
    margin-bottom: 8px;
}

.progress-numbers {
    text-align: right;
    font-size: 14px;
    color: rgba(0,0,0,0.6);
}

.last-activity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(0,0,0,0.6);
    margin-top: 8px;
}

.last-activity .material-icons {
    font-size: 16px;
}

/* États des parcours */
.track-card.completed .track-card__header {
    position: relative;
}

.track-card.completed .track-card__header::after {
    content: 'done_all';
    font-family: 'Material Icons';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 24px;
}

.track-card.in-progress .progress-fill {
    background-color: #FFC107;
}

.track-card.not-started {
    opacity: 0.8;
}

.track-card.not-started:hover {
    opacity: 1;
}

/* Tableau des exercices */
.mdl-data-table {
    width: 100%;
    white-space: normal;
}

.mdl-data-table td,
.mdl-data-table th {
    padding: 12px 8px;
}

.status-icon {
    vertical-align: middle;
}

.status-icon.completed {
    color: #4CAF50;
}

.status-icon.pending {
    color: #FFC107;
}

/* Menu déroulant des exercices */
.exercises-dropdown {
    position: relative;
    margin-right: 24px;
}

.exercises-dropdown .mdl-button {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
}

.exercises-dropdown .mdl-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.exercises-dropdown .mdl-button .material-icons {
    margin-right: 8px;
}

.mdl-menu {
    width: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.track-menu-header {
    display: flex !important;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    background-color: #f5f5f5;
    pointer-events: none;
    padding: 12px 16px !important;
}

.chapter-menu-item {
    display: flex !important;
    align-items: center;
    justify-content: end;
    padding: 8px 16px 8px 48px !important;
}

.chapter-menu-progress {
    font-size: 12px;
    opacity: 0.7;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .tracks-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .track-card__header {
        height: 100px;
    }

    .mdl-data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media screen and (max-width: 768px) {
    .tracks-grid {
        grid-template-columns: 1fr;
        padding: 16px 0;
    }

    .welcome-card .mdl-card__title {
        padding: 16px;
    }

    .track-card__header .material-icons {
        font-size: 36px;
    }

    .mdl-menu {
        width: 280px;
    }

    .exercises-dropdown {
        margin-right: 16px;
    }
}

/* Animations */
@keyframes progressFill {
    from { width: 0; }
    to { width: 100%; }
}

.progress-fill {
    animation: progressFill 1s ease-out;
}

/* Correction de la grille et des conteneurs */
.page-content {
    padding: 24px;
    max-width: 1366px;
    margin: 0 auto;
    width: 100%;
}

/* Welcome card et tracks grid */
.welcome-card,
.tracks-grid,
.exercises-history {  /* Nouveau conteneur */
    width: 100%;
    max-width: 100%;
    margin: 0 auto 24px auto;
}

/* Suppression des marges de la grille MDL */
.mdl-grid {
    padding: 0;
    margin: 0;
    width: 100%;
}

.mdl-cell--12-col {
    width: 100%;
    margin: 0;
}

/* Style du conteneur du tableau */
.exercises-history .mdl-card {
    width: 100%;
    min-height: auto;
    overflow: hidden;
}

.exercises-history .mdl-card__supporting-text {
    width: 100%;
    padding: 0;
    overflow-x: auto;
}

/* Style du tableau */
.exercises-history .mdl-data-table {
    width: 100%;
    margin: 0;
    border: none;
    white-space: nowrap;
}

.exercises-history .mdl-card__title {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

/* Styles pour les étapes verrouillées */
.progress-step.locked {
    background-color: #f5f5f5;
    border-color: #ddd;
    cursor: not-allowed;
    opacity: 0.7;
    position: relative;
}

.progress-step.locked:hover {
    transform: none;
    background-color: #f5f5f5;
}

.progress-step.locked .material-icons {
    font-size: 16px;
    color: #999;
}

/* Animation pour indiquer que c'est verrouillé */
.progress-step.locked:hover::after {
    content: "Terminez l'exercice précédent";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    pointer-events: none;
}

.progress-step.locked:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    margin-bottom: -4px;
}

/* Style pour l'exercice actuel quand il n'est pas encore complété */
.progress-step.current:not(.completed) {
    border-color: var(--primary-color);
    background-color: white;
    color: var(--primary-color);
}

/* Animation pour l'exercice en cours */
.progress-step.current {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(63, 81, 181, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(63, 81, 181, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(63, 81, 181, 0);
    }
}
/* Styles pour le menu d'administration */
.admin-menu .mdl-button {
    background-color: var(--secondary-color);
    color: white;
}

.admin-menu .mdl-menu__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-menu .mdl-menu__item .material-icons {
    color: var(--primary-color);
}

/* Badge de rôle */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    margin-left: 8px;
}

.role-badge.super-admin {
    background-color: #F44336;
}

.role-badge.professeur {
    background-color: #2196F3;
}

.role-badge.étudiant {
    background-color: #4CAF50;
}
/* Styles pour la page des étudiants */
.stats-cards {
    margin-bottom: 24px;
}

.stats-cards .mdl-card {
    width: 100%;
    min-height: 120px;
}

.stats-cards .mdl-card__title {
    background-color: var(--primary-color);
    color: white;
    padding: 16px;
}

.stats-cards .mdl-card__title .material-icons {
    margin-right: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    color: rgba(0, 0, 0, 0.54);
    font-size: 14px;
}

/* Table des étudiants */
.mdl-data-table {
    width: 100%;
    white-space: normal;
    border: none;
}

.mdl-data-table th {
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.87);
}

.mdl-data-table td {
    font-size: 14px;
    padding: 12px 8px;
}

/* Barre de progression dans la table */
.progress-bar {
    width: 100px;
    height: 4px;
    background-color: #f5f5f5;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Badge de statut */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

.status-badge.active {
    background-color: #4CAF50;
}

.status-badge.inactive {
    background-color: #F44336;
}

/* Menu d'actions */
.mdl-menu__item {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.mdl-menu__item .material-icons {
    font-size: 18px;
    color: var(--primary-color);
}

/* Style pour les actions dans la table */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-button {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation pour les changements d'état */
.mdl-data-table tr {
    transition: background-color 0.3s ease;
}

.mdl-data-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Style pour la dernière activité */
.last-activity {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(0, 0, 0, 0.54);
}

.last-activity .material-icons {
    font-size: 16px;
}

/* Styles pour les tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
}

/* Styles pour le responsive */
@media screen and (max-width: 1024px) {
    .stats-cards .mdl-cell {
        width: 100%;
        margin: 8px 16px;
    }

    .mdl-data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .progress-bar {
        width: 60px;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* Styles pour les dialogues de confirmation */
.confirmation-dialog {
    padding: 24px;
    max-width: 400px;
}

.confirmation-dialog__title {
    margin: 0 0 16px 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirmation-dialog__content {
    margin-bottom: 24px;
    color: rgba(0, 0, 0, 0.87);
}

.confirmation-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Animation pour les mises à jour */
@keyframes highlight {
    0% {
        background-color: rgba(var(--primary-color-rgb), 0.1);
    }
    100% {
        background-color: transparent;
    }
}

.highlight {
    animation: highlight 1s ease-out;
}

/* Style pour les cellules vides */
.mdl-data-table td.empty {
    color: rgba(0, 0, 0, 0.38);
    font-style: italic;
}

/* Style pour les filtres */
.table-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.table-filters .mdl-textfield {
    flex: 1;
}

/* Style pour le compteur de sélection */
.selection-counter {
    margin: 16px 0;
    color: rgba(0, 0, 0, 0.54);
    font-size: 14px;
}

/* Style pour les actions en masse */
.bulk-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

/* Styles pour les actions administrateur */
.admin-actions {
    margin: 24px 0;
    width: 100%;
}

.admin-actions .mdl-card__title {
    background-color: var(--primary-color);
    color: white;
}

.admin-actions .mdl-card__supporting-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.warning-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F44336;
    font-size: 14px;
    margin-top: 8px;
}

.warning-text .material-icons {
    font-size: 18px;
}

/* Style pour la boîte de dialogue de confirmation */
.mdl-dialog {
    padding: 24px;
    width: 400px;
}

.mdl-dialog__title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F44336;
}

.mdl-dialog__title .material-icons {
    font-size: 24px;
}

.mdl-dialog__content {
    padding: 24px 0;
}

.mdl-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 24px;
}

.mdl-dialog form {
    width: 100%;
}

.mdl-dialog .mdl-textfield {
    width: 100%;
    margin-bottom: 16px;
}

/* Styles pour la page des chapitres */
.track-header-card {
    width: 100%;
    margin-bottom: 24px;
}

.track-header-card .mdl-card__title {
    color: white;
    padding: 24px;
    height: 150px;
}

.track-header-card .mdl-card__title-text {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 24px;
}

.track-header-card .material-icons {
    font-size: 36px;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

.chapter-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.chapter-card .mdl-card__title {
    padding: 16px;
}

.chapter-card .mdl-card__supporting-text {
    flex: 1;
}

.chapter-card.completed .mdl-card__title {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.chapter-card.in-progress .mdl-card__title {
    background-color: #FFF3E0;
    color: #E65100;
}

.chapter-progress .progress-bar {
    height: 4px;
    margin-bottom: 8px;
}

.last-activity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(0,0,0,0.54);
    margin-top: 8px;
}

.last-activity .material-icons {
    font-size: 16px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .chapters-grid {
        grid-template-columns: 1fr;
    }

    .track-header-card .mdl-card__title {
        height: auto;
    }
}
.chapters-list {
    margin: 16px 0;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.chapters-list h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.chapters-list .mdl-list {
    margin: 0;
    padding: 0;
}

.chapters-list .mdl-list__item {
    padding: 8px 0;
    min-height: 40px;
}

.chapter-progress {
    margin-left: auto;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* ===============================
   NOUVELLES AMÉLIORATIONS
   =============================== */

/* Validation message plus visible */
.validation-message {
    animation: slideIn 0.5s ease-out;
    border-left: 4px solid;
    margin: 16px 0;
}

.validation-success {
    border-left-color: #4CAF50;
    background: linear-gradient(90deg, #E8F5E9 0%, #F1F8E9 100%);
}

.validation-error {
    border-left-color: #F44336;
    background: linear-gradient(90deg, #FFEBEE 0%, #FFF3E0 100%);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Boutons d'action améliorés */
.button-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}

/* Progress steps plus interactifs */
.progress-step:not(.locked):hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(63, 81, 181, 0.3);
}

/* Dialog de fin de chapitre */
.mdl-dialog {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Amélioration des éditeurs */
.code-editor:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading state pour la validation */
.mdl-button--loading {
    position: relative;
    pointer-events: none;
}

.mdl-button--loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}