@layer legacy {
/* Scoped shared student view: safe to use inside the owner cockpit. */
.student-space-view { --ssv-ink:#293446; --ssv-muted:#647085; --ssv-blue:#315fcd; --ssv-line:#e3e8f0; color:var(--ssv-ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.55; min-width:0; }
.student-space-view * { box-sizing:border-box; }
.student-space-view [hidden] { display:none !important; }
.student-space-view p, .student-space-view dd, .student-space-view h3, .student-space-view h4 { overflow-wrap:anywhere; }
.student-space-view p { margin:0 0 12px; }
.student-space-view h2, .student-space-view h3, .student-space-view h4 { line-height:1.35; margin:0 0 12px; }
.student-space-view h2 { font-size:1.13rem; }
.student-space-view h3 { font-size:1rem; }
.student-space-view h4 { font-size:.94rem; }
.student-space-view .ssv-welcome { font-size:1.2rem; font-weight:600; margin:22px 0; }
.student-space-view .ssv-toolbar, .student-space-view .ssv-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:16px 0; }
.student-space-view .ssv-button, .student-space-view .ssv-fold { font:inherit; min-height:48px; border:1px solid var(--ssv-blue); border-radius:8px; padding:10px 16px; color:white; background:var(--ssv-blue); cursor:pointer; touch-action:manipulation; line-height:1.45; }
.student-space-view .ssv-button:hover { background:#254dab; }
.student-space-view .ssv-secondary { color:var(--ssv-ink); background:white; border-color:#cbd4e1; }
.student-space-view .ssv-button:disabled, .student-space-view .ssv-fold:disabled { opacity:.58; cursor:default; }
.student-space-view button:focus-visible { outline:3px solid var(--ssv-blue); outline-offset:3px; }
.student-space-view .ssv-feedback { flex:1 1 240px; font-size:.875rem; color:var(--ssv-muted); margin:0; }
.student-space-view .ssv-feedback[role="alert"] { color:#983c2f; }
.student-space-view .ssv-section { border:1px solid var(--ssv-line); border-radius:12px; background:white; padding:0; margin:18px 0; overflow:hidden; box-shadow:0 2px 8px #222e3c0a; }
.student-space-view .ssv-section>h2 { margin:0; }
.student-space-view .ssv-fold { width:100%; display:flex; text-align:left; border:0; border-radius:0; color:var(--ssv-ink); background:#f6f8fc; padding:20px 24px; font-weight:600; }
.student-space-view .ssv-fold:hover { background:#edf2fb; }
.student-space-view .ssv-fold:focus-visible { outline-offset:-4px; }
.student-space-view .ssv-section-body { padding:22px 24px; }
.student-space-view .ssv-card { padding:18px; border:1px solid var(--ssv-line); border-radius:9px; margin:0 0 14px; background:white; box-shadow:none; }
.student-space-view .ssv-card:last-child { margin-bottom:0; }
.student-space-view .ssv-facts, .student-space-view .ssv-empty { color:var(--ssv-muted); font-size:.875rem; }
.student-space-view .ssv-profile { display:grid; grid-template-columns:minmax(80px,auto) 1fr; gap:8px 16px; margin:0; }
.student-space-view .ssv-profile dt { font-weight:600; }
.student-space-view .ssv-profile dd { margin:0; min-width:0; }
.student-space-view .ssv-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.student-space-view .ssv-totals>div { padding:14px; border-radius:8px; background:#edf2fd; }
.student-space-view .ssv-totals span, .student-space-view .ssv-totals strong { display:block; overflow-wrap:anywhere; }
.student-space-view .ssv-totals span { font-size:.8125rem; color:var(--ssv-muted); }
.student-space-view .ssv-totals strong { margin-top:4px; font-size:1.05rem; }
.student-space-view .ssv-resource { background:#f6f8fc; padding:16px; border-radius:8px; margin-top:14px; }
.student-space-view .ssv-resource-text { white-space:pre-wrap; }
.student-space-view video { width:100%; display:block; max-height:65vh; background:#111b28; border-radius:8px; }
.student-space-view .ssv-organizer { background:#f1f5ff; border:1px solid #cbdcf6; border-radius:12px; padding:22px; margin:16px 0; }
.student-space-view .ssv-order { padding:0; margin:18px 0; list-style:none; }
.student-space-view .ssv-order li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #d6dfef; }
.student-space-view .ssv-order li>span { overflow-wrap:anywhere; min-width:0; }
.student-space-view .ssv-order-buttons { display:flex; gap:8px; flex-shrink:0; }
.student-space-view .ssv-order-buttons button { min-width:48px; padding:10px; font-size:1.2rem; }
@media(max-width:600px) { .student-space-view .ssv-section-body { padding:18px 16px; } .student-space-view .ssv-fold { padding:18px 16px; } .student-space-view .ssv-totals { grid-template-columns:1fr; gap:8px; } .student-space-view .ssv-totals>div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; } .student-space-view .ssv-totals strong { margin:0; } .student-space-view .ssv-organizer { padding:18px 16px; } .student-space-view .ssv-actions button { flex:1 1 160px; } .student-space-view .ssv-profile { grid-template-columns:1fr; gap:4px; } .student-space-view .ssv-profile dd { margin-bottom:10px; } }
.student-space-view .ssv-profile-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; }
.student-space-view .ssv-profile-form>h3, .student-space-view .ssv-profile-form>.ssv-actions { grid-column:1/-1; }
.student-space-view .ssv-profile-form label { display:block; margin:0 0 6px; font-size:.875rem; font-weight:600; }
.student-space-view .ssv-profile-form input { display:block; min-width:0; width:100%; min-height:48px; border:1px solid #cbd4e1; border-radius:8px; padding:10px 12px; color:var(--ssv-ink); background:white; font:inherit; font-size:16px; }
.student-space-view .ssv-profile-form input:focus-visible { outline:3px solid var(--ssv-blue); outline-offset:3px; }
@media(max-width:600px) { .student-space-view .ssv-profile-form { grid-template-columns:1fr; } }
.student-space-view .ssv-plan-active { border-left:4px solid var(--ssv-blue); background:#f8faff; }
.student-space-view .ssv-plan-history { border-top:1px solid var(--ssv-line); margin-top:16px; padding-top:10px; }
.student-space-view .ssv-plan-history>summary { min-height:48px; padding:10px 0; cursor:pointer; font-weight:600; overflow-wrap:anywhere; }
.student-space-view .ssv-plan-history>summary:focus-visible { outline:3px solid var(--ssv-blue); outline-offset:3px; }
.student-space-view .ssv-plan-history>.ssv-card { margin-top:12px; }

.student-space-view a.ssv-button { display:inline-flex; align-items:center; text-decoration:none; margin:12px 0; }

.student-space-view .ssv-identity{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.student-space-view .ssv-photo{width:72px;height:72px;border-radius:50%;object-fit:cover;flex-shrink:0}

/* Même direction visuelle que le cockpit, limitée à la vue partagée. */
.student-space-view { --ssv-muted:#667184; --ssv-line:#e3e8f0; }
.student-space-view h2, .student-space-view h3, .student-space-view h4, .student-space-view .ssv-welcome { font-family:"Avenir Next",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-weight:600; letter-spacing:-.02em; }
.student-space-view .ssv-welcome { font-size:1.5rem; margin:24px 0; }
.student-space-view .ssv-section { border-radius:16px; box-shadow:0 2px 7px #222e3c04; margin:22px 0; }
.student-space-view .ssv-fold { background:white; padding:22px 26px; font-size:1.0625rem; gap:12px; border-bottom:1px solid var(--ssv-line); }
.student-space-view .ssv-fold[aria-expanded="false"] { border-bottom:0; }
.student-space-view .ssv-fold:hover { background:#f5f7fb; }
.student-space-view .ssv-section-body { padding:24px 26px; }
.student-space-view .ssv-card { border-radius:12px; padding:21px; }
.student-space-view .ssv-button { border-radius:9px; font-size:.875rem; }
.student-space-view .ssv-secondary { background:#f5f7fb; border-color:var(--ssv-line); }
.student-space-view .ssv-secondary:hover { background:#edf2fd; color:#293446; }
.student-space-view .ssv-totals { gap:16px; }
.student-space-view .ssv-totals>div { border:1px solid var(--ssv-line); background:#f5f7fb; padding:18px; border-radius:12px; }
.student-space-view .ssv-totals strong { font-size:1.35rem; font-family:"Avenir Next",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-weight:600; }
.student-space-view .ssv-resource { padding:18px; border-radius:10px; background:#f5f7fb; }
.student-space-view .ssv-organizer { border-radius:16px; background:#f2eef9; border-color:#e3dcef; padding:24px; }
.student-space-view .ssv-photo { width:68px; height:68px; }
.student-space-view .ssv-plan-active { background:#f2f6ff; border-color:#d5e0f6; border-left:4px solid #315fcd; }
.student-space-view video { border-radius:12px; }
@media(max-width:600px) { .student-space-view .ssv-fold { padding:20px; } .student-space-view .ssv-section-body { padding:20px; } .student-space-view .ssv-card { padding:18px; } .student-space-view .ssv-totals { gap:10px; } .student-space-view .ssv-totals>div { padding:15px; } .student-space-view .ssv-totals strong { font-size:1.2rem; } .student-space-view .ssv-organizer { padding:20px; } }

/* Student sections remain in the DOM so switching tabs preserves drafts. */
.student-space-view .ssv-tabs{display:flex;gap:.4rem;overflow-x:auto;max-width:100%;padding:.5rem 0;margin-bottom:1rem;scrollbar-width:thin}
.student-space-view .ssv-tabs [role="tab"]{flex:0 0 auto;white-space:nowrap;background:#fff;color:#254dab}
.student-space-view .ssv-tabs [aria-selected="true"]{background:#2860df;color:white;border-color:#2860df}
.student-space-view .ssv-tabs [aria-selected="true"]::after{content:' ✓';font-weight:700}
@media(max-width:600px){.student-space-view .ssv-tabs{flex-wrap:wrap;overflow:visible}.student-space-view .ssv-tabs [role="tab"]{flex:1 1 auto;white-space:normal}}
.student-space-view .ssv-tabs [role="tab"]:focus-visible{outline:3px solid #153b76;outline-offset:2px}
.student-space-view .ssv-tab-panel[hidden]{display:none!important}
.student-space-view .ssv-tab-panel{min-width:0}

}