:root {
  --ls-ink: #17352f;
  --ls-muted: #647771;
  --ls-brand: #176b5b;
  --ls-brand-dark: #105345;
  --ls-brand-soft: #e9f5f0;
  --ls-canvas: #f5f8f6;
  --ls-line: #e2eae6;
  --ls-shadow: 0 12px 34px rgba(29, 67, 57, .06);
  --ls-sidebar-width: 260px;
}
html { scroll-behavior: smooth; }
body.ls-app { background: var(--ls-canvas) !important; color: var(--ls-ink); font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 15px; }
body.ls-app a { text-decoration: none; }
body.ls-app .text-muted, body.ls-app .text-secondary { color: var(--ls-muted) !important; }
body.ls-app h1, body.ls-app h2, body.ls-app h3, body.ls-app h4, body.ls-app h5, body.ls-app h6 { color: var(--ls-ink); letter-spacing: -.025em; }
.ls-skip-link { position: fixed; top: -70px; left: 16px; z-index: 9999; padding: 10px 16px; background: var(--ls-ink); color: white; border-radius: 10px; }
.ls-skip-link:focus { top: 12px; color: white; }
.ls-sidebar { width: var(--ls-sidebar-width) !important; max-width: var(--ls-sidebar-width) !important; margin: 0 !important; left: 0 !important; top: 0 !important; box-sizing: border-box; background: #fff !important; border: 1px solid var(--ls-line) !important; border-radius: 0 !important; box-shadow: 8px 0 36px rgba(28, 60, 50, .035); display: flex !important; flex-direction: column; height: 100vh; overflow: hidden; padding: 0; z-index: 1051; }
/* Argon impose max-width: 15.625rem !important sur navbar-expand-xs. */
body.ls-admin-shell .navbar-vertical.navbar-expand-xs.ls-sidebar { width: var(--ls-sidebar-width) !important; max-width: var(--ls-sidebar-width) !important; }
.ls-sidebar .sidenav-header { min-height: 112px; height: auto; padding: 22px 22px 14px; position: relative; }
.ls-sidebar .navbar-brand { display: flex; flex-direction: column; align-items: flex-start; padding: 0; margin: 0; width: 100%; }
.ls-logo { height: 46px; width: auto; max-width: 185px; object-fit: contain; object-position: left; }
.ls-brand-subtitle { color: var(--ls-muted); font-size: .78rem; font-weight: 600; margin-top: 5px; letter-spacing: .035em; }
.ls-sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px 20px; }
.ls-nav-label { padding: 12px 14px 5px; margin: 0; color: #799087; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.ls-nav-label-spaced { border-top: 1px solid var(--ls-line); margin-top: 18px; padding-top: 22px; }
.ls-nav-group { display: flex; flex-direction: column; gap: 3px; }
.ls-sidebar .ls-nav-group .nav-link { display: flex; align-items: center; min-height: 43px; gap: 12px; margin: 0; padding: 10px 13px; border-radius: 11px; color: #536761 !important; font-size: .89rem; font-weight: 600; transition: background .18s, color .18s; }
.ls-sidebar .ls-nav-group .nav-link i { width: 19px; text-align: center; font-size: .96rem; color: #7d9990; }
.ls-sidebar .ls-nav-group .nav-link:hover { background: #f1f7f3; color: var(--ls-brand-dark) !important; }
.ls-sidebar .ls-nav-group .nav-link.active { background: var(--ls-brand-soft) !important; color: var(--ls-brand-dark) !important; box-shadow: inset 3px 0 var(--ls-brand); }
.ls-sidebar .ls-nav-group .nav-link.active i { color: var(--ls-brand); }
.ls-sidebar .ls-nav-group .ls-nav-subitem { padding-left: 25px; font-size: .83rem; }
.ls-nav-count { margin-left: auto; border-radius: 100px; padding: 2px 8px; background: #fceee4; color: #a35220; font-size: .73rem; font-weight: 800; }
.ls-sidebar-footer { border-top: 1px solid var(--ls-line); padding: 16px; background: #fff; }
.ls-profile-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ls-ink); }
.ls-profile-link img, .ls-topbar-profile img { border-radius: 50%; object-fit: cover; background: var(--ls-brand-soft); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ls-line); }
.ls-profile-link span { display: flex; flex-direction: column; min-width: 0; }
.ls-profile-link strong { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-profile-link small { color: var(--ls-muted); font-size: .72rem; }
.ls-logout { display: block; margin: 14px 0 0 46px; font-size: .79rem; font-weight: 600; color: #a45047; }
.ls-logout:hover { color: #7b332d; }
.ls-sidebar-footer .ls-profile-link { background: #f5f9f6; border-radius: 11px; padding: 8px; }
.ls-sidebar-footer .ls-profile-link i { color: #8aa79b; font-size: .7rem; }
.ls-sidebar-footer-links { display: flex; justify-content: space-between; gap: 4px; margin-top: 8px; }
.ls-sidebar-footer-links a { flex: 1; text-align: center; border-radius: 8px; padding: 7px 2px; color: #5a7469; font-size: .73rem; font-weight: 650; white-space: nowrap; }
.ls-sidebar-footer-links a:hover { background: var(--ls-brand-soft); color: var(--ls-brand-dark); }
.ls-sidebar-footer-links i { display: block; margin-bottom: 3px; }
body.ls-app.ls-learner-shell .main-content { margin-left: 0 !important; }
.ls-learner-nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px clamp(20px, 3vw, 46px); background: #fff; border-bottom: 1px solid var(--ls-line); }
.ls-learner-brand img { width: 135px; max-height: 45px; object-fit: contain; }
.ls-learner-nav nav { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.ls-learner-nav nav a { padding: 10px 14px; border-radius: 9px; color: #577167; font-size: .87rem; font-weight: 700; }
.ls-learner-nav nav a:hover, .ls-learner-nav nav a.active { background: var(--ls-brand-soft); color: var(--ls-brand-dark); }
.ls-learner-account { display: flex; align-items: center; gap: 14px; }
.ls-learner-profile { display: flex; align-items: center; gap: 8px; color: var(--ls-ink); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.ls-learner-profile img { border-radius: 50%; object-fit: cover; border: 1px solid var(--ls-line); }
.ls-learner-signout { color: #617a70; padding: 9px; border-radius: 9px; }
.ls-learner-signout:hover { background: var(--ls-brand-soft); }
.ls-leave-impersonation { color: #a44d42; font-size: .78rem; font-weight: 700; }
.ls-learner-shell .ls-topbar { min-height: 74px; background: transparent; border: 0; padding-bottom: 0; }
.ls-learner-shell .ls-page-content { padding-top: 22px !important; }
.ls-sidebar-close { position: absolute; top: 18px; right: 12px; border: 0; background: transparent; color: var(--ls-muted); padding: 8px; }
body.ls-app.ls-admin-shell .main-content { margin-left: var(--ls-sidebar-width) !important; min-height: 100vh; }
/* Override Argon's @media(max-width:1199.98px) rule that resets margin-left to 0 (specificity 0,4,0) */
@media (min-width: 1200px) { .ls-admin-shell #contenu-principal { margin-left: var(--ls-sidebar-width) !important; } }
.ls-topbar { min-height: 96px; margin: 0 !important; padding: 22px clamp(20px, 3vw, 44px); background: #fff; border-bottom: 1px solid var(--ls-line); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.ls-topbar-leading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ls-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .76rem; color: var(--ls-muted); margin-bottom: 3px; }
.ls-breadcrumb a { color: var(--ls-brand); font-weight: 600; }
.ls-topbar h1 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.25; font-weight: 750; }
.ls-topbar-actions { display: flex; align-items: center; gap: 12px; }
.ls-topbar-profile { display: inline-flex; align-items: center; gap: 9px; color: var(--ls-ink); font-weight: 650; font-size: .84rem; white-space: nowrap; }
.ls-menu-button { border: 1px solid var(--ls-line); background: #fff; color: var(--ls-brand); border-radius: 10px; min-width: 42px; min-height: 42px; }
.ls-page-content { padding: clamp(20px, 3vw, 42px) !important; max-width: 1600px; margin-inline: auto; }
body.ls-app .card { border: 1px solid var(--ls-line); border-radius: 16px; box-shadow: var(--ls-shadow) !important; background: #fff; }
body.ls-app .card-header { background: transparent; border-bottom: 1px solid var(--ls-line); padding: 19px 24px; }
body.ls-app .card-body { padding: 23px; }
body.ls-app .btn { border-radius: 10px; font-weight: 650; box-shadow: none !important; letter-spacing: 0; }
body.ls-app .btn-primary, body.ls-app .btn-success, body.ls-app .bg-gradient-primary, body.ls-app .bg-gradient-success { background: var(--ls-brand) !important; border-color: var(--ls-brand) !important; color: #fff; }
body.ls-app .btn-primary:hover, body.ls-app .btn-success:hover { background: var(--ls-brand-dark) !important; border-color: var(--ls-brand-dark) !important; }
body.ls-app .btn-outline-primary, body.ls-app .btn-outline-success { border-color: #9dc7b8; color: var(--ls-brand); }
body.ls-app .btn-outline-primary:hover, body.ls-app .btn-outline-success:hover { background: var(--ls-brand-soft); color: var(--ls-brand-dark); }
body.ls-app .form-control, body.ls-app .form-select, body.ls-app .select2-selection { border: 1px solid #ccdcd4; border-radius: 10px !important; min-height: 42px; color: var(--ls-ink); background-color: #fff; }
body.ls-app .form-control:focus, body.ls-app .form-select:focus { border-color: var(--ls-brand); box-shadow: 0 0 0 3px rgba(23, 107, 91, .13); }
body.ls-app .switch { display: inline-flex; align-items: center; }
body.ls-app .switch input[type="checkbox"].switch { appearance: none; position: relative; width: 40px; height: 23px; margin: 0; border: 1px solid #b7ccc1; border-radius: 99px; background: #dce8e1; cursor: pointer; transition: background .15s; }
body.ls-app .switch input[type="checkbox"].switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.17); transition: transform .15s; }
body.ls-app .switch input[type="checkbox"].switch:checked { background: var(--ls-brand); border-color: var(--ls-brand); }
body.ls-app .switch input[type="checkbox"].switch:checked::after { transform: translateX(17px); }
body.ls-app .switch input[type="checkbox"].switch + label { display: none; }
body.ls-app label { color: #405b52; font-weight: 650; }
body.ls-app .table-responsive { border-radius: 13px; border: 1px solid var(--ls-line); overflow-x: auto; }
body.ls-app .table { margin-bottom: 0; color: var(--ls-ink); }
body.ls-app .table thead th { background: #f3f8f5; color: #4e665d; text-transform: uppercase; font-size: .7rem; letter-spacing: .07em; padding: 13px 15px; border-color: var(--ls-line); white-space: nowrap; }
body.ls-app .table td { padding: 14px 15px; border-color: var(--ls-line); vertical-align: middle; }
body.ls-app .table-hover tbody tr:hover { background: #f8fbf9; }
body.ls-app .badge { border-radius: 100px; font-weight: 700; letter-spacing: .01em; }
body.ls-app .alert { border-radius: 12px; border: 1px solid transparent; }
body.ls-app .alert-success { background: #e8f6ee; color: #176247; border-color: #c5e7d1; }
body.ls-app .alert-warning { background: #fff7e7; color: #825d20; border-color: #f2deb5; }
body.ls-app .alert-danger { background: #fceeed; color: #913d37; border-color: #edc9c5; }
body.ls-app .pagination { gap: 5px; }
body.ls-app .page-link { border-radius: 8px !important; color: var(--ls-brand); border-color: var(--ls-line); }
body.ls-app .page-item.active .page-link { background: var(--ls-brand); border-color: var(--ls-brand); }
body.ls-app :focus-visible { outline: 3px solid #92caba !important; outline-offset: 2px; }
.ls-sidebar-backdrop { display: none; }
@media (max-width: 1199.98px) {
  .ls-sidebar { transform: translateX(-100%) !important; transition: transform .2s ease; }
  body.ls-menu-open .ls-sidebar { transform: translateX(0) !important; }
  body.ls-app.ls-admin-shell .main-content { margin-left: 0 !important; }
  body.ls-menu-open .ls-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1050; background: rgba(14, 35, 28, .42); }
}
@media (max-width: 767.98px) {
  .ls-topbar { min-height: 78px; padding: 14px 18px; }
  .ls-topbar-profile span { display: none; }
  .ls-page-content { padding: 18px !important; }
  body.ls-app .card-body { padding: 18px; }
}
@media (max-width: 980px) {
  .ls-learner-nav { flex-wrap: wrap; gap: 10px; }
  .ls-learner-nav nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .ls-learner-nav nav a { white-space: nowrap; }
  .ls-learner-profile span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ls-sidebar, body.ls-app .card, body.ls-app .btn { transition: none !important; animation: none !important; }
}
/* Pages encore servies par le gabarit Vanguard historique. */
body.ls-legacy, body.ls-panel { background: var(--ls-canvas); color: var(--ls-ink); font-family: Inter, "Segoe UI", system-ui, sans-serif; }
body.ls-legacy .sidebar { background: #fff; border-right: 1px solid var(--ls-line); box-shadow: 8px 0 36px rgba(28,60,50,.035); }
body.ls-legacy .sidebar .nav-link { color: #52665f; margin: 2px 9px; border-radius: 9px; font-weight: 600; }
body.ls-legacy .sidebar .nav-link:hover, body.ls-legacy .sidebar .nav-link.active { color: var(--ls-brand-dark); background: var(--ls-brand-soft); }
body.ls-legacy .sidebar .user-box h5 a, body.ls-legacy .sidebar .user-box ul li a { color: var(--ls-ink); }
body.ls-legacy .sidebar .user-img img { border: 3px solid var(--ls-brand-soft); }
body.ls-legacy .navbar.fixed-top { border-top: 3px solid var(--ls-brand); box-shadow: 0 2px 16px rgba(28,60,50,.05); }
body.ls-legacy .content-page { background: var(--ls-canvas); }
body.ls-legacy .content-page main { padding-top: 30px; padding-bottom: 40px; }
body.ls-legacy .card, body.ls-panel .card { border: 1px solid var(--ls-line); border-radius: 14px; box-shadow: var(--ls-shadow); }
body.ls-legacy .btn-primary, body.ls-legacy .btn-success, body.ls-panel .btn-primary, body.ls-panel .btn-success { background: var(--ls-brand); border-color: var(--ls-brand); }
body.ls-legacy .btn-primary:hover, body.ls-legacy .btn-success:hover, body.ls-panel .btn-primary:hover, body.ls-panel .btn-success:hover { background: var(--ls-brand-dark); border-color: var(--ls-brand-dark); }
body.ls-legacy .form-control, body.ls-legacy .custom-select, body.ls-panel .form-control { border-radius: 9px; border-color: #ccdcd4; }
body.ls-legacy .table thead th, body.ls-panel .table thead th { background: #f3f8f5; color: #4e665d; border-color: var(--ls-line); }
body.ls-legacy :focus-visible, body.ls-panel :focus-visible { outline: 3px solid #92caba; outline-offset: 2px; }
.ls-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px clamp(20px,4vw,48px); background: #fff; border-bottom: 1px solid var(--ls-line); }
.ls-panel-header a:last-child { color: var(--ls-brand); font-weight: 700; }
/* Connexion */
body.ls-auth { margin: 0; min-height: 100vh; font-family: Inter, "Segoe UI", system-ui, sans-serif; color: var(--ls-ink); background: var(--ls-canvas); }
.ls-auth *, .ls-auth *::before, .ls-auth *::after { box-sizing: border-box; }
.ls-auth-shell { display: grid; grid-template-columns: minmax(350px, .9fr) minmax(440px, 1.1fr); min-height: 100vh; }
.ls-auth-story { display: flex; flex-direction: column; justify-content: space-between; gap: 60px; padding: clamp(32px, 5vw, 75px); background: linear-gradient(145deg, #14584a, #227763); color: #fff; position: relative; overflow: hidden; }
.ls-auth-story::after { content: ""; position: absolute; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; right: -220px; bottom: -150px; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 145px rgba(255,255,255,.025); pointer-events: none; }
.ls-auth-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: 10px 14px; width: max-content; position: relative; z-index: 1; }
.ls-auth-logo img { display: block; width: 170px; height: auto; }
.ls-auth-kicker { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 800; color: #70ae98; }
.ls-auth-story .ls-auth-kicker { color: #b4e0cf; }
.ls-auth-story h1 { font-size: clamp(2.2rem, 3.4vw, 3.9rem); line-height: 1.12; letter-spacing: -.045em; max-width: 700px; margin: 16px 0 22px; }
.ls-auth-story p { font-size: 1.05rem; color: #dfefe8; max-width: 550px; line-height: 1.65; }
.ls-auth-story small { color: #c9e7da; }
.ls-auth-highlights { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.ls-auth-highlights span { border: 1px solid rgba(255,255,255,.2); border-radius: 100px; padding: 8px 12px; font-size: .8rem; font-weight: 650; background: rgba(255,255,255,.06); }
.ls-auth-highlights i { font-style: normal; padding-right: 4px; }
.ls-auth-panel { display: flex; align-items: center; justify-content: center; padding: 35px; }
.ls-auth-card { width: min(100%, 430px); }
.ls-auth-card-wide { width: min(100%, 650px); }
.ls-auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 16px; }
.ls-auth-card h2 { font-size: clamp(1.9rem, 2.5vw, 2.35rem); letter-spacing: -.04em; margin: 9px 0 5px; }
.ls-auth-intro { color: var(--ls-muted); margin: 0 0 30px; }
.ls-auth-field { margin-bottom: 20px; }
.ls-auth-field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 8px; }
.ls-auth-field input, .ls-auth-field select { width: 100%; height: 50px; border: 1px solid #c8d9d0; border-radius: 10px; background: #fff; color: var(--ls-ink); font: inherit; padding: 0 15px; outline: none; }
.ls-auth-field input:focus, .ls-auth-field select:focus { border-color: var(--ls-brand); box-shadow: 0 0 0 3px rgba(23,107,91,.13); }
.ls-auth-field input::placeholder { color: #91a39b; }
.ls-auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ls-auth a { color: var(--ls-brand); font-weight: 700; text-decoration: none; }
.ls-auth a:hover { text-decoration: underline; }
.ls-auth-label-row a { font-size: .78rem; }
.ls-password-wrap { position: relative; }
.ls-password-wrap input { padding-right: 90px; }
.ls-password-wrap button { position: absolute; right: 9px; top: 8px; height: 34px; padding: 0 8px; border: 0; border-radius: 7px; background: #f1f7f3; color: var(--ls-brand); font-weight: 700; cursor: pointer; }
.ls-auth-submit { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; margin-top: 27px; border: 0; border-radius: 10px; background: var(--ls-brand); color: white; font: inherit; font-weight: 750; cursor: pointer; }
.ls-auth-submit:hover { background: var(--ls-brand-dark); }
.ls-auth-register { text-align: center; color: var(--ls-muted); font-size: .88rem; margin: 22px 0 0; }
.ls-auth-alert { background: #fceeed; border: 1px solid #edc9c5; color: #913d37; border-radius: 10px; padding: 13px 15px; margin-bottom: 20px; font-size: .88rem; }
.ls-auth-alert ul { margin: 8px 0 0; padding-left: 20px; }
.ls-auth-captcha { margin: 10px 0 18px; }
.ls-auth :focus-visible { outline: 3px solid #92caba; outline-offset: 2px; }
@media (max-width: 850px) { .ls-auth-shell { grid-template-columns: 1fr; } .ls-auth-story { gap: 18px; padding: 25px 24px; } .ls-auth-story h1 { font-size: 1.5rem; margin: 7px 0; } .ls-auth-story p, .ls-auth-story small, .ls-auth-highlights { display: none; } .ls-auth-panel { align-items: flex-start; padding: 45px 24px; } }
@media (max-width: 600px) { .ls-auth-grid { grid-template-columns: 1fr; } }

/* ── Notifications in-app ─────────────────────────────────── */
.ls-notif-bell { position: relative; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ls-ink); text-decoration: none; font-size: 1.05rem; }
.ls-notif-bell:hover { background: rgba(0,0,0,.06); }
.ls-notif-badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bs-danger, #dc3545); color: #fff; font-size: .65rem; font-weight: 700; line-height: 18px; text-align: center; }
.ls-notif-icon { font-size: .85rem; }

/* ── Topbar responsive ───────────────────────────────────── */
.ls-topbar-actions { display: flex; align-items: center; gap: 6px; }

/* ── Sidebar accordion ───────────────────────────────────── */
.ls-nav-section-toggle {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 8px 16px;
    background: none; border: none; cursor: pointer;
    color: inherit; font-size: .875rem; font-weight: 500;
    text-align: left; border-radius: 6px;
    transition: background .15s;
}
.ls-nav-section-toggle:hover { background: rgba(0,0,0,.06); }
.ls-nav-section-toggle .ls-nav-chevron { margin-left: auto; font-size: .7rem; transition: transform .2s; }
.ls-nav-section.open .ls-nav-chevron { transform: rotate(180deg); }
.ls-nav-section-body { display: none; padding-left: 12px; }
.ls-nav-section.open .ls-nav-section-body { display: block; }
.ls-nav-section-body .nav-link { padding-left: 20px; font-size: .84rem; }
