/* ==========================================================
   STRUCTURE VISUELLE COMMUNE DES PAGES MATHAFOND
   RÃ©fÃ©rence visuelle : catalogue des exercices
   ========================================================== */

.app-page,
.app-page *,
.app-page *::before,
.app-page *::after {
    box-sizing: border-box;
}

/* FORMULAIRES DE COMPTE ET DE CONNEXION */
.account-form-page {
    width: min(100% - 2rem, 620px);
    margin: 40px auto;
}

.account-form-page-narrow { max-width: 520px; }

.account-form-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 8px;
}

.account-form-alert p { margin: 0; }

.account-form-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.account-form-field { margin-bottom: 16px; }
.account-form-field-last { margin-bottom: 20px; }

.account-form-help {
    margin-top: 4px;
    color: var(--app-page-muted, #64748b);
    font-size: 0.85rem;
}

.account-form-field-error {
    margin-top: 4px;
    color: #991b1b;
}

.account-form-primary {
    padding: 10px 14px;
    background: var(--app-page-blue, #2563eb);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.account-form-primary:hover { background: #1d4ed8; }
.account-form-primary-full { width: 100%; }
.account-form-cancel { margin-left: 1em; }
.account-form-back { margin-top: 20px; }

.account-form-help,
.account-form-field-error { display: inline-block; }

.account-form-field-error .errorlist,
.account-form-alert .errorlist {
    margin: 0;
    padding-left: 1.25rem;
}

html[data-theme="dark"] .account-form-alert-error,
body.dark .account-form-alert-error,
body.dark-mode .account-form-alert-error,
body.theme-dark .account-form-alert-error {
    background: #450a0a;
    color: #fecaca;
    border-color: #7f1d1d;
}

html[data-theme="dark"] .account-form-field-error,
body.dark .account-form-field-error,
body.dark-mode .account-form-field-error,
body.theme-dark .account-form-field-error { color: #fca5a5; }

@media (max-width: 640px) {
    .account-form-page {
        width: min(100% - 1.25rem, 620px);
        margin: 24px auto;
    }

    .account-form-primary,
    .account-form-cancel {
        display: block;
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .account-form-cancel { margin-top: 12px; }
}

.app-page {
    --app-page-panel: rgba(255, 255, 255, 0.97);
    --app-page-card: #ffffff;
    --app-page-card-soft: #f8fafc;
    --app-page-card-blue: #eff6ff;
    --app-page-border: rgba(148, 163, 184, 0.28);
    --app-page-border-strong: rgba(37, 99, 235, 0.32);
    --app-page-text: #0f172a;
    --app-page-muted: #64748b;
    --app-page-subtle: #475569;
    --app-page-blue: #2563eb;
    --app-page-blue-dark: #1d4ed8;
    --app-page-blue-soft: rgba(37, 99, 235, 0.10);
    --app-page-shadow: 0 18px 48px rgba(15, 23, 42, 0.09);
    --app-page-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
    --app-page-shadow-hover: 0 18px 38px rgba(37, 99, 235, 0.14);

    width: min(100%, 1420px);
    min-width: 0;
    margin: 0 auto;
    color: var(--app-page-text);
    text-align: left;
}

body.dark .app-page,
html[data-theme="dark"] .app-page,
body.dark-mode .app-page,
body.theme-dark .app-page,
[data-bs-theme="dark"] .app-page {
    --app-page-panel: rgba(15, 23, 42, 0.97);
    --app-page-card: #111827;
    --app-page-card-soft: #1e293b;
    --app-page-card-blue: rgba(37, 99, 235, 0.18);
    --app-page-border: rgba(148, 163, 184, 0.22);
    --app-page-border-strong: rgba(96, 165, 250, 0.42);
    --app-page-text: #f8fafc;
    --app-page-muted: #94a3b8;
    --app-page-subtle: #cbd5e1;
    --app-page-blue: #60a5fa;
    --app-page-blue-dark: #bfdbfe;
    --app-page-blue-soft: rgba(96, 165, 250, 0.15);
    --app-page-shadow: 0 20px 52px rgba(2, 6, 23, 0.38);
    --app-page-shadow-soft: 0 10px 28px rgba(2, 6, 23, 0.26);
    --app-page-shadow-hover: 0 18px 38px rgba(2, 6, 23, 0.40);
}

.app-page button,
.app-page select,
.app-page input {
    font: inherit;
}

.app-page a > svg,
.app-page button > svg,
.app-page [class*="-icon"] svg,
.app-page [class*="-arrow"] svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ----------------------------------------------------------
   Bandeau de page
   ---------------------------------------------------------- */

.app-page-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(24px, 4vw, 42px);
    overflow: hidden;
    border: 1px solid var(--app-page-border);
    border-radius: 28px;
    background:
        radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.17), transparent 30%),
        linear-gradient(135deg, var(--app-page-panel) 0%, var(--app-page-card-blue) 100%);
    box-shadow: var(--app-page-shadow);
}

.app-page-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 55%, transparent 100%);
}

.app-page-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 900px;
    min-width: 0;
}

.app-page-eyebrow,
.app-page-control-label,
.app-page-control-block > label,
.app-page-section-label {
    display: block;
    color: var(--app-page-blue-dark);
    font-size: 0.74rem;
    font-weight: 950;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.app-page-hero h1,
.app-page-hero h2 {
    margin: 0.5rem 0 0.7rem;
    color: var(--app-page-text);
    font-family: Arial, sans-serif;
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    font-weight: 950;
    letter-spacing: -0.06em;
    line-height: 0.96;
}

.app-page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--app-page-subtle);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.55;
}

.app-page-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.app-page-hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 1px solid var(--app-page-border);
    border-radius: 14px;
    background: var(--app-page-card);
    color: var(--app-page-text);
    font-size: 0.9rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: var(--app-page-shadow-soft);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.app-page-hero-action:hover {
    border-color: var(--app-page-border-strong);
    color: var(--app-page-blue-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--app-page-shadow-hover);
}

/* ----------------------------------------------------------
   Zone de rÃ©glages
   ---------------------------------------------------------- */

.app-page-toolbar {
    display: grid;
    gap: 18px;
    margin: 18px 0;
    padding: 18px;
    border: 1px solid var(--app-page-border);
    border-radius: 22px;
    background: var(--app-page-panel);
    box-shadow: var(--app-page-shadow-soft);
}

.app-page-control-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

.app-page-control-block {
    min-width: min(100%, 300px);
    flex: 0 1 430px;
}

.app-page-control-block > label,
.app-page-control-label {
    margin-bottom: 0.55rem;
    color: var(--app-page-muted);
}

.app-page-select-wrap {
    position: relative;
}

.app-page-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--app-page-muted);
    border-bottom: 2px solid var(--app-page-muted);
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}

.app-page-select-wrap select {
    width: 100%;
    min-height: 50px;
    padding: 0.75rem 3rem 0.75rem 1rem;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--app-page-border);
    border-radius: 15px;
    outline: none;
    background: var(--app-page-card);
    color: var(--app-page-text);
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.app-page-select-wrap select:focus {
    border-color: var(--app-page-border-strong);
    box-shadow: 0 0 0 4px var(--app-page-blue-soft);
}

/* ----------------------------------------------------------
   Panneau principal
   ---------------------------------------------------------- */

.app-page-main {
    min-height: 510px;
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--app-page-border);
    border-radius: 26px;
    background: var(--app-page-panel);
    box-shadow: var(--app-page-shadow);
}

/* ----------------------------------------------------------
   Adaptateur : page Mes Ã©lÃ¨ves
   ---------------------------------------------------------- */

.teacher-dashboard-shell .teacher-main-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.teacher-students-toolbar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.teacher-students-toolbar.teacher-card {
    margin-bottom: 18px;
}

.teacher-students-toolbar .teacher-current-group,
.teacher-students-toolbar .teacher-subcard {
    border-color: var(--app-page-border);
    background: var(--app-page-card-soft);
}

.teacher-students-main > .teacher-card,
.teacher-students-main .teacher-table-card,
.teacher-students-main > .teacher-empty-state-v2 {
    border: 1px solid var(--app-page-border);
    background: linear-gradient(180deg, var(--app-page-card) 0%, var(--app-page-card-soft) 100%);
    box-shadow: var(--app-page-shadow-soft);
}

.teacher-students-main > :last-child {
    margin-bottom: 0;
}

.teacher-students-main .teacher-section-tabs {
    margin-top: 0;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 900px) {
    .app-page-toolbar {
        position: static;
    }
}

@media (max-width: 700px) {
    .app-page-hero {
        flex-direction: column;
        padding: 24px 20px;
        border-radius: 22px;
    }

    .app-page-hero h1,
    .app-page-hero h2 {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .app-page-hero-actions,
    .app-page-hero-action {
        width: 100%;
    }

    .app-page-toolbar {
        margin: 12px 0;
        padding: 14px;
        border-radius: 18px;
    }

    .app-page-control-form,
    .app-page-control-block {
        width: 100%;
    }

    .app-page-main {
        min-height: 460px;
        padding: 18px 14px;
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-page *,
    .app-page *::before,
    .app-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================
   BARRES Dâ€™OUTILS â€” LIGNES ET ACTIONS
   ========================================================== */

.app-page-toolbar-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.app-page-toolbar-row > .app-page-control-form {
    flex: 1 1 auto;
    min-width: 0;
}

.app-page-toolbar-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.app-page-toolbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid #2563eb;
    border-radius: 14px;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 9px 20px rgba(37, 99, 235, 0.20);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.app-page-toolbar-action:hover {
    border-color: #1d4ed8;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 13px 27px rgba(37, 99, 235, 0.27);
    transform: translateY(-1px);
    text-decoration: none;
}

.app-page-toolbar-action:focus-visible {
    outline: 3px solid var(--app-page-blue-soft);
    outline-offset: 3px;
}

.app-page-toolbar-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.app-page-toolbar-action-icon svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 700px) {
    .app-page-toolbar-row {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .app-page-toolbar-actions,
    .app-page-toolbar-action {
        width: 100%;
    }

    .teacher-students-toolbar {
        gap: 10px;
        padding: 10px;
    }

    .teacher-students-toolbar .app-page-toolbar-row {
        gap: 8px;
    }

    .teacher-students-toolbar .teacher-toolbar-form {
        display: block;
    }

    .teacher-students-toolbar .app-page-control-block {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 8px;
    }

    .teacher-students-toolbar .app-page-control-block > label {
        margin: 0;
    }

    .teacher-students-toolbar .app-page-select-wrap select {
        min-height: 42px;
        padding-block: 0.55rem;
    }

    .teacher-students-toolbar .app-page-toolbar-action {
        min-height: 42px;
    }
}

/* ==========================================================
   COMPOSANTS COMMUNS â€” BOUTONS Dâ€™ACTION
   ========================================================== */

.app-page-secondary-action,
.app-page-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 17px;
    border-radius: 14px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.app-page-secondary-action {
    border: 1px solid var(--app-page-border);
    background: var(--app-page-card);
    color: var(--app-page-text);
    box-shadow: var(--app-page-shadow-soft);
}

.app-page-secondary-action:hover {
    border-color: var(--app-page-border-strong);
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
    box-shadow: var(--app-page-shadow-hover);
    transform: translateY(-1px);
}

.app-page-primary-action {
    min-height: 50px;
    padding-inline: 24px;
    border: 1px solid #2563eb;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 11px 24px rgba(37, 99, 235, 0.22);
}

.app-page-primary-action:hover {
    border-color: #1d4ed8;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

.app-page-secondary-action:focus-visible,
.app-page-primary-action:focus-visible {
    outline: 3px solid var(--app-page-blue-soft);
    outline-offset: 3px;
}

/* ==========================================================
   PAGE DE LANCEMENT QCM

   La largeur, le centrage, le bandeau, les espacements entre
   sections et le panneau principal sont fournis directement
   par les classes exercise-catalog-* du template.
   ========================================================== */

.qcm-start-form {
    width: 100%;
    min-width: 0;
    margin: 0;
}

/* RÃ©glages : niveau et mode */

.qcm-start-page .qcm-start-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.qcm-start-page .qcm-start-settings-grid > .qcm-field,
.qcm-start-page .qcm-start-settings-grid select {
    width: 100%;
    min-width: 0;
}

/* Contenu principal */

.qcm-start-content {
    display: grid;
    gap: 24px;
}

.qcm-start-page .qcm-start-section {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: clamp(18px, 2.5vw, 26px);
    border: 1px solid var(--app-page-border);
    border-radius: 20px;
    background: linear-gradient(
        180deg,
        var(--app-page-card) 0%,
        var(--app-page-card-soft) 100%
    );
    box-shadow: var(--app-page-shadow-soft);
}

.qcm-start-page .qcm-start-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.qcm-start-page .qcm-start-section-copy {
    min-width: 0;
}

.qcm-start-page .qcm-start-section-heading h2 {
    margin: 0.45rem 0 0.4rem;
    color: var(--app-page-text);
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.qcm-start-page .qcm-start-section-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--app-page-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* SÃ©lection des thÃ¨mes */

.qcm-start-page .qcm-themes-panel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--app-page-border);
}

.qcm-start-page .qcm-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.qcm-start-page .qcm-theme-tuile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 72px;
    padding: 13px 14px;
    border: 1px solid var(--app-page-border);
    border-radius: 15px;
    background: var(--app-page-card);
    color: var(--app-page-text);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
    cursor: pointer;
    user-select: none;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.qcm-start-page .qcm-theme-tuile:hover {
    border-color: var(--app-page-border-strong);
    box-shadow: var(--app-page-shadow-soft);
    transform: translateY(-1px);
}

.qcm-start-page .qcm-theme-tuile.selected {
    border-color: var(--app-page-blue);
    background: var(--app-page-card-blue);
    color: var(--app-page-blue-dark);
    box-shadow: 0 0 0 3px var(--app-page-blue-soft);
}

.qcm-start-page .qcm-theme-tuile span {
    font-weight: 850;
    line-height: 1.2;
}

.qcm-start-page .qcm-theme-tuile small {
    color: var(--app-page-muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.qcm-start-page .qcm-theme-tuile.selected small {
    color: var(--app-page-blue-dark);
    opacity: 0.82;
}

/* Options de la session */

.qcm-start-page .qcm-session-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 260px));
    justify-content: center;
    gap: 18px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 22px;
    border: 1px solid var(--app-page-border);
    border-radius: 20px;
    background: var(--app-page-card-soft);
}

.qcm-start-page .qcm-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.qcm-start-page .qcm-field label {
    color: var(--app-page-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.045em;
}

.qcm-start-page .qcm-field label span {
    color: var(--app-page-muted);
    font-weight: 700;
}

.qcm-start-page .qcm-start-option[hidden] {
    display: none !important;
}

.qcm-start-page .qcm-start-option input {
    width: 100%;
    min-height: 50px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--app-page-border);
    border-radius: 15px;
    outline: none;
    background: var(--app-page-card);
    color: var(--app-page-text);
    font: inherit;
    font-size: 1rem;
    font-weight: 850;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.qcm-start-page .qcm-start-option input:focus {
    border-color: var(--app-page-border-strong);
    box-shadow: 0 0 0 4px var(--app-page-blue-soft);
}

.qcm-start-page .qcm-start-actions {
    display: flex;
    justify-content: center;
    padding-top: 2px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 760px) {
    .qcm-start-page .qcm-start-settings-grid,
    .qcm-start-page .qcm-session-options {
        grid-template-columns: 1fr;
    }

    .qcm-start-page .qcm-session-options {
        padding: 16px;
        border-radius: 17px;
    }

    .qcm-start-page .qcm-start-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .qcm-start-page .app-page-secondary-action,
    .qcm-start-page .app-page-primary-action {
        width: 100%;
    }

    .qcm-start-page .qcm-themes-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   PAGE â€” AJOUTER DES Ã‰LÃˆVES
   ========================================================== */

.teacher-add-students-main {
    display: grid;
    gap: 20px;
    min-height: 0;
    margin-top: 18px;
}

.teacher-add-back-link > span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.teacher-add-back-link svg {
    width: 100%;
    height: 100%;
}

.teacher-add-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.teacher-add-option {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 300px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid var(--app-page-border);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, 0.12),
            transparent 38%
        ),
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
    box-shadow: var(--app-page-shadow-soft);
    color: var(--app-page-text);
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.teacher-add-option::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -52px;
    width: 145px;
    height: 145px;
    border-radius: 999px;
    background: var(--app-page-blue-soft);
    opacity: 0.55;
    pointer-events: none;
}

.teacher-add-option:hover {
    border-color: var(--app-page-border-strong);
    box-shadow: var(--app-page-shadow-hover);
    color: var(--app-page-text);
    text-decoration: none;
    transform: translateY(-3px);
}

.teacher-add-option:focus-visible {
    outline: 3px solid var(--app-page-blue-soft);
    outline-offset: 4px;
}

.teacher-add-option-secondary {
    background:
        radial-gradient(
            circle at top right,
            rgba(14, 165, 233, 0.12),
            transparent 38%
        ),
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
}

.teacher-add-option-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    border: 1px solid var(--app-page-border-strong);
    border-radius: 17px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
}

.teacher-add-option-icon svg {
    width: 27px;
    height: 27px;
}

.teacher-add-option-label {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 8px;
    color: var(--app-page-blue-dark);
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.teacher-add-option h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--app-page-text);
    font-size: 1.25rem;
    font-weight: 950;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.teacher-add-option p {
    position: relative;
    z-index: 1;
    margin: 12px 0 0;
    color: var(--app-page-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.teacher-add-option-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 28px;
}

.teacher-add-option-hint {
    color: var(--app-page-muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.teacher-add-option-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: var(--app-page-blue);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.20);
    transition:
        background 0.16s ease,
        transform 0.16s ease;
}

.teacher-add-option:hover .teacher-add-option-arrow {
    background: #1d4ed8;
    transform: translateX(3px);
}

.teacher-add-option-arrow svg {
    width: 18px;
    height: 18px;
}

.teacher-add-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 17px;
    border: 1px solid var(--app-page-border);
    border-radius: 16px;
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.teacher-add-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border-radius: 999px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
    font-weight: 950;
}

.teacher-add-info strong {
    color: var(--app-page-text);
}

/* ==========================================================
   PAGE â€” Ã‰VALUATIONS
   ========================================================== */

.teacher-evaluations-toolbar {
    display: block;
}

.teacher-evaluations-tabs {
    width: 100%;
    margin: 0;
}

.teacher-evaluations-tabs .teacher-section-tab {
    min-height: 46px;
    padding: 10px 16px;
    border-color: var(--app-page-border);
    border-radius: 14px;
    background: var(--app-page-card);
    color: var(--app-page-text);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
}

.teacher-evaluations-tabs .teacher-section-tab:hover {
    border-color: var(--app-page-border-strong);
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
}

.teacher-evaluations-tabs .teacher-section-tab.active {
    border-color: #2563eb;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 9px 20px rgba(37, 99, 235, 0.20);
}

.teacher-evaluations-main {
    display: grid;
    gap: 20px;
}

.teacher-evaluations-create-card,
.teacher-evaluations-list-card,
.teacher-evaluations-empty {
    border: 1px solid var(--app-page-border);
    background: linear-gradient(
        180deg,
        var(--app-page-card) 0%,
        var(--app-page-card-soft) 100%
    );
    box-shadow: var(--app-page-shadow-soft);
}

.teacher-evaluations-create-card {
    margin: 0;
    padding: 20px;
    border-radius: 20px;
}

.teacher-evaluations-create-card .teacher-create-list-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px 12px;
    width: 100%;
    margin: 0;
}

.teacher-evaluations-create-card .teacher-create-list-form label {
    grid-column: 1 / -1;
    color: var(--app-page-muted);
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-evaluations-create-card .teacher-create-list-form input {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--app-page-border);
    border-radius: 15px;
    outline: none;
    background: var(--app-page-card);
    color: var(--app-page-text);
    font-size: 1rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.teacher-evaluations-create-card .teacher-create-list-form input:focus {
    border-color: var(--app-page-border-strong);
    box-shadow: 0 0 0 4px var(--app-page-blue-soft);
}

.teacher-evaluations-create-card .teacher-action-btn {
    min-height: 50px;
    padding-inline: 18px;
}

.teacher-evaluations-list-grid {
    gap: 18px;
}

.teacher-evaluations-list-card {
    margin: 0;
    padding: 20px;
    border-radius: 20px;
}

.teacher-evaluations-list-card .teacher-list-card-header h3 {
    color: var(--app-page-text);
}

.teacher-evaluations-list-card .teacher-list-card-header a {
    color: inherit;
}

.teacher-evaluations-list-card .teacher-form-title,
.teacher-evaluations-list-card .teacher-muted-label {
    color: var(--app-page-muted);
}

.teacher-evaluations-list-card .teacher-checkbox-pill {
    border-color: var(--app-page-border);
    background: var(--app-page-card-soft);
    color: var(--app-page-text);
}

.teacher-evaluations-list-card .teacher-list-card-footer {
    border-color: var(--app-page-border);
}

.teacher-evaluations-list-card .teacher-action-btn {
    border-color: var(--app-page-border);
    background: var(--app-page-card);
    color: var(--app-page-text);
}

.teacher-evaluations-list-card .teacher-action-btn:hover {
    border-color: var(--app-page-border-strong);
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
}

.teacher-evaluations-list-card .teacher-action-primary {
    border-color: #2563eb;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    color: #ffffff;
}

.teacher-evaluations-list-card .teacher-action-primary:hover {
    border-color: #1d4ed8;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: #ffffff;
}

.teacher-evaluations-list-card .teacher-action-danger {
    color: #b91c1c;
}

.teacher-evaluations-list-card .teacher-action-danger:hover {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
}

.teacher-evaluations-empty {
    padding: 32px 24px;
    border-radius: 20px;
}

.teacher-evaluations-empty strong {
    color: var(--app-page-text);
}

.teacher-evaluations-empty p {
    color: var(--app-page-muted);
}

html[data-theme="dark"] .teacher-evaluations-list-card .teacher-action-danger,
body.dark .teacher-evaluations-list-card .teacher-action-danger,
body.dark-mode .teacher-evaluations-list-card .teacher-action-danger,
body.theme-dark .teacher-evaluations-list-card .teacher-action-danger {
    color: #fca5a5;
}

html[data-theme="dark"] .teacher-evaluations-list-card .teacher-action-danger:hover,
body.dark .teacher-evaluations-list-card .teacher-action-danger:hover,
body.dark-mode .teacher-evaluations-list-card .teacher-action-danger:hover,
body.theme-dark .teacher-evaluations-list-card .teacher-action-danger:hover {
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

/* ==========================================================
   RESPONSIVE â€” AJOUT Dâ€™Ã‰LÃˆVES ET Ã‰VALUATIONS
   ========================================================== */

@media (max-width: 760px) {
    .teacher-add-options {
        grid-template-columns: 1fr;
    }

    .teacher-add-option {
        min-height: 260px;
        padding: 22px;
        border-radius: 19px;
    }

    .teacher-evaluations-create-card .teacher-create-list-form {
        grid-template-columns: 1fr;
    }

    .teacher-evaluations-create-card .teacher-create-list-form label {
        grid-column: auto;
    }

    .teacher-evaluations-create-card .teacher-action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .teacher-add-option {
        min-height: 245px;
        padding: 19px;
    }

    .teacher-add-option-icon {
        width: 49px;
        height: 49px;
        margin-bottom: 18px;
        border-radius: 15px;
    }

    .teacher-add-info {
        padding: 14px;
    }

    .teacher-evaluations-create-card,
    .teacher-evaluations-list-card {
        padding: 16px;
        border-radius: 17px;
    }
}

/* ==========================================================
   PAGE â€” LIAISON Ã‰LÃˆVE / PROFESSEUR
   ========================================================== */

.link-teacher-main {
    display: grid;
    gap: 20px;
    min-height: 0;
    margin-top: 18px;
}

.link-messages {
    display: grid;
    gap: 10px;
}

.link-message {
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.45;
    text-align: center;
}

.link-message-success {
    border-color: rgba(22, 163, 74, 0.30);
    background: rgba(22, 163, 74, 0.10);
    color: #15803d;
}

.link-message-error {
    border-color: rgba(220, 38, 38, 0.30);
    background: rgba(220, 38, 38, 0.10);
    color: #dc2626;
}

.link-message-warning {
    border-color: rgba(217, 119, 6, 0.30);
    background: rgba(217, 119, 6, 0.10);
    color: #b45309;
}

.link-teacher-grid {
    display: grid;
    gap: 20px;
}

.link-card {
    min-width: 0;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--app-page-border);
    border-radius: 22px;
    background:
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
    box-shadow: var(--app-page-shadow-soft);
}

.link-card-header {
    margin-bottom: 20px;
}

.link-card h2 {
    margin: 0.45rem 0 0;
    color: var(--app-page-text);
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    font-weight: 950;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.link-card-intro {
    max-width: 900px;
    margin: 0.75rem 0 0;
    color: var(--app-page-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.link-card-intro strong {
    color: var(--app-page-text);
}

.link-list {
    display: grid;
    gap: 14px;
}

.link-child-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--app-page-border);
    border-radius: 18px;
    background: var(--app-page-card);
}

.link-child-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.link-child-name {
    color: var(--app-page-text);
    font-size: 1.05rem;
    font-weight: 950;
    line-height: 1.25;
}

.link-child-meta {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--app-page-muted);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}

.link-child-meta strong {
    color: var(--app-page-text);
}

.link-child-meta small {
    color: var(--app-page-muted);
}

.link-pill,
.link-code {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
    font-weight: 900;
}

.link-pill {
    flex: 0 0 auto;
    padding: 0.3rem 0.68rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.link-code {
    padding: 0.2rem 0.58rem;
    font-family: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
}

.link-form {
    display: grid;
    gap: 16px;
    margin: 0;
}

.link-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 16px;
}

.link-form-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.link-form-field > label,
.link-form-spacer {
    min-height: 1rem;
    color: var(--app-page-muted);
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.link-form-field input {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--app-page-border);
    border-radius: 15px;
    outline: none;
    background: var(--app-page-card);
    color: var(--app-page-text);
    font-size: 1rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.link-form-field input::placeholder {
    color: var(--app-page-muted);
    font-weight: 650;
    opacity: 0.78;
}

.link-form-field input:focus {
    border-color: var(--app-page-border-strong);
    box-shadow: 0 0 0 4px var(--app-page-blue-soft);
}

.link-form-submit .app-page-primary-action {
    width: 100%;
}

.link-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.link-actions form {
    margin: 0;
}

.link-action-btn {
    min-height: 50px;
}

.link-action-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 18px;
    border: 1px solid rgba(220, 38, 38, 0.28);
    border-radius: 14px;
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.link-action-danger:hover {
    border-color: rgba(220, 38, 38, 0.42);
    background: rgba(220, 38, 38, 0.13);
    color: #b91c1c;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.12);
    transform: translateY(-1px);
}

.link-action-danger:focus-visible {
    outline: 3px solid rgba(220, 38, 38, 0.16);
    outline-offset: 3px;
}

.link-empty {
    padding: 18px;
    border: 1px dashed var(--app-page-border);
    border-radius: 16px;
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    font-weight: 800;
    text-align: center;
}

.link-help {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--app-page-border);
    color: var(--app-page-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.link-help strong {
    color: var(--app-page-text);
}

html[data-theme="dark"] .link-message-success,
body.dark .link-message-success,
body.dark-mode .link-message-success,
body.theme-dark .link-message-success {
    color: #86efac;
}

html[data-theme="dark"] .link-message-error,
body.dark .link-message-error,
body.dark-mode .link-message-error,
body.theme-dark .link-message-error {
    color: #fca5a5;
}

html[data-theme="dark"] .link-message-warning,
body.dark .link-message-warning,
body.dark-mode .link-message-warning,
body.theme-dark .link-message-warning {
    color: #fde68a;
}

html[data-theme="dark"] .link-action-danger,
body.dark .link-action-danger,
body.dark-mode .link-action-danger,
body.theme-dark .link-action-danger {
    border-color: rgba(248, 113, 113, 0.32);
    background: rgba(248, 113, 113, 0.11);
    color: #fca5a5;
}

html[data-theme="dark"] .link-action-danger:hover,
body.dark .link-action-danger:hover,
body.dark-mode .link-action-danger:hover,
body.theme-dark .link-action-danger:hover {
    border-color: rgba(248, 113, 113, 0.48);
    background: rgba(248, 113, 113, 0.17);
    color: #fecaca;
}

@media (max-width: 900px) {
    .link-form-grid {
        grid-template-columns: 1fr;
    }

    .link-form-spacer {
        display: none;
    }
}

@media (max-width: 700px) {
    .link-teacher-main {
        gap: 14px;
        margin-top: 12px;
    }

    .link-teacher-grid {
        gap: 14px;
    }

    .link-card {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .link-child-card {
        padding: 15px;
        border-radius: 16px;
    }

    .link-child-top {
        flex-direction: column;
    }

    .link-pill {
        white-space: normal;
    }

    .link-actions,
    .link-actions form,
    .link-actions .app-page-primary-action,
    .link-actions .link-action-danger {
        width: 100%;
    }
}

/* ==========================================================
   ESPACE PARENT â€” BASE COMMUNE
   Pages : Mes enfants, Ajouter un enfant, ParamÃ¨tres
   ========================================================== */

.parent-space-main,
.parent-create-main {
    display: grid;
    gap: 20px;
    min-height: 0;
    margin-top: 18px;
}

.parent-children-main {
    margin-top: 18px !important;
}

.parent-panel,
.parent-create-card {
    min-width: 0;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--app-page-border);
    border-radius: 22px;
    background:
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
    box-shadow: var(--app-page-shadow-soft);
}

.parent-panel-header {
    margin-bottom: 20px;
}

.parent-panel-header h2,
.parent-results-heading h2,
.parent-recent-activity-header h2 {
    margin: 0.45rem 0 0;
    color: var(--app-page-text);
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    font-weight: 950;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.parent-panel-header p {
    max-width: 900px;
    margin: 0.7rem 0 0;
    color: var(--app-page-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.parent-muted-label {
    color: var(--app-page-muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.parent-muted {
    color: var(--app-page-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.parent-alert {
    padding: 15px 17px;
    border: 1px solid transparent;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.5;
}

.parent-alert-warning {
    border-color: rgba(217, 119, 6, 0.28);
    background: rgba(217, 119, 6, 0.10);
    color: #92400e;
}

.parent-panel-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}

.parent-inline-form {
    margin: 0;
}

/* ==========================================================
   MES ENFANTS â€” ACTIVITÃ‰ RÃ‰CENTE
   ========================================================== */

.parent-recent-activity-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.parent-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 16px;
}

.parent-recent-card {
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-width: 0;
    min-height: 285px;
    overflow: hidden;
    padding: 17px;
    border: 1px solid var(--app-page-border);
    border-radius: 18px;
    background:
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.055);
    color: var(--app-page-text);
}

.parent-recent-card-link {
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.parent-recent-card-link:hover {
    border-color: var(--app-page-border-strong);
    color: var(--app-page-text);
    text-decoration: none;
    box-shadow: var(--app-page-shadow-hover);
    transform: translateY(-2px);
}

.parent-recent-card-link:focus-visible {
    outline: 3px solid var(--app-page-blue-soft);
    outline-offset: 3px;
}

.parent-recent-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.parent-recent-student {
    min-width: 0;
    color: var(--app-page-text);
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.parent-recent-date {
    margin-top: 4px;
    color: var(--app-page-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.parent-recent-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.parent-recent-title {
    color: var(--app-page-text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.parent-recent-subtitle {
    color: var(--app-page-muted);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.parent-recent-chart-block,
.parent-recent-work-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.parent-recent-block-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--app-page-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.parent-recent-mini-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 5px;
    height: 62px;
    padding: 9px 9px 6px;
    border-radius: 14px;
    background: var(--app-page-card-soft);
}

.parent-recent-mini-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    height: 100%;
    min-width: 0;
}

.parent-recent-mini-bar-fill,
.parent-recent-mini-bar-empty {
    display: block;
    width: 100%;
    max-width: 18px;
    border-radius: 999px 999px 4px 4px;
}

.parent-recent-mini-bar-fill {
    min-height: 4px;
    background: var(--app-page-blue);
}

.parent-recent-mini-bar-empty {
    height: 3px;
    background: var(--app-page-border);
}

.parent-recent-mini-bar-label {
    color: var(--app-page-muted);
    font-size: 0.66rem;
    line-height: 1;
}

.parent-recent-work-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.parent-recent-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 9px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 13px;
    background: var(--app-page-card-soft);
}

.parent-recent-list-main {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.parent-recent-list-icon {
    width: 18px;
    flex: 0 0 18px;
    color: var(--app-page-muted);
    font-weight: 900;
    text-align: center;
}

.parent-recent-list-name {
    min-width: 0;
    overflow: hidden;
    color: var(--app-page-text);
    font-size: 0.83rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.parent-recent-list-status,
.parent-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.13);
    color: var(--app-page-muted);
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.parent-recent-list-row-completed .parent-recent-list-status,
.parent-status-completed {
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
}

.parent-recent-list-row-in_progress .parent-recent-list-status,
.parent-status-in_progress {
    background: rgba(217, 119, 6, 0.13);
    color: #92400e;
}

.parent-recent-list-detail {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--app-page-muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.parent-recent-list-mini-progress,
.parent-progress-bar {
    overflow: hidden;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.17);
}

.parent-recent-list-mini-progress {
    flex: 1;
    height: 5px;
}

.parent-recent-list-mini-progress span,
.parent-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--app-page-blue);
}

.parent-recent-empty-work,
.parent-empty-inline {
    padding: 12px;
    border-radius: 14px;
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

/* ==========================================================
   MES ENFANTS â€” TABLEAU DÃ‰TAILLÃ‰
   ========================================================== */

.parent-results-block {
    display: grid;
    gap: 14px;
    margin-top: 0;
}

.parent-results-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.parent-table-card {
    overflow: hidden;
    border: 1px solid var(--app-page-border);
    border-radius: 20px;
    background: var(--app-page-card);
    box-shadow: var(--app-page-shadow-soft);
}

.parent-table-scroll {
    overflow-x: auto;
}

.parent-data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--app-page-text);
    font-size: 0.88rem;
}

.parent-data-table thead th {
    padding: 14px 16px;
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.parent-data-table tbody td {
    padding: 16px;
    border-top: 1px solid var(--app-page-border);
    vertical-align: top;
}

.parent-empty-cell {
    padding: 28px !important;
    color: var(--app-page-muted);
    text-align: center;
}

.parent-child-cell,
.parent-metric-list,
.parent-list-progress-stack {
    display: flex;
    flex-direction: column;
}

.parent-child-cell {
    gap: 5px;
}

.parent-child-link {
    color: var(--app-page-text);
    font-weight: 850;
    text-decoration: none;
}

.parent-child-link:hover {
    color: var(--app-page-blue-dark);
    text-decoration: underline;
}

.parent-child-table-actions {
    margin-top: 2px;
}

.parent-table-edit-link {
    color: var(--app-page-blue-dark);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.parent-table-edit-link:hover {
    text-decoration: underline;
}

.parent-metric-list {
    gap: 4px;
    color: var(--app-page-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.parent-metric-list strong {
    color: var(--app-page-text);
}

.parent-list-progress-stack {
    gap: 9px;
}

.parent-list-progress-item {
    padding: 10px 11px;
    border-radius: 13px;
    background: var(--app-page-card-soft);
}

.parent-list-progress-top,
.parent-list-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.parent-list-progress-top > span:first-child {
    color: var(--app-page-text);
    font-weight: 800;
}

.parent-status-link {
    text-decoration: none;
}

.parent-status-link:hover {
    text-decoration: underline;
}

.parent-list-progress-meta {
    margin-top: 5px;
    color: var(--app-page-muted);
    font-size: 0.77rem;
}

.parent-list-progress-meta strong {
    color: var(--app-page-text);
}

.parent-progress-bar {
    height: 6px;
    margin-top: 7px;
}

/* ==========================================================
   PARAMÃˆTRES PARENT
   ========================================================== */

.parent-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 20px;
}

.parent-children-list {
    display: grid;
    gap: 14px;
}

.parent-child-management-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--app-page-border);
    border-radius: 17px;
    background: var(--app-page-card);
}

.parent-child-management-top,
.parent-child-teacher-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.parent-child-management-top {
    align-items: flex-start;
}

.parent-child-row-name {
    display: block;
    color: var(--app-page-text);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
}

.parent-child-username {
    display: block;
    margin-top: 4px;
    color: var(--app-page-muted);
    font-size: 0.8rem;
}

.parent-child-row-actions,
.parent-panel-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.parent-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--app-page-border);
    border-radius: 12px;
    background: var(--app-page-card);
    color: var(--app-page-text);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.parent-action-btn:hover {
    border-color: var(--app-page-border-strong);
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.parent-action-danger {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(220, 38, 38, 0.07);
    color: #dc2626;
}

.parent-action-danger:hover {
    border-color: rgba(220, 38, 38, 0.40);
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.parent-child-teacher-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--app-page-border);
}

.parent-child-teacher-status strong {
    display: block;
    margin-top: 4px;
    color: var(--app-page-text);
}

.parent-link-teacher-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.parent-link-submit {
    min-height: 50px;
}

.parent-child-link-help {
    margin: 12px 0 0;
    color: var(--app-page-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.parent-child-link-help strong {
    color: var(--app-page-text);
}

.parent-settings-form {
    display: grid;
    gap: 14px;
}

.parent-settings-divider {
    height: 1px;
    margin: 22px 0;
    background: var(--app-page-border);
}

.parent-form-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.parent-form-field label {
    color: var(--app-page-muted);
    font-size: 0.75rem;
    font-weight: 950;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.parent-form-field input,
.parent-form-field select,
.parent-create-form input,
.parent-create-form select {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--app-page-border);
    border-radius: 15px;
    outline: none;
    background: var(--app-page-card);
    color: var(--app-page-text);
    font-size: 1rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.parent-form-field input::placeholder,
.parent-create-form input::placeholder {
    color: var(--app-page-muted);
    font-weight: 650;
    opacity: 0.78;
}

.parent-form-field input:focus,
.parent-form-field select:focus,
.parent-create-form input:focus,
.parent-create-form select:focus {
    border-color: var(--app-page-border-strong);
    box-shadow: 0 0 0 4px var(--app-page-blue-soft);
}

.parent-save-btn {
    justify-self: start;
}

/* ==========================================================
   AJOUTER UN ENFANT
   ========================================================== */

.parent-create-main {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
    align-items: start;
}

.parent-create-form {
    display: grid;
    gap: 20px;
}

.parent-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.parent-create-grid .parent-form-field:last-child {
    grid-column: 1 / -1;
    max-width: 420px;
}

.parent-create-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.parent-form-errors {
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 750;
}

.parent-form-errors p {
    margin: 0;
}

.parent-form-errors-global {
    padding: 13px 15px;
    border: 1px solid rgba(220, 38, 38, 0.28);
    border-radius: 14px;
    background: rgba(220, 38, 38, 0.08);
}

.parent-create-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--app-page-border);
    border-radius: 18px;
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.parent-create-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    border-radius: 999px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
    font-weight: 950;
}

.parent-create-info strong {
    color: var(--app-page-text);
}

.parent-create-info p {
    margin: 5px 0 0;
}

/* ==========================================================
   Ã‰TATS VIDES
   ========================================================== */

.parent-empty-state-v2 {
    padding: 28px 20px;
    border: 1px dashed var(--app-page-border);
    border-radius: 18px;
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    text-align: center;
}

.parent-empty-state-v2 strong {
    display: block;
    color: var(--app-page-text);
    font-size: 1.05rem;
}

.parent-empty-state-v2 p {
    margin: 6px 0 0;
}

.parent-empty-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
}

.parent-empty-page .app-page-primary-action {
    margin-top: 18px;
}

.parent-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 15px;
    border-radius: 18px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
}

.parent-empty-icon svg {
    width: 28px;
    height: 28px;
}

/* ==========================================================
   MODE SOMBRE
   ========================================================== */

html[data-theme="dark"] .parent-alert-warning,
body.dark .parent-alert-warning,
body.dark-mode .parent-alert-warning,
body.theme-dark .parent-alert-warning {
    color: #fde68a;
}

html[data-theme="dark"] .parent-action-danger,
body.dark .parent-action-danger,
body.dark-mode .parent-action-danger,
body.theme-dark .parent-action-danger {
    border-color: rgba(248, 113, 113, 0.30);
    background: rgba(248, 113, 113, 0.10);
    color: #fca5a5;
}

html[data-theme="dark"] .parent-action-danger:hover,
body.dark .parent-action-danger:hover,
body.dark-mode .parent-action-danger:hover,
body.theme-dark .parent-action-danger:hover {
    border-color: rgba(248, 113, 113, 0.46);
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

html[data-theme="dark"] .parent-status-completed,
html[data-theme="dark"] .parent-recent-list-row-completed .parent-recent-list-status,
body.dark .parent-status-completed,
body.dark .parent-recent-list-row-completed .parent-recent-list-status,
body.dark-mode .parent-status-completed,
body.dark-mode .parent-recent-list-row-completed .parent-recent-list-status,
body.theme-dark .parent-status-completed,
body.theme-dark .parent-recent-list-row-completed .parent-recent-list-status {
    color: #bbf7d0;
}

html[data-theme="dark"] .parent-status-in_progress,
html[data-theme="dark"] .parent-recent-list-row-in_progress .parent-recent-list-status,
body.dark .parent-status-in_progress,
body.dark .parent-recent-list-row-in_progress .parent-recent-list-status,
body.dark-mode .parent-status-in_progress,
body.dark-mode .parent-recent-list-row-in_progress .parent-recent-list-status,
body.theme-dark .parent-status-in_progress,
body.theme-dark .parent-recent-list-row-in_progress .parent-recent-list-status {
    color: #fde68a;
}

html[data-theme="dark"] .parent-form-errors,
body.dark .parent-form-errors,
body.dark-mode .parent-form-errors,
body.theme-dark .parent-form-errors {
    color: #fca5a5;
}

/* ==========================================================
   RESPONSIVE PARENT
   ========================================================== */

@media (max-width: 1050px) {
    .parent-settings-grid,
    .parent-create-main {
        grid-template-columns: 1fr;
    }

    .parent-link-teacher-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .parent-link-submit {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .parent-space-main,
    .parent-create-main {
        gap: 14px;
        margin-top: 12px;
    }

    .parent-panel,
    .parent-create-card {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .parent-recent-card {
        min-height: auto;
        padding: 15px;
        border-radius: 16px;
    }

    .parent-recent-activity-header,
    .parent-child-management-top,
    .parent-child-teacher-status {
        align-items: stretch;
        flex-direction: column;
    }

    .parent-child-row-actions,
    .parent-child-row-actions .parent-action-btn,
    .parent-child-row-actions form,
    .parent-child-row-actions form .parent-action-btn {
        width: 100%;
    }

    .parent-link-teacher-form,
    .parent-create-grid {
        grid-template-columns: 1fr;
    }

    .parent-create-grid .parent-form-field:last-child {
        grid-column: auto;
        max-width: none;
    }

    .parent-create-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .parent-create-actions .app-page-secondary-action,
    .parent-create-actions .app-page-primary-action,
    .parent-panel-actions,
    .parent-panel-actions .app-page-primary-action,
    .parent-save-btn,
    .parent-settings-form .app-page-secondary-action {
        width: 100%;
    }

    .parent-create-info {
        padding: 15px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .parent-recent-list-row {
        grid-template-columns: 1fr;
    }

    .parent-recent-list-status {
        justify-self: start;
    }

    .parent-recent-mini-chart {
        gap: 3px;
        padding-inline: 7px;
    }

    .parent-list-progress-top,
    .parent-list-progress-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ==========================================================
   CONFIRMATION â€” COMPTE ENFANT CRÃ‰Ã‰
   ========================================================== */

.parent-created-main {
    display: grid;
    place-items: center;
    min-height: 0;
    margin-top: 18px;
}

.parent-created-card {
    display: grid;
    justify-items: center;
    width: min(100%, 760px);
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--app-page-border);
    border-radius: 24px;
    background:
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
    box-shadow: var(--app-page-shadow-soft);
    text-align: center;
}

.parent-created-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.parent-created-success-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 2.4;
}

.parent-created-copy h2 {
    margin: 0.5rem 0 0;
    color: var(--app-page-text);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.parent-created-copy p {
    margin: 0.7rem auto 0;
    max-width: 560px;
    color: var(--app-page-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.parent-created-credentials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    margin-top: 24px;
}

.parent-created-credential {
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--app-page-border);
    border-radius: 17px;
    background: var(--app-page-card);
    text-align: left;
}

.parent-created-credential span,
.parent-created-credential strong {
    display: block;
}

.parent-created-credential span {
    color: var(--app-page-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.parent-created-credential strong {
    margin-top: 7px;
    color: var(--app-page-blue-dark);
    font-size: 1.08rem;
    font-weight: 950;
    letter-spacing: 0.035em;
    overflow-wrap: anywhere;
}

.parent-created-warning {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    width: 100%;
    margin-top: 16px;
    padding: 14px 15px;
    border: 1px solid rgba(217, 119, 6, 0.28);
    border-radius: 15px;
    background: rgba(217, 119, 6, 0.09);
    color: #92400e;
    text-align: left;
}

.parent-created-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.16);
    font-weight: 950;
}

.parent-created-warning p {
    margin: 1px 0 0;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.45;
}

.parent-created-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

html[data-theme="dark"] .parent-created-success-icon,
body.dark .parent-created-success-icon,
body.dark-mode .parent-created-success-icon,
body.theme-dark .parent-created-success-icon {
    color: #86efac;
}

html[data-theme="dark"] .parent-created-warning,
body.dark .parent-created-warning,
body.dark-mode .parent-created-warning,
body.theme-dark .parent-created-warning {
    color: #fde68a;
}

@media (max-width: 700px) {
    .parent-created-main {
        margin-top: 12px;
    }

    .parent-created-card {
        padding: 22px 15px;
        border-radius: 19px;
    }

    .parent-created-credentials {
        grid-template-columns: 1fr;
    }

    .parent-created-actions,
    .parent-created-actions .app-page-secondary-action,
    .parent-created-actions .app-page-primary-action {
        width: 100%;
    }
}

/* ==========================================================
   ESPACE Ã‰LÃˆVE â€” HISTORIQUE ET COURS
   ========================================================== */

.student-history-main,
.student-courses-main {
    margin-top: 18px;
}

/* ----------------------------------------------------------
   Ã‰tat vide commun
   ---------------------------------------------------------- */

.student-page-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 320px;
    padding: 32px 20px;
    border: 1px dashed var(--app-page-border);
    border-radius: 20px;
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    text-align: center;
}

.student-page-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border: 1px solid var(--app-page-border-strong);
    border-radius: 18px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue);
}

.student-page-empty-icon svg {
    width: 28px;
    height: 28px;
}

.student-page-empty h2 {
    margin: 0;
    color: var(--app-page-text);
    font-size: 1.35rem;
    font-weight: 950;
    letter-spacing: -0.025em;
}

.student-page-empty p {
    max-width: 520px;
    margin: 10px 0 0;
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ==========================================================
   HISTORIQUE
   ========================================================== */

.student-history-panel {
    min-width: 0;
}

.student-history-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.student-history-section-heading h2 {
    margin: 0.45rem 0 0;
    color: var(--app-page-text);
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    font-weight: 950;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.student-history-section-heading p {
    margin: 0.55rem 0 0;
    color: var(--app-page-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.student-history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--app-page-border);
    border-radius: 999px;
    background: var(--app-page-card-soft);
    color: var(--app-page-subtle);
    font-size: 0.8rem;
    font-weight: 900;
    white-space: nowrap;
}

.student-history-table-shell {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: auto;
    border: 1px solid var(--app-page-border);
    border-radius: 20px;
    background: var(--app-page-card);
    box-shadow: var(--app-page-shadow-soft);
    scrollbar-color: var(--app-page-border-strong) var(--app-page-card-soft);
    scrollbar-width: thin;
}

.student-history-table-shell:focus-visible {
    outline: 3px solid var(--app-page-blue-soft);
    outline-offset: 3px;
}

.student-history-table {
    width: 100%;
    min-width: 2200px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--app-page-text);
    font-size: 0.87rem;
}

.student-history-table th,
.student-history-table td {
    vertical-align: top;
}

.student-history-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 14px 12px;
    border-bottom: 1px solid var(--app-page-border);
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.student-history-table tbody td {
    padding: 15px 13px;
    border-bottom: 1px solid var(--app-page-border);
    background: var(--app-page-card);
    color: var(--app-page-subtle);
    line-height: 1.45;
    transition: background 0.16s ease;
}

.student-history-table tbody tr.history-main-row:hover > td {
    background: var(--app-page-card-blue);
}

.student-history-table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.student-history-table thead th:first-child {
    left: 0;
    z-index: 5;
}

.student-history-table tbody tr.history-main-row > td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 1px 0 0 var(--app-page-border);
}

.student-history-table tbody tr.history-main-row:hover > td:first-child {
    background: var(--app-page-card-blue);
}

.student-history-table th:nth-child(1),
.student-history-table td:nth-child(1) {
    width: 70px;
    min-width: 70px;
    text-align: center;
}

.student-history-table th:nth-child(2),
.student-history-table td:nth-child(2) {
    width: 620px;
    min-width: 620px;
}

.student-history-table th:nth-child(3),
.student-history-table td:nth-child(3) {
    width: 150px;
    min-width: 150px;
    text-align: center;
}

.student-history-table th:nth-child(4),
.student-history-table td:nth-child(4) {
    width: 160px;
    min-width: 160px;
    text-align: center;
}

.student-history-table th:nth-child(5),
.student-history-table td:nth-child(5),
.student-history-table th:nth-child(6),
.student-history-table td:nth-child(6),
.student-history-table th:nth-child(12),
.student-history-table td:nth-child(12) {
    width: 78px;
    min-width: 78px;
    text-align: center;
    white-space: nowrap;
}

.student-history-table th:nth-child(7),
.student-history-table td:nth-child(7) {
    width: 96px;
    min-width: 96px;
    text-align: center;
    white-space: nowrap;
}

.student-history-table th:nth-child(8),
.student-history-table td:nth-child(8) {
    width: 155px;
    min-width: 155px;
    text-align: center;
    white-space: nowrap;
}

.student-history-table th:nth-child(9),
.student-history-table td:nth-child(9) {
    width: 220px;
    min-width: 220px;
}

.student-history-table th:nth-child(10),
.student-history-table td:nth-child(10) {
    width: 240px;
    min-width: 240px;
}

.student-history-table th:nth-child(11),
.student-history-table td:nth-child(11) {
    width: 280px;
    min-width: 280px;
}

.student-history-table th:nth-child(9),
.student-history-table td:nth-child(9),
.student-history-table th:nth-child(10),
.student-history-table td:nth-child(10),
.student-history-table th:nth-child(11),
.student-history-table td:nth-child(11) {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

.student-history-table .statement-cell,
.student-history-table .exercise-cell {
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.student-history-table .statement-box {
    width: 100%;
    max-width: none;
    overflow: visible;
}

.student-history-table .statement-box .mean-table-wrap,
.student-history-table .statement-box .proportion-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0.75rem auto !important;
    overflow-x: visible !important;
}

.student-history-table .statement-box table {
    width: 100% !important;
    max-width: 100%;
    min-width: 0 !important;
    margin-inline: auto !important;
    table-layout: fixed;
    font-size: clamp(0.72rem, 1.2vw, 0.95rem) !important;
}

.student-history-table .statement-box table th,
.student-history-table .statement-box table td {
    width: auto !important;
    min-width: 0 !important;
    padding: 0.45rem 0.35rem !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
}

.student-history-table .answer-cell,
.student-history-table .solution-cell {
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.history-center-cell {
    text-align: center;
}

.history-date-cell {
    text-align: center;
    white-space: nowrap;
}

.history-date,
.history-time {
    display: block;
    line-height: 1.25;
}

.history-date {
    color: var(--app-page-text);
    font-weight: 850;
}

.history-time {
    margin-top: 4px;
    color: var(--app-page-muted);
    font-size: 0.8rem;
}

.history-sort-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.history-sort-link:hover {
    color: var(--app-page-blue-dark);
    text-decoration: none;
}

.history-sort-link.is-active {
    color: var(--app-page-blue-dark);
    font-weight: 950;
}

.history-sort-arrow {
    font-size: 0.65rem;
    opacity: 0.82;
}

.history-correction-control-cell {
    background: var(--app-page-card) !important;
}

.correction-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--app-page-border-strong);
    border-radius: 11px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
    font: inherit;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.correction-btn:hover {
    border-color: var(--app-page-blue);
    background: var(--app-page-blue);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.correction-btn:focus-visible {
    outline: 3px solid var(--app-page-blue-soft);
    outline-offset: 3px;
}

.history-no-correction {
    color: var(--app-page-muted);
    font-weight: 850;
}

.student-history-table .correction-row[hidden] {
    display: none;
}

.student-history-table .correction-row td {
    padding: 20px 22px;
    border-bottom: 1px solid var(--app-page-border);
    background:
        linear-gradient(
            135deg,
            var(--app-page-card-blue) 0%,
            var(--app-page-card-soft) 100%
        );
    color: var(--app-page-text);
    text-align: left;
    white-space: normal;
}

.student-history-table .correction-content {
    max-width: 1180px;
    color: inherit;
}

.student-history-table .correction-content > strong {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--app-page-blue-dark);
    font-size: 0.84rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.student-history-table
    .interactive-polygon-correction
    .interactive-polygon-canvas-shell {
    width: min(45%, 560px);
    margin-inline: auto;
}

@media (max-width: 700px) {
    .student-history-table
        .interactive-polygon-correction
        .interactive-polygon-canvas-shell {
        width: min(90vw, 560px);
        margin-inline: 0;
    }
}

.student-history-table .correction-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.student-history-table .correction-list li {
    margin: 0 0 12px;
}

.student-history-table .correction-list li:last-child {
    margin-bottom: 0;
}

.student-history-table .correction-math {
    color: inherit;
    line-height: 1.55;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
}

.student-history-table .statement-cell mjx-container,
.student-history-table .statement-cell .MathJax,
.student-history-table .solution-cell mjx-container,
.student-history-table .solution-cell .MathJax,
.student-history-table .answer-cell mjx-container,
.student-history-table .answer-cell .MathJax,
.student-history-table .correction-cell mjx-container,
.student-history-table .correction-cell .MathJax,
.student-history-table .correction-math mjx-container,
.student-history-table .correction-math .MathJax {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.student-history-table .statement-cell mjx-container,
.student-history-table .statement-cell .MathJax,
.student-history-table .correction-cell mjx-container,
.student-history-table .correction-cell .MathJax,
.student-history-table .correction-math mjx-container,
.student-history-table .correction-math .MathJax {
    text-align: left !important;
}

.student-history-table img.problem-figure {
    width: 200px;
    max-width: 100%;
    height: auto;
}

/* ==========================================================
   COURS
   ========================================================== */

.student-course-stack {
    display: grid;
    gap: 22px;
}

.student-course-theme {
    min-width: 0;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--app-page-border);
    border-radius: 22px;
    background:
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
    box-shadow: var(--app-page-shadow-soft);
}

.student-course-theme-header {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--app-page-border);
}

.student-course-theme-header h2 {
    margin: 0.45rem 0 0;
    color: var(--app-page-text);
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.student-course-chapter-list {
    display: grid;
    gap: 16px;
}

.student-course-chapter {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--app-page-border);
    border-radius: 18px;
    background: var(--app-page-card);
}

.student-course-chapter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.student-course-chapter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border: 1px solid var(--app-page-border-strong);
    border-radius: 14px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue);
}

.student-course-chapter-icon svg {
    width: 22px;
    height: 22px;
}

.student-course-chapter-header > div {
    min-width: 0;
}

.student-course-chapter-header > div > span {
    display: block;
    margin-bottom: 3px;
    color: var(--app-page-muted);
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.student-course-chapter-header h3 {
    margin: 0;
    color: var(--app-page-text);
    font-size: 1.05rem;
    font-weight: 950;
    line-height: 1.22;
    letter-spacing: -0.02em;
}

.student-course-lesson-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(250px, 100%), 1fr)
    );
    gap: 12px;
}

.student-course-lesson-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--app-page-border);
    border-radius: 16px;
    background: var(--app-page-card-soft);
    color: var(--app-page-text);
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.035);
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.student-course-lesson-card:hover {
    border-color: var(--app-page-border-strong);
    background: var(--app-page-card-blue);
    color: var(--app-page-blue-dark);
    box-shadow: var(--app-page-shadow-hover);
    text-decoration: none;
    transform: translateY(-2px);
}

.student-course-lesson-card:focus-visible {
    outline: 3px solid var(--app-page-blue-soft);
    outline-offset: 3px;
}

.student-course-lesson-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--app-page-border);
    border-radius: 13px;
    background: var(--app-page-card);
    color: var(--app-page-blue);
}

.student-course-lesson-icon svg {
    width: 21px;
    height: 21px;
}

.student-course-lesson-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.student-course-lesson-copy strong {
    color: var(--app-page-text);
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.student-course-lesson-copy small {
    color: var(--app-page-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.student-course-lesson-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 10px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue-dark);
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.student-course-lesson-arrow svg {
    width: 17px;
    height: 17px;
}

.student-course-lesson-card:hover .student-course-lesson-arrow {
    background: var(--app-page-blue);
    color: #ffffff;
    transform: translateX(2px);
}

.student-course-empty {
    padding: 16px;
    border: 1px dashed var(--app-page-border);
    border-radius: 14px;
    background: var(--app-page-card-soft);
    color: var(--app-page-muted);
    font-size: 0.86rem;
    font-weight: 750;
    text-align: center;
}

/* ==========================================================
   RESPONSIVE â€” HISTORIQUE ET COURS
   ========================================================== */

@media (max-width: 1100px) {
    .student-history-table {
        min-width: 1740px;
    }

    .student-history-table th:nth-child(2),
    .student-history-table td:nth-child(2) {
        width: 440px;
        min-width: 440px;
    }

    .student-history-table th:nth-child(9),
    .student-history-table td:nth-child(9) {
        width: 180px;
        min-width: 180px;
    }

    .student-history-table th:nth-child(10),
    .student-history-table td:nth-child(10) {
        width: 200px;
        min-width: 200px;
    }

    .student-history-table th:nth-child(11),
    .student-history-table td:nth-child(11) {
        width: 240px;
        min-width: 240px;
    }
}

@media (max-width: 700px) {
    .student-history-main,
    .student-courses-main {
        margin-top: 12px;
    }

    .student-history-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .student-history-count {
        align-self: flex-start;
    }

    .student-history-table-shell {
        border-radius: 16px;
    }

    .student-course-stack {
        gap: 14px;
    }

    .student-course-theme {
        padding: 18px 14px;
        border-radius: 18px;
    }

    .student-course-chapter {
        padding: 15px;
        border-radius: 16px;
    }

    .student-course-lesson-grid {
        grid-template-columns: 1fr;
    }

    .student-course-lesson-card {
        min-height: 80px;
        padding: 12px;
    }

    .student-page-empty {
        min-height: 260px;
        border-radius: 17px;
    }
}

/* ==========================================================
   PAGES Ã‰LÃˆVE â€” TITRE PRINCIPAL STRICTEMENT COMMUN
   ========================================================== */

/* ==========================================================
   PAGES Ã‰LÃˆVE â€” ALIGNEMENT VISUEL DES QUATRE PAGES
   Tableau de bord / SynthÃ¨se / Historique / Cours
   ========================================================== */

/* MÃªme largeur rÃ©elle pour les quatre pages. */

.student-dashboard-shell.exercise-catalog.app-page,
.student-history-page.exercise-catalog.app-page,
.student-courses-page.exercise-catalog.app-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin: 0 auto !important;
}

/*
Historique et Cours ne possÃ¨dent plus de panneau intermÃ©diaire
qui rÃ©duit artificiellement la largeur du contenu.
*/

.student-page-content {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 18px;
}

/* ----------------------------------------------------------
   Conteneur visuel commun
   ---------------------------------------------------------- */

.student-page-surface {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--app-page-border) !important;
    border-radius: 24px !important;
    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, 0.12),
            transparent 36%
        ),
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        ) !important;
    box-shadow: var(--app-page-shadow-soft) !important;
}

.student-page-surface::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    display: block !important;
    width: 100%;
    height: 5px;
    background:
        linear-gradient(
            90deg,
            #2563eb 0%,
            rgba(96, 165, 250, 0.48) 65%,
            transparent 100%
        ) !important;
}

/* ----------------------------------------------------------
   DÃ©but de page strictement commun
   ---------------------------------------------------------- */

.student-page-hero {
    padding: 26px !important;
}

.student-page-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 900px;
    min-width: 0;
}

.student-page-eyebrow {
    display: block;
    color: var(--app-page-muted) !important;
    font-size: 0.74rem !important;
    font-weight: 950 !important;
    line-height: 1.1;
    letter-spacing: 0.13em !important;
    text-transform: uppercase;
}

.student-page-hero > .student-page-hero-copy > h1,
.student-page-hero.student-objectives-header > h2,
.student-page-hero .student-hero-top h1 {
    margin: 0.35rem 0 0.5rem !important;
    color: var(--app-page-text) !important;
    font-family: Arial, sans-serif;
    font-size: clamp(2.05rem, 3.2vw, 3.4rem) !important;
    font-weight: 950 !important;
    line-height: 0.98 !important;
    letter-spacing: -0.055em !important;
}

.student-page-hero > .student-page-hero-copy > p,
.student-page-hero.student-objectives-header > p,
.student-page-hero .student-hero-top > div > p {
    max-width: 900px;
    margin: 0 !important;
    color: var(--app-page-subtle) !important;
    font-size: 1.02rem !important;
    line-height: 1.5 !important;
}

/*
Les anciens styles du tableau de bord et de la synthÃ¨se sont plus
spÃ©cifiques et se trouvent dans le template. Ces rÃ¨gles garantissent
nÃ©anmoins exactement le mÃªme fond, la mÃªme bordure et le mÃªme rayon.
*/

.student-dashboard-shell .student-page-hero.student-hero-card,
.student-dashboard-shell .student-page-hero.student-objectives-header {
    padding: 26px !important;
    border: 1px solid var(--app-page-border) !important;
    border-radius: 24px !important;
    background:
        radial-gradient(
            circle at top right,
            rgba(37, 99, 235, 0.12),
            transparent 36%
        ),
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        ) !important;
    box-shadow: var(--app-page-shadow-soft) !important;
}

/* ==========================================================
   COURS â€” THÃˆMES AU MÃŠME NIVEAU VISUEL QUE LE BANDEAU
   ========================================================== */

/*
student-course-stack reste uniquement une grille d'espacement.
Il n'a aucun fond, aucune bordure et aucune ombre.
*/

.student-course-stack {
    display: grid;
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.student-course-theme.student-page-surface {
    padding: 26px !important;
    border-radius: 24px !important;
}

.student-course-theme-header {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--app-page-border);
}

.student-course-theme-header h2 {
    margin: 0.35rem 0 0 !important;
    color: var(--app-page-text);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem) !important;
    font-weight: 950;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.student-course-chapter-list {
    position: relative;
    z-index: 1;
}

/* ==========================================================
   HISTORIQUE â€” TYPOGRAPHIE PLUS COMPACTE
   ========================================================== */

.student-history-section-heading h2 {
    font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.student-history-section-heading p {
    font-size: 0.86rem;
}

.student-history-table {
    font-size: 0.84rem;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 760px) {
    .student-page-content {
        margin-top: 12px;
    }

    .student-page-hero,
    .student-dashboard-shell .student-page-hero.student-hero-card,
    .student-dashboard-shell .student-page-hero.student-objectives-header {
        padding: 20px 16px !important;
        border-radius: 20px !important;
    }

    .student-page-hero > .student-page-hero-copy > h1,
    .student-page-hero.student-objectives-header > h2,
    .student-page-hero .student-hero-top h1 {
        font-size: 2rem !important;
    }

    .student-page-hero > .student-page-hero-copy > p,
    .student-page-hero.student-objectives-header > p,
    .student-page-hero .student-hero-top > div > p {
        font-size: 0.94rem !important;
    }

    .student-course-theme.student-page-surface {
        padding: 20px 14px !important;
        border-radius: 20px !important;
    }
}

/* ==========================================================
   PAGES Ã‰LÃˆVE â€” TITRE PRINCIPAL STRICTEMENT COMMUN
   ========================================================== */

.student-history-page h1.student-page-title,
.student-courses-page h1.student-page-title {
    margin: 0.35rem 0 0.5rem !important;
    color: var(--app-page-text) !important;
    font-family: Arial, sans-serif !important;
    font-size: clamp(1.95rem, 2.8vw, 3rem) !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    letter-spacing: -0.05em !important;
}

@media (max-width: 760px) {
    .student-history-page h1.student-page-title,
    .student-courses-page h1.student-page-title {
        font-size: 1.9rem !important;
    }
}

/* ==========================================================
   ESPACE PARENT â€” TITRES PRINCIPAUX UNIFORMISÃ‰S
   Mes enfants / ParamÃ¨tres / Ajouter / Professeur
   ========================================================== */

.parent-space-page h1.parent-page-title,
.parent-create-page h1.parent-page-title,
.link-teacher-page h1.parent-page-title {
    margin: 0.35rem 0 0.5rem !important;
    color: var(--app-page-text) !important;
    font-family: Arial, sans-serif !important;
    font-size: clamp(1.95rem, 2.8vw, 3rem) !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    letter-spacing: -0.05em !important;
}

@media (max-width: 760px) {
    .parent-space-page h1.parent-page-title,
    .parent-create-page h1.parent-page-title,
    .link-teacher-page h1.parent-page-title {
        font-size: 1.9rem !important;
    }
}

/* =========================================================
   DASHBOARD ÉLÈVE — VERSION PARENT / COMMERCIALE
   ========================================================= */

.student-dashboard-container {
    width: 100%;
    max-width: none !important;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: left;
    overflow: visible;
}

.student-dashboard-container,
.student-dashboard-container *,
.student-dashboard-container *::before,
.student-dashboard-container *::after {
    box-sizing: border-box;
}

.student-dashboard-shell {
    position: relative;
    left: 50%;
    transform: translateX(-50%);

    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;

    width: calc(100vw - 48px);
    max-width: none;
    min-width: 0;

    margin-top: 28px;
    align-items: start;

    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    border-radius: 0 !important;
    overflow: visible;

    --student-panel-bg: rgba(255, 255, 255, 0.98);
    --student-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.98) 100%);
    --student-soft-bg: rgba(248, 250, 252, 0.96);
    --student-soft-bg-blue: rgba(239, 246, 255, 0.92);
    --student-border: rgba(15, 23, 42, 0.09);
    --student-border-strong: rgba(37, 99, 235, 0.20);
    --student-border-hover: rgba(37, 99, 235, 0.34);
    --student-shadow: 0 14px 42px rgba(15, 23, 42, 0.08);
    --student-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.055);
    --student-text: #0f172a;
    --student-muted: #475569;
    --student-subtle: #64748b;
    --student-blue: #2563eb;
    --student-blue-dark: #1d4ed8;
    --student-blue-soft: rgba(37, 99, 235, 0.10);
    --student-green: #166534;
    --student-green-soft: rgba(22, 163, 74, 0.11);
    --student-orange: #92400e;
    --student-orange-soft: rgba(245, 158, 11, 0.12);
    --student-red-soft: rgba(239, 68, 68, 0.10);
}

.student-dashboard-shell > * {
    min-width: 0;
    max-width: 100%;
}

/* =========================================================
   DARK MODE
   ========================================================= */

html[data-theme="dark"] .student-dashboard-shell,
body.dark .student-dashboard-shell,
body.dark-mode .student-dashboard-shell,
body.theme-dark .student-dashboard-shell,
[data-bs-theme="dark"] .student-dashboard-shell {
    --student-panel-bg: rgba(15, 23, 42, 0.96);
    --student-card-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.98) 100%);
    --student-soft-bg: rgba(30, 41, 59, 0.72);
    --student-soft-bg-blue: rgba(37, 99, 235, 0.18);
    --student-border: rgba(148, 163, 184, 0.20);
    --student-border-strong: rgba(96, 165, 250, 0.30);
    --student-border-hover: rgba(96, 165, 250, 0.48);
    --student-shadow: 0 16px 38px rgba(2, 6, 23, 0.34);
    --student-shadow-soft: 0 10px 24px rgba(2, 6, 23, 0.26);
    --student-text: #f8fafc;
    --student-muted: #cbd5e1;
    --student-subtle: #94a3b8;
    --student-blue: #60a5fa;
    --student-blue-dark: #93c5fd;
    --student-blue-soft: rgba(96, 165, 250, 0.16);
    --student-green: #bbf7d0;
    --student-green-soft: rgba(34, 197, 94, 0.16);
    --student-orange: #fde68a;
    --student-orange-soft: rgba(245, 158, 11, 0.18);
    --student-red-soft: rgba(239, 68, 68, 0.16);
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.student-sidebar {
    position: sticky;
    top: 24px;
    padding: 22px 20px;
    border: 1px solid var(--student-border);
    border-radius: 22px;
    background: var(--student-panel-bg);
    box-shadow: var(--student-shadow);
    color: var(--student-text);
}

.student-sidebar-header {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--student-border);
}

.student-sidebar-kicker,
.student-eyebrow,
.student-muted-label,
.student-sidebar-section-title {
    display: block;
    color: var(--student-subtle);
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.13em;
}

.student-sidebar h1 {
    margin: 0.55rem 0 0.5rem;
    color: var(--student-text);
    font-size: clamp(1.45rem, 1.8vw, 1.95rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.student-sidebar p {
    margin: 0;
    color: var(--student-muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.student-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.student-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--student-text);
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.student-sidebar-link:hover {
    background: var(--student-blue-soft);
    border-color: var(--student-border-hover);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    text-decoration: none;
    transform: translateY(-1px);
}

.student-sidebar-link.active {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.14) 0%, rgba(239, 246, 255, 0.92) 100%);
    border-color: var(--student-border-strong);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.10);
}

html[data-theme="dark"] .student-sidebar-link.active,
body.dark .student-sidebar-link.active,
body.dark-mode .student-sidebar-link.active,
body.theme-dark .student-sidebar-link.active,
[data-bs-theme="dark"] .student-sidebar-link.active {
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.36);
}

.student-sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--student-border);
    border-radius: 999px;
    background: var(--student-blue-soft);
    font-size: 1.15rem;
}

.student-sidebar-link strong {
    display: block;
    color: var(--student-text);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.15;
}

.student-sidebar-link small {
    display: block;
    margin-top: 0.18rem;
    color: var(--student-muted);
    font-size: 0.82rem;
    line-height: 1.2;
}

.student-sidebar-note {
    margin-top: 20px;
    padding: 14px;
    border: 1px solid var(--student-border);
    border-radius: 16px;
    background: var(--student-soft-bg);
}

.student-sidebar-note p {
    margin-top: 0.45rem;
    font-size: 0.9rem;
}





.student-subscription-card {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid var(--student-border);
    border-radius: 16px;
    background: var(--student-soft-bg);
    color: var(--student-text);
}

.student-subscription-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.student-subscription-label {
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--student-subtle);
}

.student-subscription-title {
    margin: 0.3rem 0 0.25rem;
    color: var(--student-text);
    font-size: 1.05rem;
    font-weight: 900;
}

.student-subscription-text {
    margin: 0;
    color: var(--student-muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.student-subscription-count {
    text-align: right;
}

.student-subscription-remaining {
    font-size: 2rem;
    font-weight: 950;
    line-height: 1;
    color: var(--student-blue);
}

.student-subscription-remaining.is-reached {
    color: #dc2626;
}

.student-subscription-small {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: var(--student-muted);
}

.student-subscription-alert {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--student-red-soft);
    color: #991b1b;
    font-weight: 800;
    font-size: 0.86rem;
}

body.dark .student-subscription-remaining.is-reached,
body.dark-mode .student-subscription-remaining.is-reached,
body.theme-dark .student-subscription-remaining.is-reached,
html[data-theme="dark"] .student-subscription-remaining.is-reached {
    color: #fca5a5;
}

body.dark .student-subscription-alert,
body.dark-mode .student-subscription-alert,
body.theme-dark .student-subscription-alert,
html[data-theme="dark"] .student-subscription-alert {
    color: #fecaca;
}
/* =========================================================
   PANNEAU PRINCIPAL
   ========================================================= */

.student-main-panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--student-border);
    border-radius: 24px;
    background: var(--student-panel-bg);
    box-shadow: var(--student-shadow);
    color: var(--student-text);
}

/* =========================================================
   HERO / RÉSUMÉ PARENT
   ========================================================= */

.student-hero-card {
    position: relative;
    padding: 26px;
    border: 1px solid var(--student-border);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 36%),
        var(--student-card-bg);
    box-shadow: var(--student-shadow-soft);
    overflow: hidden;
}

.student-hero-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2563eb 0%, rgba(96, 165, 250, 0.48) 65%, transparent 100%);
}

.student-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 22px;
}

.student-hero-top h2 {
    margin: 0.35rem 0 0.45rem;
    color: var(--student-text);
    font-size: clamp(2.2rem, 3.4vw, 3.8rem);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.055em;
}

.student-hero-level {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.9rem;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: var(--student-blue-soft);
    color: var(--student-blue-dark);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.student-hero-top p {
    max-width: 860px;
    margin: 0;
    color: var(--student-muted);
    font-size: 1.04rem;
    line-height: 1.45;
}

.student-heading-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
}

.student-heading-actions-stack {

    flex-direction: column;

    align-items: flex-end;

    gap: 12px;

}

.student-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.72rem 1.05rem;
    border: 1px solid var(--student-border);
    border-radius: 14px;
    font-weight: 900;
    white-space: nowrap;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.student-action-primary {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.student-action-primary:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
    filter: brightness(0.98);
}

.student-hero-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.student-hero-kpi {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    min-height: 138px;
    padding: 18px;
    border: 1px solid var(--student-border);
    border-radius: 18px;
    background: var(--student-soft-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.student-hero-kpi-primary {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.12) 0%, rgba(239, 246, 255, 0.95) 100%);
    border-color: var(--student-border-strong);
}

html[data-theme="dark"] .student-hero-kpi-primary,
body.dark .student-hero-kpi-primary,
body.dark-mode .student-hero-kpi-primary,
body.theme-dark .student-hero-kpi-primary,
[data-bs-theme="dark"] .student-hero-kpi-primary {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.28) 0%, rgba(15, 23, 42, 0.92) 100%);
    border-color: rgba(96, 165, 250, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(2, 6, 23, 0.20);
}

.student-hero-kpi span {
    display: block;
    color: var(--student-subtle);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.student-hero-kpi strong {
    display: block;
    margin-top: 0.55rem;
    color: var(--student-text);
    font-size: clamp(1.7rem, 2.2vw, 2.45rem);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.04em;
    overflow-wrap: normal;
    word-break: normal;
}

.student-hero-kpi small {
    display: block;
    margin-top: auto;
    padding-top: 0.65rem;
    color: var(--student-muted);
    font-size: 0.84rem;
    line-height: 1.25;
}

.student-hero-kpi .student-metric-duration {
    font-size: clamp(1.45rem, 1.65vw, 2rem);
    line-height: 1.08;
}

.student-parent-reading {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 18px;
    background: var(--student-soft-bg-blue);
}

.student-parent-reading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
    font-size: 1.25rem;
}

.student-parent-reading strong {
    display: block;
    color: var(--student-text);
    font-size: 1.05rem;
    font-weight: 900;
}

.student-parent-reading p {
    margin: 0.25rem 0 0;
    color: var(--student-muted);
    line-height: 1.45;
}

/* =========================================================
   CARTES GÉNÉRALES
   ========================================================= */

.student-card {
    position: relative;
    min-width: 0;
    margin-top: 18px;
    padding: 20px;
    border: 1px solid var(--student-border);
    border-radius: 20px;
    background: var(--student-card-bg);
    box-shadow: var(--student-shadow-soft);
    color: var(--student-text);
    overflow: hidden;
}

.student-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.85) 0%, rgba(96, 165, 250, 0.30) 65%, transparent 100%);
}

.student-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 14px;
}

.student-card-header h3 {
    margin: 0.15rem 0 0;
    color: var(--student-text);
    font-size: clamp(1.25rem, 1.55vw, 1.65rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.student-card-intro,
.student-selected-filter {
    margin: 0.35rem 0 0;
    color: var(--student-muted);
    font-size: 0.94rem;
    line-height: 1.4;
}

/* =========================================================
   LISTES D’EXERCICES
   ========================================================= */

.student-assigned-card-priority {
    border-color: rgba(37, 99, 235, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(239, 246, 255, 0.72) 100%);
}

.student-list-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.student-list-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--student-border);
    border-radius: 999px;
    background: var(--student-soft-bg);
    color: var(--student-text);
    font-weight: 850;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.student-list-tabs button:hover {
    transform: translateY(-1px);
}

.student-list-tabs button.active {
    background: var(--student-blue-soft);
    border-color: var(--student-border-hover);
    color: var(--student-blue-dark);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.10);
}

.student-list-tabs button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.14);
    color: inherit;
    font-size: 0.8rem;
}

.student-list-tab {
    display: none;
}

.student-list-tab.active {
    display: block;
}

.student-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 12px;
}

.student-list-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.95rem 1rem;
    border: 1px solid var(--student-border);
    border-radius: 16px;
    background: var(--student-soft-bg);
    color: var(--student-text);
    text-decoration: none;
    font-weight: 850;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.student-list-chip:hover {
    transform: translateY(-1px);
    border-color: var(--student-border-hover);
    background: var(--student-blue-soft);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
    text-decoration: none;
}

.student-list-chip-static:hover {
    transform: none;
    border-color: var(--student-border);
    background: var(--student-soft-bg);
    box-shadow: none;
}

.student-list-chip strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-empty-state-inline {
    padding: 18px;
    border: 1px dashed var(--student-border);
    border-radius: 16px;
    background: var(--student-soft-bg);
    color: var(--student-muted);
    text-align: center;
}

.student-empty-state-positive {
    background: linear-gradient(180deg, var(--student-green-soft) 0%, var(--student-soft-bg) 100%);
    border-color: rgba(22, 163, 74, 0.20);
}

.student-empty-state-inline strong {
    display: block;
    color: var(--student-text);
    font-size: 1rem;
}

.student-empty-state-inline p {
    margin: 0.35rem 0 0;
}

/* =========================================================
   GRAPHIQUE + BILAN
   ========================================================= */

.student-dashboard-focus-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(420px, 0.75fr);
    gap: 18px;
    margin-top: 18px;
}

.student-dashboard-focus-grid .student-card {
    margin-top: 0;
}

.student-chart-wrapper {
    position: relative;
    width: 100%;
    height: 330px;
    min-height: 280px;
    padding: 12px;
    border: 1px solid var(--student-border);
    border-radius: 18px;
    background: var(--student-soft-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.student-chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.student-training-card {
    align-self: start;
}

.student-training-card .student-card-header h3 {
    font-size: clamp(1.45rem, 1.9vw, 2rem);
}

.student-filters-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.student-filter-field {
    min-width: 0;
}

.student-filter-field label {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--student-subtle);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.student-filter-field select {
    width: 100%;
    min-height: 44px;
    padding: 0.58rem 0.8rem;
    border: 1px solid var(--student-border);
    border-radius: 13px;
    background: var(--student-panel-bg);
    color: var(--student-text);
    font-weight: 800;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.student-filter-field select:focus {
    outline: none;
    border-color: var(--student-border-hover);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.student-filter-field select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.student-mini-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.student-mini-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--student-border);
    border-radius: 16px;
    background: var(--student-soft-bg);
}

.student-mini-summary-card:nth-child(1) {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.10) 0%, var(--student-soft-bg) 100%);
    border-color: rgba(37, 99, 235, 0.18);
}

.student-mini-summary-card:nth-child(2) {
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.09) 0%, var(--student-soft-bg) 100%);
    border-color: rgba(14, 165, 233, 0.16);
}

.student-mini-summary-card:nth-child(3) {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.10) 0%, var(--student-soft-bg) 100%);
    border-color: rgba(245, 158, 11, 0.18);
}

.student-mini-summary-card span {
    display: block;
    color: var(--student-subtle);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.student-mini-summary-card small {
    display: block;
    margin-top: 0.25rem;
    color: var(--student-muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

.student-mini-summary-card strong {
    color: var(--student-text);
    font-size: clamp(1.35rem, 1.8vw, 1.95rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.035em;
    text-align: right;
    white-space: normal;
}

.student-mini-summary-card .student-mini-duration {
    font-size: clamp(1.15rem, 1.45vw, 1.55rem);
    max-width: 185px;
}

/* =========================================================
   QCM
   ========================================================= */

.student-qcm-section-parent {
    margin-top: 18px;
}

.student-qcm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
    gap: 12px;
}

.student-qcm-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 122px;
    padding: 18px 16px;
    border: 1px solid var(--student-border);
    border-radius: 18px;
    background: var(--student-soft-bg);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.student-qcm-card-important {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.11) 0%, var(--student-soft-bg-blue) 100%);
    border-color: rgba(37, 99, 235, 0.22);
}

.student-qcm-label {
    display: block;
    color: var(--student-subtle);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.student-qcm-value {
    display: block;
    margin-top: 0.55rem;
    color: var(--student-text);
    font-size: clamp(1.35rem, 1.8vw, 2.05rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.035em;
    overflow-wrap: normal;
}

.student-qcm-value-duration {
    font-size: clamp(1.15rem, 1.45vw, 1.55rem);
    line-height: 1.12;
}

.student-qcm-detail {
    display: block;
    margin-top: 0.45rem;
    color: var(--student-muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

.student-subsection-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 12px;
    color: var(--student-subtle);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.student-subsection-title::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--student-border);
}

/* =========================================================
   OBJECTIFS / MAÎTRISE
   ========================================================= */

.student-objectives-page {
    display: grid;
    gap: 1.5rem;
}

.objective-create-card,
.assigned-objectives-section,
.objective-history {
    margin-bottom: 1.25rem;
}

.objective-create-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.objective-form-field {
    display: grid;
    gap: 0.35rem;
    color: var(--student-text);
    font-weight: 750;
}

.objective-form-field[hidden] {
    display: none !important;
}

.objective-form-field select,
.objective-form-field input,
.objective-form-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--student-border);
    border-radius: 12px;
    background: var(--student-card-bg);
    color: var(--student-text);
}

.objective-field-note,
.objective-create-form > button {
    grid-column: 1 / -1;
}

.assigned-objective-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1rem;
}

.assigned-objectives-section > .assigned-objective-grid {
    margin-top: 1.25rem;
}

.assigned-objective-card {
    padding: 1rem;
    border: 1px solid var(--student-border);
    border-radius: 18px;
    background: var(--student-card-bg);
    box-shadow: var(--shadow-card);
}

.assigned-objective-card.is-active {
    border-color: #93c5fd;
}

.assigned-objective-top,
.objective-progress-label,
.objective-card-actions,
.group-objective-summary-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.assigned-objective-top h4 {
    margin: 0.2rem 0 0;
}

.objective-status {
    flex: 0 0 auto;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 850;
}

.objective-status.status-achieved { background: #dcfce7; color: #166534; }
.objective-status.status-missed { background: #fee2e2; color: #991b1b; }
.objective-status.status-cancelled { background: #e5e7eb; color: #4b5563; }

.objective-meta {
    color: var(--student-muted);
    font-size: 0.88rem;
}

.objective-progress {
    height: 10px;
    margin: 0.85rem 0 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--student-blue-soft);
}

.objective-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #16a34a);
}

.objective-progress-label {
    font-size: 0.88rem;
}

.objective-card-actions {
    margin-top: 0.85rem;
}

.objective-history > summary {
    cursor: pointer;
    font-weight: 850;
}

.objective-history > .assigned-objective-grid,
.group-objective-summary-list {
    margin-top: 1rem;
}

.group-objective-summary-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--student-border);
}

@media (max-width: 700px) {
    .objective-create-form { grid-template-columns: 1fr; }
    .objective-form-field,
    .objective-create-form > button { grid-column: 1; }
    .assigned-objective-top,
    .objective-progress-label,
    .group-objective-summary-row { flex-direction: column; }
}

.student-objectives-header {
    position: relative;
    padding: 26px;
    border: 1px solid var(--student-border);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 36%),
        var(--student-card-bg);
    box-shadow: var(--student-shadow-soft);
    overflow: hidden;
}

.student-objectives-header::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2563eb 0%, rgba(96, 165, 250, 0.48) 65%, transparent 100%);
}

.student-objectives-header h2 {
    margin: 0.35rem 0 0.5rem;
    color: var(--student-text);
    font-size: clamp(2.1rem, 3.2vw, 3.4rem);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.055em;
}

.student-objectives-header p {
    max-width: 900px;
    margin: 0;
    color: var(--student-muted);
    font-size: 1.02rem;
    line-height: 1.5;
}

/* =========================================================
   RÉCOMPENSES
   ========================================================= */

.student-rewards-section {
    display: grid;
    gap: 1.25rem;
}

.student-rewards-heading,
.student-mastery-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.student-rewards-heading h3,
.student-mastery-heading h3 {
    margin: 0.22rem 0 0;
    color: var(--student-text);
    font-size: clamp(1.45rem, 2vw, 2.05rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.student-rewards-summary {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.52rem 0.78rem;
    border: 1px solid var(--student-border);
    border-radius: 999px;
    background: var(--student-soft-bg);
    color: var(--student-muted);
    font-size: 0.82rem;
    font-weight: 850;
    white-space: nowrap;
}

.student-rewards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.student-reward-card {
    --reward-accent: #2563eb;
    --reward-accent-soft: rgba(37, 99, 235, 0.13);
    position: relative;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--student-border);
    border-radius: 22px;
    background: var(--student-card-bg);
    box-shadow: var(--student-shadow-soft);
    color: var(--student-text);
    overflow: hidden;
}

.student-reward-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--reward-accent), transparent 82%);
}

.student-reward-card[data-reward-key="training-time"] {
    --reward-accent: #0f766e;
    --reward-accent-soft: rgba(13, 148, 136, 0.13);
}

.student-reward-card[data-reward-key="questions-facile"] {
    --reward-accent: #16a34a;
    --reward-accent-soft: rgba(22, 163, 74, 0.13);
}

.student-reward-card[data-reward-key="questions-moyen"] {
    --reward-accent: #ca8a04;
    --reward-accent-soft: rgba(202, 138, 4, 0.14);
}

.student-reward-card[data-reward-key="questions-difficile"] {
    --reward-accent: #ea580c;
    --reward-accent-soft: rgba(234, 88, 12, 0.13);
}

.student-reward-card[data-reward-key="questions-expert"] {
    --reward-accent: #dc2626;
    --reward-accent-soft: rgba(220, 38, 38, 0.13);
}

.student-reward-card[data-reward-key="explorateur"] {
    --reward-accent: #7c3aed;
    --reward-accent-soft: rgba(124, 58, 237, 0.13);
}

html[data-theme="dark"] .student-reward-card,
body.dark .student-reward-card,
body.dark-mode .student-reward-card,
body.theme-dark .student-reward-card,
[data-bs-theme="dark"] .student-reward-card {
    --reward-accent: #60a5fa;
}

html[data-theme="dark"] .student-reward-card[data-reward-key="training-time"],
body.dark .student-reward-card[data-reward-key="training-time"],
body.dark-mode .student-reward-card[data-reward-key="training-time"],
body.theme-dark .student-reward-card[data-reward-key="training-time"],
[data-bs-theme="dark"] .student-reward-card[data-reward-key="training-time"] {
    --reward-accent: #2dd4bf;
}

html[data-theme="dark"] .student-reward-card[data-reward-key="questions-facile"],
body.dark .student-reward-card[data-reward-key="questions-facile"],
body.dark-mode .student-reward-card[data-reward-key="questions-facile"],
body.theme-dark .student-reward-card[data-reward-key="questions-facile"],
[data-bs-theme="dark"] .student-reward-card[data-reward-key="questions-facile"] {
    --reward-accent: #4ade80;
}

html[data-theme="dark"] .student-reward-card[data-reward-key="questions-moyen"],
body.dark .student-reward-card[data-reward-key="questions-moyen"],
body.dark-mode .student-reward-card[data-reward-key="questions-moyen"],
body.theme-dark .student-reward-card[data-reward-key="questions-moyen"],
[data-bs-theme="dark"] .student-reward-card[data-reward-key="questions-moyen"] {
    --reward-accent: #facc15;
}

html[data-theme="dark"] .student-reward-card[data-reward-key="questions-difficile"],
body.dark .student-reward-card[data-reward-key="questions-difficile"],
body.dark-mode .student-reward-card[data-reward-key="questions-difficile"],
body.theme-dark .student-reward-card[data-reward-key="questions-difficile"],
[data-bs-theme="dark"] .student-reward-card[data-reward-key="questions-difficile"] {
    --reward-accent: #fb923c;
}

html[data-theme="dark"] .student-reward-card[data-reward-key="questions-expert"],
body.dark .student-reward-card[data-reward-key="questions-expert"],
body.dark-mode .student-reward-card[data-reward-key="questions-expert"],
body.theme-dark .student-reward-card[data-reward-key="questions-expert"],
[data-bs-theme="dark"] .student-reward-card[data-reward-key="questions-expert"] {
    --reward-accent: #f87171;
}

html[data-theme="dark"] .student-reward-card[data-reward-key="explorateur"],
body.dark .student-reward-card[data-reward-key="explorateur"],
body.dark-mode .student-reward-card[data-reward-key="explorateur"],
body.theme-dark .student-reward-card[data-reward-key="explorateur"],
[data-bs-theme="dark"] .student-reward-card[data-reward-key="explorateur"] {
    --reward-accent: #a78bfa;
}

.student-reward-top {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.student-reward-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    padding: 7px;
    border: 1px solid var(--student-border);
    border-radius: 18px;
    background: var(--reward-accent-soft);
}

.student-reward-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.student-reward-card h4 {
    margin: 0;
    color: var(--student-text);
    font-size: 1.12rem;
    line-height: 1.15;
    font-weight: 950;
}

.student-reward-description {
    margin: 0.3rem 0 0;
    color: var(--student-muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.student-reward-value-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.student-reward-value {
    color: var(--student-text);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.student-reward-current-tier {
    color: var(--reward-accent);
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 900;
    text-align: right;
}

.student-reward-progress {
    height: 11px;
    margin-top: 0.85rem;
    border: 1px solid var(--student-border);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.20);
    overflow: hidden;
}

.student-reward-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--reward-accent);
}

.student-reward-tiers {
    display: flex;
    justify-content: space-between;
    gap: 0;
    margin-top: 1rem;
    padding: 2px 1px 7px;
}

.student-reward-tier {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 30px;
    width: 30px;
    aspect-ratio: 1;
    border: 1px solid var(--student-border);
    border-radius: 999px;
    background: var(--student-soft-bg);
    color: var(--student-subtle);
    font-size: 0.76rem;
    font-weight: 950;
}

.student-reward-tier.is-unlocked {
    border-color: var(--reward-accent);
    background: var(--reward-accent-soft);
    color: var(--reward-accent);
}

.student-reward-tier.is-current {
    color: #ffffff;
    background: var(--reward-accent);
    box-shadow: 0 0 0 4px var(--reward-accent-soft);
}

.student-mastery-heading {
    margin: 0;
}

@media (max-width: 900px) {
    .student-rewards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .student-rewards-heading,
    .student-mastery-heading {
        display: block;
    }

    .student-rewards-summary {
        display: inline-flex;
        margin-top: 0.7rem;
        white-space: normal;
    }

    .student-reward-card {
        padding: 17px;
        border-radius: 19px;
    }

    .student-reward-top {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
    }

    .student-reward-icon {
        width: 58px;
        height: 58px;
        border-radius: 16px;
    }

    .student-reward-value-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .student-reward-current-tier {
        text-align: left;
    }
}

.student-mastery-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    margin-top: 1.25rem;
    padding: 14px 16px;
    border: 1px solid var(--student-border);
    border-radius: 18px;
    background: var(--student-soft-bg);
    color: var(--student-muted);
    font-size: 0.84rem;
    font-weight: 850;
}

.student-mastery-legend span {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    min-width: 0;
}

@media (max-width: 560px) {
    .student-mastery-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 13px;
        font-size: 0.78rem;
    }
}

.mastery-dot {
    display: inline-block;
    width: 0.82rem;
    height: 0.82rem;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.student-objective-theme-card {
    position: relative;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--student-border);
    border-radius: 22px;
    background: var(--student-card-bg);
    box-shadow: var(--student-shadow-soft);
    color: var(--student-text);
    overflow: hidden;
}

.student-objective-theme-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.85) 0%, rgba(96, 165, 250, 0.30) 65%, transparent 100%);
}

.student-objective-theme-header {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1.2rem;
}

.student-objective-theme-header h3 {
    margin: 0.18rem 0 0;
    color: var(--student-text);
    font-size: clamp(1.45rem, 2vw, 2.15rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.mastery-bar {
    width: 100%;
    height: 24px;
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
    border: 1px solid var(--student-border);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.mastery-bar-small {
    height: 16px;
    min-width: 230px;
    max-width: 360px;
}

.mastery-bar-segment {
    height: 100%;
    min-width: 2px;
}

.mastery-bar-empty {
    width: 100%;
    text-align: center;
    color: var(--student-muted);
    font-size: 0.75rem;
    font-weight: 850;
    line-height: 22px;
}

.mastery-red {
    background: #ef4444;
}

.mastery-yellow {
    background: #facc15;
}

.mastery-light-green {
    background: #86efac;
}

.mastery-dark-green {
    background: #15803d;
}

.mastery-gray {
    background: #94a3b8;
}

.student-objective-chapters {
    display: grid;
    gap: 0.9rem;
}

.student-objective-chapter {
    border: 1px solid var(--student-border);
    border-radius: 18px;
    overflow: hidden;
    background: var(--student-soft-bg);
}

.student-objective-chapter summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
}

.student-objective-chapter summary .mastery-bar-small {
    min-width: 0;
    max-width: none;
    width: 100%;
}

.student-objective-chapter summary::-webkit-details-marker {
    display: none;
}

.student-objective-chapter summary strong {
    display: block;
    color: var(--student-text);
    font-weight: 950;
}

.student-objective-chapter summary small {
    display: block;
    margin-top: 0.25rem;
    color: var(--student-muted);
    font-weight: 750;
}

.student-objective-exercises {
    display: grid;
    gap: 0.55rem;
    padding: 0 1rem 1rem;
}

.student-objective-exercise-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--student-border);
    border-radius: 15px;
    background: var(--student-panel-bg);
}

.student-objective-exercise-row strong {
    display: block;
    color: var(--student-text);
    font-weight: 900;
}

.student-objective-exercise-row small {
    display: block;
    margin-top: 0.25rem;
    color: var(--student-muted);
    font-weight: 650;
    line-height: 1.35;
}

.mastery-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    min-height: 30px;
    padding: 0.36rem 0.68rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 950;
    color: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.mastery-badge.mastery-red,
.mastery-badge.mastery-dark-green {
    color: #ffffff;
}

.student-objectives-empty {
    margin-top: 0;
}

html[data-theme="dark"] .mastery-bar,
body.dark .mastery-bar,
body.dark-mode .mastery-bar,
body.theme-dark .mastery-bar,
[data-bs-theme="dark"] .mastery-bar {
    background: rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.35);
}

html[data-theme="dark"] .mastery-dot,
body.dark .mastery-dot,
body.dark-mode .mastery-dot,
body.theme-dark .mastery-dot,
[data-bs-theme="dark"] .mastery-dot {
    box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.10);
}

/* =========================================================
   SYNTHÈSE GLOBALE DE MAÎTRISE
   ========================================================= */

.student-objectives-global-card {
    position: relative;
    padding: 22px;
    border: 1px solid var(--student-border-strong);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 38%),
        var(--student-card-bg);
    box-shadow: var(--student-shadow-soft);
    color: var(--student-text);
    overflow: hidden;
}

.student-objectives-global-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2563eb 0%, rgba(96, 165, 250, 0.48) 65%, transparent 100%);
}

.student-objectives-global-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: center;
}

.student-objectives-global-card h3 {
    margin: 0.22rem 0 0;
    color: var(--student-text);
    font-size: clamp(1.55rem, 2vw, 2.15rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.student-objectives-global-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    margin-top: 0.7rem;
    color: var(--student-muted);
    font-size: 0.88rem;
    font-weight: 750;
}

.student-objectives-global-stats span {
    display: inline-flex;
    align-items: center;
}

.student-objectives-global-stats span + span::before {
    content: "•";
    margin-right: 0.8rem;
    color: var(--student-subtle);
}

.student-objectives-global-card .mastery-bar {
    height: 30px;
}

@media (max-width: 880px) {
    .student-objectives-global-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1280px) {
    .student-dashboard-focus-grid {
        grid-template-columns: 1fr;
    }

    .student-training-card .student-filters-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .student-mini-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .student-mini-summary-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .student-mini-summary-card strong {
        margin-top: 0.45rem;
        text-align: left;
    }
}

@media (max-width: 1180px) {
    .student-dashboard-shell {
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 18px;
        width: calc(100vw - 32px);
    }

    .student-hero-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .student-dashboard-shell {
        position: static;
        left: auto;
        transform: none;
        grid-template-columns: 1fr !important;
        width: 100%;
        max-width: 100%;
        gap: 18px;
        margin-top: 20px;
    }

    .student-sidebar {
        position: static;
    }

    .student-hero-top {
        flex-direction: column;
    }

    .student-heading-actions,
    .student-action-btn {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .student-dashboard-shell {
        gap: 16px;
        margin-top: 16px;
    }

    .student-sidebar,
    .student-main-panel {
        padding: 16px;
        border-radius: 20px;
    }

    .student-hero-card,
    .student-card {
        padding: 16px;
        border-radius: 18px;
    }

    .student-hero-top h2 {
        font-size: 2.15rem;
    }

    .student-hero-kpi-grid,
    .student-training-card .student-filters-form,
    .student-mini-summary-grid {
        grid-template-columns: 1fr;
    }

    .student-parent-reading {
        flex-direction: column;
    }

    .student-card-header {
        flex-direction: column;
    }

    .student-chart-wrapper {
        height: 285px;
        padding: 8px;
    }

    .student-qcm-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .student-sidebar,
    .student-main-panel {
        padding: 14px;
        border-radius: 18px;
    }

    .student-sidebar-link {
        padding: 11px;
    }

    .student-sidebar-icon {
        width: 38px;
        height: 38px;
    }

    .student-list-tabs {
        flex-direction: column;
    }

    .student-list-tabs button {
        width: 100%;
        justify-content: space-between;
    }
}

.student-objective-theme-card {
    background: var(--student-card-bg);
    border: 1px solid var(--student-border);
    border-radius: 24px;
    box-shadow: var(--student-shadow-soft);
    overflow: hidden;
}

.student-objective-theme-card + .student-objective-theme-card {
    margin-top: 18px;
}

.student-objective-theme-card::before {
    display: none;
}

.student-objective-theme-summary,
.student-objective-chapter-summary {
    list-style: none;
    cursor: pointer;
}

.student-objective-theme-summary::-webkit-details-marker,
.student-objective-chapter-summary::-webkit-details-marker {
    display: none;
}

.student-objective-theme-summary {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: center;
    padding: 22px;
}

.student-objective-summary-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.student-objective-chevron {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--student-blue-soft);
    color: var(--student-blue-dark);
    font-weight: 950;
    transition: transform 0.18s ease;
}

.student-objective-theme-card[open] > .student-objective-theme-summary .student-objective-chevron,
.student-objective-chapter[open] > .student-objective-chapter-summary .student-objective-chevron {
    transform: rotate(90deg);
}

.student-objective-theme-summary h3 {
    margin: 0.15rem 0 0;
    color: var(--student-text);
    font-size: clamp(1.55rem, 2vw, 2.1rem);
    font-weight: 950;
    letter-spacing: -0.035em;
}

.student-objective-chapters {
    display: grid;
    gap: 12px;
    padding: 0 22px 22px;
}

.student-objective-chapter {
    border: 1px solid var(--student-border);
    border-radius: 18px;
    background: var(--student-soft-bg);
    overflow: hidden;
}

.student-objective-chapter-summary {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(260px, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.student-objective-chapter-summary strong {
    display: block;
    color: var(--student-text);
    font-weight: 950;
}

.student-objective-chapter-summary small {
    display: block;
    margin-top: 0.25rem;
    color: var(--student-muted);
    font-weight: 700;
}

.student-objective-exercises {
    display: grid;
    gap: 8px;
    padding: 0 16px 16px;
}

.student-objective-exercise-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--student-border);
    border-radius: 14px;
    background: var(--student-panel-bg);
}

.student-objective-exercise-not-started {
    opacity: 0.72;
}

.student-objective-exercise-row strong {
    color: var(--student-text);
    font-weight: 900;
}

.student-objective-exercise-row small {
    display: block;
    margin-top: 0.22rem;
    color: var(--student-muted);
    font-weight: 700;
}

@media (max-width: 880px) {
    .student-objective-theme-summary,
    .student-objective-chapter-summary {
        grid-template-columns: 1fr;
    }

    .mastery-bar,
    .mastery-bar-small {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .student-objective-exercise-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.mastery-gray-light {
    background: #e5e7eb;
}

.mastery-gray-dark {
    background: #94a3b8;
}

.mastery-badge.mastery-gray-light {
    background: #e5e7eb;
    color: #334155;
}

.mastery-badge.mastery-gray-dark {
    background: #94a3b8;
    color: #0f172a;
}

.student-objective-exercise-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.student-objective-exercise-link:hover {
    color: inherit;
    text-decoration: none;
    border-color: var(--student-border-hover);
    background: var(--student-blue-soft);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.student-objective-exercise-row {
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

body.dark .mastery-gray-light,
body.dark-mode .mastery-gray-light,
body.theme-dark .mastery-gray-light,
html[data-theme="dark"] .mastery-gray-light,
[data-bs-theme="dark"] .mastery-gray-light {
    background: #334155;
}

body.dark .mastery-gray-dark,
body.dark-mode .mastery-gray-dark,
body.theme-dark .mastery-gray-dark,
html[data-theme="dark"] .mastery-gray-dark,
[data-bs-theme="dark"] .mastery-gray-dark {
    background: #64748b;
}

body.dark .mastery-badge.mastery-gray-light,
body.dark-mode .mastery-badge.mastery-gray-light,
body.theme-dark .mastery-badge.mastery-gray-light,
html[data-theme="dark"] .mastery-badge.mastery-gray-light,
[data-bs-theme="dark"] .mastery-badge.mastery-gray-light {
    color: #e2e8f0;
}

body.dark .mastery-badge.mastery-gray-dark,
body.dark-mode .mastery-badge.mastery-gray-dark,
body.theme-dark .mastery-badge.mastery-gray-dark,
html[data-theme="dark"] .mastery-badge.mastery-gray-dark,
[data-bs-theme="dark"] .mastery-badge.mastery-gray-dark {
    color: #f8fafc;
}

/* =========================================================
   ÉTAPE 2 — SUPPRESSION VISUELLE DE L’ANCIENNE SIDEBAR
   Abonnement compact + indication de la vue adulte
   ========================================================= */

/* Le tableau de bord utilise désormais toute la largeur. */
.student-dashboard-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
}

.student-main-panel {
    width: 100%;
}

/* ---------------------------------------------------------
   Indication lorsqu’un adulte consulte le profil
   --------------------------------------------------------- */

.student-view-context {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--student-border);
    border-radius: 999px;
    background: var(--student-soft-bg);
    color: var(--student-muted);
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.25;
}

.student-view-context-label {
    color: var(--student-blue-dark);
    font-weight: 950;
}

.student-view-context-parent {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.20);
}

.student-view-context-parent .student-view-context-label {
    color: #6d28d9;
}

.student-view-context-teacher {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.20);
}

/* ---------------------------------------------------------
   Informations compactes sous le titre
   --------------------------------------------------------- */

.student-hero-meta-row {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.student-compact-subscription {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 72px;
    min-width: 185px;
    padding: 10px 13px;
    border: 1px solid var(--student-border);
    border-radius: 16px;
    background: var(--student-soft-bg);
}

.student-compact-meta-label {
    display: block;
    color: var(--student-subtle);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.student-compact-subscription strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--student-text);
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.1;
}

.student-compact-subscription small {
    display: block;
    margin-top: 0.25rem;
    color: var(--student-muted);
    font-size: 0.76rem;
    line-height: 1.25;
}

.student-compact-subscription.is-alert {
    background: var(--student-red-soft);
    border-color: rgba(239, 68, 68, 0.24);
}

.student-compact-subscription.is-alert strong {
    color: #b91c1c;
}

/* ---------------------------------------------------------
   Mode sombre
   --------------------------------------------------------- */

html[data-theme="dark"] .student-view-context-parent,
body.dark .student-view-context-parent,
body.dark-mode .student-view-context-parent,
body.theme-dark .student-view-context-parent {
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(196, 181, 253, 0.28);
}

html[data-theme="dark"] .student-view-context-parent .student-view-context-label,
body.dark .student-view-context-parent .student-view-context-label,
body.dark-mode .student-view-context-parent .student-view-context-label,
body.theme-dark .student-view-context-parent .student-view-context-label {
    color: #c4b5fd;
}

html[data-theme="dark"] .student-compact-subscription.is-alert strong,
body.dark .student-compact-subscription.is-alert strong,
body.dark-mode .student-compact-subscription.is-alert strong,
body.theme-dark .student-compact-subscription.is-alert strong {
    color: #fca5a5;
}

/* ---------------------------------------------------------
   Smartphone
   --------------------------------------------------------- */

@media (max-width: 760px) {
    .student-dashboard-shell {
        display: block !important;
    }

    .student-view-context {
        width: 100%;
        justify-content: center;
        border-radius: 14px;
        text-align: center;
    }

    .student-hero-meta-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .student-compact-subscription {
        width: 100%;
        min-width: 0;
        align-items: center;
        text-align: center;
    }
}
/* =========================================================
   ABONNEMENT COMPACT — TYPE DE FORMULE
   ========================================================= */

.student-compact-subscription-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.student-subscription-plan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid var(--student-border);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 950;
    line-height: 1;
}

.student-subscription-plan.is-free {
    background: var(--student-soft-bg);
    color: var(--student-muted);
}

.student-subscription-plan.is-premium {
    background: rgba(37, 99, 235, 0.11);
    border-color: rgba(37, 99, 235, 0.22);
    color: var(--student-blue-dark);
}

html[data-theme="dark"] .student-subscription-plan.is-premium,
body.dark .student-subscription-plan.is-premium,
body.dark-mode .student-subscription-plan.is-premium,
body.theme-dark .student-subscription-plan.is-premium {
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.30);
    color: #bfdbfe;
}
/* =========================================================
   ALIGNEMENT GLOBAL DES PAGES ÉLÈVE
   Tableau de bord et synthèse utilisent exactement la même
   largeur que les pages Historique et Cours.
   ========================================================= */

/*
Le panneau global qui englobait toutes les tuiles a été retiré
du HTML. Les cartes restent donc directement posées dans la page,
comme sur Historique et Cours.
*/

.student-dashboard-shell h2.student-page-title {
    margin: 0.35rem 0 0.5rem !important;
    color: var(--app-page-text) !important;
    font-family: Arial, sans-serif !important;
    font-size: clamp(1.95rem, 2.8vw, 3rem) !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    letter-spacing: -0.05em !important;
}
@media (max-width: 760px) {
    .student-dashboard-shell h2.student-page-title {
        font-size: 1.9rem !important;
    }
}

/* =========================================================
   NAVIGATION PRINCIPALE DE L’ESPACE ÉLÈVE
   ========================================================= */

.student-space-layout {
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.student-space-layout > * {
    min-width: 0;
}

.student-space-nav {
    position: sticky;
    top: 84px;
    z-index: 40;
    display: grid;
    gap: 8px;
    padding: 10px;
    background: var(--app-page-card, #fff);
    border: 1px solid var(--app-page-border, rgba(148, 163, 184, 0.28));
    border-radius: 18px;
    box-shadow: var(--app-page-shadow-soft, 0 8px 24px rgba(15, 23, 42, 0.06));
}

.student-space-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 44px;
    padding: 9px 11px;
    background: transparent;
    color: var(--app-page-subtle, #475569);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 850;
    line-height: 1.15;
    text-decoration: none;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.student-space-nav-link:hover {
    background: var(--app-page-blue-soft, rgba(37, 99, 235, 0.10));
    color: var(--app-page-blue-dark, #1d4ed8);
    border-color: var(--app-page-border-strong, rgba(37, 99, 235, 0.32));
    text-decoration: none;
    transform: translateX(2px);
}

.student-space-nav-link.is-disabled,
.app-nav-link.is-disabled {
    cursor: not-allowed;
    opacity: 0.42;
    filter: grayscale(1);
    pointer-events: none;
}

.app-page-primary-action.is-disabled,
.app-page-secondary-action.is-disabled {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none;
}

.parent-premium-locked-feature {
    padding: 1rem;
    border: 1px dashed var(--border-soft);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--text-muted);
}

.parent-premium-locked-feature p {
    margin: 0.35rem 0 0;
}

.student-space-nav-link.is-active {
    background: var(--app-page-blue, #2563eb);
    color: #fff;
    border-color: var(--app-page-blue, #2563eb);
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.20);
}

.student-space-nav-link:focus-visible {
    outline: 3px solid var(--app-page-blue-soft, rgba(37, 99, 235, 0.18));
    outline-offset: 2px;
}

.student-space-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.student-space-nav-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.student-space-nav-label {
    min-width: 0;
}

html[data-theme="dark"] .student-space-nav,
body.dark .student-space-nav,
body.dark-mode .student-space-nav,
body.theme-dark .student-space-nav {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.30);
}

html[data-theme="dark"] .student-space-nav-link,
body.dark .student-space-nav-link,
body.dark-mode .student-space-nav-link,
body.theme-dark .student-space-nav-link {
    color: #cbd5e1;
}

html[data-theme="dark"] .student-space-nav-link:hover,
body.dark .student-space-nav-link:hover,
body.dark-mode .student-space-nav-link:hover,
body.theme-dark .student-space-nav-link:hover {
    background: rgba(96, 165, 250, 0.14);
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.28);
}

html[data-theme="dark"] .student-space-nav-link.is-active,
body.dark .student-space-nav-link.is-active,
body.dark-mode .student-space-nav-link.is-active,
body.theme-dark .student-space-nav-link.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #60a5fa;
}

@media (max-width: 1100px) {
    .student-space-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .student-space-nav {
        position: static;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 7px;
        padding: 8px;
        border-radius: 16px;
    }

    .student-space-nav-link {
        justify-content: center;
        padding-inline: 8px;
    }

    .student-space-nav-link:hover {
        transform: translateY(-1px);
    }
}

@media (max-width: 520px) {
    .student-space-layout {
        gap: 10px;
    }

    .student-space-nav {
        gap: 5px;
        padding: 6px;
        border-radius: 14px;
    }

    .student-space-nav-link {
        min-height: 44px;
        padding: 0;
    }

    .student-space-nav-label {
        display: none;
    }

    .student-space-nav-icon,
    .student-space-nav-icon svg {
        width: 22px;
        height: 22px;
    }

    .student-space-nav-icon {
        flex-basis: 22px;
    }
}

/* =========================================================
   ACTIONS ET NAVIGATION SECONDAIRE DU SUIVI ÉLÈVE
   ========================================================= */

.student-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

.student-title-row .student-page-title {
    margin-right: 0 !important;
}

.student-title-row .student-hero-level {
    flex: 0 0 auto;
    margin: 0.35rem 0 0.5rem;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .student-title-row {
        align-items: center;
        flex-wrap: nowrap;
        gap: 9px;
    }

    .student-title-row .student-page-title {
        min-width: 0;
    }

    .student-title-row .student-hero-level {
        margin: 0.35rem 0 0.5rem;
        padding: 0.28rem 0.58rem;
        font-size: 0.8rem;
    }

}

/* =========================================================
   SYNTHÈSE — DÉTAIL DES RÉSULTATS PAR DIFFICULTÉ
   ========================================================= */

.student-objective-exercise-main {
    flex: 1 1 auto;
    min-width: 0;
}

.student-objective-level-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.student-objective-level-stat {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--student-border);
    border-radius: 11px;
    background: var(--student-soft-bg);
}

.student-objective-level-stat.is-empty {
    background: transparent;
    opacity: 0.68;
}

.student-objective-level-label,
.student-objective-level-count,
.student-objective-level-rate,
.student-objective-level-empty {
    display: block;
}

.student-objective-level-label {
    color: var(--student-subtle);
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.student-objective-level-count {
    margin-top: 4px;
    color: var(--student-text);
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.2;
}

.student-objective-level-rate {
    margin-top: 2px;
    color: var(--student-muted);
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1.2;
}

.student-objective-level-empty {
    margin-top: 5px;
    color: var(--student-subtle);
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1.2;
}

.student-objective-exercise-row > .mastery-badge {
    flex: 0 0 auto;
}

@media (max-width: 1050px) {
    .student-objective-level-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .student-objective-exercise-main {
        width: 100%;
    }

    .student-objective-exercise-row > .mastery-badge {
        align-self: flex-start;
    }
}

/* =========================================================
   ALIGNEMENT GLOBAL DES PAGES Ã‰LÃˆVE
   Tableau de bord et synthÃ¨se utilisent exactement la mÃªme
   largeur que les pages Historique et Cours.
   ========================================================= */

.student-dashboard-shell.exercise-catalog.app-page {
    position: static !important;
    left: auto !important;
    transform: none !important;

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;

    margin: 0 auto !important;
    padding: 0;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible;
}

.student-dashboard-shell.exercise-catalog.app-page > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/*
Le panneau global qui englobait toutes les tuiles a Ã©tÃ© retirÃ©
du HTML. Les cartes restent donc directement posÃ©es dans la page,
comme sur Historique et Cours.
*/

@media (max-width: 980px) {
    .student-dashboard-shell.exercise-catalog.app-page {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 760px) {
    .student-dashboard-shell.exercise-catalog.app-page {
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
}

.student-dashboard-shell h1.student-page-title {
    margin: 0.35rem 0 0.5rem !important;
    color: var(--app-page-text) !important;
    font-family: Arial, sans-serif !important;
    font-size: clamp(1.95rem, 2.8vw, 3rem) !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    letter-spacing: -0.05em !important;
}
@media (max-width: 760px) {
    .student-dashboard-shell h1.student-page-title {
        font-size: 1.9rem !important;
    }
}



/* ==========================================================
   OSSATURE UNIQUE â€” ESPACES Ã‰LÃˆVE, PARENT ET PROFESSEUR
   La page Cours sert de rÃ©fÃ©rence visuelle.
   ========================================================== */

.exercise-catalog.app-page {
    width: min(100%, 1420px);
    min-width: 0;
    margin-inline: auto;
}

.teacher-students-main,
.teacher-evaluations-main,
.teacher-add-students-main,
.link-teacher-main,
.parent-space-main,
.parent-create-main,
.qcm-start-content {
    min-height: 0;
    padding: 0 !important;
    overflow: visible;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.exercise-catalog.app-page .exercise-catalog-eyebrow,
.exercise-catalog.app-page .app-page-section-label,
.student-page-eyebrow {
    color: var(--app-page-blue) !important;
}

.exercise-catalog.app-page .exercise-catalog-hero h1.app-page-title,
.student-page-hero h1.student-page-title,
.student-page-hero.student-objectives-header > h2,
.student-page-hero .student-hero-top h1 {
    margin: 0.35rem 0 0.5rem !important;
    color: var(--app-page-text) !important;
    font-family: Arial, sans-serif !important;
    font-size: clamp(1.95rem, 2.8vw, 3rem) !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    letter-spacing: -0.05em !important;
}

.teacher-students-page .teacher-page-heading,
.teacher-evaluations-page > .exercise-catalog-hero,
.parent-space-page > .exercise-catalog-hero,
.parent-create-page > .exercise-catalog-hero,
.link-teacher-page > .exercise-catalog-hero,
.teacher-add-students-page > .exercise-catalog-hero,
.qcm-start-page > .exercise-catalog-hero {
    width: 100%;
}

@media (max-width: 760px) {
    .exercise-catalog.app-page .exercise-catalog-hero h1.app-page-title,
    .student-page-hero h1.student-page-title,
    .student-page-hero.student-objectives-header > h2,
    .student-page-hero .student-hero-top h1 {
        font-size: 1.9rem !important;
    }
}

/* ==========================================================
   PROFESSEUR â€” ACTIVITÃ‰ RÃ‰CENTE
   Styles dÃ©placÃ©s du template vers la feuille commune.
   ========================================================== */

.teacher-students-page {
    --recent-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
    --recent-card-border: rgba(15, 23, 42, 0.10);
    --recent-card-border-hover: rgba(37, 99, 235, 0.34);
    --recent-card-shadow: 0 6px 18px rgba(15, 23, 42, 0.055);
    --recent-card-text: #0f172a;
    --recent-card-muted: #475569;
    --recent-card-subtle: #64748b;
    --recent-pill-bg: #e2e8f0;
    --recent-pill-text: #334155;
    --recent-link: #0f172a;
    --recent-chart-bg: rgba(15, 23, 42, 0.045);
    --recent-chart-bar: #2563eb;
    --recent-chart-empty: rgba(100, 116, 139, 0.26);
    --recent-progress-bg: rgba(100, 116, 139, 0.18);
    --recent-success-bg: rgba(22, 163, 74, 0.12);
    --recent-success-text: #166534;
    --recent-warning-bg: rgba(217, 119, 6, 0.13);
    --recent-warning-text: #92400e;
    --recent-neutral-bg: rgba(100, 116, 139, 0.14);
    --recent-neutral-text: #475569;
}

html[data-theme="dark"] .teacher-students-page,
body.dark .teacher-students-page,
body.dark-mode .teacher-students-page,
body.theme-dark .teacher-students-page,
[data-bs-theme="dark"] .teacher-students-page {
    --recent-card-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.98));
    --recent-card-border: rgba(148, 163, 184, 0.22);
    --recent-card-border-hover: rgba(96, 165, 250, 0.52);
    --recent-card-shadow: 0 12px 34px rgba(2, 6, 23, 0.34);
    --recent-card-text: #f8fafc;
    --recent-card-muted: #cbd5e1;
    --recent-card-subtle: #94a3b8;
    --recent-pill-bg: rgba(148, 163, 184, 0.18);
    --recent-pill-text: #e2e8f0;
    --recent-link: #f8fafc;
    --recent-chart-bg: rgba(148, 163, 184, 0.10);
    --recent-chart-bar: #60a5fa;
    --recent-chart-empty: rgba(148, 163, 184, 0.25);
    --recent-progress-bg: rgba(148, 163, 184, 0.18);
    --recent-success-bg: rgba(34, 197, 94, 0.16);
    --recent-success-text: #bbf7d0;
    --recent-warning-bg: rgba(245, 158, 11, 0.18);
    --recent-warning-text: #fde68a;
    --recent-neutral-bg: rgba(148, 163, 184, 0.16);
    --recent-neutral-text: #cbd5e1;
}

.teacher-recent-activity-card {
    margin-bottom: 1.25rem;
}

.teacher-objectives-overview-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1.25rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid #93c5fd;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--surface-1), #eff6ff);
    color: var(--text-main);
    text-decoration: none;
    box-shadow: var(--shadow-card);
}

.teacher-objectives-overview-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    text-decoration: none;
}

html[data-theme="dark"] .teacher-objectives-overview-card,
body.dark .teacher-objectives-overview-card,
body.dark-mode .teacher-objectives-overview-card,
body.theme-dark .teacher-objectives-overview-card {
    background: linear-gradient(135deg, #0f172a, #172554);
    border-color: rgba(96, 165, 250, 0.45);
}

.teacher-objectives-overview-card h3,
.teacher-objectives-overview-card p { margin: 0.2rem 0 0; }
.teacher-objectives-overview-card p { color: var(--text-muted); }

.teacher-objectives-overview-stats {
    display: flex;
    gap: 0.75rem;
}

.teacher-objectives-overview-stats span {
    display: grid;
    min-width: 82px;
    padding: 0.6rem;
    border-radius: 12px;
    background: var(--surface-2);
    text-align: center;
    font-size: 0.78rem;
}

.teacher-objectives-overview-stats strong { font-size: 1.2rem; }
.teacher-objectives-overview-arrow { font-size: 1.8rem; color: var(--accent); }

.teacher-objectives-shell { display: grid; gap: 1.25rem; }
.teacher-objective-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}
.teacher-objective-summary-grid > div {
    display: grid;
    gap: 0.2rem;
    padding: 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--surface-1);
    text-align: center;
}
.teacher-objective-summary-grid strong { font-size: 1.5rem; color: var(--accent); }
.teacher-objective-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 0.8rem;
}
.teacher-objective-filters label { display: grid; gap: 0.35rem; font-weight: 750; }
.teacher-objective-filters select { min-height: 42px; padding: 0.55rem; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface-1); color: var(--text-main); }
.teacher-objective-batches { display: grid; gap: 1rem; }
.teacher-objective-batch-header,
.teacher-objective-student-top { display: flex; justify-content: space-between; gap: 1rem; }
.teacher-objective-batch-header h2 { margin: 0.2rem 0; font-size: 1.15rem; }
.teacher-objective-batch-header p { margin: 0; color: var(--text-muted); }
.teacher-objective-student-list { display: grid; gap: 0.7rem; margin-top: 1rem; }
.teacher-objective-student-row { display: block; padding: 0.85rem; border: 1px solid var(--border-soft); border-radius: 14px; color: inherit; text-decoration: none; background: var(--surface-2); }
.teacher-objective-student-row:hover { border-color: var(--accent); text-decoration: none; }

@media (max-width: 760px) {
    .teacher-objectives-overview-card { grid-template-columns: 1fr; }
    .teacher-objectives-overview-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
    .teacher-objectives-overview-arrow { display: none; }
    .teacher-objective-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .teacher-objective-filters { grid-template-columns: 1fr; }
}

.teacher-recent-activity-header,
.teacher-recent-card-top,
.teacher-recent-block-heading,
.teacher-recent-list-main,
.teacher-recent-list-detail {
    display: flex;
    align-items: center;
}

.teacher-recent-activity-header {
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.teacher-recent-activity-header h3 {
    margin: 0.15rem 0 0;
}

.teacher-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 1rem;
}

.teacher-recent-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 0;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid var(--recent-card-border);
    border-radius: 1rem;
    background: var(--recent-card-bg);
    box-shadow: var(--recent-card-shadow);
    color: var(--recent-card-text);
}

.teacher-recent-card-link {
    min-height: 285px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.teacher-recent-card-link:hover {
    border-color: var(--recent-card-border-hover);
    text-decoration: none;
    transform: translateY(-2px);
}

.teacher-recent-card-link:focus-visible {
    outline: 3px solid var(--recent-card-border-hover);
    outline-offset: 3px;
}

.teacher-recent-card-top {
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.teacher-recent-student,
.teacher-recent-title,
.teacher-recent-list-name {
    color: var(--recent-card-text);
    font-weight: 800;
}

.teacher-recent-student,
.teacher-recent-title,
.teacher-recent-subtitle {
    overflow-wrap: anywhere;
}

.teacher-recent-date,
.teacher-recent-group {
    margin-top: 0.22rem;
    color: var(--recent-card-subtle);
    font-size: 0.82rem;
}

.teacher-recent-pill {
    display: inline-flex;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--recent-pill-bg);
    color: var(--recent-pill-text);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.teacher-recent-main,
.teacher-recent-chart-block,
.teacher-recent-work-block,
.teacher-recent-work-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.teacher-recent-main {
    gap: 0.2rem;
}

.teacher-recent-chart-block,
.teacher-recent-work-block,
.teacher-recent-work-list {
    gap: 0.45rem;
}

.teacher-recent-subtitle {
    color: var(--recent-card-muted);
    font-size: 0.9rem;
}

.teacher-recent-block-heading {
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--recent-card-subtle);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.teacher-recent-mini-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 0.3rem;
    height: 58px;
    padding: 0.55rem 0.55rem 0.35rem;
    border-radius: 0.85rem;
    background: var(--recent-chart-bg);
}

.teacher-recent-mini-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    height: 100%;
}

.teacher-recent-mini-bar-fill,
.teacher-recent-mini-bar-empty {
    display: block;
    width: 100%;
    max-width: 18px;
    border-radius: 999px 999px 4px 4px;
}

.teacher-recent-mini-bar-fill {
    min-height: 4px;
    background: var(--recent-chart-bar);
}

.teacher-recent-mini-bar-empty {
    height: 3px;
    background: var(--recent-chart-empty);
}

.teacher-recent-mini-bar-label {
    color: var(--recent-card-subtle);
    font-size: 0.68rem;
    line-height: 1;
}

.teacher-recent-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem 0.55rem;
    min-width: 0;
    padding: 0.52rem 0.58rem;
    border-radius: 0.75rem;
    background: var(--recent-chart-bg);
}

.teacher-recent-list-main {
    gap: 0.45rem;
    min-width: 0;
}

.teacher-recent-list-icon {
    width: 1.15rem;
    flex: 0 0 auto;
    color: var(--recent-card-muted);
    font-weight: 900;
    text-align: center;
}

.teacher-recent-list-name {
    min-width: 0;
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-recent-list-status {
    justify-self: end;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: var(--recent-neutral-bg);
    color: var(--recent-neutral-text);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.teacher-recent-list-row-completed .teacher-recent-list-status {
    background: var(--recent-success-bg);
    color: var(--recent-success-text);
}

.teacher-recent-list-row-in_progress .teacher-recent-list-status {
    background: var(--recent-warning-bg);
    color: var(--recent-warning-text);
}

.teacher-recent-list-detail {
    grid-column: 1 / -1;
    gap: 0.5rem;
    min-width: 0;
    color: var(--recent-card-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.teacher-recent-list-mini-progress {
    flex: 1;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--recent-progress-bg);
}

.teacher-recent-list-mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: currentColor;
}

.teacher-recent-empty-work {
    padding: 0.7rem;
    border-radius: 0.85rem;
    background: var(--recent-chart-bg);
    color: var(--recent-card-muted);
    font-size: 0.86rem;
}

@media (max-width: 700px) {
    .teacher-recent-activity-header,
    .teacher-recent-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .teacher-recent-card-link {
        min-height: auto;
    }

    .teacher-recent-pill {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .teacher-recent-card {
        padding: 0.85rem;
        border-radius: 0.85rem;
    }

    .teacher-recent-list-row {
        grid-template-columns: 1fr;
    }

    .teacher-recent-list-status {
        justify-self: start;
    }

    .teacher-recent-mini-chart {
        gap: 0.2rem;
        padding-inline: 0.4rem;
    }
}

/* ==========================================================
   PAGE D’ACCUEIL PUBLIQUE
   ========================================================== */

.public-home-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.public-home-hero {
    width: 100%;
}

.public-home-hero-copy {
    max-width: 980px;
}

.public-home-title {
    margin: 0.35rem 0 0.65rem;
    color: var(--app-page-text);
    font-family: Arial, sans-serif;
    font-size: clamp(2.15rem, 4vw, 4rem);
    font-weight: 950;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.public-home-hero-copy > p {
    max-width: 900px;
    margin: 0;
    color: var(--app-page-subtle);
    font-size: 1.04rem;
    line-height: 1.55;
}

.public-home-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.public-home-primary-action,
.public-home-secondary-action {
    min-height: 44px;
}

.public-home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.public-home-card {
    position: relative;
    min-width: 0;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--app-page-border);
    border-radius: 20px;
    background:
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
    box-shadow: var(--app-page-shadow-soft);
}

.public-home-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background:
        linear-gradient(
            90deg,
            rgba(37, 99, 235, 0.88) 0%,
            rgba(96, 165, 250, 0.30) 65%,
            transparent 100%
        );
}

.public-home-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    border: 1px solid var(--app-page-border-strong);
    border-radius: 15px;
    background: var(--app-page-blue-soft);
    color: var(--app-page-blue);
}

.public-home-card-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.public-home-card h2,
.public-home-access-heading h2 {
    margin: 0.45rem 0 0;
    color: var(--app-page-text);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 950;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.public-home-card p,
.public-home-access-heading p,
.public-home-access-item p {
    margin: 0.65rem 0 0;
    color: var(--app-page-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.public-home-access-card {
    margin-top: 18px;
    padding: 24px;
    border: 1px solid var(--app-page-border);
    border-radius: 22px;
    background:
        linear-gradient(
            180deg,
            var(--app-page-card) 0%,
            var(--app-page-card-soft) 100%
        );
    box-shadow: var(--app-page-shadow-soft);
}

.public-home-access-heading {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--app-page-border);
}

.public-home-access-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-home-access-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--app-page-border);
    border-radius: 16px;
    background: var(--app-page-card-soft);
}

.public-home-access-item strong {
    display: block;
    color: var(--app-page-text);
    font-size: 0.96rem;
    font-weight: 950;
}

.public-home-access-item a {
    color: var(--app-page-blue-dark);
    font-weight: 850;
    text-decoration: none;
}

.public-home-access-item a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .public-home-grid,
    .public-home-access-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .public-home-title {
        font-size: 2rem;
        line-height: 1.02;
    }

    .public-home-hero-copy > p {
        font-size: 0.94rem;
    }

    .public-home-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .public-home-primary-action,
    .public-home-secondary-action {
        width: 100%;
        justify-content: center;
    }

    .public-home-card,
    .public-home-access-card {
        padding: 18px 16px;
        border-radius: 18px;
    }
}

/* ==========================================================
   PAGES PROFESSEUR — ÉDITION DE GROUPE ET DÉTAIL D'UNE LISTE
   ========================================================== */

.teacher-edit-group-page .teacher-edit-group-section {
    margin-bottom: 2rem;
}

.teacher-edit-group-page .students-list {
    margin-top: 1rem;
}

.teacher-edit-group-page .student-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}

.teacher-edit-group-page .student-name {
    min-width: 0;
    text-align: left;
}

.teacher-edit-group-page .student-action {
    flex: 0 0 auto;
    text-align: right;
}

.teacher-edit-group-page .username {
    margin-left: 5px;
    color: var(--text-muted);
    font-size: 0.9em;
}

.teacher-exercise-list-page .teacher-exercise-list-title,
.teacher-exercise-list-page .teacher-exercise-list-save,
.teacher-exercise-list-page .teacher-exercise-list-empty {
    text-align: center;
}

.teacher-exercise-list-page .teacher-exercise-list-save {
    margin-top: 10px;
}

.teacher-exercise-list-page .teacher-exercise-list-empty {
    margin-top: 20px;
}

.teacher-exercise-list-page .list-table-wrapper {
    width: 96%;
    max-width: 1150px;
    margin: auto;
    overflow-x: auto;
}

.teacher-exercise-list-page .exercise-list-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: fixed;
}

.teacher-exercise-list-page .exercise-list-table th,
.teacher-exercise-list-page .exercise-list-table td {
    padding: 8px;
    border: 1px solid #4b5563;
    vertical-align: middle;
}

.teacher-exercise-list-page .col-title { width: 15%; }
.teacher-exercise-list-page .col-statement { width: 38%; }
.teacher-exercise-list-page .col-date { width: 12%; }
.teacher-exercise-list-page .col-attempts { width: 10%; }
.teacher-exercise-list-page .col-move { width: 18%; }
.teacher-exercise-list-page .col-actions { width: 7%; }

.teacher-exercise-list-page .exercise-preview {
    max-width: 100%;
    overflow: visible;
    font-size: 0.76rem;
    line-height: 1.25;
}

.teacher-exercise-list-page .exercise-preview img,
.teacher-exercise-list-page .exercise-preview svg {
    display: block;
    width: auto;
    height: auto;
    max-width: 210px;
    max-height: 135px;
    margin: 6px auto;
}

.teacher-exercise-list-page .exercise-preview .problem-layout {
    display: block !important;
}

.teacher-exercise-list-page .exercise-preview mjx-container {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.teacher-exercise-list-page .exercise-preview ul {
    margin: 6px 0;
    padding-left: 18px;
}

.teacher-exercise-list-page .exercise-preview li {
    margin-bottom: 2px;
}

.teacher-exercise-list-page .move-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.teacher-exercise-list-page .move-form select {
    max-width: 130px;
}

.teacher-exercise-list-page .small-cell {
    text-align: center;
    font-size: 0.75rem;
}

.teacher-exercise-list-page .statement-cell {
    text-align: left;
    font-size: 0.76rem;
}

.teacher-exercise-list-page .attempt-input {
    width: 50px;
    text-align: center;
}

.teacher-exercise-list-page .teacher-exercise-list-inline-form {
    display: inline;
}

.teacher-exercise-list-page .teacher-exercise-list-progress {
    display: flex;
    gap: 50px;
    margin-top: 20px;
}

.teacher-exercise-list-page .teacher-exercise-list-progress-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    text-align: left;
}

@media (max-width: 768px) {
    .teacher-edit-group-page .student-row {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-edit-group-page .student-action,
    .teacher-edit-group-page .student-action button {
        width: 100%;
    }

    .teacher-exercise-list-page .list-table-wrapper {
        width: 100%;
        padding-bottom: 12px;
        overflow-x: auto;
    }

    .teacher-exercise-list-page .exercise-list-table {
        min-width: 980px;
    }

    .teacher-exercise-list-page .exercise-preview img,
    .teacher-exercise-list-page .exercise-preview svg {
        max-width: 180px;
        max-height: 120px;
    }

    .teacher-exercise-list-page .teacher-exercise-list-progress {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ==========================================================
   BILAN D'UNE LISTE D'EXERCICES
   ========================================================== */

.summary-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 1rem;
}

#summaryTable {
    width: 100%;
    min-width: 1200px;
    table-layout: fixed;
}

#summaryTable th,
#summaryTable td {
    vertical-align: top;
}

#summaryTable thead th {
    text-align: center;
    white-space: nowrap;
    font-size: 0.78rem;
    line-height: 1.2;
}

#summaryTable th:nth-child(1),
#summaryTable td:nth-child(1) {
    width: 55px;
    text-align: center;
}

#summaryTable th:nth-child(2),
#summaryTable td:nth-child(2) {
    width: 55px;
    text-align: center;
}

#summaryTable th:nth-child(3),
#summaryTable td:nth-child(3) {
    width: 34%;
    min-width: 380px;
}

#summaryTable th:nth-child(4),
#summaryTable td:nth-child(4) {
    width: 16%;
    min-width: 160px;
}

#summaryTable th:nth-child(5),
#summaryTable td:nth-child(5) {
    width: 12%;
    min-width: 120px;
}

#summaryTable th:nth-child(6),
#summaryTable td:nth-child(6),
#summaryTable th:nth-child(7),
#summaryTable td:nth-child(7),
#summaryTable th:nth-child(8),
#summaryTable td:nth-child(8) {
    width: 70px;
    text-align: center;
    white-space: nowrap;
}

#summaryTable .statement-cell,
#summaryTable .history-cell,
#summaryTable .solution-cell {
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#summaryTable .statement-cell {
    overflow: hidden;
}

#summaryTable .statement-box {
    width: 100%;
    max-width: none;
    overflow: visible;
}

#summaryTable .statement-box .mean-table-wrap,
#summaryTable .statement-box .proportion-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0.75rem auto !important;
    overflow-x: visible !important;
}

#summaryTable .statement-box table {
    width: 100% !important;
    max-width: 100%;
    min-width: 0 !important;
    margin-inline: auto !important;
    table-layout: fixed;
    font-size: clamp(0.72rem, 1.2vw, 0.95rem) !important;
}

#summaryTable .statement-box table th,
#summaryTable .statement-box table td {
    width: auto !important;
    min-width: 0 !important;
    padding: 0.45rem 0.35rem !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
}

#summaryTable .statement-cell .problem-layout {
    display: block !important;
}

#summaryTable .statement-cell img,
#summaryTable .statement-cell svg {
    display: block;
    margin: 8px auto;
    max-width: 260px !important;
    max-height: 180px !important;
    width: auto !important;
    height: auto !important;
}

#summaryTable td mjx-container,
#summaryTable td .MathJax {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

#summaryTable .correction-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
}

#summaryTable .correction-btn:hover {
    background: #f3f4f6;
}

#summaryTable .correction-row td {
    padding: 16px 18px;
    text-align: left;
    white-space: normal;
    background: #f8fafc !important;
    color: #111827 !important;
}

#summaryTable .correction-content,
#summaryTable .correction-content strong,
#summaryTable .correction-content ol,
#summaryTable .correction-content li,
#summaryTable .correction-cell,
#summaryTable .correction-math {
    color: inherit !important;
}

#summaryTable .correction-content ol {
    margin: 0;
    padding-left: 1.4rem;
}

#summaryTable .correction-content li {
    margin-bottom: 0.8rem;
}

body.dark #summaryTable .correction-row td {
    background: #111827 !important;
    color: #e5e7eb !important;
}

/* ==========================================================
   INSCRIPTIONS PUBLIQUE ET PARENT
   ========================================================== */

:is(.public-signup-page, .parent-signup-page) {
min-height: calc(100vh - 120px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 48px 20px;
        background:
            radial-gradient(
                circle at top left,
                rgba(37, 99, 235, 0.12),
                transparent 32%
            ),
            radial-gradient(
                circle at bottom right,
                rgba(16, 185, 129, 0.10),
                transparent 28%
            ),
            #f8fafc;
}

:is(.public-signup-page, .parent-signup-page) .signup-card {
width: 100%;
        max-width: 760px;
        padding: 36px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 24px;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

:is(.public-signup-page, .parent-signup-page) .signup-header {
margin-bottom: 28px;
}

:is(.public-signup-page, .parent-signup-page) .eyebrow {
margin: 0 0 8px;
        color: #2563eb;
        font-size: 0.82rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
}

:is(.public-signup-page, .parent-signup-page) .signup-header h1 {
margin: 0;
        color: #0f172a;
        font-size: clamp(2rem, 4vw, 3rem);
        line-height: 1.05;
}

:is(.public-signup-page, .parent-signup-page) .subtitle {
margin: 14px 0 0;
        color: #475569;
        font-size: 1.05rem;
        line-height: 1.6;
}

:is(.public-signup-page, .parent-signup-page) .messages {
margin-bottom: 20px;
}

:is(.public-signup-page, .parent-signup-page) .message,
:is(.public-signup-page, .parent-signup-page) .form-errors,
:is(.public-signup-page, .parent-signup-page) .field-errors {
padding: 12px 14px;
        border-radius: 12px;
        font-size: 0.95rem;
}

:is(.public-signup-page, .parent-signup-page) .message-success {
background: #dcfce7;
        color: #166534;
        border: 1px solid #bbf7d0;
}

:is(.public-signup-page, .parent-signup-page) .message-error,
:is(.public-signup-page, .parent-signup-page) .form-errors,
:is(.public-signup-page, .parent-signup-page) .field-errors {
background: #fee2e2;
        color: #991b1b;
        border: 1px solid #fecaca;
}

:is(.public-signup-page, .parent-signup-page) .form-errors {
margin-bottom: 18px;
}

:is(.public-signup-page, .parent-signup-page) .field-errors {
margin-top: 8px;
}

:is(.public-signup-page, .parent-signup-page) .field-errors ul,
:is(.public-signup-page, .parent-signup-page) .form-errors ul {
margin: 0;
        padding-left: 18px;
}

:is(.public-signup-page, .parent-signup-page) .signup-form {
display: flex;
        flex-direction: column;
        gap: 18px;
}

:is(.public-signup-page, .parent-signup-page) .account-type-section {
margin-bottom: 4px;
}

:is(.public-signup-page, .parent-signup-page) .account-type-label {
margin: 0 0 10px;
        color: #111827;
        font-weight: 700;
}

:is(.public-signup-page, .parent-signup-page) .account-type-grid {
display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
}

:is(.public-signup-page, .parent-signup-page) .account-type-card {
position: relative;
        display: block;
        cursor: pointer;
}

:is(.public-signup-page, .parent-signup-page) .account-type-card input {
position: absolute;
        opacity: 0;
        pointer-events: none;
}

:is(.public-signup-page, .parent-signup-page) .account-type-content {
display: flex;
        height: 100%;
        box-sizing: border-box;
        flex-direction: column;
        padding: 20px;
        background: #f8fafc;
        border: 2px solid #e2e8f0;
        border-radius: 16px;
        transition:
            transform 0.15s ease,
            border-color 0.15s ease,
            background 0.15s ease,
            box-shadow 0.15s ease;
}

:is(.public-signup-page, .parent-signup-page) .account-type-card:hover .account-type-content {
transform: translateY(-2px);
        border-color: #93c5fd;
}

:is(.public-signup-page, .parent-signup-page) .account-type-card input:checked + .account-type-content {
background: #eff6ff;
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

:is(.public-signup-page, .parent-signup-page) .account-type-card input:focus-visible + .account-type-content {
outline: 3px solid rgba(37, 99, 235, 0.35);
        outline-offset: 3px;
}

:is(.public-signup-page, .parent-signup-page) .account-type-icon {
margin-bottom: 10px;
        font-size: 1.8rem;
}

:is(.public-signup-page, .parent-signup-page) .account-type-title {
margin-bottom: 7px;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 800;
}

:is(.public-signup-page, .parent-signup-page) .account-type-description {
color: #64748b;
        font-size: 0.92rem;
        line-height: 1.5;
}

:is(.public-signup-page, .parent-signup-page) .form-grid {
display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
}

:is(.public-signup-page, .parent-signup-page) .form-group label {
display: block;
        margin-bottom: 7px;
        color: #111827;
        font-weight: 700;
}

:is(.public-signup-page, .parent-signup-page) .form-group input {
width: 100%;
        box-sizing: border-box;
        padding: 13px 14px;
        background: #ffffff;
        color: #0f172a;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        font-size: 1rem;
        outline: none;
}

:is(.public-signup-page, .parent-signup-page) .form-group input:focus {
border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

:is(.public-signup-page, .parent-signup-page) .help-text {
margin: 6px 0 0;
        color: #64748b;
        font-size: 0.9rem;
        line-height: 1.5;
}

:is(.public-signup-page, .parent-signup-page) .help-text ul {
margin: 7px 0 0;
        padding-left: 20px;
}

:is(.public-signup-page, .parent-signup-page) .password-help ul {
margin-bottom: 0;
}

:is(.public-signup-page, .parent-signup-page) .primary-btn {
margin-top: 8px;
        padding: 14px 18px;
        background: #2563eb;
        color: #ffffff;
        border: none;
        border-radius: 14px;
        font-size: 1rem;
        font-weight: 800;
        cursor: pointer;
        transition:
            transform 0.15s ease,
            box-shadow 0.15s ease,
            background 0.15s ease;
}

:is(.public-signup-page, .parent-signup-page) .primary-btn:hover {
background: #1d4ed8;
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
}

:is(.public-signup-page, .parent-signup-page) .signup-footer {
margin-top: 22px;
        color: #475569;
        text-align: center;
}

:is(.public-signup-page, .parent-signup-page) .signup-footer a {
color: #2563eb;
        font-weight: 800;
        text-decoration: none;
}

:is(.public-signup-page, .parent-signup-page) .signup-footer a:hover {
text-decoration: underline;
}

:is(.public-signup-page, .parent-signup-page) .honeypot {
position: absolute;
        left: -10000px;
        width: 1px;
        height: 1px;
        overflow: hidden;
}

:is(html[data-theme="dark"], body.dark, body.dark-mode, body.theme-dark)
    :is(.public-signup-page, .parent-signup-page) {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.14), transparent 28%),
        #020617;
}

:is(html[data-theme="dark"], body.dark, body.dark-mode, body.theme-dark)
    :is(.public-signup-page, .parent-signup-page) .signup-card {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

:is(html[data-theme="dark"], body.dark, body.dark-mode, body.theme-dark)
    :is(.public-signup-page, .parent-signup-page) :is(
        .signup-header h1,
        .form-group label,
        .account-type-label,
        .account-type-title
    ) {
    color: #f8fafc;
}

:is(html[data-theme="dark"], body.dark, body.dark-mode, body.theme-dark)
    :is(.public-signup-page, .parent-signup-page) :is(
        .subtitle,
        .signup-footer,
        .account-type-description
    ) {
    color: #cbd5e1;
}

:is(html[data-theme="dark"], body.dark, body.dark-mode, body.theme-dark)
    :is(.public-signup-page, .parent-signup-page) .account-type-content {
    background: #111827;
    border-color: #334155;
}

:is(html[data-theme="dark"], body.dark, body.dark-mode, body.theme-dark)
    :is(.public-signup-page, .parent-signup-page)
    .account-type-card input:checked + .account-type-content {
    background: #172554;
    border-color: #60a5fa;
}

:is(html[data-theme="dark"], body.dark, body.dark-mode, body.theme-dark)
    :is(.public-signup-page, .parent-signup-page) .form-group input {
    background: #020617;
    color: #f8fafc;
    border-color: #334155;
}

:is(html[data-theme="dark"], body.dark, body.dark-mode, body.theme-dark)
    :is(.public-signup-page, .parent-signup-page) .help-text {
    color: #94a3b8;
}

@media (max-width: 700px) {
    :is(.public-signup-page, .parent-signup-page) .signup-card {
padding: 26px 20px;
            border-radius: 20px;
    }

    :is(.public-signup-page, .parent-signup-page) .account-type-grid,
    :is(.public-signup-page, .parent-signup-page) .form-grid {
grid-template-columns: 1fr;
    }
}
