/**
 * Styles personnalisés GPAO
 * Lycée Romain Rolland
 */

/* Variables de couleurs */
:root {
    --primary-color: #1a4d8c;
    --primary-light: #4a90c2;
    --primary-dark: #0d2b4d;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-bg: #f5f7fa;
    --white: #ffffff;
}

/* Anti scroll horizontal global */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Réduire double padding container-fluid imbriqués sur mobile */
@media (max-width: 576px) {
    main.container-fluid > .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Navbar compacte quand déployée — réduire padding des liens */
.navbar .nav-link {
    font-size: 0.88rem;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    white-space: nowrap;
}

.navbar-brand span {
    font-size: 0.95rem;
}

/* Surcharge Bootstrap avec couleurs du lycée */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Corps de page */
body {
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Page de login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.login-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.login-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 30px;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    transition: transform 0.2s;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    padding: 0.5rem 1rem !important;
    transition: background-color 0.2s;
    border-radius: 5px;
    margin: 0 2px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Cards personnalisées */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* Dashboard stats */
.stat-card {
    text-align: center;
    padding: 25px 20px;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    color: var(--primary-dark);
}

.table-hover tbody tr:hover {
    background-color: rgba(26, 77, 140, 0.05);
}

/* Badges de statut */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* Boutons d'action */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group-actions .btn {
    margin: 0 2px;
}

/* Formulaires */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(26, 77, 140, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--primary-dark);
}

/* Checkboxes stylisées */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Liste des élèves avec checkbox */
.eleve-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.eleve-list .form-check {
    padding: 10px 15px 10px 40px;
    border-bottom: 1px solid #eee;
    margin: 0;
}

.eleve-list .form-check:last-child {
    border-bottom: none;
}

.eleve-list .form-check:hover {
    background-color: var(--light-bg);
}

/* Workflow statut */
.workflow-status {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
}

.workflow-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.workflow-step::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 3px;
    background-color: #dee2e6;
    z-index: 0;
}

.workflow-step:last-child::after {
    display: none;
}

.workflow-step.active::after,
.workflow-step.completed::after {
    background-color: var(--success-color);
}

.workflow-step .step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #dee2e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.workflow-step.completed .step-icon {
    background-color: var(--success-color);
    color: white;
}

.workflow-step.active .step-icon {
    background-color: var(--primary-color);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(26, 77, 140, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(26, 77, 140, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(26, 77, 140, 0);
    }
}

.workflow-step .step-label {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.workflow-step.active .step-label,
.workflow-step.completed .step-label {
    color: var(--primary-dark);
    font-weight: 500;
}

/* Compte rendu */
.compte-rendu-area {
    min-height: 200px;
    resize: vertical;
}

/* Bilan élève */
.bilan-moyenne {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.bilan-label {
    font-size: 1.1rem;
    color: var(--secondary-color);
}

/* Note affichée */
.note-display {
    font-size: 1.5rem;
    font-weight: 700;
}

.note-display.excellent {
    color: var(--success-color);
}

.note-display.bien {
    color: var(--primary-color);
}

.note-display.moyen {
    color: var(--warning-color);
}

.note-display.insuffisant {
    color: var(--danger-color);
}

/* Navbar repliée (sous xl = 1200px) */
@media (max-width: 1199.98px) {
    .navbar .nav-link {
        font-size: 0.9rem;
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }

    .navbar-brand img {
        height: 30px !important;
    }

    .navbar .dropdown-toggle {
        font-size: 0.9rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .login-card {
        margin: 15px;
        padding: 25px;
    }

    .stat-card {
        padding: 15px 10px;
    }

    .stat-card .stat-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .stat-card .stat-number {
        font-size: 1.5rem;
    }

    .stat-card .stat-label {
        font-size: 0.8rem;
    }

    /* Dashboard cartes action — empiler sur mobile */
    .card-body.d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .card-body.d-flex.justify-content-between > .btn,
    .card-body.d-flex.justify-content-between > a.btn {
        align-self: stretch;
        text-align: center;
    }

    /* H1 dashboards */
    h1 {
        font-size: 1.4rem;
    }

    .workflow-status {
        justify-content: center;
        gap: 5px;
    }

    .workflow-step {
        flex: 0 1 auto;
    }

    .workflow-step .step-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .workflow-step .step-label {
        font-size: 0.7rem;
        margin-top: 5px;
    }

    .workflow-step::after {
        display: none;
    }

    /* Correction des compétences sur mobile */
    .competence-item .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .competence-item .d-flex.gap-2.ms-3 {
        margin-left: 0 !important;
        margin-top: 10px;
    }

    /* Résultat compétences élève - tableau en blocs sur mobile */
    .card-body .table-sm tbody tr {
        display: flex;
        flex-direction: column;
        padding: 10px;
        border-bottom: 1px solid #dee2e6;
    }

    .card-body .table-sm tbody tr td {
        width: 100% !important;
        padding: 3px 0;
        border: none;
    }

    .card-body .table-sm tbody tr td:last-child {
        margin-top: 5px;
    }

    .table-responsive-actions {
        white-space: nowrap;
    }

    .btn-group-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .btn-group-actions .btn {
        margin: 0;
    }

    /* QCM interactifs — responsive mobile */
    .assoc-label {
        min-width: auto;
        font-size: 0.85em;
        padding: 6px 10px;
    }

    .assoc-drop-zone {
        min-height: 38px;
        padding: 4px 8px;
    }

    .assoc-item, .cat-item {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    .ordo-list {
        max-width: 100%;
    }

    .ordo-item {
        padding: 8px 10px;
        gap: 8px;
        font-size: 0.9em;
    }

    .ordo-handle {
        font-size: 1.4em;
        padding: 4px;
    }

    .cat-source-list {
        gap: 4px;
    }

    .cat-drop-zone {
        min-height: 60px;
    }

    /* QCM navigation boutons */
    .qcm-association .row,
    .qcm-association-correction .row {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ================================================
   MODE SOMBRE (Dark Mode)
   Bootstrap 5.3 data-bs-theme="dark"
   ================================================ */

/* --- Variables dark mode --- */
[data-bs-theme="dark"] {
    --light-bg: #1a1d21;
    --white: #212529;
    --primary-color: #4a90c2;
    --primary-light: #6ba7d7;
    --primary-dark: #a0c4e8;
    --secondary-color: #9da5ad;
    --dark-surface: #2b3035;
    --dark-surface-hover: #32383e;
    --dark-border: #373b3f;
    --dark-text: #dee2e6;
    --dark-text-muted: #9da5ad;
}

/* --- Base : body, main, conteneurs --- */
[data-bs-theme="dark"] body {
    background-color: #1a1d21;
    color: #dee2e6;
}

[data-bs-theme="dark"] main {
    background-color: #1a1d21;
}

[data-bs-theme="dark"] .container-fluid,
[data-bs-theme="dark"] .container {
    color: #dee2e6;
}

/* --- Titres et textes --- */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: #e9ecef;
}

[data-bs-theme="dark"] .text-muted {
    color: #9da5ad !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.list-group-item):not(.page-link):not(.dropdown-item) {
    color: #6ba7d7;
}

/* --- Utilitaires Bootstrap surcharges --- */
[data-bs-theme="dark"] .bg-light {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .border {
    border-color: #373b3f !important;
}

[data-bs-theme="dark"] .border-top {
    border-top-color: #373b3f !important;
}

[data-bs-theme="dark"] .border-bottom {
    border-bottom-color: #373b3f !important;
}

/* --- Cards --- */
[data-bs-theme="dark"] .card {
    background-color: #2b3035;
    border-color: #373b3f;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .card-header {
    background-color: #2b3035;
    border-bottom-color: #373b3f;
    color: #dee2e6;
}

[data-bs-theme="dark"] .card-body {
    background-color: #2b3035;
    color: #dee2e6;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #2b3035;
    border-top-color: #373b3f;
}

/* --- Tables --- */
[data-bs-theme="dark"] .table {
    --bs-table-bg: #2b3035;
    --bs-table-color: #dee2e6;
    --bs-table-border-color: #373b3f;
    --bs-table-striped-bg: #32383e;
    --bs-table-hover-bg: rgba(107, 167, 215, 0.1);
    color: #dee2e6;
}

[data-bs-theme="dark"] .table thead th {
    background-color: #242830;
    border-bottom-color: #6ba7d7;
    color: #dee2e6;
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
    border-color: #373b3f;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(107, 167, 215, 0.1);
    color: #dee2e6;
}

[data-bs-theme="dark"] .table-responsive {
    background-color: #2b3035;
}

/* --- Formulaires --- */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1a1d21;
    border-color: #495057;
    color: #dee2e6;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #1a1d21;
    border-color: #6ba7d7;
    color: #dee2e6;
    box-shadow: 0 0 0 0.2rem rgba(107, 167, 215, 0.25);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #6c757d;
}

[data-bs-theme="dark"] .form-label {
    color: #dee2e6;
}

[data-bs-theme="dark"] .form-text {
    color: #9da5ad;
}

[data-bs-theme="dark"] .form-check-label {
    color: #dee2e6;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #32383e;
    border-color: #495057;
    color: #dee2e6;
}

/* --- Navbar --- */
[data-bs-theme="dark"] .navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* --- Dropdowns --- */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2b3035;
    border-color: #373b3f;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .dropdown-item {
    color: #dee2e6;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #32383e;
    color: #ffffff;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-top-color: #373b3f;
}

[data-bs-theme="dark"] .dropdown-item-text {
    color: #9da5ad !important;
}

/* --- Modals --- */
[data-bs-theme="dark"] .modal-content {
    background-color: #2b3035;
    border-color: #373b3f;
    color: #dee2e6;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #373b3f;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #373b3f;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* --- List groups --- */
[data-bs-theme="dark"] .list-group-item {
    background-color: #2b3035;
    border-color: #373b3f;
    color: #dee2e6;
}

[data-bs-theme="dark"] .list-group-item:hover {
    background-color: #32383e;
}

[data-bs-theme="dark"] .list-group-item-action:hover {
    background-color: #32383e;
    color: #dee2e6;
}

/* --- Breadcrumb --- */
[data-bs-theme="dark"] .breadcrumb {
    background-color: transparent;
}

[data-bs-theme="dark"] .breadcrumb-item a {
    color: #6ba7d7;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #9da5ad;
}

[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* --- Pagination --- */
[data-bs-theme="dark"] .page-link {
    background-color: #2b3035;
    border-color: #373b3f;
    color: #6ba7d7;
}

[data-bs-theme="dark"] .page-link:hover {
    background-color: #32383e;
    border-color: #495057;
    color: #a0c4e8;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #4a90c2;
    border-color: #4a90c2;
    color: #ffffff;
}

[data-bs-theme="dark"] .page-item.disabled .page-link {
    background-color: #1a1d21;
    border-color: #373b3f;
    color: #495057;
}

/* --- Boutons outline en dark mode --- */
[data-bs-theme="dark"] .btn-outline-secondary {
    color: #9da5ad;
    border-color: #495057;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #495057;
    color: #ffffff;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #6ba7d7;
    border-color: #6ba7d7;
}

[data-bs-theme="dark"] .btn-outline-danger {
    color: #e57373;
    border-color: #e57373;
}

/* --- Stat cards (dashboard) --- */
[data-bs-theme="dark"] .stat-card {
    color: white;
}

/* --- Alerts --- */
[data-bs-theme="dark"] .alert {
    border-color: #373b3f;
}

/* --- Login --- */
[data-bs-theme="dark"] .login-card {
    background: #2b3035;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .login-container {
    background: linear-gradient(135deg, #0d2b4d 0%, #1a4d8c 100%);
}

[data-bs-theme="dark"] .login-title {
    color: #6ba7d7;
}

/* --- Eleve list (checkbox lists) --- */
[data-bs-theme="dark"] .eleve-list {
    border-color: #373b3f;
    background-color: #2b3035;
}

[data-bs-theme="dark"] .eleve-list .form-check {
    border-bottom-color: #373b3f;
}

[data-bs-theme="dark"] .eleve-list .form-check:hover {
    background-color: #32383e;
}

/* --- Workflow / Progression stages --- */
[data-bs-theme="dark"] .workflow-step .step-icon {
    background-color: #495057;
}

[data-bs-theme="dark"] .workflow-step .step-label {
    color: #9da5ad;
}

[data-bs-theme="dark"] .workflow-step.active .step-label,
[data-bs-theme="dark"] .workflow-step.completed .step-label {
    color: #dee2e6;
}

[data-bs-theme="dark"] .workflow-step::after {
    background-color: #495057;
}

/* --- Competences --- */
[data-bs-theme="dark"] .legende-competences {
    background-color: #2b3035;
}

[data-bs-theme="dark"] .competence-item {
    border-left-color: #6ba7d7;
}

[data-bs-theme="dark"] .competence-groupe {
    background-color: #1a4d8c;
}

/* --- Bilan --- */
[data-bs-theme="dark"] .bilan-moyenne {
    color: #6ba7d7;
}

[data-bs-theme="dark"] .bilan-label {
    color: #9da5ad;
}

/* --- Notice --- */
[data-bs-theme="dark"] .notice-block {
    background-color: #2b3035;
    border-color: #373b3f;
}

[data-bs-theme="dark"] .notice-block h4 {
    color: #6ba7d7;
    border-bottom-color: #373b3f;
}

[data-bs-theme="dark"] .notice-block h5 {
    color: #6ba7d7;
    border-bottom-color: #373b3f;
}

[data-bs-theme="dark"] .notice-header {
    background: linear-gradient(135deg, #2b3035 0%, #1a2332 100%);
    border-color: #373b3f;
}

[data-bs-theme="dark"] .notice-tip {
    background-color: #1a3040;
    border-left-color: #17a2b8;
    color: #b8d8e8;
}

[data-bs-theme="dark"] .notice-important {
    background-color: #3d3000;
    border-left-color: #ffc107;
    color: #e8d89a;
}

[data-bs-theme="dark"] .notice-selector {
    background-color: #2b3035;
    border-color: #373b3f;
}

/* --- Module Projet --- */
[data-bs-theme="dark"] .projet-progress::before {
    background: #495057;
}

[data-bs-theme="dark"] .projet-progress-step .step-circle {
    border-color: #495057;
    background: #2b3035;
    color: #dee2e6;
}

[data-bs-theme="dark"] .projet-progress-step .step-label {
    color: #9da5ad;
}

[data-bs-theme="dark"] .projet-timeline::before {
    background: #495057;
}

[data-bs-theme="dark"] .mur-messages {
    background: #1a1d21;
}

[data-bs-theme="dark"] .mur-bulle {
    background: #2b3035;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    color: #dee2e6;
}

[data-bs-theme="dark"] .mur-bulle .mur-heure {
    color: #9da5ad;
}

/* --- Journal de bord / PFMP --- */
[data-bs-theme="dark"] .journal-entree {
    border-left-color: #6ba7d7;
}

[data-bs-theme="dark"] .journal-date {
    color: #6ba7d7;
}

[data-bs-theme="dark"] .journal-photo {
    border-color: #373b3f;
}

[data-bs-theme="dark"] .journal-photo:hover {
    border-color: #6ba7d7;
}

/* --- Liens utiles (dashboard eleve) --- */
[data-bs-theme="dark"] .lien-utile {
    border-color: #373b3f !important;
}

[data-bs-theme="dark"] .lien-utile:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* --- Footer --- */
[data-bs-theme="dark"] footer.footer {
    background-color: #2b3035 !important;
    border-top-color: #373b3f !important;
}

/* --- Spinner overlay --- */
[data-bs-theme="dark"] .spinner-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

/* --- Scrollbar dark mode --- */
[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #1a1d21;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #495057;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #6ba7d7;
}

/* --- Accordions --- */
[data-bs-theme="dark"] .accordion-item {
    background-color: #2b3035;
    border-color: #373b3f;
}

[data-bs-theme="dark"] .accordion-button {
    background-color: #2b3035;
    color: #dee2e6;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #32383e;
    color: #6ba7d7;
}

[data-bs-theme="dark"] .accordion-body {
    background-color: #2b3035;
}

/* --- Divers --- */
[data-bs-theme="dark"] hr {
    border-color: #373b3f;
}

[data-bs-theme="dark"] code {
    color: #e57373;
    background-color: #32383e;
}

[data-bs-theme="dark"] pre {
    background-color: #1a1d21;
    color: #dee2e6;
    border-color: #373b3f;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Liens utiles sur dashboard eleve */
.lien-utile {
    transition: all 0.3s ease;
    border-width: 2px !important;
}

.lien-utile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.lien-utile:hover .lien-icon {
    transform: scale(1.1);
}

.lien-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.lien-utile .card-body {
    padding: 1rem;
}

@media (max-width: 768px) {
    .lien-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lien-utile h6 {
        font-size: 0.9rem;
    }
}

/* Couleur orange pour les competences */
.bg-orange {
    background-color: #fd7e14 !important;
    color: white;
}

/* Styles pour les competences */
.competence-niveau {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid transparent;
}

.competence-niveau:hover {
    transform: scale(1.1);
}

.competence-niveau.selected {
    box-shadow: 0 0 0 3px rgba(0,0,0,0.3);
    transform: scale(1.15);
}

.competence-niveau-1 { background-color: #fd7e14; color: white; }
.competence-niveau-2 { background-color: #ffc107; color: #000; }
.competence-niveau-3 { background-color: #5cb85c; color: white; }
.competence-niveau-4 { background-color: #0f5132; color: white; }

/* Badges TP progression dans tableau synthese competences */
.badge-tp-progression {
    font-size: 0.7rem;
    padding: 0.2em 0.45em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s;
    display: inline-block;
}
.badge-tp-progression:hover {
    transform: scale(1.25);
    text-decoration: none;
}

.competence-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.85em;
    font-weight: 600;
    border-radius: 0.375rem;
}

.competence-groupe {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.competence-item {
    border-left: 4px solid var(--primary-light);
    padding-left: 15px;
    margin-bottom: 15px;
}

.legende-competences {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 15px;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legende-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* ================================================
   NOTICE D'UTILISATION
   ================================================ */

/* En-tête de notice */
.notice-header {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--light-bg) 0%, #e8eef5 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.notice-header h2 {
    color: var(--primary-color);
    margin-top: 0.75rem;
    font-weight: 700;
}

.notice-header .display-4 {
    font-size: 3rem;
}

/* Section notice */
.notice-section {
    margin-bottom: 3rem;
}

/* Bloc de notice (remplace les accordéons) */
.notice-block {
    background-color: var(--white);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.notice-block h4 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #e8eef5;
}

.notice-block h4 i {
    color: var(--primary-light);
}

.notice-block h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #e8eef5;
}

.notice-block h5:first-of-type {
    margin-top: 0.5rem;
}

.notice-block ul,
.notice-block ol {
    margin-bottom: 1rem;
}

.notice-block li {
    margin-bottom: 0.4rem;
}

/* Callout Astuce */
.notice-tip {
    background-color: #d1ecf1;
    border-left: 4px solid var(--info-color);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin: 1.25rem 0;
    font-size: 0.93rem;
}

.notice-tip::before {
    content: "\F431";
    font-family: "bootstrap-icons";
    margin-right: 0.5rem;
    color: var(--info-color);
    font-weight: bold;
}

/* Callout Important */
.notice-important {
    background-color: #fff3cd;
    border-left: 4px solid var(--warning-color);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    margin: 1.25rem 0;
    font-size: 0.93rem;
}

.notice-important::before {
    content: "\F33B";
    font-family: "bootstrap-icons";
    margin-right: 0.5rem;
    color: var(--warning-color);
    font-weight: bold;
}

/* Sélecteur admin */
.notice-selector {
    background-color: var(--white);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.notice-selector .btn-group .btn {
    border-radius: 6px !important;
    margin: 3px;
    font-size: 0.9rem;
}

/* Page break pour impression multi-notices */
.page-break {
    height: 0;
    margin: 0;
    padding: 0;
}

/* ================================================
   IMPRESSION — NOTICE
   ================================================ */
@media print {
    /* Masquer les éléments non imprimables */
    .no-print,
    .notice-selector {
        display: none !important;
    }

    /* En-tête notice simplifié */
    .notice-header {
        background: none !important;
        border: 2px solid var(--primary-color);
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Blocs notice */
    .notice-block {
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
    }

    /* Callouts */
    .notice-tip {
        background-color: #eef7fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .notice-important {
        background-color: #fff8e1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Saut de page entre notices */
    .page-break {
        page-break-before: always;
        break-before: page;
    }

    /* Badges lisibles en N&B */
    .badge {
        border: 1px solid #999 !important;
        color: #333 !important;
        background-color: #eee !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ============================================ */
/* MODULE PROJET                                */
/* ============================================ */

/* Barre de progression projet */
.projet-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 0 20px;
}

.projet-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #dee2e6;
    z-index: 0;
}

.projet-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.projet-progress-step .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #dee2e6;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.projet-progress-step.done .step-circle {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

.projet-progress-step.active .step-circle {
    border-color: #ffc107;
    background: #ffc107;
    color: #333;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.3);
}

.projet-progress-step .step-label {
    font-size: 0.7rem;
    color: #6c757d;
    line-height: 1.2;
}

/* Timeline de workflow (enseignant) */
.projet-timeline {
    position: relative;
    padding: 10px 0;
}

.projet-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #dee2e6;
}

.projet-etape {
    position: relative;
    padding-left: 50px;
    margin-bottom: 25px;
    min-height: 40px;
}

.projet-etape-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    z-index: 1;
}

.projet-etape-icon.valide { background: #28a745; }
.projet-etape-icon.en-cours { background: #ffc107; color: #333; }
.projet-etape-icon.soumis { background: #17a2b8; }
.projet-etape-icon.refuse { background: #dc3545; }
.projet-etape-icon.verrouille { background: #adb5bd; }

/* Mur collaboratif */
.mur-messages {
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.mur-message {
    display: flex;
    margin-bottom: 12px;
    gap: 10px;
    align-items: flex-start;
}

.mur-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.mur-bulle {
    background: white;
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 75%;
    word-break: break-word;
}

.mur-bulle .mur-auteur {
    font-weight: 600;
    font-size: 0.85rem;
}

.mur-bulle .mur-heure {
    font-size: 0.7rem;
    color: #6c757d;
    margin-left: 8px;
}

.mur-bulle .mur-texte {
    margin-top: 4px;
    font-size: 0.9rem;
}

/* Journal de bord */
.journal-entree {
    border-left: 3px solid #1a4d8c;
    padding-left: 15px;
    margin-bottom: 25px;
    padding-bottom: 5px;
}

.journal-date {
    font-weight: 600;
    color: #1a4d8c;
}

.journal-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.journal-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: transform 0.2s;
}

.journal-photo:hover {
    transform: scale(1.05);
    border-color: #1a4d8c;
}

/* ============================================
   QCM INTERACTIF — DRAG AND DROP
   ============================================ */

/* Association */
.assoc-label {
    background: #e3f2fd;
    border: 2px solid #1976d2;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

.assoc-drop-zone {
    border: 2px dashed #90caf9;
    border-radius: 8px;
    min-height: 44px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.assoc-drop-zone:empty .assoc-placeholder,
.assoc-drop-zone .assoc-placeholder { display: block; }
.assoc-drop-zone .assoc-item ~ .assoc-placeholder { display: none; }

.assoc-item, .cat-item {
    background: #fff;
    border: 1px solid #bdbdbd;
    border-radius: 6px;
    padding: 7px 12px;
    margin-bottom: 6px;
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.15s;
    user-select: none;
}

.assoc-item:hover, .cat-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.assoc-source-list {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    min-height: 60px;
}

/* Ordonnancement */
.ordo-list {
    max-width: 600px;
}

.ordo-item {
    background: #fff;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.15s;
    user-select: none;
}

.ordo-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.ordo-handle {
    color: #9e9e9e;
    cursor: grab;
    font-size: 1.2em;
}

.ordo-numero {
    background: #1976d2;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 700;
    flex-shrink: 0;
}

.ordo-texte {
    flex-grow: 1;
}

/* Catégorisation */
.cat-source-list {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cat-zone-container {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.cat-zone-title {
    background: #e8eaf6;
    padding: 8px 12px;
    margin: 0;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #c5cae9;
}

.cat-drop-zone {
    min-height: 80px;
    padding: 8px;
    position: relative;
}

.cat-drop-zone:empty .cat-placeholder,
.cat-drop-zone .cat-placeholder { display: block; text-align: center; padding: 10px; }
.cat-drop-zone .cat-item ~ .cat-placeholder { display: none; }

/* SortableJS ghost / chosen / drag classes */
.sortable-ghost {
    opacity: 0.4;
    background: #bbdefb !important;
    border-color: #1976d2 !important;
}

.sortable-chosen {
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.sortable-drag {
    opacity: 0.9;
}

/* Warning border pour validation incomplète */
.qcm-association.border-warning,
.qcm-categorisation.border-warning {
    border: 2px solid #ff9800 !important;
    border-radius: 8px;
    padding: 8px;
}

/* ============================================
   QCM INTERACTIF — DARK MODE
   ============================================ */
[data-bs-theme="dark"] .assoc-label {
    background: #1a3a5c;
    border-color: #42a5f5;
    color: #e3f2fd;
}

[data-bs-theme="dark"] .assoc-drop-zone {
    border-color: #37474f;
}

[data-bs-theme="dark"] .assoc-item,
[data-bs-theme="dark"] .cat-item {
    background: #263238;
    border-color: #455a64;
    color: #eceff1;
}

[data-bs-theme="dark"] .assoc-source-list,
[data-bs-theme="dark"] .cat-source-list {
    background: #1e272e;
    border-color: #37474f;
}

[data-bs-theme="dark"] .ordo-item {
    background: #263238;
    border-color: #455a64;
    color: #eceff1;
}

[data-bs-theme="dark"] .cat-zone-container {
    border-color: #455a64;
}

[data-bs-theme="dark"] .cat-zone-title {
    background: #1a237e;
    border-color: #283593;
    color: #c5cae9;
}

[data-bs-theme="dark"] .sortable-ghost {
    background: #1a3a5c !important;
    border-color: #42a5f5 !important;
}

/* ============================================================
   CARTE ÉLÈVE TYPE TCG — titres de compétences
   validé = vert clair (niveau 3) · renforcé = vert foncé (niveau 4, brillant)
   ============================================================ */
.carte-tcg {
    max-width: 430px;
    margin: 0 auto 1.5rem;
    perspective: 900px;
}
.carte-tcg-bordure {
    border-radius: 16px;
    padding: 5px;
    background: linear-gradient(135deg, #b98a44 0%, #e8c778 22%, #8a5f2a 48%, #e8c778 76%, #b98a44 100%);
    box-shadow: 0 6px 22px rgba(13, 43, 77, .35);
    position: relative;
    overflow: hidden;
}
.carte-tcg-brillante .carte-tcg-bordure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.38) 47%, rgba(255,255,255,.12) 52%, transparent 65%);
    background-size: 260% 100%;
    animation: tcg-brillance 4.2s ease-in-out infinite;
    pointer-events: none;
    border-radius: 16px;
}
@keyframes tcg-brillance {
    0%   { background-position: 120% 0; }
    55%  { background-position: -60% 0; }
    100% { background-position: -60% 0; }
}
.carte-tcg-interieur {
    background:
        radial-gradient(circle at 85% 12%, rgba(232, 199, 120, .14), transparent 45%),
        linear-gradient(160deg, #0d2b4d 0%, #123a63 55%, #0a2038 100%);
    border-radius: 12px;
    padding: 18px 18px 12px;
    color: #f2f6fa;
    position: relative;
}
.carte-tcg-entete {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.carte-tcg-prenom {
    font-size: 1.05rem;
    letter-spacing: .04em;
    opacity: .9;
}
.carte-tcg-nom {
    font-size: 1.45rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.1;
}
.carte-tcg-classe {
    background: rgba(232, 199, 120, .16);
    border: 1px solid #e8c778;
    color: #e8c778;
    border-radius: 6px;
    padding: 3px 10px;
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
}
.carte-tcg-filet {
    height: 2px;
    margin: 12px 0;
    background: linear-gradient(90deg, transparent, #e8c778 25%, #e8c778 75%, transparent);
    opacity: .55;
}
.carte-tcg-titres {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 60px;
}
.titre-tcg {
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 8px;
    padding: 7px 11px;
    font-weight: 600;
    font-size: .95rem;
    position: relative;
    overflow: hidden;
}
.titre-tcg i { font-size: 1.05rem; }
.titre-tcg .titre-etoile { margin-left: auto; font-size: .95rem; }
.titre-valide {
    background: rgba(92, 184, 92, .16);
    border: 1px solid #5cb85c;
    color: #9fdca0;
}
.titre-renforce {
    background: linear-gradient(120deg, rgba(15, 81, 50, .85), rgba(23, 111, 69, .85));
    border: 1px solid #e8c778;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(232, 199, 120, .25);
}
.titre-renforce::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.35) 48%, transparent 60%);
    background-size: 240% 100%;
    animation: tcg-brillance 3.4s ease-in-out infinite;
    pointer-events: none;
}
.titre-verrouille {
    background: rgba(160, 172, 184, .10);
    border: 1px dashed rgba(160, 172, 184, .45);
    color: #9aa7b4;
    font-weight: 500;
}
.carte-tcg-pied {
    margin-top: 12px;
    text-align: center;
}
.carte-tcg-pied a {
    color: #e8c778;
    text-decoration: none;
    font-size: .85rem;
}
.carte-tcg-pied a:hover { text-decoration: underline; }

/* Page collection */
.collection-titres .titre-tcg { margin-bottom: 0; height: 100%; }
.collection-titres .card-titre {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 10px;
    padding: 12px;
    height: 100%;
    background: var(--bs-body-bg, #fff);
}
.collection-titres .card-titre .source {
    font-size: .8rem;
    color: #6c757d;
    margin: 6px 0 0;
}
@media (prefers-reduced-motion: reduce) {
    .carte-tcg-brillante .carte-tcg-bordure::after,
    .titre-renforce::after { animation: none; }
}
@media (max-width: 576px) {
    .carte-tcg { max-width: 100%; }
}

/* Carte TCG — moyenne et frise de progression programme */
.carte-tcg-entete-droite {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.carte-tcg-moyenne {
    background: rgba(232, 199, 120, .12);
    border: 1px solid rgba(232, 199, 120, .55);
    border-radius: 8px;
    padding: 2px 10px;
    line-height: 1.2;
    text-align: center;
}
.carte-tcg-moyenne .valeur {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e8c778;
}
.carte-tcg-moyenne .sur {
    font-size: .8rem;
    color: rgba(232, 199, 120, .75);
    margin-left: 2px;
}
.carte-tcg-frise { margin-top: 12px; }
.frise-barre {
    position: relative;
    height: 10px;
    border-radius: 5px;
    background: rgba(242, 246, 250, .14);
    overflow: visible;
}
.frise-fait {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #b98a44, #e8c778);
    box-shadow: 0 0 6px rgba(232, 199, 120, .4);
    transition: width .6s ease;
}
.frise-repere {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 18px;
    border-radius: 2px;
    background: #f2f6fa;
    box-shadow: 0 0 4px rgba(0, 0, 0, .5);
    transform: translateX(-50%);
}
.frise-legende {
    display: flex;
    flex-wrap: wrap;          /* 08/09/2026 : chaque span sur sa ligne entière plutôt qu'en dents de scie */
    column-gap: 12px;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 5px;
    font-size: .78rem;
    color: rgba(242, 246, 250, .8);
}
.frise-legende .frise-etat { margin-left: auto; text-align: right; }
.frise-etat { font-weight: 600; }
.frise-rythme  { color: #9fdca0; }
.frise-avance  { color: #e8c778; }
.frise-retard  { color: #f1a9a0; }
.frise-neutre  { color: rgba(242, 246, 250, .75); }

/* Frise de progression sur la page Bilans (enseignant) — hors carte TCG,
   couleurs adaptées au fond des cartes via les variables Bootstrap (clair/sombre) */
.frise-bilan .frise-barre { background: var(--bs-secondary-bg, #e9ecef); }
.frise-bilan .frise-fait { box-shadow: none; }
.frise-bilan .frise-repere { background: var(--bs-body-color, #212529); box-shadow: none; }
.frise-bilan .frise-legende { color: var(--bs-secondary-color, #6c757d); }
.frise-bilan .frise-neutre { color: var(--bs-secondary-color, #6c757d); }
.frise-bilan .frise-rythme { color: var(--bs-success, #198754); }
.frise-bilan .frise-avance { color: #b98a44; }
.frise-bilan .frise-retard { color: var(--bs-danger, #dc3545); }
[data-bs-theme="dark"] .frise-bilan .frise-avance { color: #e8c778; }
[data-bs-theme="dark"] .frise-bilan .frise-rythme { color: #9fdca0; }
[data-bs-theme="dark"] .frise-bilan .frise-retard { color: #f1a9a0; }

/* Carte TCG intégrée au tableau de bord : occupe sa colonne, sans centrage flottant */
.col-lg-5 .carte-tcg, .col-xl-4 .carte-tcg, .col-lg-4 .carte-tcg {
    max-width: none;
    margin: 0;
    height: 100%;
}
.col-lg-5 .carte-tcg .carte-tcg-bordure, .col-xl-4 .carte-tcg .carte-tcg-bordure, .col-lg-4 .carte-tcg .carte-tcg-bordure {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.col-lg-5 .carte-tcg .carte-tcg-interieur, .col-xl-4 .carte-tcg .carte-tcg-interieur, .col-lg-4 .carte-tcg .carte-tcg-interieur {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.col-lg-5 .carte-tcg .carte-tcg-titres, .col-xl-4 .carte-tcg .carte-tcg-titres, .col-lg-4 .carte-tcg .carte-tcg-titres {
    flex: 1;
}

/* ============================================================
   Barre de temps a DEUX CURSEURS (Gestion peda, lot 3 - 24/08/2026)
   Le trait plein = la classe (heures d'atelier ouvertes) ;
   le trait POINTILLE = l'eleve (ses absences deduites).
   L'ecart entre les deux se lit d'un coup d'oeil : ce sont les
   absences ; l'ecart entre son trait et la barre, le travail.
   ============================================================ */
.frise-repere-eleve {
    background: repeating-linear-gradient(
        to bottom, #ffb020 0 3px, transparent 3px 5px);
    box-shadow: 0 0 4px rgba(0, 0, 0, .45);
}
.frise-bilan .frise-repere-eleve {
    background: repeating-linear-gradient(
        to bottom, #b35309 0 3px, transparent 3px 5px);
    box-shadow: none;
}
[data-bs-theme="dark"] .frise-bilan .frise-repere-eleve {
    background: repeating-linear-gradient(
        to bottom, #ffb020 0 3px, transparent 3px 5px);
}

/* 08/09/2026 — Barre de temps : les TP rendus en attente de correction.
   Segment hachuré posé juste après la barre dorée (carte élève) ; état
   « attente » en bleu doux : ce n'est ni un retard, ni une avance. */
.frise-encours {
    position: absolute;
    top: 0;
    height: 100%;
    background: repeating-linear-gradient(45deg, rgba(232, 199, 120, .7) 0 4px, rgba(232, 199, 120, .25) 4px 8px);
    border-radius: 0 5px 5px 0;
}
.frise-encours.frise-encours-debut, .frise-arendre.frise-encours-debut { border-radius: 5px; } /* part du bord de la pilule : coins gauches arrondis aussi — deux classes pour battre .frise-arendre déclaré plus bas */
/* Les TP EN COURS, à rendre : hachures plus légères, dans l'autre sens (08/09/2026) */
.frise-arendre {
    position: absolute;
    top: 0;
    height: 100%;
    background: repeating-linear-gradient(-45deg, rgba(232, 199, 120, .45) 0 3px, rgba(232, 199, 120, .08) 3px 8px);
    border-radius: 0 5px 5px 0;
}
.frise-bilan .frise-arendre {
    background: repeating-linear-gradient(-45deg, rgba(185, 138, 68, .55) 0 3px, rgba(185, 138, 68, .12) 3px 8px);
}
/* Un segment suivi d'un autre garde une jonction droite : pas d'encoche entre les hachures (:has = amélioration progressive) */
.frise-fait:has(+ .frise-encours), .frise-fait:has(+ .frise-arendre), .frise-encours:has(+ .frise-arendre) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.frise-attente { color: #9fd3e8; }
.frise-bilan .frise-encours {
    background: repeating-linear-gradient(45deg, rgba(185, 138, 68, .85) 0 4px, rgba(185, 138, 68, .3) 4px 8px);
}
.frise-bilan .frise-attente { color: var(--bs-primary, #0d6efd); }
[data-bs-theme="dark"] .frise-bilan .frise-attente { color: #9fd3e8; }
