    :root {
      --primary-blue: #0866FF;
      --light-blue: #a3c4ff;
      --accent-gradient: linear-gradient(135deg, #0866FF 0%, #2D8CFF 50%, #60B4FF 100%);
      --light-gradient: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
      --box-shadow-focus: 0 0 0 0.25rem rgba(8, 102, 255, 0.25);
      --card-shadow: 0 20px 40px rgba(8, 102, 255, 0.08), 0 5px 15px rgba(0, 0, 0, 0.05);
      --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    * {
      font-family: 'Poppins', sans-serif;
    }

    body {
      background-color: transparent;
      background-image:
        radial-gradient(120% 55% at 50% -10%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #ffffff 0%, #1389bc 52%, #0d6f9f 100%);
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      overflow-x: hidden;
    }

    /* Arriere-plan type Zimbra: halo en haut + relief en bas */
    body::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image:
        radial-gradient(90% 30% at 50% 62%, rgba(143, 220, 255, 0.16) 0%, rgba(143, 220, 255, 0) 65%),
        radial-gradient(120% 45% at 50% 100%, rgba(7, 71, 102, 0.55) 0%, rgba(7, 71, 102, 0) 72%),
        radial-gradient(80% 35% at 18% 100%, rgba(6, 87, 126, 0.52) 0%, rgba(6, 87, 126, 0) 70%),
        radial-gradient(88% 38% at 82% 100%, rgba(5, 78, 114, 0.5) 0%, rgba(5, 78, 114, 0) 70%),
        linear-gradient(180deg, rgba(18, 146, 196, 0) 54%, rgba(9, 92, 131, 0.35) 74%, rgba(6, 62, 93, 0.52) 100%);
      z-index: -1;
      pointer-events: none;
    }

    /* Voile premium sur le tiers bas pour renforcer la lisibilite */
    body::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 38vh;
      background:
        linear-gradient(180deg, rgba(6, 62, 93, 0) 0%, rgba(5, 53, 80, 0.38) 48%, rgba(4, 44, 67, 0.62) 100%);
      z-index: -1;
      pointer-events: none;
    }
    .login-container {
      width: 100%;
      max-width: 480px;
      padding: 20px;
    }

    .login-box {
      background: rgba(255, 255, 255, 0.98);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      padding: 2.5rem;
      border-radius: 24px;
      box-shadow: var(--card-shadow);
      border: 1px solid rgba(8, 102, 255, 0.1);
      transform: translateZ(0);
      transition: var(--transition-smooth);
      position: relative;
      overflow: hidden;
    }

    /* Effet de bordure lumineuse */
    .login-box::before {
      content: '';
      position: absolute;
      top: -2px;
      left: -2px;
      right: -2px;
      bottom: -2px;
      border-radius: 26px;
      z-index: -1;
      opacity: 0;
      transition: opacity 0.5s ease;
    }

    .login-box:hover {
      transform: translateY(-8px);
      box-shadow: 0 30px 60px rgba(255, 78, 8, 0.12), 0 10px 30px rgba(0, 0, 0, 0.08);
    }

    .login-box:hover::before {
      opacity: 0.6;
    }

    .logo-container {
      position: relative;
      margin-bottom: 2rem;
      text-align: center;
    }

    /* Logo Frame - Premium */
    .logo-frame {
      background: transparent;
      border-radius: 0;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: none;
      transition: box-shadow 220ms ease, transform 220ms ease;
      transform-style: preserve-3d;
      position: relative;
      overflow: hidden;
      border: 0;
      margin-bottom: 1.5rem;
    }

    .logo-frame::before {
      content: none;
    }

    .logo-frame:hover {
      transform: translateY(-1px);
      box-shadow: none;
    }

    .logo-img {
      height: clamp(60px, 8vw, 70px);
      width: auto;
      display: block;
      filter: drop-shadow(0 2px 6px rgba(6, 3, 22, 0.35));
      position: relative;
      border-radius: 16px;
      z-index: 2;
      transition: filter 220ms ease;
    }

    .logo-frame:hover .logo-img {
      filter: drop-shadow(0 3px 8px rgba(6, 3, 22, 0.42));
    }

    .welcome-title {
      color: #1a1a1a;
      font-weight: 700;
      font-size: 2rem;
      margin-bottom: 0.5rem;
      background: var(--accent-gradient);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      display: inline-block;
    }

    .welcome-subtitle {
      color: #4a5568;
      font-weight: 400;
      font-size: 1.2rem;
      margin-bottom: 0.25rem;
    }

    .tagline {
      color: #718096;
      font-size: 0.95rem;
      font-weight: 300;
      margin-top: 0.5rem;
    }

    .form-label {
      color: #2d3748;
      font-weight: 500;
      margin-bottom: 0.5rem;
      display: flex;
      align-items: center;
    }

    .form-label i {
      margin-right: 8px;
      color: var(--primary-blue);
    }

    .input-group {
      border-radius: 14px;
      overflow: hidden;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
      transition: var(--transition-smooth);
      border: 1px solid #b6c2d2;
    }

    .input-group:focus-within {
      box-shadow: 0 4px 12px rgba(8, 102, 255, 0.15);
      border-color: var(--primary-blue);
      transform: translateY(-2px);
    }

    .input-group-text {
      background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
      border: none;
      color: var(--primary-blue);
      font-size: 1.1rem;
      padding: 0 1.25rem;
    }

    .form-control {
      border: none;
      padding: 0.85rem 1.25rem;
      background: #fff;
      font-size: 1rem;
      transition: var(--transition-smooth);
    }

    .form-control:focus {
      box-shadow: none;
      background: #f8fbff;
    }

    #togglePassword {
      background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
      border: none;
      color: var(--primary-blue);
      transition: var(--transition-smooth);
      padding: 0 1.25rem;
    }

    #togglePassword:hover {
      background: var(--primary-blue);
      color: white;
    }

    .btn-primary {
      background: var(--accent-gradient);
      border: none;
      border-radius: 14px;
      padding: 1rem 2rem;
      font-weight: 600;
      font-size: 1.05rem;
      box-shadow: 0 6px 20px rgba(8, 102, 255, 0.2);
      transition: var(--transition-smooth);
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
    }

    .btn-primary::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.7s ease;
    }

    .btn-primary:hover {
      transform: translateY(-3px);
      box-shadow: 0 12px 25px rgba(8, 102, 255, 0.3);
    }

    .btn-primary:hover::before {
      left: 100%;
    }

    .btn-primary:active {
      transform: translateY(-1px);
    }

    .loader {
      width: 20px;
      height: 20px;
      border: 3px solid rgba(255, 255, 255, 0.3);
      border-top: 3px solid white;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      display: none;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .benefits-list {
      background: rgba(255, 255, 255, 0.14);
      border-radius: 16px;
      padding: 1.5rem;
      margin-top: 2rem;
      border-left: 4px solid rgba(255, 255, 255, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.2);
      -webkit-backdrop-filter: blur(2px);
      backdrop-filter: blur(2px);
    }

    .benefits-list ul {
      list-style: none;
      padding-left: 0;
      margin-bottom: 0;
    }

    .benefits-list li {
      color: #e8f4ff;
      margin-bottom: 0.75rem;
      display: flex;
      align-items: flex-start;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .benefits-list li:last-child {
      margin-bottom: 0;
    }

    .benefits-list i {
      color: #48bb78;
      margin-right: 10px;
      font-size: 1.1rem;
      margin-top: 2px;
    }

    .security-badge {
      background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
      border-radius: 12px;
      padding: 1rem;
      border: 1px solid #e2e8f0;
      text-align: center;
    }

    .security-badge i {
      color: var(--primary-blue);
      font-size: 1.2rem;
      margin-right: 8px;
    }

    .register-link {
      color: var(--primary-blue);
      text-decoration: none;
      font-weight: 500;
      transition: var(--transition-smooth);
      position: relative;
      padding-bottom: 2px;
    }

    .register-link::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 2px;
      background: var(--accent-gradient);
      transition: width 0.3s ease;
    }

    .register-link:hover {
      color: #2D8CFF;
    }

    .register-link:hover::after {
      width: 100%;
    }
    /* Lisibilite zone basse sur fond bleu sombre */
    .text-center.mt-4.pt-3.border-top {
      background: rgba(255, 255, 255, 0.92);
      border-radius: 12px;
      padding: 1rem;
      border-top: none !important;
      box-shadow: 0 8px 20px rgba(3, 38, 58, 0.18);
    }

    .text-center.mt-4.pt-3.border-top .text-muted {
      color: #334155 !important;
    }

    .forgot-password {
      color: #718096;
      text-decoration: none;
      font-size: 0.9rem;
    }

    .auth-footer {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
      margin-top: 0.5rem;
    }

    .link-button {
      background: none;
      border: none;
      color: #2D8CFF;
      font-weight: 600;
      cursor: pointer;
      padding: 0;
    }

    .link-button:disabled {
      color: #94a3b8;
      cursor: not-allowed;
    }

    .submit-row {
      display: flex;
      justify-content: flex-start;
      align-items: flex-start;
      margin-top: 10px;
    }

    .submit-btn {
      width: 50%;
      min-width: 170px;
    }

    .form-check.form-switch {
      margin-top: 2px;
    }

    .toast {
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #0E3A46;
      color: #F8FAFC;
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
      font-size: 0.9rem;
    }

    .toast.error { background: #EF4444; }
    .toast.hidden { display: none; }

    /* Animation d'entrée */
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .login-box {
      animation: fadeInUp 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    }

    /* Version Mobile */
    @media (max-width: 768px) {
      .login-box {
        padding: 2rem;
      }
      
      .welcome-title {
        font-size: 1.75rem;
      }
      
      .logo-img {
        height: 60px;
      }
    }

    @media (max-width: 576px) {
      .submit-btn {
        width: 68%;
        max-width: 205px;
        min-width: 150px;
      }

      .submit-row {
        justify-content: flex-start;
      }

      /* Mobile UX: avoid Safari zoom on focus for small text inputs */
      .form-control,
      .code-inputs input {
        font-size: 16px;
      }
    }

    @media (max-width: 576px) {
      .login-box {
        padding: 1.5rem;
        border-radius: 20px;
      }
      
      .login-container {
        padding: 10px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
  
    /* Code access component */
    .code-wrapper { display:flex; flex-direction:column; align-items:center; gap:8px; }
    .code-inputs { display:grid; grid-template-columns: repeat(6, 48px); gap:10px; }
    .code-inputs input {
      width:48px; height:52px; text-align:center; font-size:20px; font-weight:700;
      border:1px solid #b6c2d2; border-radius:12px; background:#fff;
      box-shadow: 0 10px 20px rgba(8, 102, 255, 0.08); outline:none;
      transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
    }
    .code-inputs input.code-masked {
      -webkit-text-security: disc;
      text-security: disc;
    }
    .code-inputs input:focus {
      border-color: var(--primary-blue);
      box-shadow: 0 0 0 3px rgba(8,102,255,0.18);
      transform: scale(1.04);
    }
    .code-inputs input.error {
      border-color: #EF4444;
      box-shadow: 0 0 0 3px rgba(239,68,68,0.16);
      animation: shake 150ms ease-in 0s 2;
    }
    .code-hint { margin:0; color:#718096; font-size:0.9rem; }
    .code-error { margin:0; color:#EF4444; font-size:0.9rem; }
    @keyframes shake { 0%{transform:translateX(0);} 25%{transform:translateX(-3px);} 50%{transform:translateX(3px);} 75%{transform:translateX(-2px);} 100%{transform:translateX(0);} }
    @media (max-width: 600px) {
      .code-inputs { grid-template-columns: repeat(6, 42px); gap:8px; }
      .code-inputs input { width:42px; height:48px; }
    }
    