/* ==========================================================================
   EduManager — Espace école
   Système de conception : jetons, mise en page, composants. Aucune ressource externe.
   ========================================================================== */

:root {
  --edm-brand: #1f5eff;
  --edm-brand-soft: color-mix(in srgb, var(--edm-brand) 10%, #fff);
  --edm-brand-ink: color-mix(in srgb, var(--edm-brand) 80%, #000);
  --edm-bg: #f4f6fa;
  --edm-surface: #ffffff;
  --edm-surface-2: #f8fafc;
  --edm-line: #e3e8f0;
  --edm-line-strong: #cfd7e3;
  --edm-ink: #0f1b33;
  --edm-ink-2: #334155;
  --edm-muted: #5b6780;
  --edm-success: #15803d;
  --edm-success-soft: #e8f6ee;
  --edm-warning: #b45309;
  --edm-warning-soft: #fdf3e2;
  --edm-danger: #b42318;
  --edm-danger-soft: #fdeceb;
  --edm-info: #1d4ed8;
  --edm-info-soft: #eaf0fe;
  --edm-radius: 14px;
  --edm-radius-sm: 9px;
  --edm-shadow: 0 1px 2px rgba(15, 27, 51, .04), 0 4px 14px -6px rgba(15, 27, 51, .08);
  --edm-shadow-lg: 0 18px 40px -18px rgba(15, 27, 51, .35);
  --edm-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --edm-sidebar: 264px;
  --edm-focus: 0 0 0 3px color-mix(in srgb, var(--edm-brand) 30%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.edm-body { margin: 0; background: var(--edm-bg); color: var(--edm-ink); font: 15px/1.55 var(--edm-font); -webkit-font-smoothing: antialiased; }
a { color: var(--edm-brand-ink); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: none; box-shadow: var(--edm-focus); border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.edm-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--edm-ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.edm-skip:focus { left: 8px; }
.edm-icon { flex: none; vertical-align: middle; }
.edm-muted { color: var(--edm-muted); }
.edm-small { font-size: 13px; }
.edm-nowrap { white-space: nowrap; }
.edm-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.edm-code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--edm-surface-2); border: 1px solid var(--edm-line); border-radius: 6px; padding: 1px 6px; color: var(--edm-ink-2); }
.edm-link { font-weight: 600; font-size: 14px; text-decoration: none; }
.edm-link:hover { text-decoration: underline; }
.edm-required { color: var(--edm-danger); }
.edm-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--edm-muted); margin-bottom: 4px; }

/* ---------- Mise en page ---------- */
.edm-app { display: grid; grid-template-columns: var(--edm-sidebar) minmax(0, 1fr); min-height: 100vh; }
.edm-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--edm-surface); border-right: 1px solid var(--edm-line); padding: 16px 12px; z-index: 40; }
.edm-sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; text-decoration: none; color: var(--edm-ink); }
.edm-sidebar__logo { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; }
.edm-sidebar__mark, .edm-auth__mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--edm-brand); color: #fff; font-weight: 800; font-size: 15px; flex: none; }
.edm-sidebar__name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.edm-nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.edm-nav__group { margin: 18px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8491a8; }
.edm-nav__link { display: flex; align-items: center; gap: 11px; padding: 8px 12px; margin: 1px 0; border-radius: var(--edm-radius-sm); color: var(--edm-ink-2); text-decoration: none; font-weight: 550; font-size: 14px; }
.edm-nav__link .edm-icon { color: #7a879d; }
.edm-nav__link:hover { background: var(--edm-surface-2); color: var(--edm-ink); }
.edm-nav__link.is-active { background: var(--edm-brand-soft); color: var(--edm-brand-ink); }
.edm-nav__link.is-active .edm-icon { color: var(--edm-brand); }
.edm-nav__label { flex: 1; }
.edm-nav__badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--edm-brand); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.edm-sidebar__foot { border-top: 1px solid var(--edm-line); padding-top: 10px; margin-top: 10px; }
.edm-main { min-width: 0; display: flex; flex-direction: column; }
.edm-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px; background: color-mix(in srgb, var(--edm-bg) 85%, transparent); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--edm-line); }
.edm-topbar__menu { display: inline-grid; }
.edm-topbar__context { flex: 1; display: flex; gap: 8px; align-items: center; min-width: 0; }
.edm-topbar__actions { display: flex; align-items: center; gap: 8px; }
.edm-context-switch { display: inline-flex; align-items: center; margin: 0; }
.edm-context-switch select { min-height: 34px; max-width: 240px; padding: 5px 30px 5px 10px; border: 1px solid var(--edm-line); border-radius: 999px; background: var(--edm-surface); color: var(--edm-ink-2); font: 600 13px var(--edm-font); cursor: pointer; }
.edm-context-switch--campus select { max-width: 190px; }
.edm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--edm-surface); border: 1px solid var(--edm-line); font-size: 13px; font-weight: 600; color: var(--edm-ink-2); }
.edm-icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--edm-ink-2); cursor: pointer; text-decoration: none; }
.edm-icon-btn:hover { background: var(--edm-surface); border-color: var(--edm-line); }
.edm-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--edm-danger); box-shadow: 0 0 0 2px var(--edm-bg); }
.edm-usermenu { position: relative; }
.edm-usermenu__trigger { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; cursor: pointer; list-style: none; }
.edm-usermenu__trigger::-webkit-details-marker { display: none; }
.edm-usermenu__trigger:hover { background: var(--edm-surface); }
.edm-usermenu__who { display: flex; flex-direction: column; line-height: 1.2; max-width: 220px; }
.edm-usermenu__who strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edm-usermenu__who small { color: var(--edm-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edm-usermenu__panel, .edm-popover__panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; padding: 6px; background: var(--edm-surface); border: 1px solid var(--edm-line); border-radius: 12px; box-shadow: var(--edm-shadow-lg); z-index: 50; }
.edm-usermenu__panel a, .edm-usermenu__panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--edm-ink); font: 500 14px var(--edm-font); text-decoration: none; cursor: pointer; text-align: left; }
.edm-usermenu__panel a:hover, .edm-usermenu__panel button:hover { background: var(--edm-surface-2); }
.edm-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--edm-brand), color-mix(in srgb, var(--edm-brand) 60%, #7c3aed)); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.edm-avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.edm-content { padding: 28px; max-width: 1320px; width: 100%; margin: 0 auto; }
.edm-content:focus { outline: none; }
.edm-scrim { position: fixed; inset: 0; background: rgba(15, 27, 51, .45); z-index: 35; }

/* ---------- Grilles ---------- */
.edm-stack { display: grid; gap: 20px; align-content: start; }
.edm-grid { display: grid; gap: 20px; margin-bottom: 20px; align-items: start; }
.edm-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.edm-grid--2-1 { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.edm-grid--widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.edm-grid__full { grid-column: 1 / -1; }
.edm-sticky { position: sticky; top: 84px; }

/* ---------- En-têtes et cartes ---------- */
.edm-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.edm-page-header__title { font-size: 24px; font-weight: 800; }
.edm-page-header__desc { margin: 6px 0 0; color: var(--edm-muted); max-width: 72ch; }
.edm-page-header__actions, .edm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.edm-card { background: var(--edm-surface); border: 1px solid var(--edm-line); border-radius: var(--edm-radius); box-shadow: var(--edm-shadow); padding: 22px; margin-bottom: 20px; }
.edm-grid > .edm-card, .edm-stack > .edm-card { margin-bottom: 0; }
.edm-card--flush { padding: 0; overflow: hidden; }
.edm-card--highlight { border-color: color-mix(in srgb, var(--edm-brand) 35%, var(--edm-line)); box-shadow: 0 0 0 3px var(--edm-brand-soft), var(--edm-shadow); }
.edm-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.edm-card__head h2 { font-size: 17px; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.edm-card__head p { margin: 4px 0 0; font-size: 14px; }
.edm-card--flush > .edm-card__head { padding: 18px 22px 0; }

.edm-hero { display: flex; justify-content: space-between; gap: 20px; padding: 26px 28px; margin-bottom: 20px; border-radius: var(--edm-radius); color: #fff; background: radial-gradient(circle at 90% -20%, rgba(255,255,255,.25), transparent 45%), linear-gradient(135deg, var(--edm-brand), color-mix(in srgb, var(--edm-brand) 55%, #0f1b33)); box-shadow: var(--edm-shadow); }
.edm-hero .edm-eyebrow { color: rgba(255,255,255,.75); }
.edm-hero__title { font-size: 26px; font-weight: 800; }
.edm-hero__text { margin: 6px 0 0; color: rgba(255,255,255,.88); }

/* ---------- Mise en route ---------- */
.edm-progress { width: 180px; height: 8px; border-radius: 999px; background: var(--edm-surface-2); border: 1px solid var(--edm-line); overflow: hidden; align-self: center; }
.edm-progress span { display: block; height: 100%; background: var(--edm-success); border-radius: inherit; }
.edm-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.edm-steps__item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--edm-line); border-radius: 12px; background: var(--edm-surface-2); }
.edm-steps__item a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--edm-ink); font-size: 14px; }
.edm-steps__item a:hover strong { color: var(--edm-brand-ink); text-decoration: underline; }
.edm-steps__item .edm-muted { font-size: 13px; }
.edm-steps__mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--edm-line-strong); flex: none; margin-top: 1px; background: #fff; }
.edm-steps__item.is-done { background: var(--edm-success-soft); border-color: #bfe3cc; }
.edm-steps__item.is-done .edm-steps__mark { background: var(--edm-success); border-color: var(--edm-success); color: #fff; }
.edm-steps__item.is-done strong { text-decoration: line-through; color: var(--edm-muted); }

/* ---------- Tuiles, flux ---------- */
.edm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.edm-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--edm-line); border-radius: 12px; text-decoration: none; color: var(--edm-ink); background: var(--edm-surface); transition: border-color .15s, transform .15s, box-shadow .15s; }
.edm-tile:hover { border-color: color-mix(in srgb, var(--edm-brand) 40%, var(--edm-line)); box-shadow: var(--edm-shadow); transform: translateY(-1px); }
.edm-tile__icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--edm-brand-soft); color: var(--edm-brand-ink); }
.edm-tile__label { font-weight: 650; font-size: 14px; }
.edm-tile__group { font-size: 12px; color: var(--edm-muted); }
.edm-feed { list-style: none; margin: 0; padding: 0; }
.edm-feed li { display: flex; flex-direction: column; padding: 10px 0 10px 14px; border-bottom: 1px solid var(--edm-line); position: relative; font-size: 14px; }
.edm-feed li:last-child { border-bottom: 0; }
.edm-feed li.is-unread::before { content: ""; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--edm-brand); }

/* ---------- Boîte de réception ---------- */
.edm-inbox { list-style: none; margin: 0; padding: 0; }
.edm-inbox__item a { display: flex; gap: 14px; align-items: flex-start; padding: 16px 22px; border-bottom: 1px solid var(--edm-line); text-decoration: none; color: var(--edm-ink); }
.edm-inbox__item a:hover { background: var(--edm-surface-2); }
.edm-inbox__item:last-child a { border-bottom: 0; }
.edm-inbox__dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; }
.edm-inbox__item.is-unread .edm-inbox__dot { background: var(--edm-brand); }
.edm-inbox__item.is-unread strong { font-weight: 750; }
.edm-inbox__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.edm-inbox__text { color: var(--edm-muted); font-size: 14px; }
.edm-inbox time { font-size: 13px; white-space: nowrap; }

/* ---------- Alertes, badges ---------- */
.edm-notices:empty { display: none; }
.edm-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px; border: 1px solid; font-size: 14px; }
.edm-alert > span { flex: 1; }
.edm-alert--success { background: var(--edm-success-soft); border-color: #bfe3cc; color: #14532d; }
.edm-alert--error { background: var(--edm-danger-soft); border-color: #f5c6c2; color: #7a1a12; }
.edm-alert--info { background: var(--edm-info-soft); border-color: #c7d6fb; color: #1e3a8a; }
.edm-alert--warning { background: var(--edm-warning-soft); border-color: #f3d9ae; color: #7c3d06; align-items: center; }
.edm-alert__close { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; padding: 2px; }
.edm-alert__close:hover { opacity: 1; }
.edm-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--edm-surface-2); border: 1px solid var(--edm-line); color: var(--edm-ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; margin: 1px 2px 1px 0; }
.edm-badge--success { background: var(--edm-success-soft); border-color: #bfe3cc; color: var(--edm-success); }
.edm-badge--info { background: var(--edm-info-soft); border-color: #c7d6fb; color: var(--edm-info); }
.edm-badge--warning { background: var(--edm-warning-soft); border-color: #f3d9ae; color: var(--edm-warning); }
.edm-badge--danger { background: var(--edm-danger-soft); border-color: #f5c6c2; color: var(--edm-danger); }
.edm-kpi { display: block; margin-top: 6px; font-size: 24px; line-height: 1.1; color: var(--edm-ink); }
.edm-card--soft { background: var(--edm-surface-2); box-shadow: none; }

/* ---------- Boutons ---------- */
.edm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font: 600 14px/1 var(--edm-font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.edm-btn--primary { background: var(--edm-brand); color: #fff; box-shadow: 0 1px 2px rgba(15,27,51,.12), inset 0 1px 0 rgba(255,255,255,.15); }
.edm-btn--primary:hover { background: var(--edm-brand-ink); color: #fff; }
.edm-btn--secondary { background: var(--edm-surface); border-color: var(--edm-line-strong); color: var(--edm-ink); }
.edm-btn--secondary:hover { background: var(--edm-surface-2); }
.edm-btn--ghost { background: transparent; color: var(--edm-ink-2); }
.edm-btn--ghost:hover { background: var(--edm-surface-2); }
.edm-btn--danger { background: var(--edm-surface); border-color: #f1c0bb; color: var(--edm-danger); }
.edm-btn--danger:hover { background: var(--edm-danger-soft); }
.edm-btn--sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.edm-btn--lg { min-height: 48px; font-size: 15px; }
.edm-btn--block { width: 100%; }
.edm-btn[disabled], .edm-btn.is-busy { opacity: .6; cursor: progress; }
.edm-inline-form { display: inline; margin: 0; }

/* ---------- Formulaires ---------- */
.edm-form { display: grid; gap: 16px; }
.edm-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.edm-form__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.edm-form__row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.edm-form__row--between { justify-content: space-between; font-size: 14px; }
.edm-form__actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.edm-form__actions--sticky { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--edm-bg) 35%); }
.edm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.edm-field--full { grid-column: 1 / -1; }
.edm-field > label, .edm-label { font-size: 13px; font-weight: 650; color: var(--edm-ink-2); }
.edm-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
.edm-field select, .edm-field textarea, .edm-row-form input, .edm-search input, .edm-table--inputs input:not([type="color"]) {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--edm-line-strong); border-radius: 10px; background: var(--edm-surface); color: var(--edm-ink); font: 15px/1.4 var(--edm-font); transition: border-color .15s, box-shadow .15s;
}
.edm-field textarea { min-height: 84px; resize: vertical; }
.edm-field input:focus, .edm-field select:focus, .edm-field textarea:focus, .edm-row-form input:focus, .edm-search input:focus, .edm-table--inputs input:focus { outline: none; border-color: var(--edm-brand); box-shadow: var(--edm-focus); }
.edm-field input[type="file"] { font-size: 14px; }
.edm-field input[type="color"] { width: 64px; height: 42px; padding: 3px; border: 1px solid var(--edm-line-strong); border-radius: 10px; background: #fff; }
.edm-field.has-error input, .edm-field.has-error select, .edm-field.has-error textarea { border-color: var(--edm-danger); }
.edm-field__error { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--edm-danger); font-size: 13px; font-weight: 600; }
.edm-field--button { justify-content: flex-end; }
.edm-help { margin: 0; color: var(--edm-muted); font-size: 13px; }
.edm-check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.edm-check input { width: 18px; height: 18px; accent-color: var(--edm-brand); margin: 0; }
.edm-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.edm-fieldset { border: 1px solid var(--edm-line); border-radius: 12px; padding: 16px; margin: 0; display: grid; gap: 14px; }
.edm-fieldset legend { padding: 0 6px; font-weight: 700; font-size: 14px; }
.edm-row-form { display: grid; grid-template-columns: minmax(140px, 1.3fr) repeat(2, minmax(130px, 1fr)) auto; gap: 8px; align-items: center; }
.edm-row-form input { min-height: 36px; padding: 6px 10px; font-size: 14px; }

/* ---------- Onglets, pastilles, recherche ---------- */
.edm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--edm-line); margin-bottom: 20px; overflow-x: auto; }
.edm-tabs__link { padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--edm-muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.edm-tabs__link:hover { color: var(--edm-ink); }
.edm-tabs__link.is-active { color: var(--edm-brand-ink); border-bottom-color: var(--edm-brand); }
.edm-filters { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.edm-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.edm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--edm-line); background: var(--edm-surface); color: var(--edm-ink-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.edm-pill:hover { border-color: var(--edm-line-strong); }
.edm-pill.is-active { background: var(--edm-ink); border-color: var(--edm-ink); color: #fff; }
.edm-pill__count { font-size: 11px; opacity: .7; }
.edm-search { display: flex; align-items: center; gap: 8px; position: relative; min-width: 260px; }
.edm-search .edm-icon { position: absolute; left: 12px; color: var(--edm-muted); }
.edm-search input { padding-left: 36px !important; }
.edm-filters-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }

/* ---------- Tableaux ---------- */
.edm-table-wrap { overflow-x: auto; }
.edm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.edm-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--edm-muted); background: var(--edm-surface-2); padding: 10px 16px; border-bottom: 1px solid var(--edm-line); white-space: nowrap; }
.edm-table td { padding: 12px 16px; border-bottom: 1px solid var(--edm-line); vertical-align: middle; }
.edm-table tbody tr:last-child td { border-bottom: 0; }
.edm-table tbody tr:hover td { background: #fbfcfe; }
.edm-table tr.is-selected td { background: var(--edm-brand-soft); }
.edm-table__actions { text-align: right; white-space: nowrap; }
.edm-table__actions > * { margin-left: 4px; }
.edm-table__form-cell { padding: 8px 12px !important; }
.edm-table--compact td { padding: 8px 14px; }
.edm-table--inputs td { padding: 6px 8px; }
.edm-table--inputs input { min-height: 36px !important; padding: 6px 9px !important; font-size: 14px !important; }
.edm-table--mini { margin-top: 8px; font-size: 13px; }
.edm-table--mini th, .edm-table--mini td { padding: 4px 8px; text-transform: none; letter-spacing: 0; }
.edm-person { display: flex; align-items: center; gap: 10px; }
.edm-person > span:last-child { display: flex; flex-direction: column; }
.edm-person small { font-size: 12px; }
.edm-diff summary { cursor: pointer; font-size: 13px; color: var(--edm-brand-ink); margin-top: 4px; }
.edm-diff__old { color: var(--edm-danger); text-decoration: line-through; }
.edm-diff__new { color: var(--edm-success); }
.edm-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 20px; font-size: 14px; }
.edm-pagination__links { display: flex; gap: 8px; }

/* ---------- Divers ---------- */
.edm-empty { text-align: center; padding: 44px 20px; }
.edm-empty__icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--edm-surface-2); color: var(--edm-muted); margin-bottom: 12px; }
.edm-empty__title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.edm-empty__action { margin-top: 14px; }
.edm-list { list-style: none; margin: 0; padding: 0; }
.edm-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--edm-line); }
.edm-list li:last-child { border-bottom: 0; }
.edm-bands { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; }
.edm-bands li { display: grid; grid-template-columns: 12px 110px 28px 1fr; gap: 10px; align-items: center; padding: 5px 0; }
.edm-bands__swatch { width: 12px; height: 12px; border-radius: 4px; }
.edm-bands__range { font-variant-numeric: tabular-nums; color: var(--edm-muted); }
.edm-disclosure { padding: 0; margin: 0; }
.edm-disclosure > summary { padding: 16px 20px; cursor: pointer; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.edm-disclosure[open] > summary { border-bottom: 1px solid var(--edm-line); }
.edm-disclosure > .edm-form { padding: 18px 20px; }
.edm-uploads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.edm-upload { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px dashed var(--edm-line-strong); border-radius: 12px; background: var(--edm-surface-2); }
.edm-upload__preview { display: grid; place-items: center; height: 120px; border-radius: 10px; background: #fff repeating-conic-gradient(#f1f4f9 0% 25%, #fff 0% 50%) 50% / 16px 16px; color: var(--edm-muted); border: 1px solid var(--edm-line); }
.edm-upload__preview img { max-height: 110px; object-fit: contain; }
.edm-popover { position: relative; display: inline-block; }
.edm-popover > summary { list-style: none; }
.edm-popover > summary::-webkit-details-marker { display: none; }
.edm-popover__panel { text-align: left; display: grid; gap: 12px; padding: 14px; min-width: 260px; white-space: normal; }

/* ---------- Connexion ---------- */
.edm-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); min-height: 100vh; }
.edm-auth--single { grid-template-columns: 1fr; place-items: center; padding: 20px; }
.edm-auth__panel { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 48px clamp(24px, 6vw, 64px); background: var(--edm-surface); }
.edm-auth--single .edm-auth__panel { max-width: 460px; border-radius: 18px; box-shadow: var(--edm-shadow-lg); align-items: flex-start; }
.edm-auth__brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.edm-auth__logo { width: 52px; height: 52px; object-fit: contain; }
.edm-auth__mark { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
.edm-auth__mark--muted { background: var(--edm-surface-2); color: var(--edm-muted); }
.edm-auth__school { font-weight: 800; font-size: 17px; margin: 0; }
.edm-auth__title { font-size: 28px; font-weight: 800; }
.edm-auth__foot { margin-top: 12px; font-size: 14px; }
.edm-auth__aside { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 40%), linear-gradient(145deg, var(--edm-brand), color-mix(in srgb, var(--edm-brand) 45%, #0f1b33)); display: flex; align-items: flex-end; padding: 56px; }
.edm-auth__quote { color: #fff; font-size: clamp(22px, 2.4vw, 32px); font-weight: 750; line-height: 1.3; max-width: 22ch; letter-spacing: -.02em; }

/* ---------- Adaptation mobile ---------- */
@media (max-width: 1100px) {
  .edm-grid--2-1, .edm-grid--3, .edm-grid--widgets { grid-template-columns: minmax(0, 1fr); }
  .edm-sticky { position: static; }
  .edm-uploads { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .edm-app { grid-template-columns: minmax(0, 1fr); }
  .edm-sidebar { position: fixed; left: 0; top: 0; width: min(86vw, 300px); transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--edm-shadow-lg); }
  .edm-app.is-menu-open .edm-sidebar { transform: none; }
  .edm-topbar { padding: 0 14px; }
  .edm-topbar__menu { display: inline-grid; }
  .edm-usermenu__who { display: none; }
  .edm-context-switch--campus { display: none; }
  .edm-context-switch select { max-width: 180px; }
  .edm-content { padding: 18px 14px; }
  .edm-auth { grid-template-columns: minmax(0, 1fr); }
  .edm-auth__aside { display: none; }
}
@media (max-width: 640px) {
  .edm-grid--2, .edm-form__grid, .edm-form__grid--3, .edm-filters-form { grid-template-columns: minmax(0, 1fr); }
  .edm-context-switch select { max-width: 150px; }
  .edm-row-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .edm-row-form input:first-of-type, .edm-row-form button { grid-column: 1 / -1; }
  .edm-page-header__title { font-size: 21px; }
  .edm-hero { padding: 20px; }
  .edm-hero__title { font-size: 21px; }
  .edm-card { padding: 16px; }
  .edm-search { min-width: 0; width: 100%; }
  .edm-btn { min-height: 44px; }
  .edm-table th, .edm-table td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .edm-sidebar, .edm-topbar, .edm-notices, .edm-page-header__actions, .edm-actions, .edm-table__actions { display: none !important; }
  .edm-app { display: block; }
  .edm-card { box-shadow: none; border-color: #ccc; }
}

/* ==========================================================================
   Lot 2 — élèves, classes, admissions, import
   ========================================================================== */
.edm-mb { margin-bottom: 16px; }
.edm-pad { padding: 16px 22px; }
.edm-breadcrumb { margin: -6px 0 12px; font-size: 14px; }
.edm-breadcrumb a { text-decoration: none; color: var(--edm-muted); font-weight: 600; }
.edm-breadcrumb a:hover { color: var(--edm-brand-ink); }
.edm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; }
.edm-toolbar__grow { flex: 1 1 260px; }
.edm-toolbar select { min-height: 42px; padding: 8px 12px; border: 1px solid var(--edm-line-strong); border-radius: 10px; background: var(--edm-surface); font: 14px var(--edm-font); max-width: 220px; }
.edm-avatar--f { background: linear-gradient(135deg, #db2777, #9333ea); }
.edm-avatar--m { background: linear-gradient(135deg, var(--edm-brand), #0891b2); }
.edm-avatar--xl { width: 96px; height: 96px; font-size: 30px; border-radius: 22px; }
.edm-person--link { text-decoration: none; color: var(--edm-ink); }
.edm-person--link:hover strong { color: var(--edm-brand-ink); text-decoration: underline; }
.edm-table tr.is-muted td { color: var(--edm-muted); background: var(--edm-surface-2); }
.edm-table tr.is-error td { background: #fff7f6; }
.edm-table tr.is-warning td { background: #fffbf2; }
.edm-line-msg { display: block; font-size: 13px; margin-top: 2px; }
.edm-line-msg--error { color: var(--edm-danger); font-weight: 600; }
.edm-line-msg--warning { color: var(--edm-warning); }

/* Fiche élève */
.edm-profile { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.edm-profile__photo { display: grid; gap: 8px; justify-items: center; }
.edm-profile__photo img { width: 96px; height: 96px; object-fit: cover; border-radius: 22px; border: 1px solid var(--edm-line); }
.edm-profile__name { font-size: 24px; font-weight: 800; }
.edm-profile__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 0; color: var(--edm-muted); font-size: 14px; }
.edm-profile__actions { align-self: start; }
.edm-profile__upload label { cursor: pointer; }
.edm-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 24px; margin: 0; }
.edm-dl dt { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--edm-muted); margin-bottom: 2px; }
.edm-dl dd { margin: 0; font-weight: 550; }
.edm-facts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.edm-facts li { display: flex; gap: 8px; align-items: center; }
.edm-facts .edm-icon { color: var(--edm-muted); }
.edm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.edm-inline-panel { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; padding: 14px; border-radius: 12px; background: var(--edm-surface-2); border: 1px solid var(--edm-line); }
.edm-inline-panel > div { flex: 1 1 260px; }
.edm-inline-panel input[type="email"], .edm-inline-panel select { min-height: 36px; padding: 6px 10px; border: 1px solid var(--edm-line-strong); border-radius: 8px; font: 14px var(--edm-font); }
.edm-disclosure--inline { border: 1px solid var(--edm-line); border-radius: 12px; margin: 0 0 12px; }
.edm-disclosure--inline > summary { padding: 10px 14px; font-weight: 600; font-size: 14px; }
.edm-disclosure--inline > .edm-form, .edm-disclosure--inline > div { padding: 14px; }
.edm-quote { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--edm-line-strong); background: var(--edm-surface-2); border-radius: 0 8px 8px 0; color: var(--edm-ink-2); }
.edm-files { list-style: none; margin: 0; padding: 0; }
.edm-files li { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--edm-line); }
.edm-files li:last-child { border-bottom: 0; }
.edm-files__icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--edm-brand-soft); color: var(--edm-brand-ink); flex: none; }
.edm-files__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.edm-files__body a { text-decoration: none; color: var(--edm-ink); }
.edm-files__body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Classes */
.edm-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.edm-class-card { display: grid; gap: 8px; padding: 16px; background: var(--edm-surface); border: 1px solid var(--edm-line); border-radius: var(--edm-radius); box-shadow: var(--edm-shadow); }
.edm-class-card.is-selected { border-color: var(--edm-brand); box-shadow: 0 0 0 3px var(--edm-brand-soft); }
.edm-class-card header { display: flex; flex-direction: column; }
.edm-class-card__name { font-size: 18px; font-weight: 800; text-decoration: none; color: var(--edm-ink); }
.edm-class-card__count { margin: 0; font-size: 15px; }
.edm-class-card__count strong { font-size: 24px; }
.edm-class-card footer { margin-top: 4px; }
.edm-meter { height: 8px; border-radius: 999px; background: var(--edm-surface-2); border: 1px solid var(--edm-line); overflow: hidden; }
.edm-meter span { display: block; height: 100%; background: var(--edm-success); border-radius: inherit; }
.edm-meter.is-high span { background: var(--edm-warning); }
.edm-meter.is-full span { background: var(--edm-danger); }

/* Indicateurs */
.edm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.edm-stats--compact { margin-bottom: 12px; }
.edm-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--edm-surface); border: 1px solid var(--edm-line); text-decoration: none; color: var(--edm-ink); }
a.edm-stat:hover { border-color: color-mix(in srgb, var(--edm-brand) 40%, var(--edm-line)); }
.edm-stat__value { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.edm-stat__label { font-size: 13px; color: var(--edm-muted); }
.edm-stat--success .edm-stat__value { color: var(--edm-success); }
.edm-stat--danger .edm-stat__value { color: var(--edm-danger); }
.edm-stat--warning .edm-stat__value { color: var(--edm-warning); }

/* Assistant d'import */
.edm-wizard { display: flex; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; flex-wrap: wrap; }
.edm-wizard li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--edm-surface); border: 1px solid var(--edm-line); font-size: 14px; font-weight: 600; color: var(--edm-muted); }
.edm-wizard li span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--edm-surface-2); border: 1px solid var(--edm-line-strong); font-size: 12px; }
.edm-wizard li.is-active { color: var(--edm-brand-ink); border-color: color-mix(in srgb, var(--edm-brand) 40%, var(--edm-line)); }
.edm-wizard li.is-active span { background: var(--edm-brand); border-color: var(--edm-brand); color: #fff; }
.edm-wizard li.is-done span { background: var(--edm-success); border-color: var(--edm-success); color: #fff; }
.edm-confirm { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--edm-brand) 30%, var(--edm-line)); }

@media (max-width: 900px) {
  .edm-profile { grid-template-columns: auto 1fr; }
  .edm-profile__actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .edm-profile { grid-template-columns: 1fr; text-align: center; }
  .edm-profile__meta { justify-content: center; }
  .edm-toolbar select { max-width: none; flex: 1 1 45%; }
}
@media print {
  .edm-breadcrumb, .edm-tabs, .edm-pills, .edm-toolbar, .edm-wizard { display: none !important; }
  .edm-table th, .edm-table td { padding: 4px 8px; }
}

/* ==========================================================================
   Lot 3 — matières, programmes, personnel
   ========================================================================== */
.edm-mt { margin-top: 12px; }
.edm-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.edm-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.edm-card--warning { border-color: #f3d9ae; background: linear-gradient(var(--edm-warning-soft), var(--edm-surface) 60%); }
.edm-table--inputs select { width: 100%; min-width: 180px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--edm-line-strong); border-radius: 8px; background: var(--edm-surface); font: 14px var(--edm-font); }
.edm-table--inputs select.is-empty { border-color: #f3d9ae; background: var(--edm-warning-soft); }
.edm-table--inputs input[size] { width: 90px; }
.edm-program { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.edm-program__levels { position: sticky; top: 84px; padding: 8px; margin: 0; max-height: calc(100vh - 110px); overflow-y: auto; }
.edm-program__level { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--edm-ink-2); font-weight: 600; font-size: 14px; }
.edm-program__level:hover { background: var(--edm-surface-2); }
.edm-program__level.is-active { background: var(--edm-brand-soft); color: var(--edm-brand-ink); }
.edm-row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
.edm-row-actions > div { flex: 1 1 240px; }
.edm-row-actions select { min-height: 36px; padding: 6px 10px; border: 1px solid var(--edm-line-strong); border-radius: 8px; font: 14px var(--edm-font); }
@media (max-width: 900px) {
  .edm-program { grid-template-columns: minmax(0, 1fr); }
  .edm-program__levels { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 4px; }
  .edm-program__levels .edm-nav__group { width: 100%; margin: 8px 4px 2px; }
}

/* ==========================================================================
   Lot 4 — emploi du temps
   ========================================================================== */
.edm-js .edm-js-hide { display: none !important; }
.edm-print-only { display: none; }
.edm-tt-layout { display: grid; gap: 20px; align-items: start; }
.edm-tt-layout--edit { grid-template-columns: minmax(0, 1fr) 320px; }
.edm-tt-card { padding: 14px; overflow-x: auto; }
.edm-tt {
  --edm-tt-unit: 7px;
  display: grid;
  grid-template-columns: 52px repeat(var(--edm-tt-days), minmax(110px, 1fr));
  grid-template-rows: 34px repeat(var(--edm-tt-rows), var(--edm-tt-unit));
  position: relative;
  min-width: calc(52px + var(--edm-tt-days) * 110px);
}
.edm-tt__corner { grid-column: 1; grid-row: 1; }
.edm-tt__day { grid-row: 1; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--edm-ink-2); border-bottom: 1px solid var(--edm-line); background: var(--edm-surface-2); border-radius: 8px 8px 0 0; }
.edm-tt__hour { grid-column: 1; font-size: 11px; color: var(--edm-muted); transform: translateY(-7px); text-align: right; padding-right: 8px; font-variant-numeric: tabular-nums; }
.edm-tt__line { grid-column: 2 / -1; border-top: 1px solid var(--edm-line); pointer-events: none; }
.edm-tt__break { grid-column: 2 / -1; background: repeating-linear-gradient(135deg, var(--edm-surface-2) 0 6px, #eef1f6 6px 12px); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--edm-muted); pointer-events: none; z-index: 1; overflow: hidden; }
.edm-tt__cell { display: grid; place-items: center; color: transparent; text-decoration: none; border-radius: 6px; z-index: 2; font-weight: 700; }
.edm-tt__cell:hover, .edm-tt__cell:focus-visible { background: var(--edm-brand-soft); color: var(--edm-brand-ink); outline: 1px dashed color-mix(in srgb, var(--edm-brand) 45%, transparent); }
.edm-tt__slot {
  z-index: 3; margin: 1px 2px; padding: 4px 6px; border-radius: 8px; overflow: hidden;
  width: calc((100% - 4px) / var(--edm-tt-cols)); margin-left: calc(2px + (100% - 4px) * var(--edm-tt-col) / var(--edm-tt-cols)); justify-self: start;
  background: color-mix(in srgb, var(--edm-tt-color) 14%, #fff); border-left: 4px solid var(--edm-tt-color);
  color: var(--edm-ink); text-decoration: none; display: flex; flex-direction: column; gap: 1px; font-size: 12px; line-height: 1.25;
  box-shadow: 0 1px 2px rgba(15, 27, 51, .06);
}
a.edm-tt__slot:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--edm-tt-color) 45%, transparent); }
.edm-tt__slot.is-active { box-shadow: 0 0 0 3px var(--edm-brand); }
.edm-tt__slot.is-conflict { background: repeating-linear-gradient(135deg, var(--edm-danger-soft) 0 6px, #fff 6px 12px); border-left-color: var(--edm-danger); }
.edm-tt__slot.is-dated { border-left-style: dashed; }
.edm-tt__time { font-size: 11px; color: var(--edm-muted); font-variant-numeric: tabular-nums; }
.edm-tt__title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edm-tt__meta { color: var(--edm-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edm-tt-list { display: none; }
.edm-tt-list__day { padding: 10px 0; border-bottom: 1px solid var(--edm-line); }
.edm-tt-list__day h3 { font-size: 15px; margin-bottom: 6px; }
.edm-tt-list ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.edm-tt-list li { display: grid; grid-template-columns: 92px 1fr; column-gap: 8px; padding: 8px 10px; border-left: 4px solid var(--edm-tt-color); background: color-mix(in srgb, var(--edm-tt-color) 10%, #fff); border-radius: 8px; font-size: 14px; }
.edm-tt-list li .edm-muted { grid-column: 2; font-size: 13px; }
#edm-slot-form.is-highlighted { border-color: var(--edm-brand); box-shadow: 0 0 0 3px var(--edm-brand-soft), var(--edm-shadow); }
.edm-coverage { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; }
.edm-coverage li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.edm-coverage li .edm-meter { grid-column: 1 / -1; height: 6px; }
.edm-coverage__value { font-variant-numeric: tabular-nums; color: var(--edm-muted); }
.edm-coverage li.is-ok .edm-coverage__value { color: var(--edm-success); font-weight: 700; }
.edm-coverage li.is-over .edm-coverage__value { color: var(--edm-danger); font-weight: 700; }
.edm-card--ok { border-color: #bfe3cc; background: linear-gradient(var(--edm-success-soft), var(--edm-surface) 60%); }
@media (max-width: 1100px) { .edm-tt-layout--edit { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .edm-tt { display: none; }
  .edm-tt-list { display: block; }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .edm-noprint, .edm-tt__cell { display: none !important; }
  .edm-print-only { display: block; }
  .edm-print-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
  .edm-tt-layout, .edm-tt-layout--edit { display: block; }
  .edm-tt { display: grid !important; --edm-tt-unit: 5px; min-width: 0; grid-template-columns: 44px repeat(var(--edm-tt-days), 1fr); }
  .edm-tt-list { display: none !important; }
  .edm-tt__slot { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none; }
  .edm-tt__break { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==========================================================================
   Lot 5 — notes, bulletins, cahier de textes
   ========================================================================== */
.edm-text-danger { color: var(--edm-danger); }
.edm-grade-sheet input[data-edm-score] { width: 80px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.edm-grade-sheet input[data-edm-score].is-invalid { border-color: var(--edm-danger) !important; background: var(--edm-danger-soft); }
.edm-grade-sheet input[data-edm-score]:disabled { background: var(--edm-surface-2); }
.edm-gradebook th a { color: inherit; text-decoration: none; }
.edm-gradebook th a:hover { color: var(--edm-brand-ink); text-decoration: underline; }
.edm-assessments { list-style: none; margin: 0; padding: 0; }
.edm-assessments li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--edm-line); padding-right: 10px; }
.edm-assessments li:last-child { border-bottom: 0; }
.edm-assessments li a:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; text-decoration: none; color: var(--edm-ink); }
.edm-assessments li.is-active { background: var(--edm-brand-soft); }
.edm-assessments li a:first-child:hover strong { color: var(--edm-brand-ink); }
.edm-steps-line { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; }
.edm-steps-line li { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--edm-surface); border: 1px solid var(--edm-line); font-size: 13px; font-weight: 600; color: var(--edm-muted); }
.edm-steps-line li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--edm-surface-2); border: 1px solid var(--edm-line-strong); font-size: 11px; }
.edm-steps-line li.is-active { color: var(--edm-brand-ink); border-color: color-mix(in srgb, var(--edm-brand) 40%, var(--edm-line)); }
.edm-steps-line li.is-active span { background: var(--edm-brand); border-color: var(--edm-brand); color: #fff; }
.edm-steps-line li.is-done span { background: var(--edm-success); border-color: var(--edm-success); color: #fff; }
.edm-prose { font-size: 14px; color: var(--edm-ink-2); }
.edm-prose p { margin: 0 0 .5em; }
.edm-prose ul, .edm-prose ol { margin: 0 0 .5em 1.2em; padding: 0; }
.edm-homework { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--edm-warning-soft); border: 1px solid #f3d9ae; font-size: 14px; }
.edm-homework strong { display: inline-flex; gap: 6px; align-items: center; color: #7c3d06; }
.edm-homework p { margin: 4px 0 0; }
.edm-lesson.is-selected { border-color: var(--edm-brand); box-shadow: 0 0 0 3px var(--edm-brand-soft); }
.edm-lesson-row { border-left: 4px solid var(--edm-tt-color); padding: 6px 0 6px 12px; margin: 8px 0; }
.edm-lesson-row p { margin: 2px 0; }

/* ==========================================================================
   Lot 6 — présences
   ========================================================================== */
.edm-roll-list { display: grid; gap: 8px; }
.edm-roll-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--edm-line); border-left: 4px solid var(--edm-tt-color, var(--edm-brand)); border-radius: 12px; text-decoration: none; color: var(--edm-ink); background: var(--edm-surface); }
.edm-roll-item:hover { box-shadow: var(--edm-shadow); }
.edm-roll-item.is-done { background: var(--edm-surface-2); }
.edm-roll-item__time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 96px; }
.edm-roll-item__body { flex: 1; }
.edm-roll-counts { margin: 0; font-weight: 600; }
.edm-roll-counts [data-edm-count] { font-variant-numeric: tabular-nums; }
.edm-roll { list-style: none; margin: 0; padding: 0; }
.edm-roll__row { display: flex; align-items: center; gap: 12px; padding: 10px 22px; border-bottom: 1px solid var(--edm-line); }
.edm-roll__row.is-absent { background: var(--edm-danger-soft); }
.edm-roll__row.is-late { background: var(--edm-warning-soft); }
.edm-roll__row.is-excused { background: var(--edm-surface-2); }
.edm-roll__row.is-authorized_exit { background: var(--edm-surface-2); }
.edm-roll__name { flex: 1; min-width: 0; }
.edm-roll__choices { display: flex; align-items: center; gap: 6px; }
.edm-roll__choice { position: relative; }
.edm-roll__choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.edm-roll__choice span[aria-hidden] { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--edm-line-strong); background: var(--edm-surface); font-weight: 800; color: var(--edm-muted); cursor: pointer; user-select: none; }
.edm-roll__choice input:focus-visible + span { box-shadow: var(--edm-focus); }
.edm-roll__choice--present input:checked + span { background: var(--edm-success); border-color: var(--edm-success); color: #fff; }
.edm-roll__choice--absent input:checked + span { background: var(--edm-danger); border-color: var(--edm-danger); color: #fff; }
.edm-roll__choice--late input:checked + span { background: var(--edm-warning); border-color: var(--edm-warning); color: #fff; }
.edm-roll__choice--excused input:checked + span { background: var(--edm-brand); border-color: var(--edm-brand); color: #fff; }
.edm-roll__choice--authorized_exit input:checked + span { background: var(--edm-ink); border-color: var(--edm-ink); color: #fff; }
.edm-roll__choice input:disabled + span { cursor: default; opacity: .7; }
.edm-roll__minutes input { width: 64px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--edm-line-strong); border-radius: 10px; font: 14px var(--edm-font); }
.edm-roll__row:not(.is-late) .edm-roll__minutes, .edm-roll__row:not(.is-late) .edm-roll__arrival { display: none; }
.edm-roll__extra { display: flex; align-items: center; gap: 8px; flex-basis: 100%; padding-left: 48px; }
.edm-roll__row.is-present .edm-roll__extra { display: none; }
.edm-roll__arrival { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--edm-muted); }
.edm-roll__arrival input { min-height: 38px; border: 1px solid var(--edm-line-strong); border-radius: 9px; padding: 5px 8px; }
.edm-roll__observation { flex: 1; }
.edm-roll__observation input { width: 100%; min-height: 38px; border: 1px solid var(--edm-line-strong); border-radius: 9px; padding: 5px 9px; }
@media (max-width: 640px) {
  .edm-roll__row { flex-wrap: wrap; padding: 10px 14px; }
  .edm-roll__name { flex-basis: calc(100% - 50px); }
  .edm-roll__choices { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .edm-roll__extra { padding-left: 0; }
  .edm-roll__observation { flex-basis: 100%; }
}

/* ==========================================================================
   Lot 7 — finances
   ========================================================================== */
.edm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.edm-bars li { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.edm-bars__track { height: 10px; border-radius: 999px; background: var(--edm-surface-2); overflow: hidden; }
.edm-bars__track span { display: block; height: 100%; background: var(--edm-brand); }
.edm-bars__value { font-variant-numeric: tabular-nums; font-weight: 600; }
.edm-meter.is-ok span { background: var(--edm-success); }
.edm-sep { border: 0; border-top: 1px solid var(--edm-line); margin: 12px 0; }
.edm-stat--warning .edm-stat__value { color: #b45309; }

/* ==========================================================================
   Lot 8 — communication
   ========================================================================== */
.edm-messages { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.edm-messages__list { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; }
.edm-tabs--compact { padding: 0 10px; }
.edm-conversations { list-style: none; margin: 0; padding: 0; }
.edm-conversations li { border-bottom: 1px solid var(--edm-line); }
.edm-conversations li a { display: grid; gap: 2px; padding: 10px 14px; text-decoration: none; color: var(--edm-ink); }
.edm-conversations li.is-active { background: var(--edm-brand-soft); }
.edm-conversations li.is-unread strong { color: var(--edm-brand-ink); }
.edm-thread { list-style: none; margin: 0; padding: 16px; display: grid; gap: 14px; }
.edm-thread li { display: flex; gap: 10px; align-items: flex-start; }
.edm-thread li.is-mine { flex-direction: row-reverse; }
.edm-thread__bubble { max-width: 70%; padding: 10px 12px; border-radius: 14px; background: var(--edm-surface-2); }
.edm-thread li.is-mine .edm-thread__bubble { background: var(--edm-brand-soft); }
.edm-thread__bubble p { margin: 0 0 4px; }
.edm-thread__meta { font-size: 11px; color: var(--edm-muted); }
@media (max-width: 900px) {
  .edm-messages { grid-template-columns: minmax(0, 1fr); }
  .edm-messages__list { position: static; max-height: 320px; }
  .edm-thread__bubble { max-width: 85%; }
}

/* ==========================================================================
   Lot 9 — rapports et graphiques
   ========================================================================== */
.edm-chart { width: 100%; height: auto; overflow: visible; }
.edm-chart--donut { max-width: 180px; }
.edm-chart__grid { stroke: var(--edm-line); stroke-width: 1; }
.edm-chart__label { font-size: 11px; fill: var(--edm-muted); font-family: var(--edm-font); }
.edm-chart__value { font-size: 11px; font-weight: 700; fill: var(--edm-ink-2); font-family: var(--edm-font); }
.edm-donut-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.edm-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.edm-legend li { display: flex; align-items: center; gap: 6px; }

/* ==========================================================================
   Finitions (revue générale)
   ========================================================================== */
.edm-field--check { flex-direction: row; align-items: flex-start; flex-wrap: wrap; gap: 4px 10px; }
.edm-field--check .edm-check { flex: 1 1 auto; align-items: flex-start; line-height: 1.45; }
.edm-field--check .edm-help, .edm-field--check .edm-field__error { flex-basis: 100%; margin-left: 27px; }
.edm-profile__main { min-width: 0; }
.edm-auth__art { display: grid; gap: 14px; }
.edm-setup .edm-progress { min-width: 160px; }
.edm-messages__thread { min-width: 0; }
.edm-bars__label { color: var(--edm-muted); font-variant-numeric: tabular-nums; }

/* Plans tarifaires : liste à gauche, détail à droite. */
.edm-grid--1-2 { display: grid; gap: 20px; grid-template-columns: minmax(260px, 1fr) 2fr; align-items: start; }
@media (max-width: 980px) { .edm-grid--1-2 { grid-template-columns: 1fr; } }
.edm-list li.is-selected { background: var(--edm-brand-soft); }

/* Contrôles de fin d'année. */
.edm-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.edm-checklist__item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--edm-surface-2); }
.edm-checklist__item.is-ok { background: var(--edm-success-soft); }
.edm-checklist__item.is-warning { background: var(--edm-warning-soft); }
.edm-checklist__item.is-danger { background: var(--edm-danger-soft); }
.edm-checklist__mark { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.edm-checklist__item span span { display: block; }
.edm-inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }

/* Parcours métier affiché en haut des écrans. */
.edm-workflow { margin: -6px 0 18px; }
.edm-workflow__box { border: 1px solid var(--edm-line); border-radius: 12px; background: var(--edm-surface); overflow: hidden; }
.edm-workflow__box > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.edm-workflow__box > summary::-webkit-details-marker { display: none; }
.edm-workflow__box > summary::before { content: "›"; font-size: 18px; color: var(--edm-muted); transition: transform .15s ease; }
.edm-workflow__box[open] > summary::before { transform: rotate(90deg); }
.edm-workflow__title { font-weight: 700; font-size: 13px; }
.edm-workflow__count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--edm-warning); background: var(--edm-warning-soft); padding: 3px 10px; border-radius: 999px; }
.edm-workflow__body { padding: 0 14px 14px; display: grid; gap: 10px; }
.edm-workflow__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.edm-workflow__step { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--edm-surface-2); font-size: 12.5px; }
.edm-workflow__step.is-current { background: var(--edm-brand-soft); }
.edm-workflow__step a { text-decoration: none; color: var(--edm-ink-2); }
.edm-workflow__step a:hover { text-decoration: underline; }
.edm-workflow__number { width: 20px; height: 20px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--edm-muted); }
.edm-workflow__step.is-current .edm-workflow__number { background: var(--edm-brand); color: #fff; }
.edm-workflow__blocker { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--edm-surface-2); }
.edm-workflow__blocker.is-warning { background: var(--edm-warning-soft); color: var(--edm-warning); }
.edm-workflow__blocker.is-danger { background: var(--edm-danger-soft); color: var(--edm-danger); }
.edm-workflow__blocker.is-info { background: var(--edm-brand-soft); color: var(--edm-brand-ink); }
.edm-workflow__blocker a { margin-left: 6px; font-weight: 700; }
@media print { .edm-workflow { display: none; } }

/* EduManager 2.3.2 — workflows pédagogiques */
.edm-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; }
.edm-field-help { display: block; margin-top: 5px; line-height: 1.35; }

.edm-sidebar__version{margin:.5rem .75rem 0;font-size:.72rem;line-height:1.2;opacity:.62;text-align:center}

/* EduManager 2.5.2 — assistant de nouvelle inscription */
.edm-reg-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.edm-reg-steps li { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 9px 10px; border: 1px solid var(--edm-line); border-radius: 12px; background: var(--edm-surface); color: var(--edm-muted); font-size: 12px; font-weight: 650; }
.edm-reg-steps li > span { width: 24px; height: 24px; flex: 0 0 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--edm-surface-2); font-size: 11px; font-weight: 800; }
.edm-reg-steps li.is-active { border-color: var(--edm-brand); color: var(--edm-brand-ink); background: var(--edm-brand-soft); }
.edm-reg-steps li.is-active > span { background: var(--edm-brand); color: #fff; }
.edm-reg-steps li.is-complete { color: var(--edm-ink-2); }
.edm-reg-steps li.is-complete > span { background: var(--edm-success-soft); color: var(--edm-success); }
.edm-reg-panel[hidden] { display: none !important; }
.edm-registration-precheck .edm-toolbar { margin: 0; padding: 0; border: 0; box-shadow: none; }
.edm-registration-finance-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 22px; align-items: start; }
.edm-tariff-preview { min-height: 100px; padding: 14px; border: 1px solid var(--edm-line); border-radius: 12px; background: var(--edm-surface-2); }
.edm-tariff-preview .edm-list { margin-top: 10px; }
.edm-tariff-total { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--edm-line); font-weight: 800; }
.edm-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.edm-review-card { min-width: 0; padding: 14px; border: 1px solid var(--edm-line); border-radius: 12px; background: var(--edm-surface-2); display: grid; gap: 5px; }
.edm-review-card > span { color: var(--edm-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.edm-review-card > strong { overflow-wrap: anywhere; }
.edm-review-card > small { color: var(--edm-muted); }
.edm-confirm-registration { margin-top: 18px; padding: 14px; border: 1px solid var(--edm-line); border-radius: 12px; background: var(--edm-surface); }
.edm-reg-actions { justify-content: flex-end; gap: 10px; }
.edm-reg-actions [data-edm-wizard-progress] { margin-right: auto; }
.edm-card--subtle { background: var(--edm-surface-2); box-shadow: none; }
.edm-subtitle { margin: 18px 0 10px; font-size: 14px; }
@media (max-width: 980px) {
  .edm-reg-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .edm-registration-finance-grid, .edm-review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .edm-reg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edm-reg-steps li { padding: 7px 8px; }
  .edm-reg-actions { flex-wrap: wrap; }
  .edm-reg-actions [data-edm-wizard-progress] { flex-basis: 100%; order: -1; }
}


/* EduManager 2.6.2 — inscription en 5 étapes + photo mobile */
.edm-reg-steps--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.edm-registration-photo { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px; border: 1px solid var(--edm-line); border-radius: 14px; background: var(--edm-surface-2); }
.edm-registration-photo__preview { width: 140px; height: 160px; border-radius: 14px; overflow: hidden; border: 1px dashed var(--edm-line-strong); background: var(--edm-surface); display: grid; place-items: center; }
.edm-registration-photo__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.edm-registration-photo__preview img[hidden], .edm-registration-photo__placeholder[hidden] { display: none !important; }
.edm-registration-photo__placeholder { height: 100%; width: 100%; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--edm-muted); text-align: center; }
.edm-registration-photo__placeholder span { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--edm-surface-2); border: 1px solid var(--edm-line); }
.edm-registration-photo__actions { min-width: 0; }
.edm-photo-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.edm-photo-buttons label.edm-btn { cursor: pointer; }
@media (max-width: 760px) {
  .edm-reg-steps--five { grid-template-columns: 1fr; gap: 5px; }
  .edm-reg-steps--five li { display: none; }
  .edm-reg-steps--five li.is-active { display: flex; }
  .edm-registration-photo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .edm-registration-photo__actions { width: 100%; }
  .edm-photo-buttons { justify-content: center; }
}

/* EduManager 2.6.3 — recadrage photo + aperçu finance inscription */
.edm-registration-photo__preview { width: 150px; height: 200px; }
.edm-finance-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.edm-finance-preview .edm-stat { min-width: 0; }
.edm-finance-preview .edm-stat__value { font-size: 16px; }
.edm-photo-editor[hidden] { display: none !important; }
.edm-photo-editor { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 18px; }
.edm-photo-editor__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .72); backdrop-filter: blur(2px); }
.edm-photo-editor__dialog { position: relative; z-index: 1; width: min(92vw, 520px); max-height: 94vh; overflow: auto; background: var(--edm-surface); border: 1px solid var(--edm-line); border-radius: 18px; box-shadow: 0 24px 70px rgba(15, 23, 42, .35); padding: 18px; }
.edm-photo-crop-stage { width: min(300px, 78vw); aspect-ratio: 3 / 4; margin: 12px auto; position: relative; overflow: hidden; border-radius: 14px; background: #111827; touch-action: none; user-select: none; }
.edm-photo-crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.edm-photo-crop-stage canvas:active { cursor: grabbing; }
.edm-photo-crop-guide { pointer-events: none; position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.92); box-shadow: inset 0 0 0 999px rgba(15,23,42,.08); }
.edm-photo-crop-guide::before, .edm-photo-crop-guide::after { content: ""; position: absolute; background: rgba(255,255,255,.48); }
.edm-photo-crop-guide::before { left: 33.333%; right: 33.333%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,.48); border-right: 1px solid rgba(255,255,255,.48); background: none; }
.edm-photo-crop-guide::after { top: 33.333%; bottom: 33.333%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,.48); border-bottom: 1px solid rgba(255,255,255,.48); background: none; }
.edm-photo-editor__controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.edm-photo-editor__controls label { flex: 1 1 180px; display: flex; align-items: center; gap: 10px; }
.edm-photo-editor__controls input[type="range"] { width: 100%; }
.edm-photo-editor-open { overflow: hidden; }
@media (max-width: 800px) {
  .edm-finance-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .edm-finance-preview { grid-template-columns: 1fr; }
  .edm-photo-editor { padding: 8px; }
  .edm-photo-editor__dialog { width: 96vw; padding: 12px; border-radius: 14px; }
  .edm-photo-editor__controls .edm-btn { flex: 1 1 auto; }
}

/* V2.6.3 — remplacement de photo pendant la réinscription */
.edm-reenrollment-photo {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin: 14px 0 20px;
  padding: 16px;
  border: 1px solid var(--edm-line);
  border-radius: 14px;
  background: var(--edm-surface-2);
}
.edm-reenrollment-photo > .edm-photo-editor { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .edm-reenrollment-photo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .edm-reenrollment-photo .edm-registration-photo__actions { width: 100%; }
}

/* P4 — les créneaux en brouillon restent visuellement distincts de la version publiée. */
.edm-tt__slot.is-draft { opacity: .72; border-style: dashed; }
.edm-tt__slot.is-draft::after { content: "Brouillon"; position: absolute; top: 3px; right: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
@media print { .edm-tt__slot.is-draft { display: none !important; } }


/* ---------- Navigation repliable, thème et PWA ---------- */
.edm-app { transition: grid-template-columns .2s ease; }
.edm-sidebar { transition: transform .2s ease, opacity .15s ease, visibility .15s ease; }
.edm-app.is-sidebar-hidden { grid-template-columns: 0 minmax(0, 1fr); }
.edm-app.is-sidebar-hidden .edm-sidebar { transform: translateX(-105%); opacity: 0; visibility: hidden; pointer-events: none; }
.edm-nav__section { margin: 4px 0; }
.edm-nav__section > summary { list-style: none; cursor: pointer; user-select: none; }
.edm-nav__section > summary::-webkit-details-marker { display: none; }
.edm-nav__group { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; margin: 10px 0 4px; border-radius: 8px; }
.edm-nav__group:hover { background: var(--edm-surface-2); color: var(--edm-ink-2); }
.edm-nav__group .edm-icon { transition: transform .18s ease; }
.edm-nav__section[open] > .edm-nav__group .edm-icon { transform: rotate(180deg); }
.edm-nav__submenu { display: grid; gap: 1px; padding-left: 7px; border-left: 1px solid var(--edm-line); margin-left: 10px; }
.edm-auth__tools { position: absolute; top: 18px; right: 18px; display: flex; gap: 6px; }
.edm-theme-icon { display: inline-grid; }
[data-edm-theme="dark"] .edm-theme-icon--moon { display: none; }
[data-edm-theme="light"] .edm-theme-icon--sun { display: none; }

/* Le mode sombre repose sur les mêmes composants : seules les variables changent. */
html[data-edm-theme="dark"] { color-scheme: dark; }
html[data-edm-theme="dark"] {
  --edm-bg: #0b1120;
  --edm-surface: #111827;
  --edm-surface-2: #172033;
  --edm-line: #273449;
  --edm-line-strong: #3b4a63;
  --edm-ink: #f3f6fb;
  --edm-ink-2: #d4dbea;
  --edm-muted: #9aa8bd;
  --edm-brand-soft: color-mix(in srgb, var(--edm-brand) 22%, #111827);
  --edm-brand-ink: color-mix(in srgb, var(--edm-brand) 72%, #fff);
  --edm-success-soft: #102a1b;
  --edm-warning-soft: #30220e;
  --edm-danger-soft: #351615;
  --edm-info-soft: #14233f;
  --edm-shadow: 0 1px 2px rgba(0,0,0,.18), 0 8px 20px -10px rgba(0,0,0,.5);
  --edm-shadow-lg: 0 22px 48px -20px rgba(0,0,0,.72);
}
html[data-edm-theme="dark"] .edm-topbar { background: color-mix(in srgb, var(--edm-bg) 88%, transparent); }
html[data-edm-theme="dark"] .edm-table tbody tr:hover td { background: #151f31; }
html[data-edm-theme="dark"] .edm-field input,
html[data-edm-theme="dark"] .edm-field select,
html[data-edm-theme="dark"] .edm-field textarea,
html[data-edm-theme="dark"] .edm-row-form input,
html[data-edm-theme="dark"] .edm-search input,
html[data-edm-theme="dark"] .edm-table--inputs input,
html[data-edm-theme="dark"] input,
html[data-edm-theme="dark"] select,
html[data-edm-theme="dark"] textarea { background-color: #0f1726; color: var(--edm-ink); border-color: var(--edm-line-strong); }
html[data-edm-theme="dark"] .edm-upload__preview { background-color: #0f1726; background-image: none; }
html[data-edm-theme="dark"] .edm-code { background: #0f1726; }
html[data-edm-theme="dark"] .edm-auth__aside { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.10), transparent 40%), linear-gradient(145deg, color-mix(in srgb, var(--edm-brand) 75%, #111827), #080d18); }

@media (max-width: 900px) {
  .edm-app.is-sidebar-hidden { grid-template-columns: minmax(0, 1fr); }
  .edm-app.is-sidebar-hidden .edm-sidebar { opacity: 1; visibility: visible; pointer-events: auto; }
}

html[data-edm-theme="dark"] .edm-steps__mark,
html[data-edm-theme="dark"] .edm-checklist__mark,
html[data-edm-theme="dark"] .edm-workflow__number { background: #0f1726; }
html[data-edm-theme="dark"] .edm-table tr.is-error td { background: #2b1718; }
html[data-edm-theme="dark"] .edm-table tr.is-warning td { background: #2b2415; }
html[data-edm-theme="dark"] .edm-alert--success { color: #86efac; border-color: #265e3b; }
html[data-edm-theme="dark"] .edm-alert--error { color: #fca5a5; border-color: #6b2b2b; }
html[data-edm-theme="dark"] .edm-alert--info { color: #93c5fd; border-color: #2b4d7b; }
html[data-edm-theme="dark"] .edm-alert--warning { color: #fcd34d; border-color: #6b4d1f; }

[hidden] { display: none !important; }
@media print {
  html[data-edm-theme="dark"] {
    --edm-bg: #fff; --edm-surface: #fff; --edm-surface-2: #f8fafc; --edm-line: #ddd; --edm-line-strong: #ccc;
    --edm-ink: #111; --edm-ink-2: #333; --edm-muted: #666; color-scheme: light;
  }
}

/* Zone destructive : volontairement distincte des cartes normales. */
.edm-card--danger { border-color: #f1c0bb; }
html[data-edm-theme="dark"] .edm-card--danger { border-color: #6b2b2b; }

/* Multi-établissement : édition des périmètres utilisateurs */
.edm-scope-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin:14px 0}.edm-scope-card{border:1px solid var(--edm-border);border-radius:14px;padding:14px;background:var(--edm-surface)}.edm-scope-card strong{display:block;margin-bottom:8px}.edm-scope-card .edm-check{display:flex;gap:8px;align-items:flex-start;margin:7px 0}.edm-scope-card .edm-check--nested{padding-left:24px}.edm-scope-global{padding:12px 14px;border:1px dashed var(--edm-border);border-radius:12px;background:var(--edm-surface-subtle,rgba(127,127,127,.05))}.edm-scope-global .edm-check{display:flex;gap:8px;align-items:center}.edm-scope-default{max-width:420px;margin-top:12px}


/* V2.37 — formulaires progressifs */
.edm-reg-steps--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.edm-auto-wizard__nav { display:flex; align-items:center; gap:10px; margin-top:16px; padding-top:14px; border-top:1px solid var(--edm-line); }
.edm-auto-wizard__nav [data-edm-auto-progress] { margin-right:auto; }
.edm-auto-wizard .edm-field[hidden] { display:none !important; }
@media (max-width: 720px) {
  .edm-reg-steps--three { grid-template-columns:1fr; }
  .edm-reg-steps--three li { display:none; }
  .edm-reg-steps--three li.is-active { display:flex; }
  .edm-auto-wizard__nav { flex-wrap:wrap; }
  .edm-auto-wizard__nav [data-edm-auto-progress] { width:100%; order:-1; }
}


/* V2.39 — standard unique des formulaires : pop-up compact comme la maquette validée */
html.edm-modal-open, html.edm-modal-open body { overflow:hidden !important; }
.edm-form-modal {
  position:fixed; inset:0; z-index:100050; padding:18px;
  background:rgba(15,23,42,.46); backdrop-filter:blur(2px);
  display:flex; align-items:center; justify-content:center;
}
.edm-form-modal[hidden] { display:none !important; }
.edm-form-modal__dialog {
  width:min(520px,calc(100vw - 36px)); max-height:calc(100dvh - 36px);
  display:flex; flex-direction:column; overflow:hidden;
  border:1px solid var(--edm-line); border-radius:18px; background:var(--edm-surface);
  box-shadow:0 22px 60px rgba(15,23,42,.22);
}
.edm-form-modal__head {
  flex:0 0 auto; display:flex; align-items:flex-start; gap:14px; justify-content:space-between;
  padding:22px 22px 12px; border:0; background:var(--edm-surface);
}
.edm-form-modal__head h2 { margin:0; color:var(--edm-ink); font-size:1.08rem; line-height:1.35; font-weight:800; }
.edm-form-modal__close {
  flex:0 0 34px; width:34px; height:34px; border:0; border-radius:10px;
  background:transparent; color:var(--edm-muted); cursor:pointer; font-size:25px; line-height:1;
}
.edm-form-modal__close:hover { background:var(--edm-surface-2); color:var(--edm-ink); }
.edm-form-modal__steps { flex:0 0 auto; padding:6px 22px 18px; overflow-x:auto; scrollbar-width:thin; }
.edm-form-modal__body { min-height:0; overflow:auto; overflow-x:hidden; overscroll-behavior:contain; padding:0 22px 22px; }
.edm-form-modal__body > form { width:100%; min-width:0; margin:0; }
.edm-form-modal__body > form.edm-card { border:0; box-shadow:none; padding:0; background:transparent; }
.edm-form-modal__body > form.edm-card > .edm-card__head { display:none; }
.edm-form-modal__body > form > .edm-card,
.edm-form-modal__body > form > section.edm-card { margin:0; padding:0; border:0; border-radius:0; box-shadow:none; background:transparent; }
.edm-form-modal__body > form > .edm-card > .edm-card__head,
.edm-form-modal__body > form > section.edm-card > .edm-card__head { margin:0 0 14px; padding:0; border:0; background:transparent; }
.edm-form-modal__body > form > .edm-card > .edm-card__head h2,
.edm-form-modal__body > form > section.edm-card > .edm-card__head h2 { font-size:.95rem; }

/* Dans un pop-up, tout reste en une seule colonne : aucun champ ne peut sortir de la carte. */
.edm-form-modal .edm-form__grid,
.edm-form-modal .edm-form__grid--2,
.edm-form-modal .edm-form__grid--3,
.edm-form-modal .edm-form__grid--4,
.edm-form-modal .edm-registration-finance-grid,
.edm-form-modal .edm-review-grid,
.edm-form-modal .edm-check-grid { grid-template-columns:minmax(0,1fr) !important; }
.edm-form-modal .edm-field { width:100%; min-width:0; margin-bottom:15px; }
.edm-form-modal .edm-field > label,
.edm-form-modal .edm-field label:first-child { display:block; margin-bottom:7px; color:var(--edm-ink-2); font-size:12.5px; font-weight:750; }
.edm-form-modal .edm-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.edm-form-modal .edm-field select,
.edm-form-modal .edm-field textarea {
  width:100%; max-width:100%; min-width:0; box-sizing:border-box;
  min-height:44px; border-radius:10px; border:1px solid var(--edm-line);
  background:var(--edm-surface); color:var(--edm-ink); padding:10px 12px;
}
.edm-form-modal .edm-field textarea { min-height:92px; resize:vertical; }
.edm-form-modal .edm-field input:focus,
.edm-form-modal .edm-field select:focus,
.edm-form-modal .edm-field textarea:focus { outline:2px solid color-mix(in srgb,var(--edm-brand) 24%,transparent); outline-offset:1px; border-color:var(--edm-brand); }
.edm-form-modal .edm-subtitle { margin:16px 0 10px; font-size:.86rem; }
.edm-form-modal .edm-alert { border-radius:10px; }

/* Étapes sous forme de petites cartes numérotées, comme la référence fournie. */
.edm-form-modal .edm-reg-steps {
  display:flex !important; grid-template-columns:none !important; gap:8px; width:max-content; min-width:100%;
  list-style:none; margin:0; padding:0;
}
.edm-form-modal .edm-reg-steps li {
  flex:0 0 auto; width:auto; min-width:74px; max-width:108px; min-height:58px;
  display:grid; grid-template-columns:30px minmax(0,1fr); align-items:center; gap:6px;
  padding:7px 8px; border:1px solid #e1e6ed; border-radius:11px;
  background:var(--edm-surface); color:var(--edm-muted); font-size:11px; font-weight:700; line-height:1.15;
}
.edm-form-modal .edm-reg-steps li > span {
  width:24px; height:24px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:50%; background:var(--edm-surface-2); color:var(--edm-muted); font-size:11px; font-weight:800;
}
.edm-form-modal .edm-reg-steps li.is-active { border-color:var(--edm-brand); color:var(--edm-ink-2); background:color-mix(in srgb,var(--edm-brand) 4%,var(--edm-surface)); }
.edm-form-modal .edm-reg-steps li.is-active > span { background:var(--edm-brand); color:#fff; }
.edm-form-modal .edm-reg-steps li.is-complete > span { background:var(--edm-success-soft); color:var(--edm-success); }
.edm-form-modal__steps .edm-reg-steps { margin:0; }
.edm-form-modal .edm-auto-wizard__steps { margin:0 0 20px; overflow-x:auto; padding-bottom:2px; }
.edm-form-modal .edm-auto-wizard__nav {
  position:sticky; bottom:0; z-index:4; display:flex; align-items:center; gap:8px;
  margin:18px -22px 0; padding:13px 22px; border-top:1px solid var(--edm-line);
  background:color-mix(in srgb,var(--edm-surface) 96%,transparent);
}
.edm-form-modal .edm-auto-wizard__nav [data-edm-auto-progress] { margin-right:auto; }
.edm-form-modal .edm-form__actions,
.edm-form-modal .edm-reg-actions { gap:8px; flex-wrap:wrap; }
.edm-form-modal .edm-form__actions--sticky {
  position:sticky; bottom:-22px; z-index:3; margin:16px -22px -22px; padding:13px 22px;
  background:color-mix(in srgb,var(--edm-surface) 96%,transparent); border-top:1px solid var(--edm-line);
}
.edm-form-modal .edm-btn { min-height:40px; border-radius:10px; }
.edm-form-popup-trigger { margin:8px 0 16px; }
.edm-service-operational.is-empty .edm-form__grid { opacity:.65; }

@media (max-width:720px) {
  .edm-form-modal { padding:10px; align-items:center; }
  .edm-form-modal__dialog { width:100%; max-height:calc(100dvh - 20px); border-radius:16px; }
  .edm-form-modal__head { padding:20px 16px 10px; }
  .edm-form-modal__steps { padding:5px 16px 16px; }
  .edm-form-modal__body { padding:0 16px 18px; }
  .edm-form-modal .edm-reg-steps li { min-width:70px; max-width:96px; }
  .edm-form-modal .edm-auto-wizard__nav { margin-left:-16px; margin-right:-16px; padding-left:16px; padding-right:16px; }
  .edm-form-modal .edm-form__actions--sticky { bottom:-18px; margin-left:-16px; margin-right:-16px; margin-bottom:-18px; padding-left:16px; padding-right:16px; }
}


/* V2.41 — commandes de taille des pop-up et protection anti-débordement */
.edm-form-modal__controls { display:flex; align-items:center; gap:4px; flex:0 0 auto; }
.edm-form-modal__window-btn {
  display:inline-grid; place-items:center; width:32px; height:32px; padding:0;
  border:0; border-radius:9px; background:transparent; color:var(--edm-muted);
  cursor:pointer; font:700 18px/1 var(--edm-font);
}
.edm-form-modal__window-btn:hover { background:var(--edm-surface-2); color:var(--edm-ink); }
.edm-form-modal__dialog { transition:width .16s ease,max-height .16s ease; }
.edm-form-modal__dialog.is-expanded {
  width:min(1100px,calc(100vw - 36px)); max-height:calc(100dvh - 36px);
}
.edm-form-modal__dialog.is-reduced {
  width:min(390px,calc(100vw - 36px)); max-height:min(68dvh,620px);
}
.edm-form-modal__dialog.is-expanded .edm-form-modal__body,
.edm-form-modal__dialog.is-reduced .edm-form-modal__body { overflow:auto; }

/* Les grilles et cartes ne doivent jamais imposer une largeur supérieure au contenu principal. */
.edm-content, .edm-stack, .edm-grid, .edm-grid > *, .edm-card, .edm-card__head, .edm-card__head > *,
.edm-toolbar, .edm-page-header, .edm-form, .edm-form__grid { min-width:0; max-width:100%; }
.edm-card { overflow-wrap:anywhere; word-break:normal; }
.edm-card pre, .edm-card code, .edm-code { max-width:100%; overflow-x:auto; }
.edm-card img, .edm-card svg, .edm-card canvas { max-width:100%; }
.edm-card--flush { overflow:visible; }
.edm-table-wrap { width:100%; max-width:100%; overflow-x:auto; overflow-y:visible; -webkit-overflow-scrolling:touch; scrollbar-gutter:stable; }
.edm-table { max-width:none; }
.edm-table--wide { min-width:760px; }
.edm-table--very-wide { min-width:1040px; }
.edm-table td { max-width:360px; overflow-wrap:anywhere; word-break:normal; }
.edm-table td .edm-actions, .edm-table td .edm-btn-group { min-width:max-content; }
.edm-table input, .edm-table select, .edm-table textarea { max-width:100%; }

@media (max-width:720px) {
  .edm-form-modal__controls { gap:2px; }
  .edm-form-modal__window-btn { width:30px; height:30px; }
  .edm-form-modal__dialog.is-expanded { width:100%; max-height:calc(100dvh - 20px); }
  .edm-form-modal__dialog.is-reduced { width:min(360px,calc(100vw - 20px)); max-height:64dvh; }
  .edm-card { max-width:100%; }
  .edm-table-wrap { margin-left:0; margin-right:0; }
}


/* ---------- EduManager 2.43 — récapitulatif inscription/réinscription ---------- */
.edm-enrollment-review-hero { display:grid; grid-template-columns:auto minmax(0,1fr) minmax(190px,.55fr); gap:18px; align-items:center; padding:18px; margin-bottom:18px; border:1px solid color-mix(in srgb, var(--edm-brand) 22%, var(--edm-line)); border-radius:18px; background:linear-gradient(135deg, var(--edm-brand-soft), var(--edm-surface) 52%); }
.edm-enrollment-review-photo { width:92px; height:118px; border-radius:16px; overflow:hidden; border:1px solid var(--edm-line-strong); background:var(--edm-surface); display:grid; place-items:center; box-shadow:0 8px 22px -16px rgba(15,27,51,.45); }
.edm-enrollment-review-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.edm-enrollment-review-photo__placeholder { width:100%; height:100%; display:grid; place-items:center; color:var(--edm-muted); background:var(--edm-surface-2); }
.edm-enrollment-review-main { min-width:0; display:flex; flex-direction:column; gap:4px; }
.edm-enrollment-review-name { font-size:20px; line-height:1.2; overflow-wrap:anywhere; }
.edm-enrollment-review-paid { min-width:0; padding:14px 16px; border-radius:14px; background:var(--edm-surface); border:1px solid var(--edm-line); display:flex; flex-direction:column; gap:3px; text-align:right; }
.edm-enrollment-review-paid > span { color:var(--edm-muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.edm-enrollment-review-paid > strong { color:var(--edm-success); font-size:22px; line-height:1.15; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.edm-enrollment-review-paid > small { color:var(--edm-muted); }

/* ---------- EduManager 2.43 — tableaux de bord : cards et tableaux ---------- */
.edm-dashboard-shell { --edm-dashboard-radius:18px; display:block; min-width:0; }
.edm-dashboard-shell .edm-dashboard-hero { border-radius:22px; padding:30px; box-shadow:0 18px 45px -30px color-mix(in srgb, var(--edm-brand) 65%, #0f1b33); }
.edm-dashboard-shell .edm-card { position:relative; border-radius:var(--edm-dashboard-radius); border-color:color-mix(in srgb, var(--edm-line) 82%, transparent); box-shadow:0 10px 28px -24px rgba(15,27,51,.55), 0 1px 2px rgba(15,27,51,.03); overflow:visible; }
.edm-dashboard-shell .edm-card__head { padding-bottom:12px; border-bottom:1px solid var(--edm-line); }
.edm-dashboard-shell .edm-card__head h2 { font-size:16px; font-weight:800; color:var(--edm-ink); }
.edm-dashboard-shell .edm-dashboard-widget { background:linear-gradient(180deg, var(--edm-surface), color-mix(in srgb, var(--edm-surface-2) 45%, var(--edm-surface))); }
.edm-dashboard-shell .edm-stats { gap:14px; }
.edm-dashboard-shell .edm-stat { position:relative; min-width:0; min-height:112px; justify-content:flex-end; padding:18px; border:1px solid var(--edm-line); border-radius:16px; background:linear-gradient(145deg, var(--edm-surface), var(--edm-surface-2)); box-shadow:0 8px 24px -24px rgba(15,27,51,.75); overflow:hidden; transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.edm-dashboard-shell .edm-stat::before { content:""; position:absolute; inset:0 auto auto 0; width:100%; height:3px; background:var(--edm-brand); opacity:.72; }
.edm-dashboard-shell .edm-stat--success::before { background:var(--edm-success); }
.edm-dashboard-shell .edm-stat--warning::before { background:var(--edm-warning); }
.edm-dashboard-shell .edm-stat--danger::before { background:var(--edm-danger); }
.edm-dashboard-shell a.edm-stat:hover { transform:translateY(-2px); box-shadow:0 16px 32px -25px rgba(15,27,51,.55); }
.edm-dashboard-shell .edm-stat__value { font-size:clamp(21px,2vw,29px); line-height:1.05; overflow-wrap:anywhere; }
.edm-dashboard-shell .edm-stat__label { margin-top:5px; font-weight:650; line-height:1.35; }
.edm-dashboard-shell .edm-table-wrap { border:1px solid var(--edm-line); border-radius:14px; background:var(--edm-surface); overflow:auto; }
.edm-dashboard-shell .edm-table { border-collapse:separate; border-spacing:0; min-width:640px; }
.edm-dashboard-shell .edm-table th { position:relative; padding:11px 14px; background:var(--edm-surface-2); border-bottom:1px solid var(--edm-line-strong); color:var(--edm-muted); font-size:11px; letter-spacing:.055em; }
.edm-dashboard-shell .edm-table td { padding:12px 14px; background:var(--edm-surface); border-bottom:1px solid color-mix(in srgb, var(--edm-line) 75%, transparent); }
.edm-dashboard-shell .edm-table tbody tr:nth-child(even) td { background:color-mix(in srgb, var(--edm-surface-2) 48%, var(--edm-surface)); }
.edm-dashboard-shell .edm-table tbody tr:hover td { background:var(--edm-brand-soft); }
.edm-dashboard-shell .edm-table tbody tr:last-child td { border-bottom:0; }
.edm-dashboard-shell .edm-tiles { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:12px; }
.edm-dashboard-shell .edm-tile { min-width:0; min-height:116px; justify-content:flex-end; border-radius:16px; padding:16px; background:linear-gradient(145deg,var(--edm-surface),var(--edm-surface-2)); }
.edm-dashboard-shell .edm-tile__icon { width:40px; height:40px; border-radius:12px; margin-bottom:auto; }
.edm-dashboard-shell .edm-feed li { padding:12px 8px 12px 18px; border-radius:10px; border-bottom:0; }
.edm-dashboard-shell .edm-feed li + li { margin-top:4px; }
.edm-dashboard-shell .edm-feed li:hover { background:var(--edm-surface-2); }

@media (max-width: 760px) {
  .edm-enrollment-review-hero { grid-template-columns:76px minmax(0,1fr); gap:14px; padding:14px; }
  .edm-enrollment-review-photo { width:76px; height:98px; }
  .edm-enrollment-review-paid { grid-column:1 / -1; text-align:left; }
  .edm-dashboard-shell .edm-dashboard-hero { padding:22px 20px; border-radius:18px; }
  .edm-dashboard-shell .edm-card { border-radius:16px; }
  .edm-dashboard-shell .edm-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .edm-dashboard-shell .edm-stat { min-height:96px; padding:14px; }
  .edm-dashboard-shell .edm-table { min-width:580px; }
}
@media (max-width: 460px) {
  .edm-dashboard-shell .edm-stats { grid-template-columns:1fr; }
  .edm-enrollment-review-hero { grid-template-columns:1fr; text-align:center; }
  .edm-enrollment-review-photo { margin:0 auto; }
  .edm-enrollment-review-paid { text-align:center; }
}


/* ---------- EduManager 2.44 — cards/tableaux réellement adaptatifs ---------- */
.edm-finance-dossier,
.edm-dashboard-shell { min-width:0; max-width:100%; }
.edm-finance-dossier > *,
.edm-dashboard-shell > *,
.edm-finance-dossier .edm-card,
.edm-dashboard-shell .edm-card { min-width:0; max-width:100%; }

/* Les indicateurs financiers ne descendent plus à 150 px : les montants GNF restent lisibles. */
.edm-finance-dossier .edm-stats--finance,
.edm-dashboard-shell .edm-stats {
  grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));
  gap:14px;
}
.edm-finance-dossier .edm-stat,
.edm-dashboard-shell .edm-stat {
  min-width:0;
  min-height:106px;
  padding:16px 18px;
}
.edm-finance-dossier .edm-stat__value,
.edm-dashboard-shell .edm-stat__value {
  font-size:clamp(20px,1.7vw,28px);
  line-height:1.08;
  letter-spacing:-.025em;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:normal;
  word-break:normal;
  font-variant-numeric:tabular-nums;
}
.edm-finance-dossier .edm-stat__label,
.edm-dashboard-shell .edm-stat__label {
  min-width:0;
  overflow-wrap:anywhere;
}

/* Les blocs contenant de grands tableaux passent en pleine largeur avant d'être comprimés. */
.edm-grid--finance-panels {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
  margin-bottom:20px;
  align-items:start;
}
.edm-grid--finance-panels > * { min-width:0; }
@media (max-width: 1380px) {
  .edm-grid--finance-panels,
  .edm-dashboard-shell .edm-grid--2,
  .edm-dashboard-shell .edm-grid--widgets { grid-template-columns:minmax(0,1fr); }
}

/* Sur une card pleine largeur, un tableau n'impose plus artificiellement 640 px. */
.edm-finance-dossier .edm-table-wrap,
.edm-dashboard-shell .edm-table-wrap {
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-gutter:stable;
}
.edm-finance-dossier .edm-table,
.edm-dashboard-shell .edm-table {
  width:100%;
  max-width:100%;
  min-width:0;
  table-layout:auto;
}
.edm-finance-dossier .edm-table th,
.edm-finance-dossier .edm-table td,
.edm-dashboard-shell .edm-table th,
.edm-dashboard-shell .edm-table td {
  min-width:0;
  max-width:none;
  white-space:normal;
  overflow-wrap:anywhere;
}
.edm-finance-dossier .edm-table .edm-nowrap,
.edm-dashboard-shell .edm-table .edm-nowrap { white-space:nowrap; }

/* Mobile/tablette étroite : les lignes deviennent des fiches, donc aucune colonne n'est cachée. */
@media (max-width: 760px) {
  .edm-finance-dossier .edm-stats--finance,
  .edm-dashboard-shell .edm-stats { grid-template-columns:minmax(0,1fr); }
  .edm-finance-dossier .edm-stat__value,
  .edm-dashboard-shell .edm-stat__value { font-size:24px; }

  .edm-table--responsive { min-width:0 !important; border:0; }
  .edm-table--responsive thead { display:none; }
  .edm-table--responsive tbody,
  .edm-table--responsive tr,
  .edm-table--responsive td { display:block; width:100%; }
  .edm-table--responsive tbody { display:grid; gap:12px; }
  .edm-table--responsive tr {
    padding:8px 12px;
    border:1px solid var(--edm-line);
    border-radius:14px;
    background:var(--edm-surface);
    box-shadow:0 6px 18px -20px rgba(15,27,51,.65);
  }
  .edm-table--responsive td {
    display:grid;
    grid-template-columns:minmax(112px,.8fr) minmax(0,1.2fr);
    gap:10px;
    align-items:start;
    padding:9px 0 !important;
    border:0 !important;
    border-bottom:1px solid color-mix(in srgb,var(--edm-line) 75%,transparent) !important;
    background:transparent !important;
    text-align:left !important;
    white-space:normal !important;
  }
  .edm-table--responsive td:last-child { border-bottom:0 !important; }
  .edm-table--responsive td::before {
    content:attr(data-label);
    color:var(--edm-muted);
    font-size:11px;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
    overflow-wrap:anywhere;
  }
  .edm-table--responsive td[data-label=""]::before { display:none; }
  .edm-table--responsive .edm-inline-form { max-width:100%; }
  .edm-table--responsive .edm-inline-form input,
  .edm-table--responsive .edm-inline-form select,
  .edm-table--responsive .edm-inline-form button { max-width:100%; }
  .edm-finance-dossier .edm-table-wrap,
  .edm-dashboard-shell .edm-table-wrap { overflow-x:visible; border:0; background:transparent; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .edm-finance-dossier .edm-stats--finance,
  .edm-dashboard-shell .edm-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
