@charset "UTF-8";
:root {
    --forest: #173b35;
    --forest-deep: #0f2a25;
    --forest-soft: #2f5a50;
    --forest-tint: #e8efe9;
    --ivory: #f5f4ee;
    --paper: #fffefb;
    --white: #fff;
    --ink: #1f332e;
    --text: #44554f;
    --muted: #6d7a73;
    --line: #e2e3da;
    --line-strong: #cfd4ca;
    --brass: #b98c2e;
    --brass-light: #ead7a8;
    --brass-tint: #faf3e2;
    --success: #2f6b4a;
    --danger: #a3443e;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px #1f332e0d, 0 6px 22px #1f332e0d;
    --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ivory); }
body { margin: 0; color: var(--ink); font: 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b98c2e66; outline-offset: 2px; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.eyebrow { display: block; margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------ Structure */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 264px; flex-direction: column; padding: 22px 14px 16px; color: #dfe8e3; background: var(--forest); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; width: fit-content; color: var(--white); }
.brand-logo { width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain; background: #fff; border: 2px solid #ffffff33; border-radius: 50%; }
.brand-lockup strong { display: block; font: 600 19px/1.1 var(--serif); letter-spacing: .01em; }
.brand-lockup small { display: block; margin-top: 3px; color: #a9bdb4; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.nav-burger { display: none; }
.primary-nav { display: grid; gap: 2px; margin-top: 28px; }
.nav-group { margin: 14px 12px 6px; color: #8fa89d; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-group:first-child { margin-top: 0; }
.primary-nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; color: #c9d6d0; font-size: 14px; border-radius: var(--radius-sm); transition: color .15s, background .15s; }
.primary-nav a .icon { color: #8fb0a3; }
.primary-nav a:hover { color: var(--white); background: #ffffff10; }
.primary-nav a.active { color: var(--white); background: #ffffff1a; box-shadow: inset 3px 0 var(--brass-light); font-weight: 600; }
.primary-nav a.active .icon { color: var(--brass-light); }
.sidebar-bottom { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid #ffffff1f; }
.side-year { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; color: #a9bdb4; font-size: 12px; }
.side-year strong { grid-column: 2; color: var(--white); font-size: 15px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; background: #a6d38a; border-radius: 50%; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px; background: #ffffff0d; border-radius: var(--radius-sm); }
.user-avatar { display: grid; flex: 0 0 34px; height: 34px; place-items: center; color: var(--forest); background: var(--brass-light); border-radius: 50%; font: 600 15px var(--serif); }
.sidebar-user > span:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: var(--white); font-size: 13px; font-weight: 600; }
.sidebar-user small { color: #a9bdb4; font-size: 11.5px; }
.logout-form button { display: grid; width: 34px; height: 34px; place-items: center; color: #c9d6d0; background: transparent; border: 1px solid #ffffff2e; border-radius: var(--radius-sm); cursor: pointer; }
.logout-form button:hover { color: var(--white); background: #ffffff14; }
.main-content { max-width: 1480px; min-height: 100vh; margin-left: 264px; padding: 0 40px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; margin: 0 -40px; padding: 0 40px; background: #f5f4eee6; border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.breadcrumb { color: var(--muted); font-size: 12.5px; }
.topbar h1 { margin: 2px 0 0; color: var(--forest); font: 500 25px/1.2 var(--serif); }
.topbar-meta { display: flex; align-items: center; gap: 12px; }
.term-chip { padding: 6px 11px; color: var(--forest); background: var(--forest-tint); border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.date-label { color: var(--muted); font-size: 13px; }
.main-content > .notice { margin-top: 20px; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding: 18px 0 22px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.app-footer i { padding: 0 6px; color: var(--brass); font-style: normal; }

/* ------------------------------------------------ Boutons, liens, notices */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; color: var(--white); background: var(--forest); border: 1px solid var(--forest); border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.button:hover { background: var(--forest-soft); border-color: var(--forest-soft); }
.button:active { transform: translateY(1px); }
.button > span { color: var(--brass-light); }
.button-secondary { color: var(--forest); background: var(--white); border-color: var(--line-strong); }
.button-secondary:hover { color: var(--forest); background: var(--forest-tint); border-color: #b9c6bd; }
.button-secondary > span { color: var(--brass); }
.button-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.button-small .icon { width: 16px; height: 16px; }
.button-wide { width: 100%; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--forest); font-size: 13.5px; font-weight: 600; }
.text-link span { color: var(--brass); font-size: 16px; transition: transform .2s; }
.text-link:hover span { transform: translateX(3px); }
.inline-link { color: var(--forest); font-weight: 600; text-decoration: underline; text-decoration-color: var(--brass-light); text-underline-offset: 3px; }
.light-link { color: #f4f5f0; }
.notice { padding: 13px 16px; color: #2f5a46; background: #eaf3ec; border: 1px solid #cfe3d4; border-left: 4px solid #5f9a73; border-radius: var(--radius-sm); font-size: 14px; }
.notice-error { color: #7b302c; background: #fbefed; border-color: #f0d2ce; border-left-color: #b35a53; }
.notice-warn { color: #6d5320; background: #fbf5e4; border-color: #efe1bb; border-left-color: var(--brass); }

/* ------------------------------------------------ Titres de section, panneaux */
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 16px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.section-heading h2 { margin: 0; color: var(--forest); font: 500 23px/1.3 var(--serif); }
.section-sub { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.page-intro { margin: 30px 0 18px; }
.page-intro h2 { font-size: 27px; }
.page-intro > div > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.panel { margin-top: 16px; padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-heading .eyebrow { margin-bottom: 4px; }
.panel-heading h3, .quick-panel h3, .security-note h3 { margin: 0; color: var(--forest); font: 500 20px/1.3 var(--serif); }
.panel-sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.count-chip, .mode-badge { padding: 5px 11px; color: var(--forest); background: var(--forest-tint); border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.mode-badge { color: #6d5320; background: var(--brass-tint); }

/* ------------------------------------------------ Tableau de bord */
.welcome-band { position: relative; display: flex; justify-content: space-between; gap: 24px; min-height: 220px; margin: 28px 0 34px; overflow: hidden; padding: 32px 36px; color: white; background: linear-gradient(120deg, var(--forest) 0%, #214b42 100%); border-radius: 14px; }
.welcome-copy { position: relative; z-index: 1; }
.welcome-copy .eyebrow { color: #bcd0c6; }
.welcome-copy h2 { margin: 12px 0 8px; color: white; font: 400 36px/1.1 var(--serif); letter-spacing: -.02em; }
.welcome-copy h2 em { color: #ead7a8; font-weight: 400; }
.welcome-copy > p:last-child { max-width: 420px; margin: 10px 0 0; color: #cddad3; font-size: 15px; }
.welcome-side { position: relative; z-index: 1; display: flex; width: 220px; flex-direction: column; justify-content: center; gap: 6px; padding-left: 24px; border-left: 1px solid #ffffff33; }
.welcome-year { color: #fff; font: 500 25px var(--serif); }
.welcome-term { margin-bottom: 16px; color: #cddad3; font-size: 14px; }
.welcome-decoration { position: absolute; right: 230px; bottom: -150px; color: #ffffff09; font: 470px/.8 var(--serif); pointer-events: none; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric-card { position: relative; min-height: 132px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-primary { color: white; background: var(--forest-soft); border-color: var(--forest-soft); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.metric-primary .metric-top { color: #d2ddd6; }
.metric-index { display: none; }
.metric-card > strong { display: block; margin-top: 12px; color: var(--forest); font: 500 38px/1 var(--serif); }
.metric-primary > strong { color: white; }
.metric-card > small { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.metric-primary > small { color: #c9d8d0; }
.dashboard-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 14px; margin-top: 14px; }
.dashboard-grid .panel { min-height: 226px; margin-top: 0; }
.circle-icon { display: grid; width: 36px; height: 36px; place-items: center; color: var(--forest); background: var(--forest-tint); border-radius: 50%; }
.progress-summary { display: flex; align-items: center; gap: 16px; margin: 18px 0 14px; }
.progress-summary > strong { color: var(--forest); font: 500 46px/.95 var(--serif); }
.progress-summary > strong small { color: var(--brass); font: 20px var(--serif); }
.progress-summary > span { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.progress-track { height: 8px; overflow: hidden; background: #e9eae3; border-radius: 999px; }
.progress-track span { display: block; height: 100%; background: var(--brass); border-radius: inherit; transition: width .5s ease; }
.panel-footnote, .empty-hint { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.quick-panel > .eyebrow { margin-bottom: 4px; }
.quick-links { display: grid; margin-top: 12px; }
.quick-links a { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 6px; border-top: 1px solid var(--line); border-radius: var(--radius-sm); transition: background .15s; }
.quick-links a:hover { background: #f6f6f0; }
.quick-icon { display: grid; flex: 0 0 36px; height: 36px; place-items: center; color: var(--forest); background: var(--forest-tint); border-radius: var(--radius-sm); }
.quick-links a > span:nth-child(2) { flex: 1; }
.quick-links strong, .quick-links small { display: block; }
.quick-links strong { font-size: 14px; font-weight: 600; }
.quick-links small { color: var(--muted); font-size: 12.5px; }
.quick-links b { color: var(--brass); font-size: 18px; font-weight: 400; }
.setup-nudge { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 24px 0 -8px; padding: 20px 24px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--radius); }
.setup-nudge h2 { margin: 4px 0; color: var(--forest); font: 500 21px/1.25 var(--serif); }
.setup-nudge p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------ Tableaux */
.table-panel .panel-heading { margin-bottom: 14px; }
.table-panel .panel-heading .text-link { margin-left: auto; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 12px; color: var(--muted); background: #f4f4ee; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
td { padding: 12px; color: var(--text); font-size: 14px; border-bottom: 1px solid #ecece5; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfbf7; }
td strong { color: var(--ink); font-weight: 600; }
th.num, td.num { width: 64px; text-align: center; }
.cell-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.grade-pill { display: inline-block; min-width: 44px; padding: 3px 9px; color: var(--forest); background: var(--forest-tint); border-radius: 999px; font-size: 13px; font-weight: 600; text-align: center; }
.status-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-active { color: var(--success); background: #e5f1e7; }
.tag-muted { color: var(--muted); background: #efefea; }
.row-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.row-actions a:not(.button), .link-button { padding: 0; color: var(--forest-soft); background: transparent; border: 0; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.row-actions a:not(.button):hover, .link-button:hover { text-decoration: underline; }
.link-button, .link-button.subtle { color: #8a6a3c; }
.row-actions form, .simple-row form { display: inline; }
.compact-table { margin-top: 20px; }
.compact-table th, .compact-table td { padding-inline: 8px; }
.compact-table .row-actions { flex-wrap: wrap; gap: 6px 14px; white-space: normal; }
.empty-state { display: flex; min-height: 170px; flex-direction: column; align-items: center; justify-content: center; padding: 22px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--forest); font: 500 18px var(--serif); }
.empty-state p { max-width: 460px; margin: 6px 0 0; font-size: 14px; }
.empty-mark { display: grid; width: 48px; height: 48px; margin-bottom: 10px; place-items: center; color: var(--brass); background: var(--brass-tint); border-radius: 50%; font: 24px var(--serif); }
.empty-mark .icon { width: 22px; height: 22px; }
.empty-state.compact { min-height: 110px; }

/* ------------------------------------------------ Formulaires */
.form-panel { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.compact-form { grid-template-columns: 1fr 1fr; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: var(--text); font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea, .filter-bar input, .filter-bar select { width: 100%; min-height: 42px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 14px; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: var(--forest-soft); outline: none; box-shadow: 0 0 0 3px #2f5a5022; }
.field input::placeholder, .field textarea::placeholder, .filter-bar input::placeholder { color: #9aa49d; }
.field textarea { min-height: 72px; resize: vertical; line-height: 1.45; }
.field-full { grid-column: 1 / -1; }
.field-hint { margin: -4px 0 0; color: var(--muted); font-size: 13px; }
.field-hint .text-link { font-size: 13px; }
.field-stack { display: grid; gap: 14px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; align-items: center; grid-column: 1 / -1; gap: 14px; padding-top: 4px; }
.filter-panel { padding: 16px 20px; }
.filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.filter-bar .field { min-width: 150px; flex: 1; }
.search-box { position: relative; display: block; min-width: 220px; flex: 2; }
.search-box .icon { position: absolute; top: 12px; left: 12px; color: var(--muted); }
.search-box input { padding-left: 40px; }
.details-panel { padding: 0; }
.details-panel > summary, .report-editor > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; cursor: pointer; list-style: none; }
.details-panel > summary::-webkit-details-marker, .report-editor > summary::-webkit-details-marker { display: none; }
.details-panel > summary strong, .report-editor > summary strong { display: block; margin-top: 3px; color: var(--forest); font: 500 18px/1.3 var(--serif); }
.summary-hint { color: var(--muted); font-size: 13px; }
.details-panel > summary .summary-hint::after { content: " ▾"; color: var(--brass); }
.details-panel[open] > summary .summary-hint { font-size: 0; }
.details-panel[open] > summary .summary-hint::after { content: "▴"; font-size: 13px; }
.details-panel > form { padding: 4px 24px 24px; border-top: 1px solid var(--line); }
.details-panel > form, .details-panel > .empty-state { margin-top: 0; }
.details-panel > form.form-grid { padding-top: 20px; }

/* ------------------------------------------------ Saisie en grille */
.subject-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.subject-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13.5px; transition: background .15s, border-color .15s; }
.subject-chips a small { padding: 1px 7px; color: var(--muted); background: #f1f1eb; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.subject-chips a:hover { border-color: #b9c6bd; background: #f8f9f5; }
.subject-chips a.is-done small { color: var(--success); background: #e5f1e7; }
.subject-chips a.is-active { color: var(--white); background: var(--forest); border-color: var(--forest); }
.subject-chips a.is-active small { color: var(--forest); background: var(--brass-light); }
.grade-grid th small { color: #8a948e; font-weight: 600; letter-spacing: 0; text-transform: none; }
.grade-grid td { padding: 6px 8px; }
.grade-grid .grid-cell { width: 132px; }
.grade-grid .grid-remark { width: auto; min-width: 220px; }
.grade-grid input { width: 100%; min-height: 38px; padding: 7px 10px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 15px; transition: border-color .12s, box-shadow .12s, background .12s; }
.grade-grid .grid-input { font-variant-numeric: tabular-nums; text-align: center; }
.grade-grid .grid-remark input { font-size: 14px; }
.grade-grid input:focus { border-color: var(--forest-soft); outline: none; box-shadow: 0 0 0 3px #2f5a5022; }
.grade-grid input.is-invalid { color: var(--danger); background: #fdf1ef; border-color: #d99a93; }
.grade-grid input.is-dirty { background: var(--brass-tint); border-color: #e3cd96; }
.grid-avg { width: 110px; color: var(--forest); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.grid-avg small { color: var(--muted); font-weight: 500; }
.grid-actions { position: sticky; bottom: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 14px -24px -22px; padding: 14px 24px; background: #fffefbf2; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); backdrop-filter: blur(6px); }

/* ------------------------------------------------ Bulletins (liste) */
.class-summary { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.class-summary > article { padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.summary-main h3 { margin: 4px 0 10px; color: var(--forest); font: 500 22px/1.25 var(--serif); }
.summary-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.summary-stat { display: flex; flex-direction: column; justify-content: center; }
.summary-stat > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.summary-stat > strong { margin-top: 6px; color: var(--forest); font: 500 32px/1 var(--serif); }
.summary-stat > strong em { color: var(--muted); font-size: 18px; font-style: normal; }
.summary-stat > small { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.model-badge { display: inline-flex; padding: 4px 11px; color: #6d5320; background: var(--brass-tint); border: 1px solid #efe1bb; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.rank-chip { display: inline-grid; min-width: 40px; height: 28px; padding: 0 8px; place-items: center; color: var(--forest); background: var(--forest-tint); border-radius: 999px; font-size: 13px; font-weight: 700; }
.rank-top { color: #6d5320; background: var(--brass-light); }
.avg { font-variant-numeric: tabular-nums; font-size: 15px; }
.avg-pass { color: var(--success) !important; }
.avg-fail { color: var(--danger) !important; }
.completion { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.completion-bar { flex: 1; height: 6px; overflow: hidden; background: #ebebe4; border-radius: 999px; }
.completion-bar i { display: block; height: 100%; background: var(--forest-soft); border-radius: inherit; }
.completion small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.actions-col { width: 1%; }
.model-gallery { margin-top: 40px; }
.model-cards { display: grid; grid-template-columns: 1.42fr 1fr 1fr; align-items: end; gap: 18px; }
.model-card { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.model-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px #1f332e12, 0 14px 30px #1f332e14; }
.model-card.is-current { border-color: var(--brass); box-shadow: 0 0 0 2px var(--brass-light), var(--shadow); }
.model-thumb { position: relative; display: block; overflow: hidden; padding: 14px; background: #e9e9e2; }
.model-thumb iframe { display: block; width: 100%; aspect-ratio: 210 / 297; background: #fff; border: 0; box-shadow: 0 2px 10px #1f332e1f; pointer-events: none; }
.model-thumb-landscape iframe { aspect-ratio: 297 / 210; }
.model-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.model-meta strong, .model-meta small { display: block; }
.model-meta strong { color: var(--forest); font: 500 16px var(--serif); }
.model-meta small { color: var(--muted); font-size: 12.5px; }

/* ------------------------------------------------ Page bulletin */
.report-page { min-height: 100vh; padding: 0 0 48px; background: #e4e5de; }
.report-embed { min-height: 0; padding: 0; overflow: hidden; background: #fff; }
.report-embed .sheet { box-shadow: none; }
.report-toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 12px 24px; background: #fffefbf2; border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px #1f332e0f; backdrop-filter: blur(8px); }
.report-title { min-width: 0; flex: 1; }
.report-title strong, .report-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-title strong { color: var(--forest); font: 500 17px/1.3 var(--serif); }
.report-title small { color: var(--muted); font-size: 12.5px; }
.report-pager { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.report-pager a, .report-pager .is-disabled { display: grid; width: 34px; height: 34px; place-items: center; color: var(--forest); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.report-pager a:hover { background: var(--forest-tint); }
.report-pager .is-disabled { opacity: .35; }
.report-pager > span:not(.is-disabled) { min-width: 54px; text-align: center; }
.report-actions { display: flex; gap: 10px; }
.report-notice, .report-editor { max-width: 960px; margin: 0 auto 16px; }
.report-editor { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.report-editor > form { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.report-editor > summary .summary-hint { max-width: 330px; text-align: right; }
.sheet-viewport { padding: 0 16px; }
.report-empty { max-width: 640px; margin: 40px auto; background: var(--paper); border-radius: var(--radius); }

/* ------------------------------------------------ Classes, paramètres, auth */
.split-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px; }
.split-layout .panel { margin-top: 0; }
.split-layout .panel-heading { min-height: 42px; }
.subsection-list { margin-top: 22px; border-top: 1px solid var(--line); }
.simple-row { display: flex; align-items: center; gap: 12px; min-height: 58px; border-bottom: 1px solid #ecece5; }
.simple-row > span:nth-child(2) { flex: 1; }
.simple-row strong, .simple-row small { display: block; }
.simple-row strong { color: var(--ink); font-size: 14.5px; }
.simple-row small { color: var(--muted); font-size: 12.5px; }
.list-index { color: var(--brass); font: 14px var(--serif); }
.simple-row > a, .simple-row .link-button { color: var(--forest-soft); font-size: 13.5px; font-weight: 600; }
.security-note { display: flex; align-items: flex-start; gap: 16px; background: #f1f2eb; }
.security-icon { display: grid; flex: 0 0 40px; height: 40px; place-items: center; color: var(--forest); background: #e0e7dc; border-radius: var(--radius-sm); }
.security-note h3 { font-size: 18px; }
.security-note p:last-child { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.security-note code { color: var(--forest); font: 13px monospace; }
.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 30px 18px; background: radial-gradient(ellipse at 14% 12%, #e5e8db 0, transparent 40%), var(--ivory); }
.auth-shell { width: min(100%, 440px); }
.auth-shell > .brand-lockup { margin: 0 auto 24px; color: var(--forest); }
.auth-shell > .brand-lockup small { color: var(--muted); }
.auth-panel { padding: 34px 36px 36px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 55px #1f332e14; }
.auth-panel .eyebrow { color: #8f6c25; }
.auth-panel h1 { margin: 8px 0; color: var(--forest); font: 500 28px/1.2 var(--serif); }
.auth-panel > p.muted { margin: 0 0 22px; font-size: 14px; line-height: 1.6; }
.auth-panel .notice { margin: 0 0 16px; }
.form-stack { display: grid; gap: 16px; }
.auth-foot { margin: 18px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

/* ------------------------------------------------ Assistant */
.setup-nudge .button span, .wizard-next-form .button span, .wizard-finish-grid .button span { margin-left: 4px; }
.wizard-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 30px 0 22px; }
.wizard-intro h2 { margin: 6px 0; color: var(--forest); font: 500 30px/1.15 var(--serif); }
.wizard-intro p:last-child { max-width: 660px; margin: 0; color: var(--muted); font-size: 14.5px; }
.wizard-steps { display: flex; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.wizard-steps a { display: inline-flex; align-items: center; gap: 10px; min-width: max-content; padding: 13px 18px; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.wizard-steps a > span { display: grid; width: 26px; height: 26px; place-items: center; color: var(--muted); background: #e9ebe4; border-radius: 50%; font: 12px var(--serif); }
.wizard-steps a:hover { color: var(--forest); background: #efefe8; }
.wizard-steps a.is-current { color: var(--forest); font-weight: 700; border-color: var(--brass); }
.wizard-steps a.is-current > span, .wizard-steps a.is-past > span { color: #fff; background: var(--forest-soft); }
.wizard-panel { margin-bottom: 20px; padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.wizard-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.wizard-panel-head .eyebrow { margin: 0 0 4px; color: #8f6c25; }
.wizard-panel-head h3 { margin: 0; color: var(--forest); font: 500 23px/1.2 var(--serif); }
.wizard-count { color: var(--muted); font: 15px var(--serif); }
.wizard-progress { height: 6px; margin: 18px 0 22px; overflow: hidden; background: #e8e9e1; border-radius: 999px; }
.wizard-progress span { display: block; height: 100%; background: var(--brass); transition: width .25s ease; }
.wizard-guidance { max-width: 840px; margin: 0 0 20px; color: var(--text); font-size: 14.5px; line-height: 1.7; }
.wizard-form { margin-bottom: 18px; }
.wizard-next-form { display: flex; justify-content: flex-end; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.wizard-back-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.wizard-back-row > span { color: var(--muted); font-size: 13px; }
.wizard-two-up { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.wizard-subpanel { min-width: 0; padding: 20px; background: #fbfaf6; border: 1px solid var(--line); border-radius: var(--radius); }
.wizard-subpanel > h4 { margin: 0 0 14px; color: var(--forest); font: 500 18px var(--serif); }
.wizard-inline { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 14px 18px; background: #f7f6f0; border-left: 3px solid var(--brass-light); border-radius: var(--radius-sm); }
.wizard-inline .eyebrow { margin: 0 0 3px; }
.wizard-inline strong { color: var(--forest); font: 16px var(--serif); }
.wizard-inline p:last-child { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.wizard-term-form { display: flex; align-items: end; gap: 12px; margin-top: 12px; padding: 14px 16px; background: #fbfaf6; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.wizard-term-form .field { flex: 1; }
.cycle-list { display: grid; gap: 6px; margin-top: 16px; }
.cycle-list article { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; background: white; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cycle-mark { display: grid; width: 32px; height: 32px; place-items: center; color: var(--forest); background: var(--forest-tint); border-radius: 50%; font: 15px var(--serif); }
.cycle-list strong, .cycle-list small { display: block; }
.cycle-list strong { color: var(--ink); font: 600 14px var(--serif); }
.cycle-list small { margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.cycle-list article > a { color: var(--forest-soft); font-size: 13px; font-weight: 600; }
.wizard-small-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.wizard-records { margin-top: 16px; padding: 14px 18px; background: #f3f3ec; border-left: 3px solid var(--brass); border-radius: var(--radius-sm); }
.wizard-records > strong { color: var(--forest); font: 600 15px var(--serif); }
.wizard-records p, .wizard-records li { color: var(--muted); font-size: 13.5px; }
.wizard-records p { margin: 5px 0; }
.wizard-records ul { display: flex; flex-wrap: wrap; gap: 5px 24px; margin: 9px 0 0; padding-left: 18px; }
.wizard-finish-grid { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 24px; max-width: 800px; margin: 28px auto; padding: 24px; background: #f5f4ed; border: 1px solid var(--line); border-radius: var(--radius); }
.wizard-finish-mark { display: grid; width: 74px; height: 74px; place-items: center; color: var(--forest); background: var(--brass-light); border-radius: 50%; font: 46px/.9 var(--serif); }
.wizard-finish-grid h4 { margin: 5px 0; color: var(--forest); font: 500 20px var(--serif); }
.wizard-finish-grid p:not(.eyebrow) { margin: 5px 0 14px; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------ Adaptatif */
@media (max-width: 1180px) {
    .class-summary { grid-template-columns: 1fr 1fr 1fr; }
    .class-summary .summary-main { grid-column: 1 / -1; }
    .model-cards { grid-template-columns: 1fr 1fr; }
    .model-cards .model-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 1050px) {
    .sidebar { width: 236px; }
    .main-content { margin-left: 236px; padding-inline: 26px; }
    .topbar { margin-inline: -26px; padding-inline: 26px; }
    .dashboard-grid, .split-layout { grid-template-columns: 1fr; }
    .welcome-decoration { right: 70px; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 10px 14px; }
    .sidebar-head { padding: 0; }
    .brand-logo { width: 38px; height: 38px; }
    .brand-lockup strong { font-size: 17px; }
    .nav-burger { display: grid; width: 42px; height: 42px; place-items: center; color: var(--white); border: 1px solid #ffffff33; border-radius: var(--radius-sm); cursor: pointer; }
    .primary-nav, .sidebar-bottom { display: none; }
    .nav-toggle:checked ~ .sidebar .primary-nav { display: grid; margin-top: 12px; padding-bottom: 6px; }
    .nav-toggle:checked ~ .sidebar .sidebar-bottom { display: block; padding-bottom: 6px; }
    .main-content { margin: 0; padding: 0 16px; }
    .topbar { position: static; min-height: 72px; margin-inline: -16px; padding-inline: 16px; }
    .topbar h1 { font-size: 21px; }
    .date-label, .topbar-cta { display: none; }
    .welcome-band { display: grid; gap: 18px; min-height: 0; margin: 18px 0 26px; padding: 24px 22px; }
    .welcome-copy h2 { font-size: 30px; }
    .welcome-side { width: auto; padding: 14px 0 0; border: 0; border-top: 1px solid #ffffff33; }
    .welcome-decoration { right: -2px; bottom: -81px; font-size: 280px; }
    .section-heading, .setup-nudge, .wizard-intro { align-items: flex-start; flex-direction: column; gap: 10px; }
    .metric-row { grid-template-columns: 1fr; gap: 10px; }
    .metric-card { min-height: 0; }
    .panel { padding: 18px 16px; }
    .page-intro h2 { font-size: 23px; }
    .form-grid, .compact-form { grid-template-columns: 1fr; }
    .field-full, .form-actions { grid-column: 1; }
    .filter-bar .field { min-width: calc(50% - 6px); }
    .filter-bar .button { flex: 1; }
    .search-box { min-width: 100%; }
    .class-summary { grid-template-columns: 1fr 1fr; }
    .model-cards { grid-template-columns: 1fr; }
    .grid-actions { margin-inline: -16px; padding-inline: 16px; }
    .details-panel > summary, .report-editor > summary { padding: 16px; }
    .details-panel > form, .report-editor > form { padding-inline: 16px; }
    .report-editor > summary .summary-hint { display: none; }
    .report-toolbar { flex-wrap: wrap; padding: 10px 14px; }
    .report-title { order: 3; flex-basis: 100%; }
    .report-actions { margin-left: auto; }
    .sheet-viewport { padding: 0 8px; }
    .wizard-two-up { grid-template-columns: 1fr; }
    .wizard-inline, .wizard-term-form { align-items: stretch; flex-direction: column; }
    .wizard-finish-grid { grid-template-columns: 1fr; }
    .app-footer { flex-direction: column; }
}
@media (max-width: 480px) {
    .filter-bar .field { min-width: 100%; }
    .class-summary { grid-template-columns: 1fr; }
    .report-actions .button { padding: 0 11px; }
    .report-pager > span:not(.is-disabled) { min-width: 40px; }
}
@media print {
    .app-page .sidebar, .app-page .topbar, .app-footer { display: none; }
}
