:root {
      --navy:       #1a2e4a;
      --navy-light: #243e62;
      --navy-dark:  #0f1e31;
      --red:        #d63b2f;
      --red-light:  #e85244;
      --red-pale:   #fdecea;
      --blue-mid:   #2a6db5;
      --blue-pale:  #e8f1fb;
      --bg:         #f4f6f9;
      --bg-white:   #ffffff;
      --border:     #dde3ec;
      --text:       #1a2e4a;
      --text-mid:   #4a5a72;
      --text-muted: #8a97aa;
      --success:    #1f8a5e;
      --success-bg: #e6f5ef;
      --radius:     8px;
      --shadow:     0 1px 4px rgba(26,46,74,.08), 0 4px 16px rgba(26,46,74,.06);
      --shadow-lg:  0 4px 24px rgba(26,46,74,.13);
      --sans: 'Lato', sans-serif;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--sans);
      font-size: 14px;
      min-height: 100vh;
    }

    /* ===================== SIDEBAR ===================== */
    #sidebar {
      width: 272px;
      min-height: 100vh;
      background: var(--navy);
      position: fixed;
      top: 0; left: 0; bottom: 0;
      z-index: 200;
      display: flex;
      flex-direction: column;
      box-shadow: 2px 0 16px rgba(26,46,74,.18);
    }

    .sidebar-logo {
      padding: 0 22px;
      height: 64px;
      display: flex;
      align-items: center;
      gap: 12px;
      border-bottom: 1px solid rgba(255,255,255,.08);
      background: var(--navy-dark);
    }
    .sidebar-logo img {
      height: 32px;
      filter: brightness(0) invert(1);
      opacity: .92;
    }
    .sidebar-logo-fallback {
      display: flex; align-items: center; gap: 10px;
    }
    .logo-icon {
      width: 36px; height: 36px;
      background: var(--red);
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 18px;
      color: #fff;
      flex-shrink: 0;
    }
    .logo-text {
      font-family: var(--title);
      font-weight: 700;
      font-size: 15px;
      color: #fff;
      line-height: 1.2;
    }
    .logo-sub {
      font-size: 10px;
      color: rgba(255,255,255,.45);
      font-weight: 400;
      letter-spacing: .04em;
    }

    .sidebar-section {
      padding: 18px 16px 6px;
    }
    .sidebar-section-label {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: rgba(255,255,255,.35);
      padding: 0 6px;
      margin-bottom: 6px;
    }

    .sites-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 4px 6px 10px;
    }
    .sites-actions span {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: .12em;
      text-transform: uppercase;
      color: rgba(255,255,255,.35);
    }
    .btn-new-site {
      display: inline-flex; align-items: center; gap: 5px;
      background: var(--red);
      color: #fff;
      border: none;
      border-radius: 5px;
      font-family: var(--sans);
      font-size: 11px;
      font-weight: 700;
      padding: 5px 10px;
      cursor: pointer;
      transition: background .15s, transform .1s;
    }
    .btn-new-site:hover { background: var(--red-light); transform: translateY(-1px); }
    .btn-new-site:active { transform: translateY(0); }

    .site-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; }
    .site-list::-webkit-scrollbar { width: 4px; }
    .site-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; }

    .site-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: var(--radius);
      cursor: pointer;
      border-left: 3px solid transparent;
      transition: background .15s, border-color .15s;
      margin-bottom: 2px;
      position: relative;
    }
    .site-item:hover { background: rgba(255,255,255,.06); }
    .site-item.active {
      background: rgba(255,255,255,.09);
      border-left-color: var(--red);
    }

    .site-favicon {
      width: 30px; height: 30px;
      border-radius: 6px;
      background: rgba(255,255,255,.1);
      display: flex; align-items: center; justify-content: center;
      font-size: 14px;
      flex-shrink: 0;
      overflow: hidden;
    }
    .site-favicon img { width: 100%; height: 100%; object-fit: cover; }

    .site-info { flex: 1; min-width: 0; }
    .site-name {
      font-weight: 700;
      font-size: 12.5px;
      color: rgba(255,255,255,.9);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .site-url {
      font-size: 10px;
      color: rgba(255,255,255,.38);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .site-counter {
      font-size: 10px;
      font-weight: 700;
      background: rgba(255,255,255,.1);
      color: rgba(255,255,255,.55);
      padding: 2px 7px;
      border-radius: 20px;
      flex-shrink: 0;
    }
    .site-item.active .site-counter {
      background: var(--red);
      color: #fff;
    }

    .site-delete-btn {
      width: 22px; height: 22px;
      border-radius: 5px;
      background: transparent;
      border: none;
      color: rgba(255,255,255,.3);
      display: flex; align-items: center; justify-content: center;
      font-size: 12px;
      cursor: pointer;
      opacity: 0;
      transition: opacity .15s, color .15s, background .15s;
      flex-shrink: 0;
    }
    .site-item:hover .site-delete-btn { opacity: 1; }
    .site-delete-btn:hover { color: #ff7070; background: rgba(214,59,47,.25); }

    .sidebar-bottom {
      padding: 14px 16px;
      border-top: 1px solid rgba(255,255,255,.07);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .sidebar-bottom-logo {
      height: 22px;
      filter: brightness(0) invert(1);
      opacity: .3;
    }
    .sidebar-bottom-txt {
      font-size: 10px;
      color: rgba(255,255,255,.25);
    }

    /* ===================== TOPBAR ===================== */
    #main { margin-left: 272px; min-height: 100vh; display: flex; flex-direction: column; }

    .topbar {
      height: 64px;
      background: var(--bg-white);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 28px;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: 0 1px 0 var(--border);
    }

    .topbar-left { display: flex; align-items: center; gap: 0; }
    .topbar-breadcrumb {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
    }
    .bc-root {
      color: var(--text-muted);
      font-weight: 600;
    }
    .bc-sep { color: var(--border); font-size: 16px; }
    .bc-site {
      color: var(--navy);
      font-weight: 700;
      font-size: 14px;
    }
    .bc-env {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 20px;
      text-transform: uppercase;
      letter-spacing: .06em;
    }
    .bc-env.production { background: var(--success-bg); color: var(--success); }
    .bc-env.staging     { background: #fff4e0; color: #b07000; }
    .bc-env.development { background: var(--blue-pale); color: var(--blue-mid); }

    .topbar-right { display: flex; align-items: center; gap: 10px; }

    .search-wrap { position: relative; }
    .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
    .search-input {
      border: 1px solid var(--border);
      background: var(--bg);
      color: var(--text);
      border-radius: var(--radius);
      font-family: var(--sans);
      font-size: 13px;
      padding: 7px 12px 7px 30px;
      width: 200px;
      transition: border-color .15s, box-shadow .15s, width .2s;
    }
    .search-input:focus { outline: none; border-color: var(--blue-mid); box-shadow: 0 0 0 3px rgba(42,109,181,.12); width: 240px; }
    .search-input::placeholder { color: var(--text-muted); }

    .btn-primary-ecp {
      display: inline-flex; align-items: center; gap: 6px;
      background: var(--navy);
      color: #fff;
      border: none;
      border-radius: var(--radius);
      font-family: var(--sans);
      font-size: 13px;
      font-weight: 700;
      padding: 8px 16px;
      cursor: pointer;
      transition: background .15s, box-shadow .15s;
    }
    .btn-primary-ecp:hover { background: var(--navy-light); box-shadow: var(--shadow); }

    .btn-secondary-ecp {
      display: inline-flex; align-items: center; gap: 6px;
      background: #fff;
      color: var(--text-mid);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      font-family: var(--sans);
      font-size: 13px;
      font-weight: 600;
      padding: 7px 14px;
      cursor: pointer;
      transition: border-color .15s, color .15s;
    }
    .btn-secondary-ecp:hover { border-color: var(--navy); color: var(--navy); }

    /* ===================== CONTENT ===================== */
    .content { padding: 28px 28px 40px; flex: 1; }

    .empty-state {
      flex: 1;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      text-align: center;
      padding: 100px 20px;
      gap: 12px;
    }
    .empty-icon-wrap {
      width: 72px; height: 72px;
      background: var(--blue-pale);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 32px;
      margin-bottom: 8px;
      color: var(--blue-mid);
    }
    .empty-state h5 { font-family: var(--title); font-weight: 700; font-size: 18px; color: var(--navy); }
    .empty-state p { color: var(--text-muted); font-size: 13px; line-height: 1.6; }

    /* Stats */
    .stats-row { display: flex; gap: 16px; margin-bottom: 28px; }
    .stat-card {
      flex: 1;
      background: var(--bg-white);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 22px;
      box-shadow: var(--shadow);
      display: flex;
      align-items: center;
      gap: 16px;
      transition: box-shadow .2s;
    }
    .stat-card:hover { box-shadow: var(--shadow-lg); }
    .stat-icon {
      width: 44px; height: 44px;
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 20px;
      flex-shrink: 0;
    }
    .stat-icon.navy  { background: var(--navy); color: #fff; }
    .stat-icon.green { background: var(--success-bg); color: var(--success); }
    .stat-icon.red   { background: var(--red-pale); color: var(--red); }

    .stat-val { font-family: var(--title); font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1; }
    .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 600; }

    /* Section header */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }
    .section-title {
      font-family: var(--title);
      font-size: 13px;
      font-weight: 700;
      color: var(--navy);
      display: flex;
      align-items: center;
      gap: 7px;
    }
    .section-title::before {
      content: '';
      display: inline-block;
      width: 3px; height: 16px;
      background: var(--red);
      border-radius: 2px;
    }

    /* Filter pills */
    .filter-group { display: flex; gap: 4px; }
    .filter-pill {
      font-family: var(--sans);
      font-size: 12px;
      font-weight: 600;
      padding: 5px 13px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: #fff;
      color: var(--text-mid);
      cursor: pointer;
      transition: background .15s, border-color .15s, color .15s;
    }
    .filter-pill:hover { border-color: var(--navy); color: var(--navy); }
    .filter-pill.active { background: var(--navy); border-color: var(--navy); color: #fff; }
    .filter-pill.active.green { background: var(--success); border-color: var(--success); }
    .filter-pill.active.red   { background: var(--red); border-color: var(--red); }

    /* Module grid */
    .modules-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
      gap: 16px;
    }

    .module-card {
      background: var(--bg-white);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      box-shadow: var(--shadow);
      transition: box-shadow .2s, border-color .2s, transform .15s;
      position: relative;
      overflow: hidden;
    }
    .module-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      background: var(--border);
      transition: background .2s;
    }
    .module-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
    .module-card:hover::before { background: var(--navy); }
    .module-card.enabled::before { background: var(--success); }
    .module-card.enabled { border-color: rgba(31,138,94,.2); }

    .module-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .module-icon {
      width: 42px; height: 42px;
      border-radius: 10px;
      background: var(--blue-pale);
      border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      font-size: 20px;
    }

    .module-name {
      font-family: var(--title);
      font-weight: 700;
      font-size: 14px;
      color: var(--navy);
      margin-bottom: 5px;
    }
    .module-desc {
      font-size: 12.5px;
      color: var(--text-mid);
      line-height: 1.55;
      margin-bottom: 14px;
    }
    .module-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .module-cat {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .07em;
      color: var(--blue-mid);
      background: var(--blue-pale);
      padding: 3px 9px;
      border-radius: 20px;
    }
    .module-actions { display: flex; align-items: center; gap: 8px; }

    /* Toggle */
    .form-check-input.ecp-toggle {
      width: 30px; height: 21px;
      padding: 0 20px;
      margin-right: 10px;
      cursor: pointer;
      background-color: var(--border);
      border-color: #cdd5df;
      transition: background-color .2s;
    }
    .form-check-input.ecp-toggle:checked {
      background-color: var(--success);
      border-color: var(--success);
    }
    .form-check-input.ecp-toggle:focus {
      box-shadow: 0 0 0 3px rgba(31,138,94,.15);
    }

    .btn-icon-del {
      width: 28px; height: 28px;
      border-radius: 6px;
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text-muted);
      display: flex; align-items: center; justify-content: center;
      font-size: 13px;
      cursor: pointer;
      transition: background .15s, border-color .15s, color .15s;
    }
    .btn-icon-del:hover { background: var(--red-pale); border-color: var(--red); color: var(--red); }

    /* ===================== MODALS ===================== */
    .modal-content {
      background: var(--bg-white);
      border: none;
      border-radius: 12px;
      box-shadow: var(--shadow-lg);
      color: var(--text);
    }
    .modal-header {
      border-bottom: 1px solid var(--border);
      padding: 18px 24px 14px;
      background: var(--navy);
      border-radius: 12px 12px 0 0;
    }
    .modal-title {
      font-family: var(--title);
      font-weight: 700;
      font-size: 15px;
      color: #fff;
      display: flex; align-items: center; gap: 8px;
    }
    .modal-title i { color: rgba(255,255,255,.7); }
    .modal-body { padding: 22px 24px; }
    .modal-footer { border-top: 1px solid var(--border); padding: 14px 24px; }

    .form-label {
      font-size: 12px;
      font-weight: 700;
      color: var(--text-mid);
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: .05em;
    }
    .form-control, .form-select {
      border: 1px solid var(--border);
      background: var(--bg);
      color: var(--text);
      border-radius: var(--radius);
      font-family: var(--sans);
      font-size: 13px;
      padding: 9px 12px;
      transition: border-color .15s, box-shadow .15s;
    }
    .form-control:focus, .form-select:focus {
      border-color: var(--blue-mid);
      box-shadow: 0 0 0 3px rgba(42,109,181,.12);
      background: #fff;
      outline: none;
      color: var(--text);
    }
    .form-control::placeholder { color: var(--text-muted); }

    .btn-close { filter: brightness(0) invert(1) opacity(.6); }

    .btn-modal-cancel {
      background: #fff;
      border: 1px solid var(--border);
      color: var(--text-mid);
      font-family: var(--sans);
      font-weight: 600;
      font-size: 13px;
      padding: 8px 16px;
      border-radius: var(--radius);
      cursor: pointer;
      transition: border-color .15s, color .15s;
    }
    .btn-modal-cancel:hover { border-color: var(--navy); color: var(--navy); }

    .btn-modal-confirm {
      background: var(--navy);
      color: #fff;
      border: none;
      font-family: var(--sans);
      font-weight: 700;
      font-size: 13px;
      padding: 8px 18px;
      border-radius: var(--radius);
      cursor: pointer;
      display: inline-flex; align-items: center; gap: 6px;
      transition: background .15s;
    }
    .btn-modal-confirm:hover { background: var(--navy-light); }
    .btn-modal-confirm.danger { background: var(--red); }
    .btn-modal-confirm.danger:hover { background: var(--red-light); }

    /* Toast */
    .toast-container { z-index: 9999; }
    .ecp-toast {
      background: var(--navy);
      color: #fff;
      border: none;
      border-radius: var(--radius);
      font-family: var(--sans);
      font-size: 13px;
      min-width: 260px;
      box-shadow: var(--shadow-lg);
    }
    .ecp-toast.success { background: var(--success); }
    .ecp-toast .btn-close { filter: brightness(0) invert(1); }

    /* Empty modules */
    .no-modules {
      grid-column: 1 / -1;
      text-align: center;
      padding: 48px 20px;
      color: var(--text-muted);
    }
    .no-modules i { font-size: 36px; display: block; margin-bottom: 10px; opacity: .35; }

    @media (max-width: 768px) {
      #sidebar { transform: translateX(-100%); }
      #main { margin-left: 0; }
    }

    /* ===================== PAGE CONNEXION ===================== */

    body.login-page {
      display: flex;
      align-items: stretch;
      min-height: 100vh;
      background: var(--bg);
    }

    /* -- Panneau gauche décoratif -- */
    .login-panel-left {
      width: 45%;
      background: var(--navy);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 48px 52px;
      position: relative;
      overflow: hidden;
    }

    .login-panel-left::before {
      content: '';
      position: absolute;
      width: 520px; height: 520px;
      border-radius: 50%;
      border: 60px solid rgba(255,255,255,.04);
      top: -120px; right: -160px;
      pointer-events: none;
    }
    .login-panel-left::after {
      content: '';
      position: absolute;
      width: 320px; height: 320px;
      border-radius: 50%;
      border: 40px solid rgba(255,255,255,.04);
      bottom: -60px; left: -80px;
      pointer-events: none;
    }

    .login-accent-bar {
      position: absolute;
      top: 0; left: 0;
      width: 5px; height: 100%;
      background: var(--red);
    }

    .login-brand {
      display: flex;
      align-items: center;
      gap: 14px;
      position: relative;
      z-index: 1;
    }
    .login-brand-icon {
      width: 46px; height: 46px;
      background: var(--red);
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 22px;
      color: #fff;
      flex-shrink: 0;
    }
    .login-brand-name {
      font-family: var(--title);
      font-weight: 800;
      font-size: 18px;
      color: #fff;
      line-height: 1.2;
    }
    .login-brand-sub {
      font-size: 11px;
      color: rgba(255,255,255,.4);
      font-weight: 400;
    }

    .login-panel-middle {
      position: relative;
      z-index: 1;
    }
    .login-panel-middle h2 {
      font-family: var(--title);
      font-weight: 800;
      font-size: 32px;
      color: #fff;
      line-height: 1.25;
      margin-bottom: 16px;
    }
    .login-panel-middle h2 span { color: var(--red); }
    .login-panel-middle p {
      font-size: 14px;
      color: rgba(255,255,255,.5);
      line-height: 1.7;
      max-width: 340px;
    }

    .login-features {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-top: 36px;
    }
    .login-feature {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .login-feature-dot {
      width: 32px; height: 32px;
      border-radius: 8px;
      background: rgba(255,255,255,.07);
      border: 1px solid rgba(255,255,255,.1);
      display: flex; align-items: center; justify-content: center;
      font-size: 15px;
      flex-shrink: 0;
    }
    .login-feature span {
      font-size: 13px;
      color: rgba(255,255,255,.6);
      font-weight: 600;
    }

    .login-panel-footer {
      font-size: 11px;
      color: rgba(255,255,255,.22);
      position: relative;
      z-index: 1;
    }

    /* -- Panneau droit (formulaire) -- */
    .login-panel-right {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 40px 24px;
    }

    .login-box {
      width: 100%;
      max-width: 420px;
    }

    .login-header { margin-bottom: 36px; }
    .login-header h3 {
      font-family: var(--title);
      font-weight: 800;
      font-size: 24px;
      color: var(--navy);
      margin-bottom: 6px;
    }
    .login-header p {
      font-size: 13.5px;
      color: var(--text-muted);
    }
    .login-step-tag {
      display: inline-block;
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .1em;
      color: var(--red);
      background: var(--red-pale);
      padding: 3px 10px;
      border-radius: 20px;
      margin-bottom: 14px;
    }

    /* -- Champs du formulaire -- */
    .login-form-group { margin-bottom: 20px; }

    .login-form-label {
      display: block;
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--text-mid);
      margin-bottom: 8px;
    }

    .login-input-wrap { position: relative; }

    .login-input-icon {
      position: absolute;
      left: 13px; top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      font-size: 15px;
      pointer-events: none;
      transition: color .2s;
    }
    .login-input-wrap:focus-within .login-input-icon { color: var(--blue-mid); }

    .login-input {
      width: 100%;
      border: 1.5px solid var(--border);
      background: #fff;
      color: var(--text);
      border-radius: 9px;
      font-family: var(--sans);
      font-size: 14px;
      font-weight: 600;
      padding: 12px 44px;
      transition: border-color .2s, box-shadow .2s;
      outline: none;
    }
    .login-input:focus {
      border-color: var(--blue-mid);
      box-shadow: 0 0 0 4px rgba(42,109,181,.1);
    }
    .login-input::placeholder { color: var(--text-muted); font-weight: 400; }
    .login-input.is-invalid {
      border-color: var(--red);
      box-shadow: 0 0 0 4px rgba(214,59,47,.08);
    }

    .login-toggle-pwd {
      position: absolute;
      right: 13px; top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 16px;
      cursor: pointer;
      padding: 0;
      transition: color .15s;
    }
    .login-toggle-pwd:hover { color: var(--navy); }

    /* -- Options (remember + forgot) -- */
    .login-options {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 26px;
    }

    .login-remember {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
    }
    .login-checkbox {
      width: 16px; height: 16px;
      border: 1.5px solid var(--border);
      border-radius: 4px;
      background: #fff;
      appearance: none;
      -webkit-appearance: none;
      cursor: pointer;
      transition: background .15s, border-color .15s;
      position: relative;
      flex-shrink: 0;
    }
    .login-checkbox:checked {
      background: var(--navy);
      border-color: var(--navy);
    }
    .login-checkbox:checked::after {
      content: '';
      position: absolute;
      left: 4px; top: 1px;
      width: 5px; height: 9px;
      border: 2px solid #fff;
      border-top: none; border-left: none;
      transform: rotate(45deg);
    }
    .login-remember-label {
      font-size: 13px;
      color: var(--text-mid);
      font-weight: 600;
      user-select: none;
    }

    .login-forgot {
      font-size: 13px;
      color: var(--blue-mid);
      font-weight: 600;
      text-decoration: none;
      transition: color .15s;
    }
    .login-forgot:hover { color: var(--navy); text-decoration: underline; }

    /* -- Bouton connexion -- */
    .btn-login {
      width: 100%;
      background: var(--navy);
      color: #fff;
      border: none;
      border-radius: 9px;
      font-family: var(--title);
      font-weight: 700;
      font-size: 15px;
      padding: 13px;
      cursor: pointer;
      transition: background .2s, box-shadow .2s, transform .1s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      letter-spacing: .02em;
    }
    .btn-login:hover {
      background: var(--navy-light);
      box-shadow: 0 6px 20px rgba(26,46,74,.22);
      transform: translateY(-1px);
    }
    .btn-login:active { transform: translateY(0); }
    .btn-login.loading { opacity: .75; pointer-events: none; }

    .btn-login .login-spinner {
      width: 16px; height: 16px;
      border: 2px solid rgba(255,255,255,.3);
      border-top-color: #fff;
      border-radius: 50%;
      animation: login-spin .7s linear infinite;
      display: none;
    }
    .btn-login.loading .login-spinner { display: block; }
    .btn-login.loading .btn-login-text { display: none; }

    @keyframes login-spin { to { transform: rotate(360deg); } }

    /* -- Divider -- */
    .login-divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 24px 0;
    }
    .login-divider::before,
    .login-divider::after {
      content: ''; flex: 1;
      height: 1px;
      background: var(--border);
    }
    .login-divider span {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .08em;
    }

    /* -- Alerte erreur -- */
    .login-alert-error {
      background: var(--red-pale);
      border: 1px solid rgba(214,59,47,.25);
      border-radius: 8px;
      padding: 11px 14px;
      font-size: 13px;
      color: var(--red);
      font-weight: 600;
      display: none;
      align-items: center;
      gap: 8px;
      margin-bottom: 20px;
    }
    .login-alert-error.show { display: flex; }

    /* -- Pied de page formulaire -- */
    .login-footer {
      margin-top: 32px;
      text-align: center;
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.7;
    }
    .login-footer a {
      color: var(--blue-mid);
      text-decoration: none;
      font-weight: 600;
    }
    .login-footer a:hover { text-decoration: underline; }

    /* -- Bouton démo -- */
    .btn-demo {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: var(--blue-mid);
      font-weight: 700;
      text-decoration: none;
      padding: 10px 18px;
      border: 1.5px solid var(--border);
      border-radius: 9px;
      background: #fff;
      transition: border-color .15s, box-shadow .15s;
    }
    .btn-demo:hover {
      border-color: var(--navy);
      box-shadow: 0 2px 8px rgba(26,46,74,.1);
      color: var(--navy);
    }

    @media (max-width: 860px) {
      .login-panel-left { display: none; }
    }

    .body-login-page{
      background-color: var(--navy);
      color: white
    }