/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --green-dark:  #2e7d32;
  --green-mid:   #388e3c;
  --green-light: #43a047;
  --gold:        #f5c518;
}

/* ── Reset / base ────────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Nunito', sans-serif;
  color: #1e293b;
}

/* ── Split layout ────────────────────────────────────────────────────────── */
.auth-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Panneau gauche (hero) ───────────────────────────────────────────────── */
.auth-left {
  flex: 1 1 50%;
  min-width: 0;
  background: linear-gradient(160deg, #2e7d32 0%, #388e3c 35%, #2e7d32 65%, #1b5e20 100%);
  display: flex;
  flex-direction: column;
  padding: 2.75rem 3rem;
  position: relative;
  overflow: hidden;
}

/* Filigrane : grande icône bouclier en fond */
.auth-left::before {
  content: '';
  position: absolute;
  bottom: -12%;
  right: -10%;
  width: 72%;
  aspect-ratio: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8 1a.5.5 0 0 1 .324.118l5.5 4.5A.5.5 0 0 1 14 6v3.5c0 2.707-1.773 4.655-3.41 5.794C9.775 16.048 8.86 16.5 8 16.5s-1.775-.452-2.59-1.206C3.773 14.155 2 12.207 2 9.5V6a.5.5 0 0 1 .176-.382l5.5-4.5A.5.5 0 0 1 8 1z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .035;
  pointer-events: none;
  transform: rotate(-8deg);
}

/* Filigrane : grand "e-DOS" en texte diagonal */
.auth-left::after {
  content: 'e-DOS';
  position: absolute;
  top: 38%;
  left: -8%;
  font-size: clamp(6rem, 14vw, 11rem);
  font-weight: 900;
  color: rgba(255, 255, 255, .028);
  letter-spacing: -.02em;
  white-space: nowrap;
  transform: rotate(-18deg);
  pointer-events: none;
  user-select: none;
  font-family: 'Nunito', sans-serif;
}

/* Courbe SVG en bas du panneau gauche */
.auth-left-curve {
  position: absolute;
  bottom: 0;
  right: -1px;
  top: 0;
  width: 56px;
  pointer-events: none;
  z-index: 2;
}
.auth-left-curve path {
  fill: #f1f5f9; /* doit correspondre au fond du panneau droit */
}

/* Accent lumineux en haut à gauche */
.auth-left-glow {
  position: absolute;
  top: -15%;
  left: -10%;
  width: 55%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(245,197,24,.09) 0%, transparent 68%);
  pointer-events: none;
}

/* ── Filigranes flottants ────────────────────────────────────────────────── */
.auth-wm {
  position: absolute;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
}

/* Balance de la justice — grand, centré-gauche */
.auth-wm--justice {
  font-size: clamp(7rem, 12vw, 10rem);
  top: 22%;
  left: 8%;
  color: rgba(255, 255, 255, .055);
  transform: rotate(-8deg);
}

/* Dollar 1 — grand, en haut à droite, légèrement doré */
.auth-wm--dollar1 {
  font-size: clamp(8rem, 14vw, 12rem);
  top: 4%;
  right: 12%;
  color: rgba(245, 197, 24, .06);
  transform: rotate(12deg);
}

/* Dollar 2 — moyen, bas gauche */
.auth-wm--dollar2 {
  font-size: clamp(4rem, 7vw, 6rem);
  bottom: 18%;
  left: 4%;
  color: rgba(255, 255, 255, .04);
  transform: rotate(-22deg);
}

/* Dollar 3 — petit, milieu-droite */
.auth-wm--dollar3 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  top: 52%;
  right: 22%;
  color: rgba(245, 197, 24, .05);
  transform: rotate(28deg);
}

/* Second accent doré en bas à droite (contraste) */
.auth-left-glow2 {
  position: absolute;
  bottom: -10%;
  right: 5%;
  width: 40%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(26,180,26,.12) 0%, transparent 65%);
  pointer-events: none;
}

/* Brand */
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: .3px;
  text-decoration: none;
  flex-shrink: 0;
}
.auth-brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  padding: 3px 7px;
  flex-shrink: 0;
  line-height: 0;
}
.auth-brand-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
}
.auth-brand .badge-gov {
  font-size: .58rem;
  background: rgba(245, 197, 24, .22);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 24, .4);
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: .5px;
}

/* Hero body */
.auth-hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 0 2rem;
}

.auth-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 197, 24, .15);
  border: 1px solid rgba(245, 197, 24, .3);
  color: var(--gold);
  padding: 4px 13px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 1.6rem;
  width: fit-content;
  letter-spacing: .3px;
}

.auth-left h1 {
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 520px;
}
.auth-left h1 span { color: var(--gold); }

.auth-lead {
  color: rgba(255, 255, 255, .68);
  font-size: .95rem;
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 2.25rem;
}

/* Feature list */
.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: 1.1rem;
}
.auth-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(245, 197, 24, .15);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-feature-text strong {
  display: block;
  font-size: .84rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.auth-feature-text span {
  font-size: .77rem;
  color: rgba(255, 255, 255, .52);
  line-height: 1.4;
}

/* Footer gauche */
.auth-left-footer {
  font-size: .72rem;
  color: rgba(255, 255, 255, .28);
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: .85rem;
  margin-top: .5rem;
  line-height: 1.6;
}
.auth-left-footer strong { color: rgba(245, 197, 24, .7); }
.auth-left-footer a { color: rgba(255, 255, 255, .35); text-decoration: none; }
.auth-left-footer a:hover { color: var(--gold); }

/* ── Panneau droit (carte) ───────────────────────────────────────────────── */
.auth-right {
  flex: 1 1 50%;
  max-width: 50%;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
}

.auth-card {
  width: 100%;
  max-width: 390px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .07);
  overflow: hidden;
}

.auth-card-hd {
  background: linear-gradient(145deg, var(--green-dark) 0%, #1b5e20 100%);
  color: #fff;
  padding: 1.75rem 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Filigrane ::before — bouclier SVG */
.auth-card-hd::before {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -8%;
  width: 55%;
  aspect-ratio: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8 1a.5.5 0 0 1 .324.118l5.5 4.5A.5.5 0 0 1 14 6v3.5c0 2.707-1.773 4.655-3.41 5.794C9.775 16.048 8.86 16.5 8 16.5s-1.775-.452-2.59-1.206C3.773 14.155 2 12.207 2 9.5V6a.5.5 0 0 1 .176-.382l5.5-4.5A.5.5 0 0 1 8 1z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .06;
  pointer-events: none;
  transform: rotate(-6deg);
}

/* Filigrane ::after — texte "e-DOS" diagonal */
.auth-card-hd::after {
  content: 'e-DOS';
  position: absolute;
  top: 30%;
  left: -12%;
  font-size: 3.8rem;
  font-weight: 900;
  color: rgba(255, 255, 255, .045);
  letter-spacing: -.02em;
  white-space: nowrap;
  transform: rotate(-18deg);
  pointer-events: none;
  user-select: none;
  font-family: 'Nunito', sans-serif;
}

/* Filigranes flottants dans le header carte */
.chd-wm {
  position: absolute;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  z-index: 0;
}

/* Balance justice — milieu gauche */
.chd-wm--justice {
  font-size: 3.5rem;
  top: 10%;
  left: 6%;
  color: rgba(255, 255, 255, .07);
  transform: rotate(-8deg);
}

/* Dollar grand — haut droite, doré */
.chd-wm--dollar1 {
  font-size: 4.5rem;
  top: -10%;
  right: 28%;
  color: rgba(245, 197, 24, .08);
  transform: rotate(14deg);
}

/* Dollar petit — bas gauche */
.chd-wm--dollar2 {
  font-size: 2rem;
  bottom: 5%;
  left: 38%;
  color: rgba(255, 255, 255, .05);
  transform: rotate(-20deg);
}

/* Halo doré haut gauche */
.auth-card-hd-glow {
  position: absolute;
  top: -40%;
  left: -15%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(245,197,24,.1) 0%, transparent 65%);
  pointer-events: none;
}
.auth-card-icon { font-size: 2rem; opacity: .9; }
.auth-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: .45rem 0 0;
  letter-spacing: .2px;
}
.auth-card-sub {
  font-size: .8rem;
  opacity: .7;
  margin: .2rem 0 0;
}

.auth-card-bd { padding: 1.75rem 2rem; }

.auth-copyright {
  margin-top: 1.25rem;
  font-size: .72rem;
  color: rgba(0, 0, 0, .35);
  text-align: center;
  max-width: 390px;
  line-height: 1.5;
}
.auth-copyright strong { color: var(--gold); }
.auth-copyright a { color: rgba(0, 0, 0, .4); text-decoration: none; }
.auth-copyright a:hover { color: var(--green-dark); }

/* ── Responsive : mobile ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(145deg, #2e7d32 0%, #1b5e20 100%);
    padding: 2rem 1rem;
  }
  .auth-card { max-width: 420px; }
  .auth-copyright { color: rgba(255, 255, 255, .35); }
  .auth-copyright a { color: rgba(255, 255, 255, .4); }
}

/* ── Éléments de formulaire ──────────────────────────────────────────────── */
.form-label {
  font-size: .85rem;
  font-weight: 500;
}

.form-control:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 .25rem rgba(45, 110, 45, .2);
}

.btn-primary {
  background-color: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--green-mid);
  border-color: var(--green-mid);
}

/* Champs avec icône intégrée */
.input-field {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #dee2e6;
  border-radius: .375rem;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input-field:focus-within {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 .25rem rgba(45, 110, 45, .2);
}
.input-field-icon {
  position: absolute;
  left: .75rem;
  color: var(--green-mid);
  pointer-events: none;
  font-size: .9rem;
  z-index: 1;
}
.input-field .form-control {
  border-color: transparent !important;
  box-shadow: none !important;
  background: transparent;
  padding-left: 2.25rem;
}
.input-field .form-control:focus {
  border-color: transparent !important;
  box-shadow: none !important;
}
.pw-toggle {
  position: absolute;
  right: .5rem;
  background: none;
  border: none;
  color: #94a3b8;
  padding: .2rem .3rem;
  cursor: pointer;
  line-height: 1;
  font-size: .95rem;
}
.pw-toggle:hover { color: var(--green-dark); }

/* Notice gouvernementale */
.gov-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: .6rem .9rem;
  font-size: .78rem;
  color: #78350f;
}

/* ── OTP / MFA ───────────────────────────────────────────────────────────── */
input[type='text'].otp-input {
  font-size: 1.8rem;
  letter-spacing: .5rem;
  text-align: center;
}
