/* ==========================================================================
   Écrans d'authentification (maquette « Connexion »)
   - gauche : panneau bleu nuit, logo, accroche, tableau de bord en orbite, garanties ;
   - droite : fond clair, carte blanche avec le logo et le formulaire (jetons clairs locaux).
   ========================================================================== */

.auth-body { background: #f6f5fb; }

.auth { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(420px, 1fr); min-height: 100vh; }

/* ---------- Logo « d » + Delomid CONNECT ---------- */
.brand-logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-logo__mark { width: 40px; height: 52px; flex-shrink: 0; }
.brand-logo__name { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.3rem; letter-spacing: 0.01em; }
.brand-logo__name span:first-child { font-weight: 800; }
.brand-logo__name span:last-child { font-weight: 500; letter-spacing: 0.04em; }
.brand-logo--light { color: #ffffff; }
.brand-logo--dark { color: #141a3c; }
.brand-logo--dark .brand-logo__mark { width: 48px; height: 62px; }
.brand-logo--dark .brand-logo__name { font-size: 1.5rem; }

/* ---------- Panneau gauche ---------- */
.auth__visual {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-4); min-height: 100vh;
  padding: clamp(28px, 4vw, 56px) clamp(28px, 5vw, 92px) clamp(24px, 3vw, 40px); color: #ffffff;
  background:
    radial-gradient(ellipse 60% 50% at 30% 55%, rgba(124, 58, 237, 0.22), transparent 70%),
    linear-gradient(160deg, #1d2150 0%, #161a42 55%, #131637 100%);
}
/* Grand arc décoratif en haut à droite */
.auth__visual::before {
  content: ""; position: absolute; top: -170px; right: -150px; width: 470px; height: 470px; border-radius: 50%;
  border: 64px solid rgba(160, 30, 170, 0.32); pointer-events: none;
}
.auth__visual > * { position: relative; }

.auth__pitch { max-width: 640px; margin-top: var(--space-4); }
.auth__headline { margin: 0 0 var(--space-4); font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; }
.auth__headline-accent { background: linear-gradient(90deg, #ff2ec4, #d01cd8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth__tagline { margin: 0; max-width: 580px; font-size: clamp(1rem, 1.25vw, 1.2rem); color: #c9cde6; line-height: 1.55; }

.auth__figure { display: block; width: auto; max-width: min(100%, 860px); max-height: min(52vh, 560px); height: auto; margin: 0 auto; align-self: center; filter: drop-shadow(0 30px 50px rgba(8, 10, 40, 0.45)); }

.auth__trust { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-4) clamp(24px, 4vw, 64px); margin: auto 0 0; padding: 0; }
.auth__trust li { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: #c9cde6; }
.auth__trust li .icon { width: 26px; height: 26px; flex-shrink: 0; color: #ffffff; }
.auth__trust strong { display: block; color: #ffffff; font-weight: 700; }

/* ---------- Panneau formulaire : fond clair, carte blanche, jetons clairs ---------- */
.auth__panel {
  color-scheme: light;
  --color-surface: #ffffff;
  --color-surface-muted: #f4f5fa;
  --color-input: #f4f5fa;
  --color-border: #e4e6ef;
  --color-border-strong: #dcdfea;
  --color-navy-50: #eef0f7;
  --color-text: #141a3c;
  --color-text-secondary: #5f6683;
  --color-text-muted: #7c829c;
  --color-link: #c414a8;
  --color-focus: #c414a8;
  --ring: 0 0 0 3px rgba(214, 2, 179, 0.18);
  --color-success: #146c43;
  --color-success-bg: #e7f5ee;
  --color-warning: #8a4b00;
  --color-warning-bg: #fff4e0;
  --color-danger: #b42318;
  --color-danger-bg: #fdecea;
  --color-info: #3b1d6e;
  --color-info-bg: #f3ecfd;
  --brand-gradient: linear-gradient(90deg, #e414b4 0%, #a31ab8 55%, #6a1a9a 100%);

  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 56px); color: var(--color-text);
  background: #f6f5fb;
}
/* Quart de cercle lilas en bas à droite */
.auth__panel::after {
  content: ""; position: absolute; right: -140px; bottom: -160px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(196, 160, 255, 0.45), rgba(232, 214, 255, 0.25)); pointer-events: none;
}
.auth__card {
  position: relative; z-index: 1; width: 100%; max-width: 560px; padding: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 64px);
  background: #ffffff; border-radius: 28px; box-shadow: 0 24px 60px rgba(28, 22, 70, 0.10), 0 2px 8px rgba(28, 22, 70, 0.04);
}
.auth__logo { display: flex; justify-content: center; margin-bottom: var(--space-6); }

.auth__title { font-size: clamp(2rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 var(--space-3); }
.auth__intro { color: var(--color-text-secondary); font-size: var(--text-md, 1.05rem); line-height: 1.5; margin: 0 0 var(--space-6); }
.auth__intro strong { color: var(--color-text); }
.auth__form .field + .field { margin-top: var(--space-5); }
.auth__form .label { font-weight: 700; margin-bottom: var(--space-2); }
.auth__form .otp { margin: var(--space-2) 0 var(--space-2); }
.auth__panel .input { min-height: 54px; border-radius: 12px; border-color: var(--color-border-strong); background: var(--color-input); font-size: var(--text-md, 1rem); }
.auth__panel .input::placeholder { color: #9aa0b6; }
.auth__panel .input:focus-visible { background: #ffffff; border-color: var(--color-focus); }
.auth__panel .input-group .input { padding-left: 52px; }
.auth__panel .input-icon-left { left: 18px; color: #5f6683; }
.auth__panel .input-icon-left .icon { width: 20px; height: 20px; }
.auth__panel .input-action { right: 10px; color: #5f6683; }

.auth__options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); }
.auth__check { display: inline-flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); cursor: pointer; }
.auth__check input { width: 22px; height: 22px; margin: 0; accent-color: #d602b3; cursor: pointer; }

.auth__submit { margin-top: var(--space-5); min-height: 58px; border-radius: 12px; font-size: 1.1rem; }
.auth__panel .btn--primary { background: #19254d; color: #ffffff; border: 0; box-shadow: 0 12px 26px rgba(25, 37, 77, 0.28); }
.auth__panel .btn--primary:hover { background: #22326a; box-shadow: 0 14px 30px rgba(25, 37, 77, 0.36); }
.auth__alert { margin-bottom: var(--space-5); }
.auth__link { color: var(--color-link); font-size: var(--text-sm); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: var(--space-1); }
.auth__link:hover { color: #9c0e86; }
.auth__link--strong { font-size: var(--text-md, 1rem); font-weight: 700; text-decoration: none; }
.auth__link--strong:hover { text-decoration: underline; }
.auth__link .icon { width: 18px; height: 18px; }
.auth__contact { margin: var(--space-6) 0 0; text-align: center; font-size: var(--text-sm); color: var(--color-text-secondary); }
.auth__secondary { margin-top: var(--space-5); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }
.auth__secondary form { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-1); }
.auth__footer { position: relative; z-index: 1; margin: var(--space-5) 0 0; font-size: var(--text-xs); color: var(--color-text-muted); }

.auth__badge {
  display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border-radius: 16px; background: var(--brand-gradient); color: #ffffff; margin-bottom: var(--space-4);
}
.auth__badge--danger { background: var(--color-danger-bg); color: var(--color-danger); }

/* ---------- Écrans moyens : visuel plus compact ---------- */
@media (max-width: 1560px) {
  .auth__trust { gap: var(--space-3) var(--space-5); }
  .auth__trust li { font-size: var(--text-xs); }
  .auth__trust li .icon { width: 22px; height: 22px; }
}
@media (max-width: 1200px) {
  .auth { grid-template-columns: minmax(0, 1.1fr) minmax(400px, 1fr); }
  .auth__trust { gap: var(--space-3) var(--space-5); }
}

/* ---------- Mobile : bandeau compact en haut, formulaire dessous ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth__visual { gap: var(--space-3); min-height: 0; padding: var(--space-5) var(--space-4); }
  .auth__visual::before { width: 260px; height: 260px; border-width: 36px; top: -110px; right: -100px; }
  .auth__pitch { margin-top: var(--space-2); }
  .auth__headline { font-size: 1.7rem; margin-bottom: 0; }
  .auth__tagline, .auth__figure, .auth__trust { display: none; }
  .auth__panel { justify-content: flex-start; padding: var(--space-5) var(--space-4); }
  .auth__card { border-radius: 22px; padding: var(--space-6) var(--space-5); }
  .auth__logo { display: none; }
}
