﻿/* Lotus Core V5 auth — ported for Mixta */

    :root {
      color-scheme: light;
      /* Palette verte Lotus (alignée sidebar / POS) */
      --brand: #1b3d24;
      --bg: #e4ebe0;
      --surface: #ffffff;
      --surface-2: #f0f5ed;
      --border: #c9d6c4;
      --text: #142a19;
      --text-muted: #4d6354;
      --accent: #1b3d24;
      --accent-mid: #245c30;
      --accent-hover: #122a19;
      --accent-light: #dcebd7;
      --accent-soft: #eef5ea;
      --accent-dark: #0e2214;
      --green: #245c30;
      --green-bg: #dcebd7;
      --red: #b3261e;
      --red-bg: #fae9e7;
      --orange: #c9a227;
      --orange-bg: #f6eed8;
      --blue: #1f5f6b;
      --blue-bg: #e2eef0;
      --shadow-sm: 0 1px 3px rgba(20, 42, 25, 0.07), 0 1px 2px rgba(20, 42, 25, 0.04);
      --shadow: 0 4px 16px rgba(20, 42, 25, 0.10), 0 2px 6px rgba(20, 42, 25, 0.05);
      --shadow-lg: 0 16px 48px rgba(20, 42, 25, 0.14), 0 4px 12px rgba(20, 42, 25, 0.06);
      --radius: 12px;
      --radius-sm: 8px;
      --radius-lg: 18px;
      --font-display: 'Outfit', sans-serif;
      --font-body: 'Plus Jakarta Sans', sans-serif;
    }

    .dark {
      color-scheme: dark;
      --brand: #2f6b1d;
      --bg: #0a0e09;
      --surface: #121810;
      --surface-2: #182016;
      --border: #243022;
      --text: #f0ece6;
      --text-muted: #8a9688;
      --accent: #3d8a2c;
      --accent-mid: #2f7020;
      --accent-hover: #4e9a34;
      --accent-light: #152010;
      --accent-soft: #1a2814;
      --accent-dark: #5a9a48;
      --green: #3d8a2c;
      --green-bg: #101a0c;
      --red: #e06060;
      --red-bg: #2a1010;
      --orange: #e08830;
      --orange-bg: #2a1c08;
      --blue: #5ecf9a;
      --blue-bg: #0f2418;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
      --shadow: 0 4px 16px rgba(0,0,0,0.4);
      --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
    }

    .dark body {
      background:
        radial-gradient(ellipse 90% 55% at 100% -5%, rgba(61, 138, 44, 0.12), transparent 50%),
        radial-gradient(ellipse 70% 45% at 0% 100%, rgba(27, 61, 36, 0.22), transparent 45%),
        var(--bg);
    }

    .dark .auth-split-brand {
      background: linear-gradient(165deg, #152010 0%, #101a0c 42%, #0e1610 100%);
      border-right-color: color-mix(in srgb, var(--accent) 28%, var(--border));
    }

    .dark .auth-card,
    .dark .auth-split {
      border: 1px solid var(--border);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html, body { height: 100%; }

    body {
      font-family: var(--font-body);
      background:
        radial-gradient(ellipse 90% 55% at 100% -5%, rgba(27, 61, 36, 0.12), transparent 50%),
        radial-gradient(ellipse 70% 45% at 0% 100%, rgba(36, 92, 48, 0.08), transparent 45%),
        var(--bg);
      color: var(--text);
      font-size: 14px;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }

    /* Auth Layout */
    .auth-container {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .auth-card {
      max-width: 450px;
      width: 100%;
      background: var(--surface);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      padding: 32px;
      animation: fadeInUp 0.5s ease-out;
    }

    /* Page connexion : deux colonnes */
    .auth-split {
      display: grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(300px, 400px);
      width: 100%;
      max-width: 920px;
      background: var(--surface);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      animation: fadeInUp 0.5s ease-out;
    }
    .auth-split-brand {
      padding: 36px 32px 40px;
      text-align: left;
      background: linear-gradient(
        165deg,
        #e8f2e6 0%,
        #dcebd7 42%,
        #f4f8f2 100%
      );
      border-right: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 20px;
    }
    .auth-split-brand .auth-logo {
      text-align: left;
      margin-bottom: 0;
    }
    .auth-split-brand .auth-logo-icon {
      margin-left: 0;
      margin-right: auto;
    }
    .auth-split-form {
      padding: 32px 32px 36px;
      text-align: center;
    }
    .auth-split-form .flash-messages {
      text-align: left;
    }
    @media (max-width: 800px) {
      .auth-split {
        grid-template-columns: 1fr;
        max-width: 450px;
      }
      .auth-split-brand {
        border-right: none;
        border-bottom: 1px solid color-mix(in srgb, var(--accent) 12%, var(--border));
        padding-bottom: 28px;
        text-align: center;
        align-items: center;
      }
      .auth-split-brand .auth-logo {
        text-align: center;
      }
      .auth-split-brand .auth-logo-icon {
        margin-left: auto;
        margin-right: auto;
      }
      .auth-split-headline,
      .auth-login-note {
        margin-left: auto;
        margin-right: auto;
      }
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .auth-logo {
      text-align: center;
      margin-bottom: 24px;
    }

    .auth-logo-icon {
      width: 60px;
      height: 60px;
      background: linear-gradient(145deg, #245c30 0%, #1b3d24 100%);
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 16px;
      box-shadow: 0 6px 18px rgba(27, 61, 36, 0.28);
    }

    .auth-logo-icon svg {
      width: 32px;
      height: 32px;
      color: #fff;
      stroke: #fff;
    }
    .lgi-brand-logo {
      display: block;
      max-width: 100%;
      height: auto;
      object-fit: contain;
    }
    .lgi-brand-logo--auth {
      max-width: 240px;
      margin: 0 auto 14px;
    }
    .auth-split-brand .lgi-brand-logo--auth {
      margin-left: 0;
      margin-right: auto;
      max-width: 220px;
    }
    .auth-logo:has(.lgi-brand-logo) h1 {
      display: none;
    }

    .auth-logo h1 {
      font-family: var(--font-display);
      font-size: 24px;
      font-weight: 700;
      color: var(--text);
    }

    .auth-logo p {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    .auth-title {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 700;
      text-align: center;
      margin-bottom: 24px;
      color: var(--text);
    }

    /* Form Elements */
    .form-group {
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      margin-bottom: 6px;
    }

    .form-input {
      width: 100%;
      padding: 10px 14px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text);
      font-family: var(--font-body);
      font-size: 14px;
      transition: all 0.2s;
    }

    .form-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
    }

    .form-input::placeholder {
      color: var(--text-muted);
      opacity: 0.6;
    }

    /* Checkbox */
    .checkbox-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .checkbox-group input {
      width: 16px;
      height: 16px;
      accent-color: var(--accent);
    }

    .checkbox-group label {
      font-size: 13px;
      color: var(--text-muted);
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      padding: 10px 16px;
      border-radius: var(--radius-sm);
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      border: none;
      text-decoration: none;
    }

    .btn-primary {
      background: linear-gradient(180deg, #245c30 0%, #1b3d24 100%);
      color: #fff;
      box-shadow: 0 4px 14px rgba(27, 61, 36, 0.28);
    }

    .btn-primary:hover {
      background: linear-gradient(180deg, #2f7a3a 0%, #1b3d24 100%);
      transform: translateY(-1px);
    }

    .btn-secondary {
      background: var(--surface-2);
      border: 1px solid var(--border);
      color: var(--text);
    }

    .btn-secondary:hover {
      background: color-mix(in srgb, var(--accent-light) 38%, var(--surface-2));
      border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
    }

    /* Links */
    .auth-link {
      text-align: center;
      margin-top: 20px;
      font-size: 13px;
      color: var(--text-muted);
    }

    .auth-link a {
      color: var(--accent);
      text-decoration: none;
      font-weight: 600;
    }

    .auth-link a:hover {
      text-decoration: underline;
    }

    /* Flash Messages */
    .flash-messages {
      margin-bottom: 20px;
    }

    .alert {
      padding: 10px 14px;
      border-radius: var(--radius-sm);
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
    }

    .alert-success {
      background: var(--green-bg);
      color: var(--green);
      border: 1px solid var(--green);
    }

    .alert-error {
      background: var(--red-bg);
      color: var(--red);
      border: 1px solid var(--red);
    }

    .alert-warning {
      background: var(--orange-bg);
      color: var(--orange);
      border: 1px solid var(--orange);
    }

    .alert-info {
      background: var(--blue-bg);
      color: var(--blue);
      border: 1px solid var(--blue);
    }

    /* Divider */
    .auth-divider {
      display: flex;
      align-items: center;
      text-align: center;
      margin: 20px 0;
      color: var(--text-muted);
      font-size: 12px;
    }

    .auth-divider::before,
    .auth-divider::after {
      content: '';
      flex: 1;
      border-bottom: 1px solid var(--border);
    }

    .auth-divider::before {
      margin-right: 10px;
    }

    .auth-divider::after {
      margin-left: 10px;
    }

    /* Theme Toggle */
    .theme-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      width: 40px;
      height: 40px;
      border-radius: 99px;
      background: var(--surface);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s;
      z-index: 100;
    }

    .theme-toggle:hover {
      background: var(--surface-2);
    }

    .theme-toggle svg {
      width: 20px;
      height: 20px;
      color: var(--text-muted);
    }

    /* Responsive */
    @media (max-width: 480px) {
      .auth-card {
        padding: 24px;
      }
      
      .auth-logo-icon {
        width: 48px;
        height: 48px;
      }
      
      .auth-logo-icon svg {
        width: 24px;
        height: 24px;
      }
      
      .auth-title {
        font-size: 18px;
      }
    }

    form.was-validated input:invalid,
    form.was-validated select:invalid,
    form.was-validated textarea:invalid {
      border-color: var(--red) !important;
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent);
    }
    #lotus-global-loading {
      position: fixed;
      inset: 0;
      z-index: 100000;
      display: flex;
      align-items: center;
      justify-content: center;
      background: color-mix(in srgb, var(--bg) 55%, rgba(0,0,0,0.35));
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }
    #lotus-global-loading.is-visible {
      opacity: 1;
      pointer-events: auto;
    }
    #lotus-global-loading .lotus-spinner-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      padding: 22px 28px;
      border-radius: var(--radius-lg);
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-lg);
      font-size: 13px;
      color: var(--text-muted);
    }
    #lotus-global-loading .lotus-spinner {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 3px solid var(--border);
      border-top-color: var(--accent);
      animation: lotus-spin 0.75s linear infinite;
    }
    @keyframes lotus-spin {
      to { transform: rotate(360deg); }
    }
  
