/* Pages d'authentification (login*.php) - EC2LT
   Ecran scinde en deux : panneau bleu marine (marque) + carte de connexion. */

:root {
  --navy: #14225c;
  --navy-dark: #0c1740;
  --red: #ae2037;
  --bg: #eef1f6;
  --white: #ffffff;
  --gray-600: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body.auth-body {
  font-family: 'Bookman Old Style', 'Poppins', sans-serif;
  min-height: 100vh;
  color: #1f2937;
}

/* ===== Loader ===== */
.loading {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999999;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--white);
}

.load-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 5px solid var(--gray-200);
  border-top: 5px solid var(--navy);
  border-right: 5px solid var(--red);
  animation: auth-rotate 1s infinite linear;
}

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

/* ===== Layout general ===== */
.auth-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== Panneau de marque (gauche) ===== */
.auth-side {
  width: 420px;
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px 36px 24px;
  text-align: center;
}

.auth-logo-wrap {
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.5);
}

.auth-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-brand-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.25;
  margin: 0 0 14px;
}

.auth-underline {
  width: 60px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  margin: 0 auto 18px;
}

.auth-tagline {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 260px;
  margin: 0 auto;
  line-height: 1.6;
}

.auth-illustration {
  margin: 20px auto 10px;
  width: 100%;
  max-width: 260px;
  opacity: 0.35;
}

.auth-illustration svg {
  width: 100%;
  height: auto;
  display: block;
}

.auth-side-footer p {
  margin: 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

/* ===== Panneau de connexion (droite) ===== */
.auth-main {
  flex: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}

.auth-card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(20, 34, 92, 0.12);
  padding: 40px 38px;
  width: 100%;
  max-width: 440px;
}

.auth-card h2 {
  text-align: center;
  color: var(--navy);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
}

.auth-subtitle {
  text-align: center;
  color: var(--gray-600);
  font-size: 13.5px;
  margin: 0 0 14px;
}

.auth-underline-small {
  width: 50px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  margin: 0 auto 24px;
}

/* ===== Message d'erreur ===== */
.auth-alert {
  background: rgba(224, 36, 42, 0.08);
  border-left: 4px solid var(--red);
  color: #b91c1c;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 18px;
}

/* ===== Champs du formulaire ===== */
.auth-field {
  margin-bottom: 18px;
}

.auth-field label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  font-size: 13.5px;
  margin-bottom: 7px;
}

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(20, 34, 92, 0.12);
}

.auth-input i.auth-input-icon {
  padding: 0 12px;
  color: var(--gray-600);
  font-size: 15px;
}

.auth-input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 12px 12px 0;
  font-size: 14.5px;
  color: #1f2937;
  min-width: 0;
}

.auth-toggle-eye {
  padding: 0 14px;
  color: var(--gray-600);
  cursor: pointer;
  transition: color 0.2s;
}

.auth-toggle-eye:hover {
  color: var(--navy);
}

/* ===== Options (se souvenir / mot de passe oublie) ===== */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #374151;
  cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}

.auth-link-forgot {
  font-size: 13.5px;
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
}

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

/* ===== Boutons ===== */
.auth-btn-primary {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.auth-btn-primary:hover:not(:disabled) {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(20, 34, 92, 0.3);
}

.auth-btn-primary:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--gray-600);
  font-size: 13px;
  margin: 22px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-divider span {
  padding: 0 12px;
}

.auth-btn-outline {
  width: 100%;
  border: 1px solid var(--navy);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.auth-btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .auth-wrapper {
    flex-direction: column;
  }

  .auth-side {
    width: 100%;
    padding: 28px 24px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .auth-logo-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
  }

  .auth-brand-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .auth-tagline {
    display: none;
  }

  .auth-illustration {
    display: none;
  }

  .auth-side-footer {
    width: 100%;
  }

  .auth-side-footer p {
    margin-top: 6px;
  }

  .auth-main {
    padding: 26px 16px 40px;
  }

  .auth-card {
    padding: 28px 22px;
  }
}

@media (max-width: 420px) {
  .auth-card {
    padding: 24px 18px;
  }

  .auth-card h2 {
    font-size: 22px;
  }

  .auth-options {
    flex-direction: column;
    align-items: flex-start;
  }
}
