:root { color-scheme: light; --student-blue: #0a4e9b; --student-dark: #073b78; --student-text: #1d2d44; }
* { box-sizing: border-box; }
.student-page { margin: 0; background: #f3f6fa; color: var(--student-text); font: 16px/1.6 Arial, Helvetica, sans-serif; }
.student-page h1, .student-page h2, .student-page h3 { color: var(--student-dark); line-height: 1.3; overflow-wrap: anywhere; }
.student-page h1 { font-size: clamp(1.6rem, 4vw, 2rem); }
.student-page h2 { font-size: 1.35rem; }
.student-page h3 { font-size: 1.2rem; }
.student-page h4 { font-size: 1.05rem; }
.student-page h5 { font-size: 1rem; margin: 12px 0; }
.student-page a { color: var(--student-blue); }
.student-container { width: min(1050px, 100%); margin: 0 auto; padding: 32px 24px; }
.student-card { min-width: 0; padding: 28px; margin-bottom: 24px; border: 1px solid #e0e7ef; border-radius: 16px; background: white; box-shadow: 0 6px 24px rgb(24 53 89 / 5%); overflow-wrap: anywhere; }
.student-logo { width: 180px; max-width: 100%; height: auto; }
.student-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.student-login-card { width: 100%; max-width: 480px; margin: 0; }
.student-password { max-width: 660px; }
.student-form { display: grid; gap: 18px; }
.student-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.student-form input:not([type="hidden"]) { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid #aab8c8; border-radius: 8px; font: inherit; }
.student-button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; background: var(--student-blue); color: white; font: inherit; font-weight: 700; cursor: pointer; }
.student-button:hover { background: var(--student-dark); }
.student-button:disabled { background: #64748b; cursor: not-allowed; }
.student-button-secondary { color: var(--student-blue); background: white; border-color: var(--student-blue); }
.student-button-secondary:hover { background: #edf3fa; }
.student-page :is(a, button, input):focus-visible { outline: 3px solid var(--student-blue); outline-offset: 3px; }
.student-header { background: white; border-bottom: 1px solid #e0e7ef; }
.student-header-inner { max-width: 1050px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.student-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; text-decoration: none; font-weight: 700; }
.student-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.student-header nav a { display: inline-flex; align-items: center; min-height: 44px; }
.student-header form { margin: 0; }
.student-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 16px 0; }
.student-details dt { color: #596779; font-size: 0.9rem; }
.student-details dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.student-message { padding: 14px; background: #edf3fa; border: 1px solid #c9daee; border-radius: 8px; }
.student-error { color: #8c2727; background: #fff5f5; border-color: #edc6c6; }
.student-success { color: #205f3f; background: #eef8f2; border-color: #a7d4bd; }
.student-effective { color: #205f3f; font-weight: 700; }
.student-followup { border-top: 1px solid #e0e7ef; margin-top: 24px; padding-top: 8px; }
.student-year + .student-year { border-top: 1px solid #e0e7ef; padding-top: 12px; }
@media (max-width: 750px) { .student-details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .student-login { padding: 16px; } .student-container { padding: 24px 16px; } .student-card { padding: 20px; } .student-details { grid-template-columns: minmax(0, 1fr); } .student-header-inner { padding: 16px; } .student-header nav { gap: 12px; } }

/* Cadre partagé des pages authentifiées, indépendant de la connexion. */
.student-app { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.student-app > main { min-width: 0; }
.student-sidebar { background: #03193D; color: white; padding: 28px 18px; }
.student-sidebar .student-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 12px; color: white; }
.student-sidebar .student-logo { width: 210px; background: white; padding: 10px; border-radius: 8px; }
.student-menu { margin-top: 24px; }
.student-menu summary { min-height: 48px; padding: 12px; font-weight: 700; cursor: pointer; border: 1px solid #ffffff70; border-radius: 8px; }
.student-menu nav { display: grid; gap: 8px; padding-top: 12px; }
.student-menu nav > a, .student-menu-future { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 12px; border-radius: 8px; overflow-wrap: anywhere; }
.student-menu nav > a { color: white; text-decoration: none; }
.student-menu nav > a:hover { background: #ffffff18; }
.student-menu nav > a[aria-current="page"] { color: var(--student-dark); background: #ffd200; font-weight: 700; }
.student-menu-future { color: #e0eafa; }
.student-menu-future small { flex-shrink: 0; font-size: 0.75rem; border: 1px solid #ffffff70; border-radius: 5px; padding: 2px 6px; }
.student-menu form { margin: 12px 0 0; padding-top: 16px; border-top: 1px solid #ffffff50; }
.student-menu .student-button { width: 100%; }
.student-sidebar :is(a, button, summary):focus-visible { outline: 3px solid #ffd200; outline-offset: 3px; }
.student-skip { position: fixed; left: 16px; top: -100px; z-index: 10; padding: 12px 18px; background: white; border-radius: 8px; }
.student-skip:focus { top: 16px; }
.student-eyebrow { font-size: 0.85rem; color: #596779; font-weight: 700; margin-bottom: 0; }
.student-welcome { font-size: 1.3rem; font-weight: 700; color: var(--student-dark); }
.student-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.student-home-grid .student-card { margin-bottom: 0; }
.student-home-grid { margin-bottom: 32px; }
.student-summary { grid-template-columns: minmax(0, 1fr); }
.student-announcement-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.student-announcement-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.student-announcement-pagination a { display: inline-flex; align-items: center; min-height: 48px; }
.student-course-year + .student-course-year { border-top: 1px solid #e0e7ef; margin-top: 28px; padding-top: 12px; }
.student-course-list { padding: 0; list-style: none; }
.student-course-list li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e0e7ef; }
.student-course-list li > div { min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.student-course-list p { margin: 4px 0 0; font-size: 0.9rem; color: #596779; }
.student-course-list a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 12px; }
@media (min-width: 901px) {
    .student-menu > summary { display: none; }
    .student-menu:not([open]) > nav { display: grid; }
}
@media (max-width: 1100px) {
    .student-app .student-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .student-home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .student-app { grid-template-columns: minmax(0, 1fr); }
    .student-sidebar { padding: 16px; }
    .student-sidebar .student-brand { flex-direction: row; align-items: center; }
    .student-sidebar .student-logo { width: 170px; }
    .student-menu { margin-top: 12px; }
}
@media (max-width: 480px) {
    .student-app .student-details { grid-template-columns: minmax(0, 1fr); }
    .student-sidebar .student-brand { flex-direction: column; align-items: flex-start; }
}

/* Tableau de bord : deux cartes dès que la largeur utile le permet. */
.student-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 32px; }
.student-dashboard-grid .student-dashboard-card { display: flex; flex-direction: column; margin-bottom: 0; }
.student-dashboard-card h2 { margin-top: 0; }
.student-dashboard-card h3 { margin: 0 0 12px; }
.student-dashboard-card p { margin: 0 0 12px; }
.student-dashboard-card .student-dashboard-action { display: flex; align-items: center; min-height: 48px; margin-top: auto; padding-top: 12px; }
@media (min-width: 700px) and (max-width: 900px), (min-width: 1100px) {
    .student-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Résultats : tableaux sémantiques consultables au clavier sur petits écrans. */
.student-results-filters form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 20px; }
.student-results-filters label { font-weight: 700; }
.student-results-filters select { width: 100%; min-width: 0; min-height: 48px; padding: 10px; border: 1px solid #aab8c8; border-radius: 8px; background: white; color: var(--student-text); font: inherit; }
.student-results-filters .student-button { justify-self: start; }
.student-results-scroll { max-width: 100%; overflow-x: auto; margin-top: 16px; }
.student-results-scroll:focus-visible, .student-results-filters select:focus-visible { outline: 3px solid var(--student-blue); outline-offset: 3px; }
.student-results-table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: left; }
.student-results-table caption { text-align: left; color: #596779; padding-bottom: 10px; }
.student-results-table th, .student-results-table td { padding: 14px 12px; border-bottom: 1px solid #e0e7ef; vertical-align: top; }
.student-results-table thead th { background: #edf3fa; color: var(--student-dark); }
.student-results-table tbody th { font-weight: 600; }
.student-results-table th:nth-child(2) { min-width: 180px; }
.student-result-status, .student-result-help { display: block; margin-top: 6px; font-size: .9rem; font-weight: 400; }
.student-result-help { color: #596779; }
.student-result-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
.student-result-note { white-space: nowrap; font-weight: 700; }
.student-result-average { padding-top: 16px; margin-bottom: 0; }
.student-result-module-code { color: #596779; margin-top: -8px; }
.student-results-summary { border-left: 5px solid var(--student-blue); }
@media (max-width: 480px) { .student-results-table th, .student-results-table td { padding: 10px 8px; } .student-results-filters .student-button { width: 100%; } }
/* La même photo privée est utilisée dans la navigation et dans le dossier. */
.identity-photo { display: block; width: 128px; height: 160px; max-width: 100%; object-fit: contain; background: #edf1f5; border-radius: 8px; margin: 0 0 1rem; }
.identity-photo-small { width: 64px; height: 80px; margin: 0; flex: 0 0 auto; }
.student-identity { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; margin: 1rem 0; min-width: 0; }
.student-identity span { overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
