/* ─── Arcademix LMS — Frontend Builder CSS ──────────────────────────────── */

/* ── Wrapper global ──────────────────────────────────────────────────────── */
.alms-frontend-builder{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#111827;max-width:960px;margin:0 auto;}

/* ── Header instructeur ──────────────────────────────────────────────────── */
.alms-fb-header{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1.25rem 1.5rem;margin-bottom:1rem;flex-wrap:wrap;gap:1rem;}
.alms-fb-header__info{display:flex;align-items:center;gap:12px;}
.alms-fb-avatar{width:44px;height:44px;border-radius:50%;background:#ede9fe;color:#4338ca;font-weight:700;font-size:15px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.alms-fb-header__name{font-weight:700;font-size:15px;}
.alms-fb-header__role{font-size:12px;color:#6b7280;text-transform:uppercase;letter-spacing:.05em;}
.alms-fb-header__kpis{display:flex;gap:1.5rem;}
.alms-fb-kpi{text-align:center;}
.alms-fb-kpi .v{display:block;font-size:1.2rem;font-weight:700;color:#4f46e5;}
.alms-fb-kpi .l{display:block;font-size:.7rem;color:#6b7280;text-transform:uppercase;letter-spacing:.04em;}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.alms-fb-nav{display:flex;gap:.5rem;border-bottom:2px solid #e5e7eb;margin-bottom:1.5rem;flex-wrap:wrap;}
.alms-fb-nav__item{padding:.6rem 1.1rem;font-size:.875rem;font-weight:600;color:#6b7280;text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-2px;transition:color .15s,border-color .15s;}
.alms-fb-nav__item:hover,.alms-fb-nav__item--active{color:#4f46e5;border-bottom-color:#4f46e5;}
.alms-fb-nav__item--cta{margin-left:auto;background:#4f46e5;color:#fff;border-radius:8px;border-bottom:2px solid transparent;padding:.55rem 1.1rem;}
.alms-fb-nav__item--cta:hover{background:#4338ca;color:#fff;}

/* ── Section ─────────────────────────────────────────────────────────────── */
.alms-fb-section{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1.5rem 2rem;}
.alms-fb-section__header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1.25rem;gap:1rem;}
.alms-fb-section__title{font-size:1.2rem;font-weight:700;margin:0 0 .25rem;}
.alms-fb-section__subtitle{font-size:.85rem;color:#6b7280;margin:0;}

/* ── Gate (accès refusé / pending) ──────────────────────────────────────── */
.alms-fb-gate{text-align:center;padding:3rem 2rem;}
.alms-fb-gate__icon{font-size:3rem;margin-bottom:1rem;}
.alms-fb-gate h3{font-size:1.25rem;font-weight:700;margin:0 0 .75rem;}
.alms-fb-gate p{color:#6b7280;margin-bottom:1.5rem;}
.alms-fb-gate--pending{background:#fffbeb;border-radius:12px;}
.alms-fb-gate--error{background:#fef2f2;border-radius:12px;}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.alms-fb-empty{text-align:center;padding:3rem 2rem;}
.alms-fb-empty__icon{font-size:3rem;margin-bottom:1rem;}
.alms-fb-empty h3{font-size:1.1rem;font-weight:700;margin:0 0 .5rem;}
.alms-fb-empty p{color:#6b7280;margin:0 0 1.5rem;}

/* ── Grid cours ──────────────────────────────────────────────────────────── */
.alms-fb-courses-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1rem;}
.alms-fb-course-card{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;transition:box-shadow .15s;}
.alms-fb-course-card:hover{box-shadow:0 4px 16px rgba(0,0,0,.1);}
.alms-fb-course-card__thumb{aspect-ratio:16/9;position:relative;overflow:hidden;background:#f3f4f6;}
.alms-fb-course-card__thumb img{width:100%;height:100%;object-fit:cover;}
.alms-fb-course-card__thumb-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:2.5rem;background:linear-gradient(135deg,#ede9fe,#ddd6fe);}
.alms-fb-course-card__body{padding:1rem;}
.alms-fb-course-card__title{font-size:.9rem;font-weight:700;margin:0 0 .5rem;line-height:1.3;}
.alms-fb-course-card__meta{font-size:.78rem;color:#6b7280;display:flex;gap:1rem;margin-bottom:.75rem;}
.alms-fb-course-card__actions{display:flex;gap:.4rem;flex-wrap:wrap;}

/* ── Formulaire cours ────────────────────────────────────────────────────── */
.alms-fb-form{display:flex;flex-direction:column;gap:1.5rem;}
.alms-fb-form-block{border:1px solid #f3f4f6;border-radius:10px;padding:1.25rem;}
.alms-fb-form-block__title{font-size:.9rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#374151;margin:0 0 1rem;padding-bottom:.75rem;border-bottom:1px solid #f3f4f6;}
.alms-fb-form-block__desc{font-size:.83rem;color:#6b7280;margin:-.5rem 0 1rem;}
.alms-fb-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem;}
.alms-fb-field{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.85rem;}
.alms-fb-field--full{grid-column:1/-1;}
.alms-fb-field label{font-size:.83rem;font-weight:600;color:#374151;}
.alms-fb-field input[type="text"],
.alms-fb-field input[type="url"],
.alms-fb-field input[type="number"],
.alms-fb-field select,
.alms-fb-field textarea{padding:.6rem .85rem;border:1.5px solid #e5e7eb;border-radius:8px;font-size:.9rem;background:#f9fafb;transition:border-color .15s,background .15s;width:100%;}
.alms-fb-field input:focus,
.alms-fb-field select:focus,
.alms-fb-field textarea:focus{outline:none;border-color:#4f46e5;background:#fff;}
.alms-fb-field-hint{font-size:.75rem;color:#6b7280;}
.alms-fb-checkbox-label{display:flex;align-items:center;gap:.5rem;font-size:.85rem;cursor:pointer;}

/* ── Zone upload image couverture ────────────────────────────────────────── */
.alms-fb-thumb-upload-area{border:2px dashed #e5e7eb;border-radius:10px;padding:1.5rem;text-align:center;cursor:pointer;transition:border-color .15s,background .15s;min-height:120px;display:flex;align-items:center;justify-content:center;}
.alms-fb-thumb-upload-area:hover{border-color:#4f46e5;background:#faf5ff;}
#alms-fb-thumb-placeholder{display:flex;flex-direction:column;align-items:center;gap:.4rem;color:#9ca3af;pointer-events:none;}
.alms-fb-thumb-icon{font-size:2rem;display:block;}
#alms-fb-thumb-preview-img{border-radius:8px;max-width:100%;max-height:200px;object-fit:cover;pointer-events:none;}

/* ── Étapes progression formulaire ──────────────────────────────────────── */
.alms-fb-steps-hint{display:flex;align-items:center;gap:.75rem;justify-content:center;margin:.75rem 0;flex-wrap:wrap;}
.alms-fb-step{display:flex;align-items:center;gap:.4rem;opacity:.45;}
.alms-fb-step--active{opacity:1;}
.alms-fb-step__num{width:22px;height:22px;border-radius:50%;background:#e5e7eb;color:#374151;font-size:.72rem;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.alms-fb-step--active .alms-fb-step__num{background:#4f46e5;color:#fff;}
.alms-fb-step__label{font-size:.78rem;font-weight:500;color:#374151;}
.alms-fb-step__arrow{color:#9ca3af;font-size:.85rem;}

/* ── Actions formulaire ──────────────────────────────────────────────────── */
.alms-fb-form-actions{display:flex;gap:1rem;justify-content:flex-end;padding-top:.5rem;}
.alms-fb-notice-small{font-size:.78rem;color:#6b7280;text-align:center;margin:0;}

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.alms-fb-btn{display:inline-flex;align-items:center;gap:.4rem;padding:.6rem 1.2rem;border-radius:8px;font-size:.875rem;font-weight:600;cursor:pointer;border:1.5px solid transparent;text-decoration:none;transition:background .15s,transform .1s,border-color .15s;}
.alms-fb-btn--primary{background:#4f46e5;color:#fff;border-color:#4f46e5;}
.alms-fb-btn--primary:hover{background:#4338ca;border-color:#4338ca;}
.alms-fb-btn--secondary{background:#f3f4f6;color:#374151;border-color:#e5e7eb;}
.alms-fb-btn--secondary:hover{background:#e5e7eb;}
.alms-fb-btn--ghost{background:transparent;color:#6b7280;border-color:#e5e7eb;}
.alms-fb-btn--ghost:hover{background:#f9fafb;}
.alms-fb-btn--danger{background:#fef2f2;color:#dc2626;border-color:#fecaca;}
.alms-fb-btn--danger:hover{background:#fee2e2;}
.alms-fb-btn--sm{padding:.4rem .85rem;font-size:.8rem;}
.alms-fb-btn--xs{padding:.25rem .6rem;font-size:.75rem;}
.alms-fb-btn--full{width:100%;justify-content:center;}
.alms-fb-btn:disabled{opacity:.55;cursor:not-allowed;transform:none;}

/* ── Curriculum builder ──────────────────────────────────────────────────── */
#alms-fb-sections-list{display:flex;flex-direction:column;gap:.75rem;margin-bottom:1rem;}
.alms-fb-section-block{border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;background:#fff;}
.alms-fb-section-block__header{display:flex;align-items:center;gap:.75rem;padding:.8rem 1rem;background:#f9fafb;border-bottom:1px solid #f3f4f6;}
.alms-fb-section-block__title{flex:1;font-weight:600;font-size:.9rem;outline:none;border:none;background:transparent;padding:.2rem .4rem;border-radius:4px;}
.alms-fb-section-block__title:focus{background:#fff;box-shadow:0 0 0 2px #4f46e5;}
.alms-fb-section-block__actions{display:flex;gap:.4rem;}
.alms-fb-drag-handle{color:#9ca3af;cursor:grab;font-size:14px;flex-shrink:0;}
.alms-fb-lessons-list{list-style:none;margin:0;padding:0;}
.alms-fb-lesson-item{display:flex;align-items:center;gap:.65rem;padding:.6rem 1rem;border-bottom:1px solid #f9fafb;font-size:.85rem;}
.alms-fb-lesson-item:last-child{border-bottom:none;}
.alms-fb-lesson-type-icon{font-size:13px;color:#9ca3af;flex-shrink:0;}
.alms-fb-lesson-title{flex:1;font-weight:500;}
.alms-fb-lesson-actions{display:flex;gap:.35rem;margin-left:auto;}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.alms-fb-badge{display:inline-block;padding:.15rem .6rem;border-radius:999px;font-size:.7rem;font-weight:700;text-transform:uppercase;}
.alms-fb-badge--approved{background:#ecfdf5;color:#065f46;}
.alms-fb-badge--pending{background:#fffbeb;color:#92400e;}
.alms-fb-badge--draft{background:#f3f4f6;color:#374151;}
.alms-fb-badge--rejected{background:#fef2f2;color:#7f1d1d;}
.alms-fb-badge--preview{background:#eff6ff;color:#1e40af;}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.alms-fb-modal{position:relative;z-index:9999;}
.alms-fb-modal__overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);}
.alms-fb-modal__box{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;border-radius:12px;width:560px;max-width:95vw;max-height:85vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.25);}
.alms-fb-modal__box--wide{width:720px;}
.alms-fb-modal__header{display:flex;justify-content:space-between;align-items:center;padding:1.25rem 1.5rem;border-bottom:1px solid #e5e7eb;}
.alms-fb-modal__header h3{margin:0;font-size:1rem;font-weight:700;}
.alms-fb-modal__close{background:none;border:none;cursor:pointer;font-size:18px;color:#6b7280;padding:.25rem;}
.alms-fb-modal__body{padding:1.25rem 1.5rem;}
.alms-fb-modal__footer{display:flex;gap:.75rem;justify-content:flex-end;padding:1rem 1.5rem;border-top:1px solid #e5e7eb;}

/* ── Notices ─────────────────────────────────────────────────────────────── */
.alms-fb-notice{padding:.8rem 1rem;border-radius:8px;font-size:.875rem;margin-bottom:1rem;}
.alms-fb-notice--success{background:#ecfdf5;border-left:4px solid #059669;color:#064e3b;}
.alms-fb-notice--error{background:#fef2f2;border-left:4px solid #dc2626;color:#7f1d1d;}
.alms-fb-notice--info{background:#eff6ff;border-left:4px solid #3b82f6;color:#1e40af;}

/* ── Table ───────────────────────────────────────────────────────────────── */
.alms-fb-table-wrap{overflow-x:auto;margin-top:1rem;}
.alms-fb-table{width:100%;border-collapse:collapse;font-size:.875rem;}
.alms-fb-table th{text-align:left;padding:.6rem .75rem;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:#6b7280;border-bottom:2px solid #e5e7eb;}
.alms-fb-table td{padding:.7rem .75rem;border-bottom:1px solid #f3f4f6;vertical-align:middle;}
.alms-fb-table tr:last-child td{border-bottom:none;}
.alms-fb-table small{display:block;color:#6b7280;font-size:.75rem;}

/* ── Progress bar ────────────────────────────────────────────────────────── */
.alms-fb-progress{background:#e5e7eb;border-radius:999px;height:6px;overflow:hidden;margin-bottom:3px;}
.alms-fb-progress__bar{background:#4f46e5;height:100%;border-radius:999px;transition:width .3s;}

/* ── KPI cards revenus ───────────────────────────────────────────────────── */
.alms-fb-kpis-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1rem;margin-bottom:1.5rem;}
.alms-fb-kpi-card{background:#f9fafb;border-radius:10px;padding:1rem;text-align:center;}
.alms-fb-kpi-card .v{display:block;font-size:1.25rem;font-weight:700;color:#4f46e5;}
.alms-fb-kpi-card .l{display:block;font-size:.72rem;color:#6b7280;text-transform:uppercase;letter-spacing:.04em;margin-top:.3rem;}

/* ── Payout box ──────────────────────────────────────────────────────────── */
.alms-fb-payout-box{background:#f9fafb;border:1px solid #e5e7eb;border-radius:10px;padding:1.25rem;margin-bottom:1.5rem;}
.alms-fb-payout-box h3{margin:0 0 .35rem;font-size:.95rem;}
.alms-fb-payout-form{display:flex;gap:.75rem;align-items:center;margin-top:.85rem;flex-wrap:wrap;}
.alms-fb-payout-form input[type="number"]{padding:.6rem .85rem;border:1.5px solid #e5e7eb;border-radius:8px;font-size:.9rem;width:150px;}
.alms-fb-payout-form span{font-size:.85rem;color:#6b7280;font-weight:600;}

/* ── Quiz questions (dans modal) ─────────────────────────────────────────── */
.alms-fb-question-block{border:1px solid #e5e7eb;border-radius:8px;padding:1rem;margin-bottom:.75rem;}
.alms-fb-question-block__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem;}
.alms-fb-question-block__num{font-size:.75rem;font-weight:700;text-transform:uppercase;color:#4f46e5;}
.alms-fb-options-list{display:flex;flex-direction:column;gap:.4rem;margin:.5rem 0;}
.alms-fb-option-row{display:flex;align-items:center;gap:.5rem;}
.alms-fb-option-row input[type="text"]{flex:1;padding:.4rem .65rem;border:1px solid #e5e7eb;border-radius:6px;font-size:.85rem;}
.alms-fb-option-correct{width:16px;height:16px;cursor:pointer;}

@media(max-width:640px){
  .alms-fb-header{flex-direction:column;align-items:flex-start;}
  .alms-fb-grid-2{grid-template-columns:1fr;}
  .alms-fb-form-actions{flex-direction:column;}
  .alms-fb-courses-grid{grid-template-columns:1fr;}
  .alms-fb-modal__box{width:95vw;}
}

/* ── Refonte Espace instructeur — shell sidebar (charte indigo) ─────────── */
.alms-fb-shell{--fbi:#5b3ff5;--fbi-d:#4a2fd0;--fbi-50:#eef0fe;--fbi-100:#e6e5fd;--fbink:#0f172a;--fbmut:#6b7280;--fbline:#eef0f4;display:flex;align-items:flex-start;gap:24px;max-width:1360px;margin:0 auto;padding:24px 16px 60px;color:var(--fbink);}
.alms-fb-sidebar{width:250px;flex-shrink:0;position:sticky;top:16px;background:#fff;border:1px solid var(--fbline);border-radius:18px;padding:18px 16px;box-shadow:0 2px 14px rgba(17,24,39,.05);display:flex;flex-direction:column;gap:14px;}
.alms-fb-main{flex:1;min-width:0;}
.alms-fb-side__profile{display:flex;align-items:center;gap:12px;}
.alms-fb-side__avatar{width:46px;height:46px;border-radius:50%;background:var(--fbi);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.alms-fb-side__name{font-weight:800;font-size:.95rem;color:var(--fbink);line-height:1.2;}
.alms-fb-side__role{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:var(--fbmut);}
.alms-fb-side__cta{display:block;text-align:center;background:var(--fbi);color:#fff;font-weight:700;font-size:.86rem;padding:.7rem;border-radius:11px;text-decoration:none;transition:background .15s;}
.alms-fb-side__cta:hover{background:var(--fbi-d);color:#fff;}
.alms-fb-side__label{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:#9ca3af;font-weight:700;padding:2px 4px;}
.alms-fb-side__nav{display:flex;flex-direction:column;gap:2px;}
.alms-fb-side__item{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:11px;color:#374151;text-decoration:none;font-weight:600;font-size:.88rem;transition:background .15s,color .15s;}
.alms-fb-side__item:hover{background:var(--fbi-50);color:var(--fbi);}
.alms-fb-side__item.is-active{background:var(--fbi-100);color:var(--fbi);}
.alms-fb-side__kpis{display:flex;gap:8px;border-top:1px solid var(--fbline);padding-top:14px;}
.alms-fb-side__kpi{flex:1;text-align:center;}
.alms-fb-side__kpi .v{display:block;font-size:1.02rem;font-weight:800;color:var(--fbink);}
.alms-fb-side__kpi .l{display:block;font-size:.64rem;text-transform:uppercase;letter-spacing:.03em;color:var(--fbmut);}
.alms-fb-side__foot{border-top:1px solid var(--fbline);padding-top:12px;}
.alms-fb-side__student{display:flex;align-items:center;gap:8px;color:var(--fbmut);text-decoration:none;font-size:.82rem;font-weight:600;padding:9px 10px;border-radius:9px;border:1px solid var(--fbline);justify-content:center;}
.alms-fb-side__student:hover{border-color:var(--fbi);color:var(--fbi);}
.alms-fb-shell .alms-fb-section{background:transparent;border:none;padding:0;}
.alms-fb-shell .alms-fb-section__header{margin-bottom:18px;}
.alms-fb-shell .alms-fb-section__title{font-size:1.7rem;font-weight:800;letter-spacing:-.02em;}
.alms-fb-shell .alms-fb-btn--primary{background:var(--fbi);border-color:var(--fbi);}
.alms-fb-shell .alms-fb-btn--primary:hover{background:var(--fbi-d);border-color:var(--fbi-d);}
.alms-fb-shell .alms-fb-course-card{background:#fff;border:1px solid var(--fbline);border-radius:16px;box-shadow:0 2px 12px rgba(17,24,39,.05);transition:transform .18s,box-shadow .18s;}
.alms-fb-shell .alms-fb-course-card:hover{box-shadow:0 12px 28px rgba(17,24,39,.12);transform:translateY(-3px);}
@media (max-width: 860px){
  .alms-fb-shell{flex-direction:column;}
  .alms-fb-sidebar{width:100%;position:static;flex-direction:row;flex-wrap:wrap;align-items:center;}
  .alms-fb-side__profile{flex:1;}
  .alms-fb-side__nav{flex-direction:row;flex-wrap:wrap;flex-basis:100%;}
  .alms-fb-side__kpis,.alms-fb-side__foot{flex-basis:100%;border-top:none;}
}

/* ═══════════════════════════════════════════════════════════════════════════
   COURSE BUILDER — Étape 1 (3 colonnes) — refonte fidèle à la maquette
   ═══════════════════════════════════════════════════════════════════════════ */
.alms-cb{--cb:#5b3ff5;--cb-d:#4a2fd0;--cb-ink:#0f1222;--cb-mut:#6b7280;--cb-line:#e8e8ef;--cb-bg:#f7f7fb;--cb-soft:#f3f2fb;
    color:var(--cb-ink);font-size:15px;line-height:1.5;}
.alms-cb *{box-sizing:border-box;}
.alms-cb .alms-cb-svg{flex:0 0 auto;vertical-align:middle;}

/* En-tête */
.alms-cb-topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem;}
.alms-cb-back{display:inline-flex;align-items:center;gap:.35rem;font-size:.82rem;color:var(--cb-mut);text-decoration:none;margin-bottom:.5rem;}
.alms-cb-back:hover{color:var(--cb);}
.alms-cb-headline{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;}
.alms-cb-h1{font-size:1.7rem;font-weight:800;margin:0;letter-spacing:-.02em;}
.alms-cb-step{background:var(--cb-soft);color:var(--cb);font-size:.72rem;font-weight:700;padding:.28rem .7rem;border-radius:99px;}
.alms-cb-topbar__r{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;}
.alms-cb-saved{display:inline-flex;align-items:center;gap:.35rem;font-size:.78rem;color:#059669;opacity:0;transition:opacity .3s;}
.alms-cb-saved.is-visible{opacity:1;}
.alms-cb-saved .alms-cb-svg{width:16px;height:16px;}

/* Boutons */
.alms-cb-btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;font-size:.85rem;font-weight:600;
    padding:.6rem 1rem;border-radius:10px;border:1px solid transparent;cursor:pointer;text-decoration:none;line-height:1;
    transition:background .15s,border-color .15s,color .15s,box-shadow .15s;white-space:nowrap;}
.alms-cb-btn--primary{background:var(--cb);color:#fff;box-shadow:0 6px 16px -6px rgba(91,63,245,.6);}
.alms-cb-btn--primary:hover{background:var(--cb-d);color:#fff;}
.alms-cb-btn--ghost{background:#fff;color:var(--cb-ink);border-color:var(--cb-line);}
.alms-cb-btn--ghost:hover{border-color:#c9c9d6;}
.alms-cb-btn--outline{background:#fff;color:var(--cb);border-color:#d6d1f7;}
.alms-cb-btn--outline:hover{background:var(--cb-soft);}
.alms-cb-btn--danger-ghost{background:#fff;color:#dc2626;border-color:#f1c9c9;}
.alms-cb-btn--danger-ghost:hover{background:#fef2f2;}
.alms-cb-btn--sm{padding:.42rem .7rem;font-size:.78rem;border-radius:8px;}
.alms-cb-btn--block{width:100%;}
.alms-cb-btn.is-disabled{opacity:.5;pointer-events:none;}
.alms-cb-btn .alms-cb-svg{width:16px;height:16px;}

/* Héros (nouveau cours) */
.alms-cb-hero{display:flex;gap:1.1rem;background:#fff;border:1px solid var(--cb-line);border-radius:16px;padding:1.75rem;margin-bottom:1.25rem;}
.alms-cb-hero__icon{width:56px;height:56px;flex:0 0 auto;border-radius:14px;background:var(--cb-soft);color:var(--cb);display:flex;align-items:center;justify-content:center;}
.alms-cb-hero__icon .alms-cb-svg{width:28px;height:28px;}
.alms-cb-hero__body{flex:1;min-width:0;}
.alms-cb-hero__q{font-size:1.5rem;font-weight:800;margin:0 0 .3rem;letter-spacing:-.02em;}
.alms-cb-hero__sub{color:var(--cb-mut);margin:0 0 1rem;font-size:.92rem;}
.alms-cb-hero__input{width:100%;font-size:1rem;padding:.85rem 1rem;border:1.5px solid var(--cb-line);border-radius:11px;margin-bottom:.9rem;}
.alms-cb-hero__input:focus{outline:none;border-color:var(--cb);box-shadow:0 0 0 3px rgba(91,63,245,.14);}
.alms-cb-hero__input.is-error{border-color:#dc2626;}

/* Barre titre (existant) */
.alms-cb-titlebar{margin-bottom:1.25rem;}
.alms-cb-titlebar__label{display:block;font-size:.78rem;font-weight:700;color:var(--cb-mut);text-transform:uppercase;letter-spacing:.04em;margin-bottom:.4rem;}
.alms-cb-titlebar__input{width:100%;font-size:1.05rem;font-weight:600;padding:.8rem 1rem;border:1.5px solid var(--cb-line);border-radius:11px;background:#fff;}
.alms-cb-titlebar__input:focus{outline:none;border-color:var(--cb);box-shadow:0 0 0 3px rgba(91,63,245,.14);}
.alms-cb-titlebar__input.is-error{border-color:#dc2626;}

/* Grille 3 colonnes */
.alms-cb-cols{display:grid;grid-template-columns:300px minmax(0,1fr) 300px;gap:1.1rem;align-items:start;}
.alms-cb-cols.is-locked .alms-cb-structure,.alms-cb-cols.is-locked .alms-cb-editor{opacity:.55;pointer-events:none;}
.alms-cb-col{min-width:0;}
.alms-cb-structure,.alms-cb-editor,.alms-cb-progcard,.alms-cb-helpcard{background:#fff;border:1px solid var(--cb-line);border-radius:14px;}
.alms-cb-structure{padding:1rem;position:sticky;top:1rem;}
.alms-cb-col__head{display:flex;align-items:center;gap:.4rem;margin-bottom:.85rem;}
.alms-cb-col__title{font-size:.95rem;font-weight:700;margin:0;}
.alms-cb-col__info{color:#b3b3c2;display:inline-flex;cursor:help;}
.alms-cb-col__info .alms-cb-svg{width:15px;height:15px;}

/* Colonne 1 — sections/leçons */
.alms-cb-sec{border:1px solid var(--cb-line);border-radius:11px;margin-bottom:.7rem;overflow:hidden;}
.alms-cb-sec__head{display:flex;align-items:center;gap:.4rem;padding:.6rem .55rem;background:var(--cb-soft);}
.alms-cb-sec__toggle{background:none;border:none;cursor:pointer;color:var(--cb);padding:2px;display:flex;transition:transform .2s;}
.alms-cb-sec:not(.is-open) .alms-cb-sec__toggle{transform:rotate(-90deg);}
.alms-cb-sec__idx{font-size:.82rem;font-weight:700;color:var(--cb);white-space:nowrap;}
.alms-cb-sec__idx::after{content:" -";color:var(--cb-mut);font-weight:600;}
.alms-cb-sec__name{flex:1;font-size:.85rem;font-weight:600;min-width:0;outline:none;padding:2px 4px;border-radius:5px;}
.alms-cb-sec__name:focus{background:#fff;box-shadow:0 0 0 2px rgba(91,63,245,.25);}
.alms-cb-sec__del{background:none;border:none;cursor:pointer;color:#b3b3c2;padding:2px;display:flex;}
.alms-cb-sec__del:hover{color:#dc2626;}
.alms-cb-sec__del .alms-cb-svg{width:15px;height:15px;}
.alms-cb-sec:not(.is-open) .alms-cb-lessons,.alms-cb-sec:not(.is-open) .alms-cb-addlesson{display:none;}
.alms-cb-lessons{list-style:none;margin:0;padding:.3rem;}
.alms-cb-lesson{display:flex;align-items:center;gap:.45rem;padding:.5rem .5rem;border-radius:8px;cursor:pointer;transition:background .12s;}
.alms-cb-lesson:hover{background:var(--cb-soft);}
.alms-cb-lesson.is-selected{background:var(--cb-soft);box-shadow:inset 3px 0 0 var(--cb);}
.alms-cb-lesson__grip{color:#c7c7d4;display:flex;cursor:grab;}
.alms-cb-lesson__grip .alms-cb-svg{width:15px;height:15px;}
.alms-cb-lesson__check{color:#c7c7d4;display:flex;}
.alms-cb-lesson.is-selected .alms-cb-lesson__check{color:var(--cb);}
.alms-cb-lesson__check .alms-cb-svg{width:16px;height:16px;}
.alms-cb-lesson__num{font-size:.78rem;color:var(--cb-mut);font-variant-numeric:tabular-nums;}
.alms-cb-lesson__title{flex:1;font-size:.83rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.alms-cb-lesson.is-selected .alms-cb-lesson__title{color:var(--cb);font-weight:600;}
.alms-cb-lesson__badge{font-size:.62rem;font-weight:700;background:#e7fbf0;color:#0a8b52;padding:.14rem .4rem;border-radius:5px;text-transform:uppercase;}
.alms-cb-addlesson{display:flex;align-items:center;gap:.35rem;width:100%;background:none;border:none;color:var(--cb);
    font-size:.8rem;font-weight:600;cursor:pointer;padding:.45rem .55rem;border-radius:7px;}
.alms-cb-addlesson:hover{background:var(--cb-soft);}
.alms-cb-addlesson .alms-cb-svg{width:14px;height:14px;}
.alms-cb-structure__empty{text-align:center;padding:1.5rem .5rem;}
.alms-cb-structure__empty-ico{width:52px;height:52px;margin:0 auto .7rem;border-radius:12px;background:var(--cb-soft);color:#bcb6ee;display:flex;align-items:center;justify-content:center;}
.alms-cb-structure__empty-ico .alms-cb-svg{width:26px;height:26px;}
.alms-cb-structure__empty-t{font-weight:700;font-size:.9rem;margin:0 0 .25rem;}
.alms-cb-structure__empty-s{color:var(--cb-mut);font-size:.8rem;margin:0 0 .2rem;}
.alms-cb-structure #alms-cb-sections:not(:empty)+.alms-cb-structure__empty{display:none;}
.alms-cb-structure .alms-cb-btn--block{margin-top:.6rem;}

/* Colonne 2 — éditeur */
.alms-cb-editor{padding:1.5rem;min-height:420px;}
.alms-cb-empty{display:flex;gap:1rem;align-items:center;padding:2rem;background:var(--cb-bg);border:1.5px dashed var(--cb-line);border-radius:12px;}
.alms-cb-empty__ico{width:48px;height:48px;flex:0 0 auto;border-radius:11px;background:#fff;color:#bcb6ee;display:flex;align-items:center;justify-content:center;border:1px solid var(--cb-line);}
.alms-cb-empty__t{font-weight:700;margin:0 0 .2rem;}
.alms-cb-empty__s{color:var(--cb-mut);font-size:.85rem;margin:0;}
.alms-cb-panel__bcrumb{font-size:.78rem;color:var(--cb-mut);margin-bottom:.55rem;}
.alms-cb-bcrumb__sep{margin:0 .3rem;color:#c7c7d4;}
.alms-cb-panel__titlerow{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.1rem;}
.alms-cb-panel__h{font-size:1.35rem;font-weight:800;margin:0;letter-spacing:-.01em;}
.alms-cb-field{margin-bottom:1rem;}
.alms-cb-grid2{display:grid;grid-template-columns:1fr 1fr;gap:1rem;}
.alms-cb-field--check{display:flex;align-items:flex-end;padding-bottom:.7rem;}
.alms-cb-label{display:block;font-size:.82rem;font-weight:600;margin-bottom:.4rem;}
.alms-cb-label--sm{font-size:.76rem;color:var(--cb-mut);font-weight:600;}
.alms-cb-input{width:100%;font-size:.9rem;padding:.68rem .8rem;border:1.5px solid var(--cb-line);border-radius:10px;background:#fff;font-family:inherit;}
.alms-cb-input:focus{outline:none;border-color:var(--cb);box-shadow:0 0 0 3px rgba(91,63,245,.13);}
.alms-cb-input--sm{padding:.5rem .7rem;font-size:.84rem;}
.alms-cb-textarea{resize:vertical;min-height:90px;}
.alms-cb-counter{text-align:right;font-size:.72rem;color:#a1a1ae;margin-top:.25rem;}
.alms-cb-check{display:inline-flex;align-items:center;gap:.45rem;font-size:.85rem;cursor:pointer;}
.alms-cb-check input{width:16px;height:16px;accent-color:var(--cb);}

.alms-cb-block{border-top:1px solid var(--cb-line);padding-top:1.1rem;margin-top:1.1rem;}
.alms-cb-block__title{font-size:.92rem;font-weight:700;margin:0 0 .7rem;}
.alms-cb-block__row{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.3rem;}
.alms-cb-block__row .alms-cb-block__title{margin:0;}
.alms-cb-block__sub{font-size:.8rem;color:var(--cb-mut);margin:0 0 .8rem;}

/* Vidéo */
.alms-cb-video-empty{text-align:center;background:var(--cb-bg);border:1.5px dashed var(--cb-line);border-radius:12px;padding:1.6rem 1rem;}
.alms-cb-video-empty__ico{width:52px;height:52px;margin:0 auto .55rem;border-radius:50%;background:var(--cb-soft);color:var(--cb);display:flex;align-items:center;justify-content:center;}
.alms-cb-video-empty__ico .alms-cb-svg{width:26px;height:26px;}
.alms-cb-video-empty__t{font-weight:600;font-size:.88rem;margin:0 0 .35rem;}
.alms-cb-video-empty__or{color:#a1a1ae;font-size:.78rem;margin:0 0 .55rem;}
.alms-cb-hint{font-size:.72rem;color:#a1a1ae;margin:.6rem 0 0;}
.alms-cb-video-has{display:flex;align-items:center;gap:.9rem;background:var(--cb-bg);border:1px solid var(--cb-line);border-radius:12px;padding:.8rem;}
.alms-cb-video-thumb{width:96px;height:60px;flex:0 0 auto;border-radius:8px;background:#1a1730;color:#fff;display:flex;align-items:center;justify-content:center;}
.alms-cb-video-thumb .alms-cb-svg{width:26px;height:26px;}
.alms-cb-video-meta{flex:1;min-width:0;}
.alms-cb-video-name{font-weight:600;font-size:.86rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.alms-cb-video-detail{font-size:.76rem;color:var(--cb-mut);margin-top:.2rem;}
.alms-cb-video-actions{display:flex;flex-direction:column;gap:.35rem;}

/* Progress bars */
.alms-cb-progress{margin-top:.7rem;}
.alms-cb-progress__track{height:8px;background:#eceaf7;border-radius:5px;overflow:hidden;}
.alms-cb-progress__bar{height:100%;width:0;background:var(--cb);transition:width .2s;}
.alms-cb-progress__txt{font-size:.75rem;color:var(--cb-mut);margin:.35rem 0 0;}

/* Ressources */
.alms-cb-res-list{display:flex;flex-direction:column;gap:.5rem;margin:.4rem 0;}
.alms-cb-res-empty{font-size:.8rem;color:#a1a1ae;margin:.3rem 0;}
.alms-cb-res-item{display:flex;align-items:center;gap:.65rem;padding:.6rem .75rem;background:var(--cb-bg);border:1px solid var(--cb-line);border-radius:10px;}
.alms-cb-res-item__ico{font-size:1.1rem;}
.alms-cb-res-item__name{flex:1;font-size:.84rem;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.alms-cb-res-item__meta{font-size:.72rem;color:var(--cb-mut);white-space:nowrap;}
.alms-cb-res-item__del{background:none;border:none;color:#b3b3c2;cursor:pointer;display:flex;padding:2px;}
.alms-cb-res-item__del:hover{color:#dc2626;}
.alms-cb-res-item__del .alms-cb-svg{width:15px;height:15px;}

.alms-cb-panel__foot{display:flex;justify-content:flex-end;align-items:center;gap:.9rem;border-top:1px solid var(--cb-line);padding-top:1.1rem;margin-top:1.2rem;}
.alms-cb-panel__status{font-size:.8rem;color:#059669;font-weight:600;}

/* Colonne 3 — progression */
.alms-cb-progress-col{position:sticky;top:1rem;display:flex;flex-direction:column;gap:1rem;}
.alms-cb-progcard{padding:1.25rem;}
.alms-cb-progcard__title{font-size:.98rem;font-weight:700;margin:0 0 1.1rem;}
.alms-cb-stepper{list-style:none;margin:0;padding:0;}
.alms-cb-stepper__step{position:relative;display:flex;gap:.8rem;padding-bottom:1.3rem;}
.alms-cb-stepper__step:not(:last-child)::before{content:"";position:absolute;left:13px;top:30px;bottom:0;width:2px;background:var(--cb-line);}
.alms-cb-stepper__num{width:28px;height:28px;flex:0 0 auto;border-radius:50%;background:#eceaf7;color:#9a93c9;
    font-size:.82rem;font-weight:700;display:flex;align-items:center;justify-content:center;z-index:1;}
.alms-cb-stepper__step.is-active .alms-cb-stepper__num{background:var(--cb);color:#fff;}
.alms-cb-stepper__body{flex:1;min-width:0;}
.alms-cb-stepper__name{font-weight:700;font-size:.9rem;}
.alms-cb-stepper__desc{font-size:.78rem;color:var(--cb-mut);margin:.2rem 0 .5rem;}
.alms-cb-badge{display:inline-block;font-size:.68rem;font-weight:700;padding:.2rem .55rem;border-radius:6px;background:#f0f0f5;color:#8a8a99;}
.alms-cb-badge--live{background:#e7fbf0;color:#0a8b52;}
.alms-cb-checklist{list-style:none;margin:.7rem 0 0;padding:0;}
.alms-cb-checklist li{display:flex;align-items:center;gap:.5rem;padding:.28rem 0;font-size:.8rem;color:var(--cb-mut);}
.alms-cb-checklist__dot{width:14px;height:14px;flex:0 0 auto;border-radius:50%;border:2px solid #d5d5e0;position:relative;}
.alms-cb-checklist li.is-done .alms-cb-checklist__dot{background:#0a8b52;border-color:#0a8b52;}
.alms-cb-checklist li.is-done .alms-cb-checklist__dot::after{content:"";position:absolute;left:3px;top:1px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);}
.alms-cb-checklist__lbl{flex:1;}
.alms-cb-checklist li.is-done .alms-cb-checklist__lbl{color:var(--cb-ink);}
.alms-cb-checklist__val{font-weight:600;font-variant-numeric:tabular-nums;}

.alms-cb-helpcard{padding:1.1rem;display:flex;gap:.75rem;}
.alms-cb-helpcard__ico{width:34px;height:34px;flex:0 0 auto;border-radius:9px;background:var(--cb-soft);color:var(--cb);display:flex;align-items:center;justify-content:center;}
.alms-cb-helpcard__t{font-weight:700;font-size:.85rem;}
.alms-cb-helpcard__s{font-size:.78rem;color:var(--cb-mut);margin:.2rem 0 .5rem;}
.alms-cb-helpcard__link{display:inline-flex;align-items:center;gap:.3rem;font-size:.8rem;font-weight:600;color:var(--cb);text-decoration:none;}
.alms-cb-helpcard__link .alms-cb-svg{width:13px;height:13px;}

/* Barre bas */
.alms-cb-footbar{display:flex;justify-content:space-between;gap:1rem;margin-top:1.5rem;padding-top:1.25rem;border-top:1px solid var(--cb-line);flex-wrap:wrap;}

/* Responsive */
@media(max-width:1100px){
    .alms-cb-cols{grid-template-columns:260px minmax(0,1fr);}
    .alms-cb-progress-col{grid-column:1 / -1;flex-direction:row;flex-wrap:wrap;position:static;}
    .alms-cb-progcard,.alms-cb-helpcard{flex:1;min-width:260px;}
}
@media(max-width:760px){
    .alms-cb-cols{grid-template-columns:1fr;}
    .alms-cb-structure,.alms-cb-progress-col{position:static;}
    .alms-cb-grid2{grid-template-columns:1fr;}
    .alms-cb-topbar__r{width:100%;}
}

/* ═══ Peaufinage Priorité 3 — cohérence des vues instructeur ═══════════════ */
/* En-tête wizard réutilisé pour l'étape 2 (formulaire infos) */
.alms-cb--form{margin-bottom:1.1rem;}
.alms-cb--form .alms-cb-topbar{margin-bottom:0;}
.alms-fb-section--form{margin-top:0;}

/* Mini-stepper du wizard (étape 2) */
.alms-fb-steps-hint{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:0 0 1rem;padding:.9rem 1rem;background:#f7f7fb;border:1px solid #e8e8ef;border-radius:12px;}
.alms-fb-step{display:flex;align-items:center;gap:.5rem;}
.alms-fb-step__num{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700;background:#eceaf7;color:#9a93c9;}
.alms-fb-step__label{font-size:.82rem;color:#6b7280;font-weight:600;}
.alms-fb-step--active .alms-fb-step__num{background:#5b3ff5;color:#fff;}
.alms-fb-step--active .alms-fb-step__label{color:#0f1222;}
.alms-fb-step--done .alms-fb-step__num{background:#e7fbf0;color:#0a8b52;}
.alms-fb-step--done .alms-fb-step__label{color:#0f1222;}
.alms-fb-step__arrow{color:#c7c7d4;font-weight:700;}

/* Actions du formulaire : retour à gauche, actions à droite */
.alms-fb-form-actions{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;border-top:1px solid #e8e8ef;padding-top:1.2rem;margin-top:1.4rem;}
.alms-fb-form-actions__back{margin-right:auto;}

/* KPI cards (Revenus) — accent indigo cohérent */
.alms-fb-kpis-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-bottom:1.5rem;}
.alms-fb-kpi-card{background:#fff;border:1px solid #e8e8ef;border-radius:14px;padding:1.25rem 1.35rem;display:flex;flex-direction:column;gap:.3rem;}
.alms-fb-kpi-card .v{font-size:1.5rem;font-weight:800;color:#5b3ff5;letter-spacing:-.01em;}
.alms-fb-kpi-card .l{font-size:.76rem;font-weight:600;color:#6b7280;text-transform:uppercase;letter-spacing:.04em;}

/* Tables instructeur — style cohérent */
.alms-fb-table-wrap{background:#fff;border:1px solid #e8e8ef;border-radius:14px;overflow:hidden;}
.alms-fb-table{width:100%;border-collapse:collapse;}
.alms-fb-table thead th{background:#f7f7fb;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#6b7280;text-align:left;padding:.8rem 1rem;border-bottom:1px solid #e8e8ef;}
.alms-fb-table tbody td{padding:.85rem 1rem;border-bottom:1px solid #f0f0f5;font-size:.86rem;vertical-align:middle;}
.alms-fb-table tbody tr:last-child td{border-bottom:none;}
.alms-fb-table tbody tr:hover{background:#faf9ff;}

/* Encadré versement */
.alms-fb-payout-box{background:#fff;border:1px solid #e8e8ef;border-radius:14px;padding:1.35rem;margin-bottom:1.5rem;}
.alms-fb-payout-box h3{margin:0 0 .3rem;font-size:1rem;font-weight:700;}
.alms-fb-payout-form{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin-top:.8rem;}
.alms-fb-payout-form input{padding:.6rem .8rem;border:1.5px solid #e8e8ef;border-radius:10px;font-size:.9rem;max-width:180px;}
.alms-fb-payout-form input:focus{outline:none;border-color:#5b3ff5;box-shadow:0 0 0 3px rgba(91,63,245,.13);}

/* En-tête de section avec sous-titre (Étudiants) */
.alms-fb-section__header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:1.1rem;}
.alms-fb-section__subtitle{color:#6b7280;font-size:.85rem;margin:.25rem 0 0;}

/* Barre de progression (Étudiants) */
.alms-fb-progress{height:7px;background:#eceaf7;border-radius:5px;overflow:hidden;width:120px;}
.alms-fb-progress__bar{height:100%;background:#5b3ff5;border-radius:5px;}

/* Badges statut — palette cohérente */
.alms-fb-badge{display:inline-block;font-size:.68rem;font-weight:700;padding:.2rem .55rem;border-radius:6px;text-transform:uppercase;letter-spacing:.02em;}
.alms-fb-badge--approved{background:#e7fbf0;color:#0a8b52;}
.alms-fb-badge--pending{background:#fff4e5;color:#b76e00;}
.alms-fb-badge--draft{background:#f0f0f5;color:#6b7280;}
.alms-fb-badge--rejected{background:#fdecec;color:#c0342e;}

/* État vide */
.alms-fb-empty{text-align:center;padding:2.5rem 1.5rem;background:#f7f7fb;border:1.5px dashed #e8e8ef;border-radius:14px;}
.alms-fb-empty__icon{font-size:2.5rem;margin-bottom:.6rem;}
.alms-fb-empty h3{margin:.2rem 0 .3rem;font-size:1.05rem;font-weight:700;}
.alms-fb-empty p{color:#6b7280;font-size:.88rem;margin:0 0 1rem;}
