﻿/** 
 * ========================================================
 * Design System MRO E-Learning â€” Material 3 via Tailwind
 * ========================================================
 * Primary  : #DDAF25 (Jaune DorÃ©)
 * Secondary: #26B4D8 (Bleu Cyan)
 * Surface  : #ffffff
 * Text     : #111111
 * ========================================================
 */

/* â”€â”€ Tokens M3 â€” Variables CSS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

:root {
    --md-sys-color-primary: #DDAF25;
    --md-sys-color-on-primary: #111111;
    --md-sys-color-primary-container: #FFF3D0;
    --md-sys-color-on-primary-container: #3E2E00;

    --md-sys-color-secondary: #26B4D8;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #D4F1F9;
    --md-sys-color-on-secondary-container: #003544;

    --md-sys-color-surface: #ffffff;
    --md-sys-color-on-surface: #111111;
    --md-sys-color-on-surface-variant: #666666;
    --md-sys-color-surface-variant: #F5F5F5;
    --md-sys-color-outline: #E0E0E0;
    --md-sys-color-outline-variant: #C4C4C4;

    --md-sys-color-tertiary: #FF9800;
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-tertiary-container: #FFF3E0;
    --md-sys-color-on-tertiary-container: #4E2700;

    --md-sys-color-error: #DC2626;
    --md-sys-color-on-error: #ffffff;
    --md-sys-color-success: #16A34A;
    --md-sys-color-warning: #F59E0B;

    /* Conteneurs sémantiques (status) */
    --md-sys-color-success-container: #DCFCE7;
    --md-sys-color-on-success-container: #166534;
    --md-sys-color-warning-container: #FEF3C7;
    --md-sys-color-on-warning-container: #92400E;
    --md-sys-color-error-container: #FEE2E2;
    --md-sys-color-on-error-container: #991B1B;

    /* Variantes supplémentaires */
    --md-sys-color-primary-dark: #C49A20;

    /* Élévation M3 */
    --md-sys-elevation-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
    --md-sys-elevation-2: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --md-sys-elevation-3: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --md-sys-elevation-4: 0 14px 28px rgba(0,0,0,0.12), 0 6px 10px rgba(0,0,0,0.08);

    /* Arrondis M3 (12px Ã  28px) */
    --md-sys-shape-corner-small: 12px;
    --md-sys-shape-corner-medium: 16px;
    --md-sys-shape-corner-large: 20px;
    --md-sys-shape-corner-extra-large: 28px;

    /* Transitions */
    --md-sys-motion-duration: 200ms;
    --md-sys-motion-easing: cubic-bezier(0.2, 0, 0, 1);
}

/* â”€â”€ Reset & Base â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--md-sys-color-on-surface);
    background-color: var(--md-sys-color-surface-variant);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}


/* Capitalisation automatique des labels et titres */
h1, h2, h3, h4, h5, h6,
.page-header__title, .page-header__subtitle,
.form-label, .nav-rail__item, .btn, th, label,
.badge, .stat-card__label, .editor-meta__control,
.profil-section-title, .dashboard-section__title,
.flash, .msg-item__name {
    text-transform: capitalize;
}
/* â”€â”€ Navigation Rail (Organisme) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.nav-rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: var(--md-sys-color-surface);
    border-right: 1px solid var(--md-sys-color-outline);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    z-index: 100;
    box-shadow: var(--md-sys-elevation-1);
}

.nav-rail__logo {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-on-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-rail__items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    width: 100%;
    padding: 0 12px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.nav-rail__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    min-height: 56px;
    border-radius: var(--md-sys-shape-corner-large);
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
    cursor: pointer;
    flex-shrink: 0;
}

.nav-rail__item:hover {
    background: var(--md-sys-color-secondary-container);
}

.nav-rail__item--active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.nav-rail__item .material-symbols-outlined {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-rail__bottom {
    padding: 12px;
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: var(--md-sys-color-on-error);
    background: var(--md-sys-color-error, #d32f2f);
    border-radius: 9px;
}

/* â”€â”€ Layout principal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.main-content {
    margin-left: 80px;
    padding: 32px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 32px;
}

.page-header__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 4px;
}

.page-header__subtitle {
    color: var(--md-sys-color-on-surface-variant, #666);
    font-size: 1rem;
}

/* â”€â”€ Breadcrumb backlink (Atome) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.breadcrumb-back {
    text-decoration: none;
    color: var(--md-sys-color-secondary);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    transition: color 0.15s;
}
.breadcrumb-back:hover {
    color: var(--md-sys-color-primary);
}
.breadcrumb-back .material-symbols-outlined {
    font-size: 18px;
}

/* â”€â”€ Badge row + small badge (Atome) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.badge-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.badge--sm {
    font-size: 0.8rem;
}
.badge--sm .material-symbols-outlined {
    font-size: 15px;
    vertical-align: middle;
}

/* â”€â”€ Section heading (Atome) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.section-heading {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 20px;
}

/* â”€â”€ Empty state (MolÃ©cule) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
}
.empty-state .material-symbols-outlined {
    font-size: 48px;
    color: var(--md-sys-color-outline);
    display: block;
    margin-bottom: 12px;
}
.empty-state p {
    color: var(--md-sys-color-on-surface-variant, #666);
    margin-top: 8px;
    font-size: 0.95rem;
}
.empty-state--sm {
    padding: 24px;
}
.empty-state--sm .material-symbols-outlined {
    font-size: 32px;
}
.empty-state--sm p {
    font-size: 0.85rem;
}
.empty-state__hint {
    font-size: 0.85rem;
    color: var(--md-sys-color-outline, #999);
    margin-top: 4px;
}

/* â”€â”€ Course content layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.course-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* â”€â”€ Cards M3 (MolÃ©cule) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    box-shadow: var(--md-sys-elevation-1);
    padding: 24px;
    transition: box-shadow var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.card:hover {
    box-shadow: var(--md-sys-elevation-2);
}

.card--outlined {
    box-shadow: none;
    border: 1px solid var(--md-sys-color-outline);
}

.card--outlined:hover {
    box-shadow: var(--md-sys-elevation-1);
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.card__subtitle {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
}

.card__body {
    color: var(--md-sys-color-on-surface);
}

.card__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--md-sys-color-outline);
}

/* â”€â”€ Boutons M3 (Atome) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--md-sys-shape-corner-large);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
    text-decoration: none;
    line-height: 1.4;
}

.btn--primary {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn--primary:hover {
    box-shadow: var(--md-sys-elevation-2);
    filter: brightness(1.05);
}

.btn--secondary {
    background: var(--md-sys-color-secondary);
    color: var(--md-sys-color-on-secondary);
}

.btn--secondary:hover {
    box-shadow: var(--md-sys-elevation-2);
    filter: brightness(1.05);
}

.btn--outlined {
    background: transparent;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-primary);
}

.btn--outlined:hover {
    background: var(--md-sys-color-primary-container);
}

.btn--text {
    background: none;
    border: none;
    color: var(--md-sys-color-primary);
    padding: 10px 12px;
}

.btn--text:hover {
    background: var(--md-sys-color-primary-container);
}

.btn--danger {
    background: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
}

.btn--sm {
    padding: 6px 16px;
    font-size: 0.8rem;
}

/* â”€â”€ FAB (Floating Action Button) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    box-shadow: var(--md-sys-elevation-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--md-sys-motion-duration) var(--md-sys-motion-easing);
    z-index: 50;
}

.fab:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
    transform: translateY(-2px);
}

.fab--extended {
    width: auto;
    padding: 16px 24px;
    gap: 12px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* â”€â”€ Champs de formulaire (Atome) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-small);
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface);
    transition: border-color var(--md-sys-motion-duration) var(--md-sys-motion-easing);
    outline: none;
}

.form-input:focus {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(221, 175, 37, 0.15);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
    line-height: 1.4;
}

/* â”€â”€ Badges / Chips (Atome) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 4px;
}

.badge--primary {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.badge--secondary {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.badge--success {
    background: var(--md-sys-color-success-container);
    color: var(--md-sys-color-on-success-container);
}

.badge--warning {
    background: var(--md-sys-color-warning-container);
    color: var(--md-sys-color-on-warning-container);
}

.badge--error {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

/* â”€â”€ Barre de progression (MolÃ©cule) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.progress {
    width: 100%;
    height: 8px;
    background: var(--md-sys-color-outline);
    border-radius: 100px;
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    border-radius: 100px;
    background: var(--md-sys-color-primary);
    transition: width 0.5s ease;
}

.progress__bar--secondary {
    background: var(--md-sys-color-secondary);
}

/* â”€â”€ Flash Messages (MolÃ©cule) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.flash {
    padding: 14px 20px;
    border-radius: var(--md-sys-shape-corner-small);
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.flash--success {
    background: var(--md-sys-color-success-container);
    color: var(--md-sys-color-on-success-container);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-success) 30%, transparent);
}

.flash--error {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-error) 30%, transparent);
}

.flash--warning {
    background: var(--md-sys-color-warning-container);
    color: var(--md-sys-color-on-warning-container);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-warning) 30%, transparent);
}

/* â”€â”€ Tableau (Organisme) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    overflow: hidden;
}

.data-table thead {
    background: var(--md-sys-color-surface-variant);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--md-sys-color-on-surface-variant);
}

.data-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--md-sys-color-outline);
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: var(--md-sys-color-surface-variant);
}

/* â”€â”€ Grille de cours â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* â”€â”€ Liste de cours (catalogue hiÃ©rarchique) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.courses-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
/* -- Cours : grille catalogue -------------------------------- */

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
@media (max-width: 768px) {
    .courses-grid { grid-template-columns: 1fr; }
}

/* -- Cours : carte moderne M3 -------------------------------- */

.cours-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-extra-large, 28px);
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s cubic-bezier(0.2,0,0,1), border-color 0.3s, transform 0.25s;
    will-change: transform;
    isolation: isolate;
}
.cours-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.10);
    border-color: var(--md-sys-color-primary);
    transform: translateY(-4px);
}
.cours-card--publie {
    border-left: 4px solid var(--md-sys-color-success, #2e7d32);
}
.cours-card--brouillon {
    border-left: 4px solid var(--md-sys-color-warning, #f9a825);
}
.cours-card__hero {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-secondary-container) 100%);
}
.cours-card__hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.2,0,0,1);
}
.cours-card:hover .cours-card__hero-img {
    transform: scale(1.05);
}
.cours-card__hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cours-card__hero-placeholder .material-symbols-outlined {
    font-size: 56px;
    color: var(--md-sys-color-primary);
    opacity: 0.35;
}
.cours-card__hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0,0,0,0.12));
    pointer-events: none;
}
.cours-card__hero-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 1;
}
.cours-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
}
.cours-card__badge .material-symbols-outlined { font-size: 14px; }
.cours-card__badge--success {
    background: rgba(46, 125, 50, 0.85);
    color: #fff;
}
.cours-card__badge--draft {
    background: rgba(249, 168, 37, 0.85);
    color: #fff;
}
.cours-card__badge--archive {
    background: rgba(120, 120, 120, 0.85);
    color: #fff;
}
.cours-card--archive {
    opacity: .65;
    filter: grayscale(.3);
}
.cours-card__badge--complete {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    gap: 4px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(46,125,50,0.4);
}
.cours-card--termine {
    border: 2px solid rgba(46,125,50,0.5);
    box-shadow: 0 0 12px rgba(46,125,50,0.15);
}
.cours-card--termine .cours-card__hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46,125,50,0.08), transparent 60%);
    pointer-events: none;
}
.cours-card__body {
    padding: 20px 24px 12px;
    flex: 1;
}
.cours-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--md-sys-color-on-surface);
    line-height: 1.3;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cours-card__desc {
    font-size: 0.84rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.55;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cours-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.cours-card__meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    background: var(--md-sys-color-surface-variant);
    padding: 3px 10px;
    border-radius: 100px;
}
.cours-card__meta-chip .material-symbols-outlined { font-size: 14px; }
.cours-card__meta-chip--date { color: var(--md-sys-color-outline-variant); background: transparent; }
.cours-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.cours-card__tag {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    padding: 2px 9px;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 600;
}
.cours-card__tag--more {
    background: transparent;
    color: var(--md-sys-color-outline-variant);
}
.cours-card__progress {
    padding: 0 24px 10px;
}
.cours-card__progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.cours-card__progress-text {
    font-size: 0.7rem;
    color: var(--md-sys-color-outline-variant);
    font-weight: 500;
}
.cours-card__progress-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--md-sys-color-primary);
}
.cours-card__progress-track {
    height: 4px;
    background: var(--md-sys-color-surface-variant);
    border-radius: 2px;
    overflow: hidden;
}
.cours-card__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ── Scores exercices H5P sur la card ── */
.cours-card__scores {
    padding: 8px 24px 10px;
    border-top: 1px solid rgba(0,0,0,0.04);
}
.cours-card__scores-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--md-sys-color-outline-variant);
}
.cours-card__scores-text {
    flex: 1;
    font-size: 0.78rem;
}
.cours-card__scores-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
}
.cours-card__scores-badge--success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--md-sys-color-success, #22C55E);
}
.cours-card__scores-avg {
    font-size: 0.72rem;
    color: var(--md-sys-color-outline-variant);
    margin-top: 4px;
    padding-left: 22px;
}
.cours-card__scores-avg strong {
    color: var(--md-sys-color-primary);
}
.cours-card__lecons {
    padding: 8px 24px 12px;
    border-top: 1px solid rgba(0,0,0,0.04);
}
.cours-card__lecons-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--md-sys-color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.cours-card__lecons-label .material-symbols-outlined { font-size: 15px; }
.cours-card__lecons-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cours-card__lecon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--md-sys-shape-corner-small, 8px);
    background: var(--md-sys-color-surface-variant);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, transform 0.1s;
}
.cours-card__lecon:hover {
    background: rgba(38, 180, 216, 0.1);
    transform: translateX(3px);
}
.cours-card__lecon-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-size: 0.68rem;
    font-weight: 800;
    flex-shrink: 0;
}
.cours-card__lecon-title {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.cours-card__lecon-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: var(--md-sys-color-secondary);
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}
.cours-card__lecon-edit:hover { background: rgba(38,180,216,0.15); }
.cours-card__lecon-edit .material-symbols-outlined { font-size: 16px; }
.cours-card__lecons-more {
    font-size: 0.75rem;
    color: var(--md-sys-color-outline-variant);
    text-align: center;
    padding: 4px 0;
    font-weight: 500;
}
.cours-card__actions {
    padding: 12px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid rgba(0,0,0,0.04);
    margin-top: auto;
}
.cours-card__cta {
    flex-shrink: 0;
}
.cours-card__actions-secondary {
    display: flex;
    gap: 4px;
}
.cours-card__action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.cours-card__action-icon:hover {
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-primary);
}
.cours-card__action-icon .material-symbols-outlined { font-size: 18px; }
.cours-card__action-icon--danger:hover {
    background: rgba(186, 26, 26, 0.08);
    color: var(--md-sys-color-error);
}


/* â”€â”€ Cours : conteneur parent â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.cours-container {
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-large, 20px);
    background: var(--md-sys-color-surface);
    overflow: hidden;
    transition: box-shadow 0.3s cubic-bezier(0.2,0,0,1), border-color 0.3s, transform 0.2s;
}
.cours-container:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--md-sys-color-outline-variant);
    transform: translateY(-2px);
}
.cours-container--publie {
    border-left: 4px solid var(--md-sys-color-success, #2e7d32);
}

/* Photo à la une du cours */
.cours-container__photo {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--md-sys-color-surface-variant);
}
.cours-container__photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}
.cours-container:hover .cours-container__photo-img {
    transform: scale(1.03);
}

.cours-container__header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: linear-gradient(135deg, var(--md-sys-color-surface) 0%, var(--md-sys-color-surface-variant) 100%);
}
.cours-container__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}
.cours-container__identity {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}
.cours-container__icon {
    font-size: 32px;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
    margin-top: 2px;
    background: var(--md-sys-color-primary-container);
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-corner-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cours-container__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--md-sys-color-on-surface);
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.cours-container__date {
    font-size: 0.78rem;
    color: var(--md-sys-color-outline-variant);
}
.cours-container__badges {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
}
.cours-container__desc {
    font-size: 0.88rem;
    color: var(--md-sys-color-on-surface-variant);
    margin: 0 0 12px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cours-container__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.cours-container__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--md-sys-color-outline-variant);
    font-weight: 500;
}
.cours-container__meta-item .material-symbols-outlined {
    font-size: 16px;
}
.cours-container__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-left: 4px;
}
.cours-container__tag {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}
.cours-container__tag--more {
    color: var(--md-sys-color-outline-variant);
    background: transparent;
}

/* â”€â”€ LeÃ§ons dans le cours â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.cours-container__lecons {
    padding: 12px 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cours-container__lecons-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--md-sys-color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 6px;
    margin-bottom: 2px;
}
.cours-container__lecons-header .material-symbols-outlined {
    font-size: 15px;
}
.cours-container__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--md-sys-color-outline);
    font-size: 0.85rem;
    padding: 28px 20px;
}
.cours-container__empty .material-symbols-outlined {
    font-size: 22px;
}

.lecon-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: none;
    border-radius: var(--md-sys-shape-corner-medium, 12px);
    background: var(--md-sys-color-surface-variant);
    transition: background 0.2s cubic-bezier(0.2,0,0,1), transform 0.15s;
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}
.lecon-card:hover {
    background: rgba(38, 180, 216, 0.08);
    transform: translateX(4px);
}
.lecon-card__num {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}
.lecon-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lecon-card__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lecon-card__desc {
    font-size: 0.75rem;
    color: var(--md-sys-color-outline-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lecon-card__meta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.lecon-card__blocs {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: var(--md-sys-color-secondary);
    font-weight: 600;
    white-space: nowrap;
}
.lecon-card__blocs .material-symbols-outlined {
    font-size: 14px;
}
.lecon-card__duree {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: var(--md-sys-color-outline-variant);
    white-space: nowrap;
}
.lecon-card__duree .material-symbols-outlined {
    font-size: 14px;
}
.lecon-card__edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--md-sys-color-secondary);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.lecon-card__edit:hover {
    background: rgba(38, 180, 216, 0.15);
    color: var(--md-sys-color-primary);
}
.lecon-card__edit .material-symbols-outlined {
    font-size: 18px;
}

/* â”€â”€ Progress bar (cours) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cours-container__progress {
    padding: 0 28px 16px;
}
.cours-container__progress-bar {
    height: 4px;
    background: var(--md-sys-color-surface-variant);
    border-radius: 2px;
    overflow: hidden;
}
.cours-container__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.cours-container__progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--md-sys-color-outline-variant);
    margin-top: 4px;
}

/* â”€â”€ Footer du cours â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.cours-container__footer {
    padding: 14px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: transparent;
}

/* â”€â”€ Stats cards (MolÃ©cule) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large, 20px);
    padding: 24px;
    box-shadow: var(--md-sys-elevation-1);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
    box-shadow: var(--md-sys-elevation-2);
    transform: translateY(-2px);
}
.stat-card__icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}
.stat-card__icon .material-symbols-outlined {
    font-size: 28px;
}

.stat-card__value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--md-sys-color-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-card__label {
    font-size: 0.82rem;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

/* â”€â”€ Login page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-secondary) 100%);
}

.login-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--md-sys-elevation-3);
    border: 2px solid var(--md-sys-color-secondary, #26B4D8);
}

.login-card__title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.login-card__subtitle {
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

/* â”€â”€ Messagerie interne â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.msg-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.msg-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--md-sys-shape-corner-medium, 12px);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    cursor: pointer;
}
.msg-item:hover {
    background: var(--md-sys-color-surface-variant);
}
.msg-item--unread {
    background: rgba(38, 180, 216, 0.06);
}
.msg-item--unread .msg-item__name {
    font-weight: 700;
}
.msg-item__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.msg-item__body {
    flex: 1;
    min-width: 0;
}
.msg-item__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
.msg-item__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}
.msg-item__date {
    font-size: 0.72rem;
    color: var(--md-sys-color-outline-variant);
    flex-shrink: 0;
}
.msg-item__preview {
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-item__badge {
    background: var(--md-sys-color-secondary);
    color: var(--md-sys-color-on-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* â”€â”€ Conversation thread â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.msg-thread {
    max-height: 500px;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.msg-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.msg-bubble--sent {
    align-self: flex-end;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border-bottom-right-radius: 4px;
}
.msg-bubble--received {
    align-self: flex-start;
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
    border-bottom-left-radius: 4px;
}
.msg-bubble__subject {
    font-weight: 600;
    font-size: 0.78rem;
    opacity: 0.8;
    margin-bottom: 4px;
}
.msg-bubble__text {
    word-break: break-word;
}
.msg-bubble__time {
    font-size: 0.68rem;
    opacity: 0.6;
    margin-top: 6px;
    text-align: right;
}

/* â”€â”€ Reply bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.msg-reply {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 16px;
    margin-top: 12px;
}
.msg-reply__input-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.msg-reply__input {
    flex: 1;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 16px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}
.msg-reply__input:focus {
    border-color: var(--md-sys-color-primary);
}
.msg-reply__send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.15s;
}
.msg-reply__send:hover {
    background: var(--md-sys-color-secondary);
    transform: scale(1.05);
}
.msg-reply__send .material-symbols-outlined {
    font-size: 20px;
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

@media (max-width: 768px) {
    .nav-rail {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .cours-container__photo {
        height: 140px;
    }

    .cours-container__header {
        padding: 16px 18px 12px;
    }
    .cours-container__lecons {
        padding: 10px 18px 16px;
    }
    .cours-container__footer {
        padding: 10px 18px;
    }
    .lecon-card__desc {
        display: none;
    }
    .cours-container__icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    .cours-container__title {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* 2-col grids → stack on mobile */
    .grid-2col,
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .data-table { font-size: 0.82rem; }
    .data-table th, .data-table td { padding: 8px 10px; }

    .page-header__title { font-size: 1.3rem; }
    .page-header__subtitle { font-size: 0.85rem; }

    .res-tabs { gap: 0; }
    .res-tabs__item { padding: 8px 10px; font-size: 0.78rem; }
    .res-tabs__label { display: none; }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ── H5P Score Dialog ─────────────────────────────────────── */

.h5p-dialog-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.h5p-dialog-overlay--visible {
    display: flex;
}

.h5p-dialog {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--md-sys-elevation-3);
    animation: dialogSlideUp 0.25s ease;
}

@keyframes dialogSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.h5p-dialog__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--md-sys-color-outline);
}

.h5p-dialog__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.h5p-dialog__body {
    padding: 16px 24px 24px;
    overflow-y: auto;
}

.h5p-dialog__close {
    min-width: 0;
    padding: 4px;
}

.score-clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.score-clickable:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* â”€â”€ H5P Container (Organisme) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.h5p-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--md-sys-color-surface);
    box-shadow: var(--md-sys-elevation-1);
    transition: box-shadow var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.h5p-container:hover {
    box-shadow: var(--md-sys-elevation-2);
}

.h5p-container__iframe {
    width: 100%;
    border: none;
    border-radius: 24px;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.h5p-container__loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--md-sys-color-surface);
    z-index: 10;
}

.h5p-container__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--md-sys-color-outline);
    border-top-color: var(--md-sys-color-secondary);
    border-radius: 50%;
    animation: h5p-spin 0.8s linear infinite;
}

@keyframes h5p-spin {
    to { transform: rotate(360deg); }
}

.h5p-container__loader-text {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

.h5p-container__feedback {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 0 0 24px 24px;
    font-size: 0.9rem;
    font-weight: 500;
}

.h5p-container__feedback--success {
    background: var(--md-sys-color-success-container);
    color: var(--md-sys-color-on-success-container);
}

.h5p-container__feedback--failure {
    background: var(--md-sys-color-warning-container);
    color: var(--md-sys-color-on-warning-container);
}

.h5p-container__feedback-icon {
    font-size: 20px;
}

/* â”€â”€ Utilitaires â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* â”€â”€ Barre de filtres (MolÃ©cule) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.table-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-medium);
    box-shadow: var(--md-sys-elevation-1);
}

.table-filters__search {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.table-filters__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--md-sys-color-on-surface-variant);
    pointer-events: none;
}

.table-filters__search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.9rem;
    background: var(--md-sys-color-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.table-filters__search-input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(38, 180, 216, 0.15);
}

.table-filters__select {
    padding: 10px 36px 10px 12px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.9rem;
    background: var(--md-sys-color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    min-width: 150px;
    transition: border-color 0.2s ease;
}

.table-filters__select:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(38, 180, 216, 0.15);
}

.table-filters__count {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    margin-left: auto;
}

.table-filters__reset {
    padding: 8px 16px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-medium);
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.table-filters__reset:hover {
    background: var(--md-sys-color-surface-variant);
}

/* Ligne masquÃ©e par filtre */
.data-table tbody tr.filtered-out,
.courses-grid > .filtered-out,
.courses-list > .filtered-out {
    display: none !important;
}

@media (max-width: 768px) {
    .table-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .table-filters__search {
        min-width: 100%;
    }

    .table-filters__select {
        min-width: 100%;
    }

    .table-filters__count {
        margin-left: 0;
        text-align: center;
    }
}

/* â”€â”€ Groupes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.group-card {
    display: flex;
    flex-direction: column;
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-1);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--md-sys-motion-duration) var(--md-sys-motion-easing),
                transform var(--md-sys-motion-duration) var(--md-sys-motion-easing);
}

.group-card:hover {
    box-shadow: var(--md-sys-elevation-2);
    transform: translateY(-3px);
}

.group-card__accent {
    height: 5px;
    flex-shrink: 0;
}

.group-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-card__top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.group-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--md-sys-shape-corner-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--md-sys-color-on-primary);
}

.group-card__avatar .material-symbols-outlined {
    font-size: 22px;
}

.group-card__info {
    flex: 1;
    min-width: 0;
}

.group-card__name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.group-card__date {
    font-size: 0.78rem;
    color: var(--md-sys-color-outline-variant, #999);
}

.group-card__desc {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.group-card__stats {
    display: flex;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--md-sys-color-outline);
    font-size: 0.8rem;
    color: var(--md-sys-color-outline-variant, #888);
}

.group-card__stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.group-card__stat .material-symbols-outlined {
    font-size: 16px;
}

/* â”€â”€ Groupe DÃ©tail (2 colonnes) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

.groupe-section {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-1);
    padding: 24px;
}

.groupe-section__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--md-sys-color-on-surface);
}

.groupe-section__title .material-symbols-outlined {
    font-size: 20px;
    color: var(--md-sys-color-primary);
}

/* â”€â”€ Membres list â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.membres-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.membre-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-variant);
}

.membre-item__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.membre-item__info {
    flex: 1;
    min-width: 0;
}

.membre-item__name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.membre-item__email {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* â”€â”€ Cours accÃ¨s list â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.cours-acces-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cours-acces-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--md-sys-shape-corner-medium);
    background: var(--md-sys-color-surface-variant);
}

.cours-acces-item__info {
    flex: 1;
    min-width: 0;
}

.cours-acces-item__title {
    font-weight: 500;
    font-size: 0.9rem;
}

.cours-acces-item__dates {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
}

.cours-acces-item .badge {
    flex-shrink: 0;
}

/* â”€â”€ Profil page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.profil-card {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-1);
    padding: 32px;
    text-align: center;
}

.profil-card__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 16px;
}

.profil-card__name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.profil-card__email {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 12px;
}

.profil-card__stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--md-sys-color-outline);
}

.profil-card__stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--md-sys-color-primary);
}

.profil-card__stat-label {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
}

.profil-card__groups {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.profil-card__group-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
}

/* â”€â”€ Dashboard sections â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.dashboard-section {
    margin-top: 32px;
}

.dashboard-section__title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--md-sys-color-on-surface);
}

.dashboard-section__title .material-symbols-outlined {
    font-size: 22px;
    color: var(--md-sys-color-primary);
}

/* â”€â”€ Activity feed â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.activity-feed {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-1);
    overflow: hidden;
}

.activity-feed__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.activity-feed__item:last-child {
    border-bottom: none;
}

.activity-feed__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--md-sys-color-surface-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-feed__icon .material-symbols-outlined {
    font-size: 18px;
    color: var(--md-sys-color-primary);
}

.activity-feed__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-feed__text {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface);
    line-height: 1.4;
}

.activity-feed__meta {
    font-size: 0.75rem;
    color: var(--md-sys-color-outline-variant);
}

/* â”€â”€ Inline create form â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.inline-create-form {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-1);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.inline-create-form__row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.inline-create-form__field {
    flex: 1;
    min-width: 180px;
}

.inline-create-form__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 4px;
}

.inline-create-form__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.9rem;
    background: var(--md-sys-color-surface);
    transition: border-color 0.2s ease;
}

.inline-create-form__input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(38, 180, 216, 0.15);
}

.inline-create-form__color {
    width: 42px;
    height: 42px;
    border: 2px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 2px;
    cursor: pointer;
    background: transparent;
}

/* â”€â”€ AccÃ¨s badge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.badge--actif {
    background: var(--md-sys-color-success-container);
    color: var(--md-sys-color-on-success-container);
}

.badge--expire {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.badge--futur {
    background: #DBEAFE;
    color: #1E40AF;
}

/* â”€â”€ Form add (inline selects) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.add-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid var(--md-sys-color-outline);
    margin-top: 12px;
}

.add-form select,
.add-form input[type="date"] {
    padding: 8px 10px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.85rem;
    background: var(--md-sys-color-surface);
}

.add-form select {
    flex: 1;
    min-width: 140px;
}

.add-form input[type="date"] {
    width: 140px;
}

/* â”€â”€ Empty state â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--md-sys-color-outline-variant);
}

.empty-state .material-symbols-outlined {
    font-size: 48px;
    color: var(--md-sys-color-outline);
    margin-bottom: 12px;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* â”€â”€ Groupe meta form â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.groupe-meta {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-1);
    padding: 24px;
    margin-bottom: 24px;
}

.groupe-meta__form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.groupe-meta__field {
    flex: 1;
    min-width: 160px;
}

.groupe-meta__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 4px;
}

.groupe-meta__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-medium);
    font-size: 0.9rem;
}

.groupe-meta__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* â”€â”€ Remove button (compact) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.btn-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--md-sys-color-outline-variant);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.btn-remove:hover {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-error);
}

.btn-remove .material-symbols-outlined {
    font-size: 18px;
}

/* ── Scroll to top button ────────────────────────── */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-sys-elevation-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 200;
}
.scroll-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top:hover {
    background: var(--md-sys-color-primary-dark, #C49A20);
    box-shadow: var(--md-sys-elevation-4);
}
.scroll-top .material-symbols-outlined {
    font-size: 28px;
}

/* ── Profil page — enhanced layout ─────────────────────── */

.profil-hero {
    background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, color-mix(in srgb, var(--md-sys-color-primary) 70%, var(--md-sys-color-secondary)) 100%);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: 40px 36px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.profil-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.profil-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 20%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}
.profil-hero__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 3px solid rgba(255,255,255,0.3);
    position: relative;
    z-index: 1;
}
.profil-hero__info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.profil-hero__name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
.profil-hero__email {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    margin: 4px 0 10px;
}
.profil-hero__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.profil-hero__badges .badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
}
.profil-hero__meta {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}
.profil-hero__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.profil-hero__meta .material-symbols-outlined {
    font-size: 16px;
}

.profil-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}
@media (max-width: 768px) {
    .profil-details-grid { grid-template-columns: 1fr; }
    .profil-hero { flex-direction: column; text-align: center; padding: 28px 20px 24px; }
    .profil-hero__badges { justify-content: center; }
    .profil-hero__meta { justify-content: center; flex-wrap: wrap; }
}

.profil-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--md-sys-color-on-surface);
}
.profil-section-title .material-symbols-outlined {
    font-size: 20px;
    color: var(--md-sys-color-primary);
}

.profil-contact-item:hover {
    background: color-mix(in srgb, var(--md-sys-color-primary) 10%, var(--md-sys-color-surface-variant)) !important;
    box-shadow: var(--md-sys-elevation-1);
}

.profil-progress-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.profil-progress-ring svg {
    transform: rotate(-90deg);
}
.profil-progress-ring__label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--md-sys-color-primary);
}

/* Formation tabs (sub-navigation Cours / Lecons) */
.formation-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--md-sys-color-outline-variant, #e0e0e0);
    padding-bottom: 0;
}

.formation-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant, #666);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 12px 12px 0 0;
    transition: color .2s, border-color .2s, background .2s;
}

.formation-tabs__tab .material-symbols-outlined {
    font-size: 20px;
}

.formation-tabs__tab:hover {
    color: var(--md-sys-color-on-surface, #1a1a1a);
    background: var(--md-sys-color-surface-variant, #f5f5f5);
}

.formation-tabs__tab--active {
    color: var(--md-sys-color-primary, #DDAF25);
    border-bottom-color: var(--md-sys-color-primary, #DDAF25);
    font-weight: 600;
}
