*{box-sizing:border-box}body{margin:0;background:#f1f6fb;color:#163e5d;font:14px/1.55 system-ui,Arial}header{background:white;border-bottom:1px solid #cfdfeb;padding:14px 4%;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}a{color:#146d9f}main{max-width:1210px;padding:18px;margin:auto}.hero{padding:26px;border-radius:15px;background:linear-gradient(110deg,#173c65,#337ca5);color:white}.hero h1{margin:4px 0}.hero span{font-weight:850;letter-spacing:.09em;font-size:11px}.catalogue,.panel,#editor{background:white;border:1px solid #d0e1ed;border-radius:12px;padding:20px;margin:18px 0}.category-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:9px}.category-grid button{display:flex;flex-direction:column;gap:8px;min-height:92px;text-align:left;font-weight:800}.category-grid small{font-size:12px;font-weight:500}.category-grid button.active{background:#175f96;color:white}.filters,.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:13px;margin:15px 0}.filters{align-items:end}.filters button{margin:0}.fields label,.filters label,.savebar label{font-weight:750}input:not([type=checkbox]),select,textarea{display:block;width:100%;padding:10px;border:1px solid #b7cfdf;border-radius:8px;background:white;color:#173e5b;font:inherit;margin-top:5px}label.check{display:flex;gap:10px;align-items:center}button{border:1px solid #bfd5e3;background:#f5fafe;color:#165b89;padding:10px 13px;border-radius:8px;font-weight:750;cursor:pointer}button:disabled{opacity:.5}#createNew,#saveDoc{background:#166ba1;color:#fff}.tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.tabs button.active{background:#166ba1;color:white}.panel{background:#fbfdff}.record{padding:14px;border:1px solid #d0e1ed;border-radius:9px;margin:8px 0;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.record small{display:block;color:#607a8a}.block{border:1px solid #cbdeec;border-radius:10px;padding:14px;margin:12px 0}.block-controls{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.block textarea{min-height:86px}.block .options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.block .options input{min-width:0}.add-actions,.savebar{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px;align-items:end}.savebar{border-top:1px solid #d0e1ed;padding-top:18px}.savebar label{flex:1;min-width:200px}#previewOutput{border:1px solid #cadfeb;border-radius:9px;margin:12px 0;padding:15px;white-space:pre-wrap}.status-pill{color:#397c5b;font-size:12px;font-weight:850}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #e0ad4d;outline-offset:2px}@media(max-width:650px){.tabs{grid-template-columns:repeat(2,1fr)}.block .options{grid-template-columns:1fr}.hero{padding:17px}}
.r258-block-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:9px;background:#edf6fd;border:1px solid #c9e0ef;border-radius:9px;padding:11px;margin:12px 0}
.r258-block-settings>label{font-weight:700}
.r258-format{display:flex;flex-wrap:wrap;align-items:end;gap:7px}
.r258-format button{padding:8px 12px}
.r258-help{color:#456a83;font-size:13px}
#previewOutput table{border-collapse:collapse;width:100%}
#previewOutput td{border:1px solid #c9dce8;padding:8px}

.r259-section{border:2px solid #2477b4;border-radius:12px;background:#f4f9fe;padding:14px;margin:16px 0}
.r259-section-head,.r259-child-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px;padding:10px;border-bottom:1px solid #c9ddeb}
.r259-section-head select{min-width:240px;max-width:340px}
.r259-section-head button{background:#176da7;color:white}
.r259-child{background:white;border:1px solid #c7ddec;border-radius:10px;padding:14px;margin:13px 0}
.r259-child>label{display:block;margin:9px 0;font-weight:650}
.r259-child textarea{min-height:105px}
.r259-fontbar{display:flex;align-items:center;flex-wrap:wrap;gap:5px;background:#eef5fb;border:1px solid #c6d8e9;border-radius:8px;padding:8px;margin:10px 0}
.r259-fontbar span{font-size:12px;font-weight:750;margin-right:8px}.r259-fontbar button{padding:7px 10px;background:white}
.r259-fontbar select{width:auto;min-width:100px;margin:0}.r259-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(max-width:720px){.r259-section-head select{min-width:0;width:100%}.r259-choices{grid-template-columns:1fr}}

/* R260 — student-like preview and fixed footer */
body{padding-bottom:128px}
#editor .savebar{position:fixed;z-index:30;bottom:0;left:50%;transform:translateX(-50%);width:min(calc(100% - 20px),1180px);margin:0;padding:10px 13px;background:#fff;box-shadow:0 -7px 24px rgba(25,57,83,.12);border:1px solid #cbdce9;border-radius:13px 13px 0 0;align-items:center}
#editor .savebar label{min-width:130px;max-width:260px}#editor .savebar button{white-space:normal}
#editor .savebar .r260-primary{background:#086abf;color:white}#editor .savebar .r260-success{background:#167648;color:white}
#editor .savebar #saveMessage{flex-basis:100%;margin:0;font-size:12px;color:#214e71}
.r260-upload{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0;padding:9px;border:1px solid #c4dbec;border-radius:9px;background:#f0f7fc}
.r260-upload input[type=file]{max-width:340px;font-size:13px}.r260-upload button{background:#17679d;color:white}
.r260-upload-state{font-size:12px;font-weight:700;color:#286383;overflow-wrap:anywhere}
#r260StudentDialog{width:min(900px,calc(100% - 24px));max-height:90vh;border:1px solid #c3d7e6;border-radius:14px;padding:20px;color:#173d5c}
#r260StudentDialog::backdrop{background:rgba(10,33,54,.72)}
.r260-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #cfdeeb}
.r260-student-block{border:1px solid #d1e1ec;padding:16px;border-radius:10px;margin:12px 0;background:#fbfdff}
.r260-student-block p{white-space:pre-wrap}.r260-student-block label{display:block;margin:9px 0;padding:8px;border:1px solid #d6e5ef;border-radius:7px}
.r260-student-block table{width:100%;border-collapse:collapse}.r260-student-block td{border:1px solid #cee0ec;padding:9px}
.r260-student-block img,.r260-student-block video{max-width:100%;height:auto}
@media(max-width:670px){body{padding-bottom:235px}#editor .savebar{gap:5px;padding:7px;max-height:230px;overflow:auto}#editor .savebar button{font-size:12px;padding:7px 8px}#editor .savebar label{display:none}}


/* R323.6.48 — justified QCM editor field always visible */
#editor .r323648-qcm-justification{display:block!important;visibility:visible!important;margin:12px 0 3px;padding:13px 15px;background:#f3f9ff;border:1px solid #7eadd0;border-left:4px solid #1775b1;border-radius:9px}
#editor .r323648-qcm-justification label{display:block;color:#163d5a;font-size:14px;font-weight:800}
#editor .r323648-qcm-justification textarea{display:block!important;visibility:visible!important;width:100%;min-height:110px;margin:8px 0;font:inherit;color:#173e5b;background:#fff}
#editor .r323648-qcm-justification small{display:block;font-size:12px;line-height:1.5;color:#436780}

/* R323.6.51 — Phrase à compléter sous-bloc section */
.r323651-cloze-instructions{padding:10px 13px;border-left:4px solid #2c7cae;background:#f1f8fd;border-radius:6px;color:#264b63;font-size:13px;line-height:1.5;margin:8px 0}
.r259-child:has(.r323651-cloze-instructions) [data-r259-text]{min-height:70px}

/* R323.6.52 — Champs du même type que les phrases à compléter des leçons */
.r352-holes{display:grid;gap:12px;margin:12px 0}
.r352-holes fieldset{border:1px solid #b7d8ee;border-radius:7px;background:#f4faff;padding:12px;min-width:0}
.r352-holes legend{font-weight:700;color:#204e74}
.r352-holes label{display:block;margin-bottom:7px}
.r352-row{display:flex;flex-wrap:wrap;gap:7px;margin:7px 0 11px}
.r352-row button{padding:8px 11px;border:1px solid #afcce0;background:#fff;color:#155b91;border-radius:5px;cursor:pointer}
.r352-row button:disabled{opacity:.42;cursor:not-allowed}
.r352-holes input,.r352-holes textarea,.r352-holes select{width:100%;box-sizing:border-box}
.r352-cloze-source{min-height:100px}

/* R323.6.56 — alignement titres, sous-titres, consignes et textes */
.r356-alignbar{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin:5px 0 10px;padding:7px 9px;border:1px solid #c6dbeb;border-radius:7px;background:#eef6fb}
.r356-alignbar small{font-size:12px;font-weight:700;color:#25516f;margin-right:6px}
.r356-alignbar button{min-width:36px;height:32px;padding:3px 6px;font-size:17px;border:1px solid #b8d0e2;border-radius:5px;background:white;color:#174b6d;cursor:pointer}
.r356-alignbar button[aria-pressed="true"]{background:#135c93;border-color:#135c93;color:white}
.r356-alignbar button:focus-visible{outline:3px solid #f4b83e;outline-offset:2px}
.r356-align-left{text-align:left}.r356-align-center{text-align:center}.r356-align-right{text-align:right}.r356-align-justify{text-align:justify}
#r356DocumentTitleBar{margin:7px 0 13px}
