/* ══════════════════════════════════════════
   LOGIN PAGE — Styles spécifiques
══════════════════════════════════════════ */

.login-page {
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
}

.login-wrapper {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

/* ══ PANNEAU GAUCHE ══ */
.left-panel {
  width: 50%;
  min-width: 50%;
  min-height: 100vh;
  background: linear-gradient(160deg, #0a2540 0%, #0b4f6c 55%, #0d9e93 100%);
  padding: 40px 48px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  position: relative;
  overflow: hidden;
  animation: fadeInLeft 0.8s ease-out;
}

/* Cercles décoratifs améliorés */
.left-panel::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}
.left-panel::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 260px;
  height: 260px;
  background: rgba(13,158,147,.12);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

/* Logo */
.lp-logo-img {
  text-align: center;
  position: relative;
  z-index: 2;
}
.lp-logo-img img {
  height: 80px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
  transition: transform 0.3s ease;
}
.lp-logo-img img:hover {
  transform: scale(1.05);
}

/* Bienvenue */
.lp-welcome {
  position: relative;
  z-index: 2;
  text-align: center;
}
.lp-welcome-sub {
  font-family: 'Cairo', sans-serif;
  font-size: 20px;
  color: rgba(255,255,255,.85);
  font-weight: 400;
  text-align: center;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}
.lp-welcome-title {
  font-family: 'Cairo', sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}
.lp-welcome-title span {
  color: #4ecdc4;
  text-shadow: 0 0 20px rgba(78,205,196,.3);
}

/* Description */
.lp-desc {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,.75);
  text-align: center;
  line-height: 1.7;
  position: relative;
  z-index: 2;
  max-width: 380px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Features */
.lp-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
  align-items: center;
  animation: fadeInUp 0.6s ease-out 0.5s both;
}
.lp-feature {

  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row-reverse;
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease;

  justify-content: space-between;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);

  padding: 12px 14px;
  direction: rtl;
}
.lp-feature:hover {
  background: rgba(255,255,255,.06);
  transform: translateX(-4px);
}
.lp-feat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lp-feature:hover .lp-feat-icon {
  transform: scale(1.1);
}
.fi-teal   { background: rgba(13,158,147,.25);  color: #5ee8df; box-shadow: 0 4px 15px rgba(13,158,147,.2); }
.fi-purple { background: rgba(155,89,182,.25);  color: #c39bd3; box-shadow: 0 4px 15px rgba(155,89,182,.2); }
.fi-orange { background: rgba(230,126,34,.25);  color: #f0a868; box-shadow: 0 4px 15px rgba(230,126,34,.2); }
.fi-green  { background: rgba(39,174,96,.25);   color: #7dcea0; box-shadow: 0 4px 15px rgba(39,174,96,.2); }

.lp-feat-text { text-align: right; }
.lp-feat-title {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.lp-feat-desc {
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,.65);
  line-height: 1.5;
}

/* Illustration */
.lp-illustration {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  position: relative;
  z-index: 2;
  height: 120px;
  animation: fadeInUp 0.6s ease-out 0.7s both;
}
.illus-phone {
  width: 58px;
  height: 100px;
  border-radius: 12px;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 3;
  backdrop-filter: blur(4px);
  animation: float 4s ease-in-out infinite;
}
.illus-phone-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.illus-logo-small {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #fff;
}
.illus-logo-small i {
  font-size: 14px;
  color: var(--teal);
}
.illus-logo-small .ar {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 12px;
}
.illus-truck {
  font-size: 72px;
  color: rgba(255,255,255,.9);
  line-height: 1;
  animation: float 5s ease-in-out infinite 0.5s;
}
.illus-boxes {
  font-size: 44px;
  color: rgba(255,255,255,.7);
  align-self: flex-end;
  margin-bottom: 8px;
  animation: float 4.5s ease-in-out infinite 1s;
}
.illus-cart  {
  font-size: 38px;
  color: rgba(255,255,255,.6);
  align-self: flex-end;
  margin-bottom: 4px;
  animation: float 5.5s ease-in-out infinite 0.3s;
}

/* ══ PANNEAU DROIT ══ */
.right-panel {
  width: 50%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f2f5 0%, #e8ecef 100%);
  padding: 40px 24px;
  animation: fadeInRight 0.8s ease-out;
}

.login-form-box {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(10,37,64,.1), 0 2px 8px rgba(10,37,64,.05);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: slideUp 0.6s ease-out 0.2s both;
}

/* Header du formulaire */
.form-header {
  text-align: left;
}

.form-title-ar {
  font-family: 'Cairo', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  line-height: 1.2;
}
.form-title-fr {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-top: -6px;
}
.form-subtitle {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-top: 8px;
}
.form-subtitle span { font-size: 11px; }

/* Alertes */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  margin-bottom: 4px;
  animation: slideDown 0.3s ease-out;
}
.alert-error {
  background: #fdf2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}
.alert-error i {
  font-size: 16px;
  flex-shrink: 0;
  color: #dc2626;
}
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}
.alert-success i {
  font-size: 16px;
  flex-shrink: 0;
  color: #16a34a;
}

/* Groupes */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row-reverse;
}
.label-fr {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  gap: 10px;
  height: 50px;
  background: #fafbfc;
  transition: all 0.2s ease;
}
.input-wrap:focus-within {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13,158,147,.1);
}
.input-wrap i {
  color: var(--muted);
  font-size: 15px;
  flex-shrink: 0;
}
.input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
}
.input-wrap input::placeholder {
  color: #adb5bd;
}

/* Toggle mot de passe (bouton accessible) */
.toggle-pwd {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 15px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.toggle-pwd:hover {
  color: var(--teal);
  background: rgba(13,158,147,.08);
}
.toggle-pwd:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
.remember-me input[type="checkbox"] {
  display: none;
}
.checkmark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: #fff;
  flex-shrink: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkmark::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}
.remember-me input:checked + .checkmark {
  background: var(--teal);
  border-color: var(--teal);
}
.remember-me input:checked + .checkmark::after {
  opacity: 1;
  transform: scale(1);
}
.remember-me input:focus-visible + .checkmark {
  box-shadow: 0 0 0 3px rgba(13,158,147,.2);
}
.remember-text .fr {
  font-size: 10px;
  display: block;
  color: var(--muted);
}

.forgot-link {
  font-size: 12px;
  color: var(--teal);
  text-decoration: none;
  text-align: right;
  line-height: 1.5;
  transition: color 0.15s;
}
.forgot-link span {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.forgot-link:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}
.forgot-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Bouton login */
.btn-login {
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, var(--navy-1), var(--teal));
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(13,158,147,.3);
  margin-top: 20px;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13,158,147,.4);
}
.btn-login:active {
  transform: translateY(0);
}
.btn-login:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
.btn-login i {
  font-size: 16px;
  transform: rotate(180deg);
}

/* Séparateur */
.separator {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  justify-content: center;
}
.separator::before,
.separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.sep-fr {
  font-size: 11px;
}

/* Boutons sociaux */
.btn-social {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: 'Cairo', sans-serif;
  background: #fff;
}
.btn-social:hover {
  border-color: var(--teal);
  background: #f8fffe;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.btn-social:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.btn-social div {
  line-height: 1.5;
}
.btn-social span {
  font-size: 11px;
  color: var(--muted);
}

/* Créer compte */
.create-account {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-family: 'Cairo', sans-serif;
  line-height: 1.8;
  padding-top: 8px;
}
.create-account a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.create-account a:hover {
  color: var(--teal-dark);
  text-decoration: underline;
}
.create-account a:focus-visible {
  outline: 2px solid var(--teal);
  outline-radius: 4px;
}

/* ══ ANIMATIONS ══ */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ══ RESPONSIVE ══ */
@media (max-width: 1024px) {
  .left-panel {
    width: 45%;
    min-width: 45%;
    padding: 32px 28px;
  }
  .right-panel {
    width: 55%;
    padding: 32px 20px;
  }
  .lp-welcome-title { font-size: 28px; }
  .lp-features { gap: 10px; }
}

@media (max-width: 900px) {
  .left-panel { display: none; }
  .right-panel {
    width: 100%;
    padding: 24px 16px;
    background: linear-gradient(160deg, #f0f2f5 0%, #e8ecef 100%);
  }
  .login-form-box {
    box-shadow: 0 4px 20px rgba(10,37,64,.08);
  }
}

@media (max-width: 480px) {
  .right-panel { padding: 16px 12px; }
  .login-form-box {
    padding: 28px 20px;
    border-radius: 16px;
    gap: 14px;
  }
  .form-title-ar { font-size: 26px; }
  .form-title-fr { font-size: 18px; }
  .form-subtitle { font-size: 11px; }
  .btn-login {
    height: 50px;
    font-size: 15px;
    border-radius: 12px;
  }
  .btn-social {
    padding: 12px 14px;
    font-size: 12px;
    gap: 10px;
    border-radius: 12px;
  }
  .input-wrap { height: 48px; }
}

@media (max-width: 360px) {
  .login-form-box { padding: 22px 14px; }
  .form-title-ar { font-size: 22px; }
  .form-title-fr { font-size: 16px; }
  .input-wrap { height: 44px; }
  .btn-login { height: 46px; font-size: 14px; }
  .form-options { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Accessibilité : mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  .left-panel,
  .right-panel,
  .login-form-box,
  .lp-welcome-sub,
  .lp-welcome-title,
  .lp-desc,
  .lp-features,
  .lp-illustration,
  .alert {
    animation: none;
  }
  .left-panel::before,
  .left-panel::after,
  .illus-phone,
  .illus-truck,
  .illus-boxes,
  .illus-cart {
    animation: none;
  }
  * { transition-duration: 0.01ms !important; }
}
/* ══════════════════════════════════════════════
   LOGO MOBILE
   Masqué par défaut (desktop) car le logo est déjà
   visible dans .left-panel. Affiché uniquement quand
   .left-panel disparaît (<900px).
   ══════════════════════════════════════════════ */

.mobile-logo {
  display: none;
}

@media (max-width: 900px) {
  .mobile-logo {
    display: flex;
    justify-content: center;
    padding: 20px 0 10px;
  }

  .mobile-logo img {
    max-width: 90px;
    border-radius: 12px;
    display: block;
  }
}