/* JK Formations - Glassmorphism Design System */
@import url('css/glassmorphism-theme.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   Root Variables
   ============================================ */
:root {
    --navbar-height: 48px;
    --page-padding: 16px;
    --content-height: calc(100vh - var(--navbar-height) - var(--page-padding) * 2);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    overflow-x: hidden;
    color: var(--text-primary);
}

/* Responsive spacing */
@media (max-width: 960px) {
    :root { --page-padding: 12px; }
}

@media (max-width: 600px) {
    :root { --page-padding: 8px; }
}

/* ============================================
   Viewport-based Layouts
   ============================================ */
.page-container {
    height: var(--content-height);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-container-scroll {
    height: var(--content-height);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* ============================================
   Navigation Links
   ============================================ */
.nav-link {
    display: flex;
    align-items: center;
    color: var(--navbar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--navbar-text-hover);
}

.nav-link.active {
    color: var(--accent-emerald);
    border-bottom-color: var(--accent-emerald);
}

/* ============================================
   Glass Cards (KPI, etc.)
   ============================================ */
.kpi-card {
    background: var(--surface-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--surface-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   Status Badges
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-encours {
    background-color: var(--badge-encours-bg);
    color: var(--badge-encours-text);
    border: 1px solid var(--badge-encours-border);
}

.status-avenir {
    background-color: var(--badge-avenir-bg);
    color: var(--badge-avenir-text);
    border: 1px solid var(--badge-avenir-border);
}

.status-terminee {
    background-color: var(--badge-termine-bg);
    color: var(--badge-termine-text);
    border: 1px solid var(--badge-termine-border);
}

.status-annulee {
    background-color: var(--badge-annule-bg);
    color: var(--badge-annule-text);
    border: 1px solid var(--badge-annule-border);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
    height: 6px;
    background-color: var(--progress-bg);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent-emerald);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary-jk {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--btn-shadow);
}

.btn-primary-jk:hover {
    box-shadow: var(--btn-hover-shadow);
    transform: translateY(-1px);
}

/* ============================================
   Tables
   ============================================ */
.table-header {
    background: var(--surface-bg);
    border-bottom: 1px solid var(--surface-border);
}

.table-header th {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
}

.table-row {
    border-bottom: 1px solid var(--surface-border);
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background-color: var(--surface-hover-bg);
}

/* ============================================
   Error UI
   ============================================ */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Une erreur s'est produite."
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #ffcc00;
    padding: 0.75rem;
    text-align: center;
    z-index: 1000;
}

/* ============================================
   Validation
   ============================================ */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--accent-emerald);
}

.invalid {
    outline: 1px solid var(--error-icon);
}

.validation-message {
    color: var(--error-text);
    font-size: 0.875rem;
}

/* ===========================================
   DIALOG RESPONSIVE STYLES (Centralized)
   =========================================== */

.responsive-dialog {
    max-width: min(95vw, 600px);
    margin: 8px;
}

.responsive-dialog .mud-dialog-title {
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-primary);
}

.responsive-dialog .mud-dialog-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 12px 16px;
}

.responsive-dialog .mud-dialog-actions {
    padding: 8px 16px 12px;
}

.dialog-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
}

/* Laptop screens */
@media (max-height: 800px) {
    .responsive-dialog .mud-dialog-content {
        max-height: calc(100vh - 160px);
        padding: 10px 14px;
    }
    .responsive-dialog .mud-dialog-title {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    .responsive-dialog .mud-dialog-actions {
        padding: 6px 14px 10px;
    }
    .responsive-dialog .mud-grid {
        --mud-grid-spacing: 8px;
    }
    .responsive-dialog .mud-input-root {
        font-size: 0.875rem;
    }
    .responsive-dialog .mud-input-label {
        font-size: 0.8rem;
    }
}

/* Very small height */
@media (max-height: 700px) {
    .responsive-dialog .mud-dialog-content {
        max-height: calc(100vh - 140px);
        padding: 8px 12px;
    }
    .responsive-dialog .mud-dialog-title {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .responsive-dialog .mud-dialog-actions {
        padding: 4px 12px 8px;
    }
}

/* Tablet */
@media (max-width: 960px) {
    .responsive-dialog { max-width: min(95vw, 500px); }
}

/* Mobile */
@media (max-width: 600px) {
    .responsive-dialog {
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
    }
    .responsive-dialog .mud-dialog-content {
        padding: 10px 12px;
        max-height: calc(100vh - 120px);
    }
    .responsive-dialog .mud-dialog-title { padding: 10px 12px; }
    .responsive-dialog .mud-dialog-actions { padding: 8px 12px; }
    .dialog-actions { flex-direction: column-reverse; }
    .dialog-actions > * { width: 100%; }
}

/* Dialog size variants */
.formation-dialog { max-width: min(95vw, 650px); }
@media (max-width: 960px) { .formation-dialog { max-width: min(95vw, 550px); } }
@media (max-width: 600px) { .formation-dialog { max-width: 100vw; } }

.exercice-dialog { max-width: min(95vw, 700px); }
@media (max-width: 960px) { .exercice-dialog { max-width: min(95vw, 600px); } }

.activite-dialog { max-width: min(95vw, 700px); }
@media (max-width: 960px) { .activite-dialog { max-width: min(95vw, 600px); } }

.brief-dialog { max-width: min(95vw, 700px); }
@media (max-width: 960px) { .brief-dialog { max-width: min(95vw, 600px); } }

/* --- Generate AI Dialog --- */
.generated-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--badge-encours-bg);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.preview-content h1,
.preview-content h2,
.preview-content h3 {
    color: var(--text-primary);
    margin-top: 16px;
    margin-bottom: 8px;
}

.preview-content h1 { font-size: 1.3rem; }
.preview-content h2 { font-size: 1.15rem; }
.preview-content h3 { font-size: 1rem; }

.preview-content p {
    margin-bottom: 8px;
}

.preview-content ul,
.preview-content ol {
    padding-left: 20px;
    margin-bottom: 8px;
}

.preview-content li {
    margin-bottom: 4px;
}

.preview-content code {
    background: var(--tab-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.preview-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.preview-content th,
.preview-content td {
    padding: 8px 12px;
    border: 1px solid var(--surface-border);
    text-align: left;
    font-size: 0.85rem;
}

.preview-content th {
    background: var(--tab-bg);
    font-weight: 600;
}

.preview-content blockquote {
    border-left: 3px solid var(--accent-emerald);
    padding-left: 12px;
    margin: 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.preview-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===========================================
   LIST PAGE STYLES (Glassmorphism)
   =========================================== */

.list-page-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Glass page header (replaces colored gradients) */
.list-page-header {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 24px;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.list-page-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.list-page-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.list-page-header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.list-page-header-text p {
    font-size: 0.85rem;
    margin: 4px 0 0 0;
    color: var(--text-secondary);
}

.list-page-header-actions {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.list-page-header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    padding: 10px 20px;
    border-radius: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.list-page-header-btn:hover {
    background: var(--surface-hover-bg);
    transform: translateY(-2px);
}

.list-page-header-btn.primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    box-shadow: var(--btn-shadow);
}

.list-page-header-btn.primary:hover {
    box-shadow: var(--btn-hover-shadow);
}

/* Glass filters panel */
.list-filters-panel {
    background: var(--surface-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid var(--surface-border);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.list-filters-panel .filter-item {
    min-width: 150px;
    flex: 1;
    max-width: 250px;
}

.list-filters-panel .filter-item-small {
    min-width: 120px;
    flex: 0 0 auto;
    width: 150px;
}

/* Stats pills */
.list-stats-pills {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.list-stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface-bg);
    color: var(--text-secondary);
    border: 1px solid var(--surface-border);
}

.list-stat-pill.highlight {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.list-stat-pill .stat-value {
    font-weight: 700;
    font-size: 0.85rem;
}

/* Glass table container */
.list-table-container {
    flex: 1;
    min-height: 0;
    background: var(--surface-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    transition: all 0.3s ease;
}

.list-table-container ::deep .mud-table-container { height: 100%; }
.list-table-container ::deep .mud-table-root { height: 100%; display: flex; flex-direction: column; }
.list-table-container ::deep .mud-table-body { flex: 1; overflow-y: auto; }

/* Table header */
.list-table-container ::deep th {
    background: var(--surface-bg) !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary) !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--surface-border) !important;
}

/* Table rows */
.list-table-container ::deep .mud-table-row {
    transition: all 0.2s ease;
}

.list-table-container ::deep .mud-table-row:hover {
    background: var(--surface-hover-bg) !important;
}

.list-table-container ::deep td {
    padding: 12px 16px !important;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--surface-border) !important;
}

/* Modern status badges */
.status-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge-modern.encours {
    background: var(--badge-encours-bg);
    color: var(--badge-encours-text);
    border: 1px solid var(--badge-encours-border);
}

.status-badge-modern.avenir {
    background: var(--badge-avenir-bg);
    color: var(--badge-avenir-text);
    border: 1px solid var(--badge-avenir-border);
}

.status-badge-modern.termine {
    background: var(--badge-termine-bg);
    color: var(--badge-termine-text);
    border: 1px solid var(--badge-termine-border);
}

.status-badge-modern.annule {
    background: var(--badge-annule-bg);
    color: var(--badge-annule-text);
    border: 1px solid var(--badge-annule-border);
}

/* Cell content */
.list-cell-main {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.list-cell-main:hover {
    color: var(--accent-emerald);
}

.list-cell-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.list-cell-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.list-cell-badge.primary {
    background: var(--badge-avenir-bg);
    color: var(--badge-avenir-text);
}

.list-cell-badge.secondary {
    background: var(--surface-bg);
    color: var(--text-secondary);
}

/* Action menu */
.list-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.list-action-btn:hover {
    background: var(--surface-hover-bg);
}

/* Empty state */
.list-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.list-empty-state-icon {
    width: 64px;
    height: 64px;
    background: var(--surface-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.list-empty-state-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Animations */
.list-animate-in {
    animation: listSlideIn 0.4s ease-out forwards;
    opacity: 0;
}

/* Responsive - Laptop */
@media (max-height: 960px) {
    .list-page-container { gap: 12px; }
    .list-page-header { padding: 16px 20px; }
    .list-page-header-icon { width: 40px; height: 40px; }
    .list-page-header-text h1 { font-size: 1.25rem; }
    .list-filters-panel { padding: 12px 16px; gap: 10px; }
    .list-table-container ::deep th { padding: 10px 14px !important; }
    .list-table-container ::deep td { padding: 10px 14px !important; }
}

/* Responsive - Width */
@media (max-width: 960px) {
    .list-page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .list-page-header-actions { width: 100%; }
    .list-page-header-btn { flex: 1; justify-content: center; }
    .list-filters-panel { flex-direction: column; }
    .list-filters-panel .filter-item,
    .list-filters-panel .filter-item-small { width: 100%; max-width: none; }
    .list-stats-pills { width: 100%; margin-left: 0; justify-content: center; }
}

@media (max-width: 600px) {
    .list-page-header { padding: 14px 16px; border-radius: 12px; }
    .list-page-header-text h1 { font-size: 1.1rem; }
    .list-page-header-btn { padding: 8px 16px; font-size: 0.8rem; }
    .list-cell-main { font-size: 0.85rem; }
    .status-badge-modern { padding: 4px 8px; font-size: 0.65rem; }
}

/* ===================================
   Card Grid Styles (Glass)
   =================================== */
.list-cards-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px;
}

.list-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.list-card {
    background: var(--surface-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid var(--surface-border);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: cardSlideIn 0.4s ease-out forwards;
    opacity: 0;
}

.list-card:nth-child(1) { animation-delay: 0.05s; }
.list-card:nth-child(2) { animation-delay: 0.1s; }
.list-card:nth-child(3) { animation-delay: 0.15s; }
.list-card:nth-child(4) { animation-delay: 0.2s; }
.list-card:nth-child(5) { animation-delay: 0.25s; }
.list-card:nth-child(6) { animation-delay: 0.3s; }
.list-card:nth-child(7) { animation-delay: 0.35s; }
.list-card:nth-child(8) { animation-delay: 0.4s; }
.list-card:nth-child(n+9) { animation-delay: 0.45s; }

.list-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: var(--accent-emerald-glow);
}

.list-card-header {
    padding: 16px 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.list-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.list-card-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Type badges */
.list-card-badge.quiz {
    background: var(--badge-quiz-bg);
    color: var(--badge-quiz-text);
}

.list-card-badge.atelier {
    background: var(--badge-atelier-bg);
    color: var(--badge-atelier-text);
}

.list-card-badge.mise-en-situation {
    background: var(--badge-situation-bg);
    color: var(--badge-situation-text);
}

.list-card-badge.cas-pratique {
    background: var(--badge-pratique-bg);
    color: var(--badge-pratique-text);
}

.list-card-badge.autre {
    background: var(--badge-autre-bg);
    color: var(--badge-autre-text);
}

/* Niveau badges */
.list-card-badge.debutant {
    background: var(--badge-debutant-bg);
    color: var(--badge-debutant-text);
}

.list-card-badge.intermediaire {
    background: var(--badge-intermediaire-bg);
    color: var(--badge-intermediaire-text);
}

.list-card-badge.avance {
    background: var(--badge-avance-bg);
    color: var(--badge-avance-text);
}

.list-card-body {
    padding: 0 16px;
    flex: 1;
}

.list-card-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.list-card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-card-footer {
    padding: 12px 16px 16px;
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto;
    border-top: 1px solid var(--surface-border);
}

.list-card-footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.list-card-footer-icon {
    font-size: 1rem;
}

/* AI badge */
.list-card-ai-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--badge-pratique-bg);
    border-radius: 6px;
    font-size: 0.65rem;
    color: var(--badge-pratique-text);
    font-weight: 600;
}

/* Empty state cards */
.list-cards-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 24px;
    text-align: center;
    background: var(--surface-bg);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 2px dashed var(--surface-border);
}

.list-cards-empty-icon {
    width: 64px;
    height: 64px;
    background: var(--surface-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-cards-empty-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Responsive cards */
@media (max-width: 768px) {
    .list-cards-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
    .list-card-header { padding: 12px 12px 10px; }
    .list-card-body { padding: 0 12px; }
    .list-card-footer { padding: 10px 12px 12px; }
}

@media (max-width: 480px) {
    .list-cards-grid { grid-template-columns: 1fr; }
}

/* ===========================================
   MUDBLAZOR GLASSMORPHISM OVERRIDES
   =========================================== */

/* Dialog overlay */
.mud-overlay {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(4px);
}

/* Dialog - opaque solid background */
.mud-dialog {
    background: var(--dialog-bg) !important;
    border: 1px solid var(--dialog-border) !important;
    border-radius: 16px !important;
    box-shadow: var(--dialog-shadow) !important;
    color: var(--text-primary) !important;
}

.mud-dialog-title {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--separator-color);
}

.mud-dialog-content {
    color: var(--text-primary) !important;
}

.mud-dialog-actions {
    border-top: 1px solid var(--separator-color);
}

/* Input fields */
.mud-input-outlined .mud-input-outlined-border {
    border-color: var(--input-border) !important;
    transition: border-color 0.3s ease;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--input-hover-border) !important;
}

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: #10b981 !important;
}

.mud-input {
    color: var(--input-text) !important;
}

.mud-input-control {
    background: var(--input-filled-bg) !important;
    border-radius: 8px;
}

.mud-input-label {
    color: var(--label-color) !important;
}

.mud-input-label.mud-input-label-inputcontrol {
    color: var(--label-color) !important;
}

.mud-input-helper-text {
    color: var(--text-muted) !important;
}

/* Select / Autocomplete / Popover dropdowns */
.mud-popover {
    background: var(--popover-bg) !important;
    border: 1px solid var(--dialog-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--dialog-shadow) !important;
}

.mud-list-item {
    color: var(--text-primary) !important;
    transition: background 0.2s ease;
}

.mud-list-item:hover {
    background: var(--surface-hover-bg) !important;
}

/* Picker (date picker, etc.) */
.mud-picker {
    background: var(--dialog-bg) !important;
    color: var(--text-primary) !important;
}

.mud-picker-toolbar {
    background: var(--surface-bg) !important;
    color: var(--text-primary) !important;
}

.mud-picker-calendar-header-switch button {
    color: var(--text-primary) !important;
}

.mud-picker .mud-button-month,
.mud-picker .mud-button-year {
    color: var(--text-primary) !important;
}

.mud-day button {
    color: var(--text-primary) !important;
}

/* Table */
.mud-table {
    background: transparent !important;
}

.mud-table-head .mud-table-cell {
    background: var(--surface-bg) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--surface-border) !important;
}

.mud-table-body .mud-table-row:hover {
    background: var(--surface-hover-bg) !important;
}

.mud-table-cell {
    color: var(--text-primary) !important;
    border-bottom-color: var(--surface-border) !important;
}

/* Chips */
.mud-chip {
    color: var(--text-primary) !important;
}

.mud-chip.mud-chip-filled {
    background: var(--surface-bg) !important;
    border: 1px solid var(--surface-border);
}

/* Primary button */
.mud-button-filled.mud-button-primary {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: var(--btn-shadow);
    transition: all 0.3s ease;
}

.mud-button-filled.mud-button-primary:hover {
    box-shadow: var(--btn-hover-shadow);
}

/* Tabs */
.mud-tabs-toolbar {
    background: var(--surface-bg) !important;
    backdrop-filter: blur(12px);
}

.mud-tab {
    color: var(--tab-text) !important;
    transition: all 0.3s ease;
}

.mud-tab:hover {
    background: var(--tab-hover-bg) !important;
}

.mud-tab.mud-tab-active {
    color: var(--tab-active-text) !important;
}

.mud-tabs-toolbar .mud-tab-slider {
    background: var(--tab-indicator) !important;
}

/* Expansion panels */
.mud-expand-panel {
    background: var(--surface-bg) !important;
    border: 1px solid var(--surface-border) !important;
    color: var(--text-primary) !important;
}

/* Snackbar */
.mud-snackbar {
    backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
}

/* Menu */
.mud-menu .mud-list {
    background: var(--card-bg) !important;
    backdrop-filter: blur(20px) !important;
}

/* DatePicker */
.mud-picker {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
}

.mud-picker-toolbar {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

/* Divider */
.mud-divider {
    border-color: var(--separator-color) !important;
}

/* Progress circular */
.mud-progress-circular {
    color: var(--accent-emerald) !important;
}

/* Tooltip */
.mud-tooltip {
    background: var(--card-bg) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
}
