.classroom-student-row{display:flex;align-items:center;gap:10px;min-width:0}
.classroom-student-row .student-row{flex:1;min-width:0}
.classroom-leader-form{flex:0 0 auto;margin:0}
.classroom-leader-form .btn{white-space:nowrap;min-height:40px;padding:9px 12px;font-size:13px}
.class-chat-panel{padding:18px}
.class-chat-messages{display:flex;flex-direction:column;gap:12px;max-height:min(62vh,680px);min-height:180px;overflow-y:auto;padding:4px 2px 16px;scroll-behavior:smooth}
.class-chat-message{max-width:min(88%,680px);align-self:flex-start;padding:11px 14px;border:1px solid #e2e9e4;border-radius:14px 14px 14px 4px;background:#f7faf8;overflow-wrap:anywhere}
.class-chat-message.mine{align-self:flex-end;border-color:#cce5d2;border-radius:14px 14px 4px 14px;background:#edf8ef}
.class-chat-message small{display:block;margin-bottom:5px;color:#66736a;font-size:12px}
.class-chat-message p{margin:0;white-space:pre-wrap;line-height:1.5}
.class-chat-form{display:flex;align-items:flex-end;gap:12px;border-top:1px solid #e6ece8;padding-top:15px}
.class-chat-form textarea{flex:1;min-width:0;resize:vertical}
.class-chat-form button{white-space:nowrap}
@media(max-width:720px){.classroom-student-row{align-items:stretch;flex-wrap:wrap}.classroom-student-row .student-row{flex-basis:100%;width:100%}.classroom-leader-form{margin-left:auto}.class-chat-panel{padding:12px}.class-chat-form{flex-direction:column;align-items:stretch}.class-chat-form button{width:100%}.class-chat-message{max-width:96%}}
.attendance-session-state{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;margin:0 0 18px;border:1px solid #dce8df;border-radius:14px;background:#f7faf7}.attendance-session-state p{margin:5px 0 0;color:#68776d;font-size:13px}.session-open{border-color:#9bd2aa;background:#f0faf2}.session-closed{border-color:#e6dfca;background:#fbfaf5}.session-not-open{border-color:#dce2e8}.task-actions>a{position:relative;min-height:132px;padding-top:48px!important}.task-bubble{position:absolute;top:15px;left:16px;display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 9px;border-radius:999px;font-weight:800;background:#edf1ee;color:#34463a}.task-bubble.attention{background:#fff0d7;color:#8a4f00}.task-bubble.done{background:#e0f5e6;color:#176b32}.task-bubble.neutral{background:#e9efff;color:#3152a3}@media(max-width:650px){.attendance-session-state{align-items:flex-start;flex-direction:column}.attendance-session-state form,.attendance-session-state .btn{width:100%}}
.chat-attachments{display:grid;gap:9px;margin-top:10px;max-width:min(100%,460px)}.chat-attachment-image{display:block;max-width:260px}.chat-attachment-image img{display:block;max-width:100%;max-height:250px;object-fit:contain;border-radius:12px;border:1px solid #dce6df}.chat-attachment-media{display:grid;gap:5px;min-width:220px}.chat-attachment-media audio{width:min(100%,360px);height:42px}.chat-attachment-media video{width:min(100%,360px);max-height:240px;border-radius:10px;background:#111}.chat-attachment-file{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 11px;border:1px solid #dce6df;border-radius:10px;background:#f7faf7;color:#193d31;font-size:13px}.chat-attachment-file small{color:#78847d}.chat-composer-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.chat-attach-label,.chat-record-button,.chat-record-stop,.chat-record-cancel{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 12px;border:1px solid #dce6df;border-radius:10px;background:#fff;color:#193d31;font:inherit;font-size:13px;font-weight:650;cursor:pointer}.chat-attach-label input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.chat-file-list{flex-basis:100%;color:#68776d;font-size:12px}.chat-record-status{color:#8a3e32;font-size:12px}.chat-record-preview{max-width:100%;height:40px}.chat-record-button[hidden],.chat-record-stop[hidden],.chat-record-cancel[hidden],.chat-record-preview[hidden]{display:none}@media(max-width:760px){.menu-open .main-area:before{content:"";position:fixed;inset:0;background:rgba(12,28,21,.42);z-index:19}.chat-composer-tools>*{max-width:100%}.chat-attachment-media video,.chat-attachment-media audio{width:100%}}

.task-bubble.unread{background:#ffe4e4;color:#b42318;box-shadow:0 0 0 3px #fff1f1}
.messages-layout{display:grid;grid-template-columns:minmax(230px,280px) minmax(0,1fr);height:min(60vh,650px);min-height:380px;padding:0;overflow:hidden}
.message-contacts{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;border-right:1px solid #e7ebe7;background:#fff}
.message-contacts-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 15px 9px}
.message-contacts-heading h3{margin:0;font-size:14px}.message-contacts-heading small{white-space:nowrap}
.message-student-search{display:flex;align-items:center;gap:8px;margin:0 12px 9px;padding:0 10px;height:38px;border:1px solid #dfe5df;border-radius:9px;color:#829087}
.message-student-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:12px}
.message-contact-list{min-height:0;overflow-y:auto;padding:0 8px 10px;overscroll-behavior:contain}
.message-contact-list .contact-link{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:42px;margin:2px 0;padding:9px 10px;border-radius:9px;font-size:12px;line-height:1.35}
.message-contact-list .contact-link>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.message-contact-list .contact-link.active{background:#eaf4ed;color:#153d31;font-weight:700}
.contact-unread{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px;font-weight:800}
.chat-area{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;overflow:hidden}
.chat-area .chat-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px}
.chat-area .chat-form{flex:none;margin:0;padding:12px;border-top:1px solid #e6ece8;background:#fff}
.chat-area .chat-form textarea{min-height:58px;max-height:130px;resize:vertical}
.chat-area .chat-form>.btn{align-self:flex-end}.chat-area .chat-composer-tools{max-width:100%}
.chat-area .chat-file-list{max-height:42px;overflow:auto}.chat-area .bubble-wrap{max-width:min(88%,620px);overflow-wrap:anywhere}
@media(max-width:760px){
 .messages-layout{display:flex;flex-direction:column;height:calc(100dvh - 320px);min-height:420px}
 .message-contacts{flex:0 0 auto;max-height:154px;border-right:0;border-bottom:1px solid #e7ebe7}
 .message-contacts-heading{padding:10px 12px 6px}.message-student-search{height:34px;margin:0 10px 6px}
 .message-contact-list{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;padding:0 10px 8px}
 .message-contact-list .contact-link{flex:none;max-width:190px;min-height:34px;margin:0;padding:7px 9px;border:1px solid #e8ece8}
 .chat-area{flex:1}.chat-area .chat-messages{padding:10px}.chat-area .chat-form{padding:9px}
 .chat-area .chat-form textarea{width:100%}.chat-area .chat-composer-tools{gap:6px}
 .chat-area .chat-attachment-media audio,.chat-area .chat-attachment-media video{max-width:100%}
}

.ai-authoring-dialog{width:min(720px,calc(100vw - 24px));max-height:min(88dvh,900px);overflow-y:auto;padding:0;border:0;border-radius:18px;box-shadow:0 24px 80px rgba(8,28,19,.28)}
.ai-authoring-dialog::backdrop{background:rgba(12,27,20,.58);backdrop-filter:blur(3px)}
.ai-authoring-dialog>.form-panel{padding:clamp(16px,4vw,28px);margin:0}
.ai-authoring-dialog h2{margin:0}.ai-authoring-dialog textarea{width:100%;resize:vertical}.ai-authoring-dialog [hidden]{display:none!important}
.ai-authoring-result{margin-top:20px;padding:16px;border:1px solid #dce8df;border-radius:14px;background:#f8fbf9}
.ai-authoring-result h3,.ai-authoring-result h4{margin:0 0 8px;color:#153d31}.ai-authoring-text{max-height:42vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.55;color:#25352b}
.ai-question-draft{margin:10px 0;padding:12px;border:1px solid #e2e9e4;border-radius:10px;background:#fff}.ai-question-draft p{margin:5px 0}.ai-question-draft small{display:block;margin-top:7px;color:#617267}
@media(max-width:600px){.ai-authoring-dialog{width:calc(100vw - 16px);max-height:92dvh;border-radius:14px}.ai-authoring-result{padding:12px}.ai-authoring-dialog .lp-actions{align-items:stretch;flex-direction:column}.ai-authoring-dialog .lp-actions .btn{width:100%}}

/* Zones de rédaction confortables pour préparer les cours depuis un ordinateur. */
.lp-editor{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;width:100%;max-width:1440px;margin-inline:auto}
.lp-editor>.form-panel{box-sizing:border-box;width:100%;max-width:none;min-width:0;padding:clamp(18px,2.2vw,32px)}
.lp-editor>.form-panel h2{margin-top:0;margin-bottom:18px}
.lp-editor .form-grid{gap:18px}
.lp-editor textarea[name="body"],.lp-editor textarea[name="instructions"]{box-sizing:border-box;width:100%;min-height:clamp(320px,48vh,680px);padding:14px 16px;resize:vertical;line-height:1.65}
.lp-editor textarea[name="youtube_urls"]{box-sizing:border-box;width:100%;min-height:clamp(130px,20vh,240px);padding:12px 14px;resize:vertical;line-height:1.55}
.lp-editor #lp-questions textarea{box-sizing:border-box;width:100%;min-height:clamp(110px,16vh,210px);padding:12px 14px;resize:vertical;line-height:1.55}
.lp-editor #lp-questions input[type="text"]{min-height:48px;padding:11px 13px}
.lp-editor .lp-actions{gap:10px;flex-wrap:wrap}
.ai-module-form{display:grid;gap:14px;width:100%;max-width:100%}
.ai-module-form textarea{box-sizing:border-box;width:100%;min-height:clamp(190px,30vh,380px);padding:13px 15px;resize:vertical;line-height:1.6}
.ai-module-form input[type="text"],.ai-module-form input:not([type]),.ai-module-form input[type="number"]{box-sizing:border-box;width:100%;min-height:46px;padding:10px 12px}
@media(max-width:760px){
 .lp-editor{gap:12px}
 .lp-editor>.form-panel{padding:16px}
 .lp-editor>.form-panel h2{margin-bottom:14px}
 .lp-editor .form-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 .lp-editor .form-grid>.wide{grid-column:1/-1}
 .lp-editor textarea[name="body"],.lp-editor textarea[name="instructions"]{min-height:min(44dvh,380px);padding:12px;line-height:1.6}
 .lp-editor textarea[name="youtube_urls"]{min-height:150px}
 .lp-editor #lp-questions textarea{min-height:125px}
 .lp-editor .lp-actions .btn{flex:1 1 100%;width:100%}
 .ai-module-form textarea{min-height:min(34dvh,280px)}
}
.lp-rich-field{box-sizing:border-box;display:block;width:100%;min-width:0}
.lp-rich-label{display:block;margin:0 0 7px;color:#26382d;font-size:14px;font-weight:700}
.lp-rich-toolbar{position:sticky;top:6px;z-index:2;display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:0;padding:9px;border:1px solid #dce6df;border-bottom:0;border-radius:12px 12px 0 0;background:#f7faf8;box-shadow:0 3px 8px rgba(19,50,35,.05)}
.lp-rich-toolbar button{display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:36px;padding:6px 9px;border:1px solid transparent;border-radius:8px;background:transparent;color:#193d31;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.lp-rich-toolbar button:hover,.lp-rich-toolbar button:focus-visible{border-color:#c9ddd0;background:#eaf4ed;outline:none}
.lp-rich-separator{width:1px;height:24px;margin:0 3px;background:#dce6df}
.lp-rich-surface{box-sizing:border-box;width:100%;min-height:clamp(420px,58vh,760px);max-height:none;overflow:auto;padding:20px 22px;border:1px solid #dce6df;border-radius:0 0 12px 12px;background:#fff;color:#23372b;font-size:15px;line-height:1.75;overflow-wrap:anywhere}
.lp-rich-surface:focus{border-color:#8db7a0;outline:3px solid rgba(49,112,77,.12)}
.lp-rich-surface[aria-invalid="true"]{border-color:#c43b36;outline-color:rgba(196,59,54,.14)}
.lp-rich-surface:empty:before{content:attr(data-placeholder);color:#929d95;pointer-events:none}
.lp-rich-surface p{margin:0 0 1em}.lp-rich-surface h2{margin:1.25em 0 .55em;font-size:1.35em}.lp-rich-surface h3{margin:1.1em 0 .5em;font-size:1.15em}.lp-rich-surface ul,.lp-rich-surface ol{padding-left:1.6em}.lp-rich-surface blockquote{margin:1em 0;padding:.5em 1em;border-left:3px solid #9bbda5;background:#f5f9f6;color:#4a5d50}
.lp-rich-error{display:block;margin-top:7px;color:#b42318;font-size:13px}.lp-rich-error[hidden]{display:none}
.lp-module-description{line-height:1.6;overflow-wrap:anywhere}.lp-module-description p{margin:0 0 .65em}.lp-module-description ul,.lp-module-description ol{padding-left:1.5em}
@media(max-width:760px){
 .lp-rich-label{font-size:13px}
 .lp-rich-toolbar{position:static;gap:4px;padding:7px}
 .lp-rich-toolbar button{min-width:36px;min-height:38px;padding:6px 8px}
 .lp-rich-separator{margin-inline:1px}
 .lp-rich-surface{min-height:min(48dvh,420px);padding:14px;font-size:14px;line-height:1.65}
}
