:root{--genesis-blue:#39c8ff;--genesis-blue-soft:rgba(57,200,255,.12)}
.shell.tutor-focus{grid-template-columns:268px minmax(0,1fr)}.shell.tutor-focus.sidebar-hidden{grid-template-columns:0 minmax(0,1fr)}.shell.tutor-focus.sidebar-hidden .sidebar{transform:translateX(-100%);opacity:0;pointer-events:none}.shell.tutor-focus .content{max-width:none;padding:0}.tutor-layout{height:calc(100vh - 68px);display:flex;flex-direction:column;background:radial-gradient(circle at 50% -20%,rgba(39,128,196,.16),transparent 38%),#080d15}.tutor-header{display:flex;align-items:center;justify-content:space-between;padding:18px clamp(18px,4vw,44px);border-bottom:1px solid rgba(255,255,255,.08)}.tutor-header h1{margin:3px 0 0;font-size:18px}.tutor-header span,.tutor-header small{color:#8ea2b9}.tutor-header-actions{display:flex;gap:8px}.tutor-header-actions button{border:1px solid rgba(255,255,255,.12);background:transparent;border-radius:9px;padding:8px 11px;color:#c8d4df;cursor:pointer}.tutor-thread{flex:1;overflow:auto;padding:34px max(20px,calc((100% - 850px)/2)) 170px;scroll-behavior:smooth}.tutor-empty{text-align:center;max-width:620px;margin:10vh auto;color:#9aabba}.tutor-empty .tutor-glyph{width:46px;height:46px;margin:auto auto 20px;border-radius:14px;background:linear-gradient(135deg,#0c86d8,#44d7ff);display:grid;place-items:center;color:white;font-weight:900}.tutor-empty h2{color:white;font-size:30px}.tutor-suggestions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:24px}.tutor-suggestions button{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.035);border-radius:999px;padding:9px 12px;color:#c4d0dc;cursor:pointer}.chat-message{display:grid;grid-template-columns:34px minmax(0,1fr);gap:15px;margin:0 auto 30px}.chat-message.user{grid-template-columns:minmax(0,1fr);padding-left:80px}.chat-message.user .chat-copy{justify-self:end;max-width:680px;padding:12px 16px;border-radius:18px 18px 4px 18px;background:rgba(255,255,255,.075)}.chat-avatar{width:32px;height:32px;border-radius:10px;background:linear-gradient(135deg,#087cc8,#48d9ff);display:grid;place-items:center;font-weight:900}.chat-copy{color:#e7edf3;line-height:1.72;min-width:0}.chat-copy label{display:block;margin-bottom:7px;color:#7890a8;font-size:11px;text-transform:uppercase;letter-spacing:.1em}.chat-copy p{margin:0 0 13px}.chat-copy ul,.chat-copy ol{padding-left:22px}.chat-copy code{background:#111c29;border:1px solid #26384b;border-radius:5px;padding:2px 5px}.chat-copy pre{overflow:auto;padding:14px;border:1px solid #223245;border-radius:12px;background:#07101b}.chat-copy a{color:#62d6ff}.stream-caret:after{content:"";display:inline-block;width:7px;height:17px;margin-left:3px;background:#58d7ff;vertical-align:-3px;animation:blink 1s infinite}@keyframes blink{50%{opacity:0}}.tutor-compose-zone{position:absolute;left:0;right:0;bottom:0;padding:48px max(20px,calc((100% - 850px)/2)) 20px;background:linear-gradient(transparent,#080d15 42%)}.tutor-layout{position:relative}.tutor-compose{border:1px solid rgba(113,190,238,.25);border-radius:18px;background:#101925;box-shadow:0 20px 60px rgba(0,0,0,.35);padding:12px}.tutor-compose textarea{width:100%;min-height:30px;max-height:170px;resize:none;border:0;outline:0;background:transparent;color:white;padding:7px;font:inherit}.tutor-compose footer{display:flex;align-items:center;justify-content:space-between}.tutor-compose small{color:#7890a8}.tutor-send{width:36px;height:36px;border:0;border-radius:11px;background:#2bbef7;color:#03111c;font-weight:900;cursor:pointer}.tutor-send[disabled]{opacity:.45;cursor:not-allowed}.jump-latest{position:absolute;right:28px;bottom:130px;border:1px solid #294057;border-radius:999px;background:#0f1925;color:#d9e8f5;padding:8px 12px;cursor:pointer}.exercise-feedback{margin:24px 0;padding:26px;border:1px solid rgba(78,184,235,.28);border-radius:20px;background:linear-gradient(145deg,rgba(20,55,78,.72),rgba(10,20,31,.9))}.feedback-status{display:flex;align-items:center;gap:10px}.feedback-status b{font-size:20px}.feedback-status.correct{color:#74dfb0}.feedback-status.partial{color:#ffd17a}.feedback-status.review{color:#ff9b9b}.feedback-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.feedback-grid article{padding:17px;border-radius:13px;background:rgba(255,255,255,.035)}.feedback-grid h3{margin:0 0 8px;font-size:13px;color:#9fc5de}.feedback-grid p{margin:0;color:#d2dce5;line-height:1.6}.retry-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-top:17px;border-top:1px solid rgba(255,255,255,.08)}.attempt-summary{display:flex;gap:10px;align-items:center}.attempt-result{font-size:11px;border:1px solid rgba(255,255,255,.14);border-radius:999px;padding:4px 8px}.admin-shell{min-height:calc(100vh - 68px);padding:34px;background:#080d15}.admin-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:28px}.admin-head h1{margin:5px 0;font-size:38px}.admin-tabs{display:flex;gap:7px;flex-wrap:wrap}.admin-tabs button{border:1px solid rgba(255,255,255,.11);background:#101823;color:#aebdca;border-radius:9px;padding:9px 12px;cursor:pointer}.admin-tabs button.active{border-color:#2dbef5;color:white;background:#10283a}.admin-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px}.admin-metric,.admin-panel{border:1px solid rgba(255,255,255,.09);border-radius:16px;background:#0f1722;padding:20px}.admin-metric span{color:#7f94aa;font-size:12px}.admin-metric strong{display:block;margin-top:9px;font-size:28px}.admin-panel{margin-top:16px}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{text-align:left;padding:12px;border-bottom:1px solid rgba(255,255,255,.07);font-size:13px}.admin-table th{color:#8095aa}.admin-table button{border:0;background:transparent;color:#55ceff;cursor:pointer}.admin-empty{padding:35px;text-align:center;color:#8ea1b4}.admin-denied{max-width:620px;margin:12vh auto;text-align:center}.video-form{display:grid;grid-template-columns:1fr 1fr;gap:13px}.video-form label{display:grid;gap:6px;color:#a9bac9;font-size:12px}.video-form input,.video-form textarea,.video-form select{border:1px solid #28394a;border-radius:9px;background:#0a121d;color:white;padding:11px}.video-form .wide{grid-column:1/-1}
@media(max-width:850px){.feedback-grid,.admin-grid,.video-form{grid-template-columns:1fr}.video-form .wide{grid-column:auto}.chat-message.user{padding-left:25px}.tutor-header small{display:none}.shell.tutor-focus,.shell.tutor-focus.sidebar-hidden{grid-template-columns:minmax(0,1fr)}}
.exercise-coach-step{min-width:0;overflow-wrap:anywhere}.exercise-coach-step h3:not(:first-of-type){margin-top:15px}.exercise-coach-step .feedback-status{margin-bottom:14px}.exercise-coach-step .feedback-status b{font-size:15px}
.exercise-official-feedback{overflow-wrap:anywhere}.exercise-official-feedback .feedback-status b{font-size:16px}.exercise-official-feedback p{margin:12px 0;color:#d2dce5;line-height:1.6}.exercise-official-feedback small{display:block;color:#a9bac9;line-height:1.5}
@media(max-width:620px){
  .shell.tutor-focus,.shell.tutor-focus .main,.shell.tutor-focus .content,.tutor-layout,.tutor-thread,.tutor-compose-zone{min-width:0;max-width:100%}
  .shell.tutor-focus{width:100%;overflow-x:clip}
  .shell.tutor-focus .topbar{gap:8px;padding:0 12px}
  .shell.tutor-focus .crumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .shell.tutor-focus .status-pill{display:none}
  .tutor-header{align-items:stretch;flex-direction:column;gap:12px;padding:16px}
  .tutor-header-actions{min-width:0;max-width:100%;flex-wrap:wrap}
  .tutor-header-actions button{min-width:0;max-width:100%;white-space:normal}
  .tutor-thread{padding:22px 16px 160px;overflow-x:hidden}
  .chat-message,.chat-message.user{min-width:0;max-width:100%;padding-left:0}
  .chat-message.user .chat-copy{max-width:100%;overflow-wrap:anywhere}
  .chat-copy,.message-content{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .chat-copy pre{max-width:100%;overflow-x:auto;overflow-wrap:normal}
  .tutor-compose-zone{left:0;right:0;padding:32px 12px 12px}
  .tutor-compose,.tutor-compose textarea{min-width:0;max-width:100%}
  .tutor-compose footer{gap:8px}
  .tutor-compose small{min-width:0;line-height:1.3}
  .tutor-send{flex:0 0 36px}
}

/* La grille Admin reste dans le viewport ; seul le tableau défile horizontalement. */
.admin-shell,.admin-panel,.admin-head{box-sizing:border-box;min-width:0;max-width:100%}
.admin-head>div{min-width:0}
.admin-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.admin-table-wrap .admin-table{min-width:780px}
.admin-table td small{display:block;overflow-wrap:anywhere}
@media(max-width:620px){
  .topbar{overflow-x:clip}
  .admin-shell{padding:18px 12px}
  .admin-head{display:block}
  .admin-head h1{font-size:30px;overflow-wrap:anywhere}
  .admin-tabs{margin-top:18px}
  .admin-panel{padding:14px}
  .admin-panel label{display:block;min-width:0;margin-bottom:10px}
  .admin-panel input,.admin-panel select{box-sizing:border-box;max-width:100%}
}

/* Le hub guide vers les seuls contenus autorisés ; le chat reste disponible. */
.tutor-hub{max-width:850px;min-width:0;margin:0 auto 32px;color:#eaf5ff}
.tutor-hub-intro{text-align:center;padding:10px 0 25px}
.tutor-hub-intro .eyebrow{font-size:11px;letter-spacing:.18em;color:#74d8ff}
.tutor-hub-intro h2{margin:12px 0;font-size:clamp(26px,3vw,38px);line-height:1.16;letter-spacing:-.025em}
.tutor-hub-intro p{margin:0;color:#aabed0;line-height:1.5}
.tutor-path-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tutor-path{display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-width:0;min-height:195px;padding:19px;border:1px solid rgba(93,195,245,.23);border-radius:18px;background:linear-gradient(155deg,rgba(28,58,82,.7),rgba(13,23,37,.92));color:#eaf5ff;cursor:pointer;transition:transform .18s ease,border-color .18s ease,background .18s ease}
.tutor-path:hover,.tutor-path.selected{transform:translateY(-2px);border-color:#59d4ff;background:linear-gradient(155deg,rgba(28,89,126,.74),rgba(13,29,48,.94))}
.tutor-path-icon{display:grid;place-items:center;width:40px;height:40px;border:1px solid rgba(100,219,255,.42);border-radius:12px;background:rgba(36,182,246,.13);color:#87e3ff;font-size:23px}
.tutor-path-copy{display:grid;gap:8px;margin-top:15px;min-width:0}
.tutor-path-copy strong{font-size:16px;line-height:1.3;overflow-wrap:anywhere}
.tutor-path-copy small{color:#b4c7d7;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.tutor-path-arrow{margin-top:auto;align-self:flex-end;color:#7ddcff;font-size:20px}
.tutor-hub-choices{min-width:0;margin-top:20px;padding:19px;border:1px solid rgba(100,191,236,.18);border-radius:18px;background:rgba(8,20,32,.85)}
.tutor-choices-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.tutor-choices-head h3{margin:5px 0 0;font-size:20px}
.tutor-choices-head button,.tutor-hub-help button{padding:8px 12px;border:1px solid rgba(122,200,239,.35);border-radius:10px;background:rgba(28,58,82,.4);color:#d9f1ff;cursor:pointer}
.tutor-hub-choices>p{margin:14px 0;color:#aebfce}
.tutor-topic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.tutor-topic{display:grid;gap:7px;min-width:0;text-align:left;padding:13px 15px;border:1px solid rgba(113,190,238,.18);border-radius:12px;background:#101d2b;color:#ecf7ff;cursor:pointer}
.tutor-topic:hover:not(:disabled){border-color:#5acfff;background:#153047}
.tutor-topic strong,.tutor-topic small{overflow-wrap:anywhere}
.tutor-topic small{color:#abc2d2;line-height:1.4}
.tutor-topic span{color:#7ddcff;font-size:12px}
.tutor-topic:disabled{opacity:.58;cursor:not-allowed}
.tutor-topic:disabled span{color:#b8c3cb}
.tutor-hub-unavailable{padding:17px;border-radius:11px;background:rgba(255,255,255,.04);color:#bed0dd;line-height:1.5}
.tutor-hub-help{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:17px;color:#a9bdce;font-size:12px}
.tutor-chat-history{max-width:850px;min-width:0;margin:0 auto;padding-top:22px;border-top:1px solid rgba(119,192,229,.15)}
.tutor-chat-hint{color:#94aabd;font-size:13px}
.tutor-return{display:inline-flex;margin:0 0 16px}
.tutor-hub button:focus-visible,.tutor-return:focus-visible{outline:3px solid #7be1ff;outline-offset:3px}
.tutor-compose textarea:focus-visible{outline:3px solid #7be1ff;outline-offset:3px}
@media(max-width:850px){.tutor-path-grid{grid-template-columns:1fr}.tutor-path{min-height:0;display:grid;grid-template-columns:40px minmax(0,1fr) 20px;align-items:center;gap:12px}.tutor-path-copy{margin:0}.tutor-path-arrow{margin:0;align-self:center}}
@media(max-width:620px){.tutor-hub-intro{padding:0 0 20px;text-align:left}.tutor-hub-intro h2{font-size:27px}.tutor-hub-choices{padding:14px}.tutor-choices-head{align-items:flex-start;flex-direction:column}.tutor-topic-grid{grid-template-columns:1fr}.tutor-hub-help{align-items:flex-start;flex-direction:column}.tutor-path{padding:14px}}
.evaluation-form,.evaluation-result{min-width:0}
.evaluation-question{min-width:0}
.evaluation-question legend{display:grid;gap:8px;max-width:100%;padding:0;overflow-wrap:anywhere}
.evaluation-question legend span{font-size:12px;color:var(--muted)}
.evaluation-options{display:grid;gap:10px;margin-top:14px;min-width:0}
.evaluation-choice{display:flex;align-items:flex-start;gap:12px;min-width:0;padding:13px;border:1px solid var(--line);border-radius:12px;cursor:pointer;overflow-wrap:anywhere}
.evaluation-choice input{flex:none;margin-top:3px}
.evaluation-choice span{min-width:0}
.evaluation-score{overflow-wrap:anywhere}
.tutor-exercise-focus{max-width:850px;margin:0 auto 26px;padding:20px 22px;border:1px solid rgba(74,188,234,.35);border-radius:18px;background:linear-gradient(140deg,rgba(21,58,82,.7),rgba(13,26,41,.85));overflow-wrap:anywhere}
.tutor-exercise-focus h2{margin:8px 0 14px;font-size:clamp(19px,2.4vw,25px);line-height:1.35;color:#f0f8fc}
.tutor-exercise-focus p{margin:0 0 10px;color:#d0e0eb;white-space:pre-line;line-height:1.6}
.tutor-exercise-focus small{color:#96bdcd}
.retry-row{flex-wrap:wrap}
.retry-row button{max-width:100%;white-space:normal}
@media(max-width:620px){.tutor-exercise-focus{padding:16px}.retry-row{align-items:stretch;flex-direction:column}.retry-row button{width:100%}}
@media (prefers-reduced-motion: reduce) {
  .stream-caret::after { animation: none; opacity: 1; }
}
