/* Twaino Text Editor — Rich text editor */

.tw-te-app{max-width:1200px;margin:0 auto;padding-top:20px;font-family:inherit;color:#1a1a2e}
.tw-te-app *,.tw-te-app *::before,.tw-te-app *::after{box-sizing:border-box}

/* Header */
.tw-te-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:10px;flex-wrap:wrap}
.tw-te-header-left{display:flex;align-items:center;gap:14px}
.tw-te-label{font-size:15px;font-weight:700;color:#1a1a2e}
.tw-te-header-actions{display:flex;gap:6px;flex-wrap:wrap}

/* Gray action buttons (Copier, Effacer) */
.tw-te-btn-action{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;font-size:12px;font-weight:500;color:#6b7280;background:#fff;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;transition:all .15s;font-family:inherit;line-height:1}
.tw-te-btn-action:hover{background:#f3f4f6;color:#1a1a2e;border-color:#d1d5db}
.tw-te-btn-action svg{flex-shrink:0}

/* Green export buttons (PDF, DOCX) */
.tw-te-btn-export{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;font-size:12px;font-weight:500;color:#56aea4;background:#fff;border:1px solid #56aea4;border-radius:6px;cursor:pointer;transition:all .15s;font-family:inherit;line-height:1}
.tw-te-btn-export:hover{background:#56aea4;color:#fff;border-color:#56aea4}
.tw-te-btn-export svg{flex-shrink:0}

/* Editor card */
.tw-te-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;margin-bottom:10px}

/* Toolbar */
.tw-te-toolbar{display:flex;align-items:center;gap:2px;padding:8px 12px;background:#fafbfc;border-bottom:1px solid #e5e7eb;flex-wrap:wrap}
.tw-te-tb-btn{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:#6b7280;border-radius:4px;cursor:pointer;transition:all .15s;font-family:inherit;font-size:12px;font-weight:600;line-height:1;padding:0}
.tw-te-tb-btn:hover{background:#56aea4;color:#fff;border-color:#56aea4}
.tw-te-tb-btn.tw-te-tb-active{background:#e8f5f3;color:#56aea4}
.tw-te-tb-btn svg{flex-shrink:0}
.tw-te-tb-sep{width:1px;height:20px;background:#e5e7eb;margin:0 6px;flex-shrink:0}

/* Editor area */
.tw-te-editor{padding:20px;min-height:400px;outline:none;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:1.7;color:#1a1a2e;cursor:text;overflow-wrap:break-word;word-wrap:break-word}
.tw-te-editor:empty::before{content:attr(data-placeholder);color:#b0b5c0;pointer-events:none;display:block}
.tw-te-editor:focus{outline:none}
.tw-te-editor h1{font-size:28px;font-weight:700;line-height:1.3;margin:16px 0 8px}
.tw-te-editor h2{font-size:22px;font-weight:700;line-height:1.3;margin:14px 0 6px}
.tw-te-editor h3{font-size:18px;font-weight:600;line-height:1.4;margin:12px 0 6px}
.tw-te-editor ul,.tw-te-editor ol{margin:8px 0;padding-left:24px}
.tw-te-editor li{margin-bottom:4px}
.tw-te-editor a{color:#56aea4;text-decoration:underline}

/* Stats bar */
.tw-te-stats{display:flex;gap:6px;padding:8px 0;flex-wrap:wrap;align-items:center}
.tw-te-stat{font-size:12px;color:#6b7280}
.tw-te-stat strong{color:#1a1a2e;font-weight:700}
.tw-te-stat-sep{font-size:12px;color:#d1d5db}

/* Article toggle */
.tw-te-article-toggle{margin-top:4px;margin-bottom:12px}
.tw-te-toggle-btn{display:flex;align-items:center;gap:8px;width:100%;padding:12px 16px;background:#fff;border:1.5px solid #56aea4;border-radius:10px;cursor:pointer;font-size:14px;font-weight:600;color:#56aea4;font-family:inherit;transition:all .15s;text-align:left}
.tw-te-toggle-btn:hover{background:#f0fdf8;border-color:#4a9e94;color:#4a9e94}
.tw-te-toggle-chevron{transition:transform .25s ease;flex-shrink:0;color:#56aea4}
.tw-te-toggle-btn:hover .tw-te-toggle-chevron{color:#4a9e94}
.tw-te-toggle-btn.tw-te-toggle-open .tw-te-toggle-chevron{transform:rotate(180deg)}
.tw-te-h1{font-size:14px;font-weight:600;margin:0;padding:0;color:inherit;font-family:inherit;line-height:1.4}

/* Responsive */
@media(max-width:880px){
  .tw-te-editor{min-height:300px;padding:16px}
  .tw-te-toolbar{padding:6px 8px;gap:1px}
  .tw-te-tb-btn{width:26px;height:26px;font-size:11px}
  .tw-te-tb-sep{margin:0 4px;height:18px}
}
@media(max-width:500px){
  .tw-te-header{flex-direction:column;align-items:stretch}
  .tw-te-header-actions{flex-wrap:wrap;justify-content:flex-end}
  .tw-te-stats{flex-direction:column;gap:4px}
  .tw-te-stat-sep{display:none}
  .tw-te-editor{min-height:250px;padding:14px;font-size:14px}
  .tw-te-toolbar{gap:1px;padding:6px}
  .tw-te-tb-btn{width:24px;height:24px;font-size:10px}
  .tw-te-tb-sep{margin:0 3px;height:16px}
}
