/* ═══════════════════════════════════════════════════════════════════════════
   CHAMPAGNE GARDET — LOGIN (connexion)
   Plaque dorée embossée façon coffret de bijouterie.
   Repose sur les tokens et la base définis dans homepage.css.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Variables locales (palette or "metal réel") ─── */
:root {
  --gold-highlight:  #f5d98a;
  --gold-mid:        #d4ad53;
  --gold-shadow:     #8a6a28;
  --gold-engraved:   #3a280f;
  --gold-engraved-2: #54391a;
}

/* ─── Body — un poil plus clair que la home pour matcher la maquette ─── */
body.page-login {
  background:
    radial-gradient(ellipse at 50% 0%, #353535 0%, #2b2b2b 40%, #232323 100%);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.login-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 7vw, 90px) 20px clamp(80px, 12vw, 140px);
}

/* Cadre sombre extérieur, légère ombre portée intérieure (relief discret) */
.login-card {
  position: relative;
  width: min(100%, 560px);
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #2a2a2a 0%, #232323 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.6),
    0 10px 20px -20px rgba(0,0,0,0.6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLAQUE OR EMBOSSÉE
   ═══════════════════════════════════════════════════════════════════════════ */

.gold-plate {
  position: relative;
  padding: clamp(34px, 5vw, 50px) clamp(28px, 4vw, 46px) clamp(40px, 5vw, 54px);
  border-radius: 6px;
  text-align: center;
  /* Métal : sheen vertical (lumière du haut) + variation horizontale subtile */
  background:
    /* Reflet brillant horizontal (centre lumineux) */
    radial-gradient(ellipse 90% 60% at 50% 35%, rgba(255,240,180,0.35) 0%, transparent 60%),
    /* Sheen vertical brossé */
    linear-gradient(180deg,
      #b88f3c 0%,
      #d4ad53 8%,
      #e7c870 22%,
      #d8b35a 45%,
      #c9a14a 65%,
      #b18a38 85%,
      #c9a04a 100%
    );
  /* Reliefs : bord supérieur clair, bord inférieur sombre, encadrement */
  box-shadow:
    /* Highlight haut */
    inset 0 2px 0 rgba(255,240,200,0.65),
    /* Ombre bas */
    inset 0 -2px 0 rgba(60,40,10,0.55),
    /* Côtés */
    inset 3px 0 0 rgba(255,235,180,0.18),
    inset -3px 0 0 rgba(60,40,10,0.35),
    /* Bordure embossée extérieure 
    inset 0 0 0 6px rgba(255,230,170,0.08),
    inset 0 0 0 7px rgba(60,40,10,0.18),*/
    /* Ombre portée extérieure */
    0 18px 20px -12px rgba(0,0,0,0.55),
    0 4px 12px rgba(0,0,0,0.4);
}

/* Cadre intérieur ciselé (le rectangle gravé dans la plaque) */
.plate-inner-frame {
  position: absolute;
  inset: 16px;
  border-radius: 3px;
  pointer-events: none;
  box-shadow:
    /* Trait sombre (creusé) */
    inset 0 1px 0 rgba(60,40,10,0.55),
    inset 1px 0 0 rgba(60,40,10,0.4),
    inset -1px 0 0 rgba(255,230,170,0.25),
    inset 0 -1px 0 rgba(255,230,170,0.45),
    /* Léger relief en pourtour */
    0 1px 0 rgba(255,230,170,0.3),
    0 -1px 0 rgba(60,40,10,0.3);
}

/* ─── LOGO sur la plaque ─── */
.plate-logo {
  display: flex;             /* block-level flex → toute la largeur du parent */
  justify-content: center;   /* centre le SVG horizontalement, peu importe la taille du viewBox */
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}

.logo-svg--embossed {
  width: clamp(180px, 36%, 240px);
  height: auto;
  /* Couleur gravée + double drop-shadow pour effet "stamped in metal" */
  color: var(--gold-engraved);
  filter:
    drop-shadow(0 1px 0 rgba(255,240,200,0.5))
    drop-shadow(0 -1px 0 rgba(40,25,5,0.35));
}

/* ─── Titre "Dealer Portal Login" ─── */
.plate-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4.5vw, 2.4rem);
  letter-spacing: 0.005em;
  color: var(--gold-engraved);
  margin: 0 0 30px;
  position: relative;
  z-index: 1;
  /* Effet gravé : ombre claire en bas, sombre en haut */
  text-shadow:
    0 1px 0 rgba(255,240,200,0.55),
    0 -1px 0 rgba(40,25,5,0.35);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM
   ═══════════════════════════════════════════════════════════════════════════ */

.login-form {
  position: relative;
  z-index: 1;
}

/* Erreur — pilule discrète au-dessus du champ */
.form-error {
  background: rgba(80,15,15,0.85);
  color: #ffd5d0;
  font-size: 13px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  padding: 10px 18px;
  border-radius: 4px;
  margin-bottom: 16px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.4);
  box-shadow:
    inset 0 1px 0 rgba(255,200,180,0.15),
    0 2px 6px rgba(0,0,0,0.3);
}

/* ─── Tray (le conteneur recessed qui regroupe les 2 inputs) ─── */
.input-tray {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.05) 100%);
  border-radius: 26px;
  padding: 10px;
  margin-bottom: 22px;
  box-shadow:
    /* Creusé dans la plaque */
    inset 0 2px 4px rgba(40,25,5,0.5),
    inset 0 -1px 0 rgba(255,240,200,0.35),
    inset 2px 0 2px rgba(40,25,5,0.25),
    inset -2px 0 2px rgba(40,25,5,0.25),
    /* Léger reflet bas extérieur */
    0 1px 0 rgba(255,240,200,0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field { position: relative; }

/* ─── Inputs (chacun en pilule recessed dans le tray) ─── */
.input-tray input {
  width: 100%;
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  font-weight: 400;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(40,25,5,0.4);
  background:
    linear-gradient(180deg, rgba(15,10,0,0.65) 0%, rgba(30,20,5,0.55) 100%);
  color: var(--gold-highlight);
  letter-spacing: 0.01em;
  box-shadow:
    /* Creux */
    inset 0 2px 3px rgba(0,0,0,0.55),
    inset 0 -1px 0 rgba(255,230,170,0.18);
  outline: none;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.input-tray input::placeholder {
  color: rgba(201,168,76,0.55);
  font-weight: 300;
  letter-spacing: 0.01em;
}

.input-tray input:hover {
  border-color: rgba(40,25,5,0.6);
}

.input-tray input:focus {
  border-color: rgba(255,235,170,0.55);
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,0.55),
    inset 0 -1px 0 rgba(255,230,170,0.25),
    0 0 0 2px rgba(255,220,140,0.18);
}

.input-tray input[aria-invalid="true"] {
  border-color: rgba(180,60,40,0.7);
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,0.55),
    0 0 0 2px rgba(180,60,40,0.18);
}

/* Désactive l'autofill bleu du navigateur */
.input-tray input:-webkit-autofill,
.input-tray input:-webkit-autofill:hover,
.input-tray input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--gold-highlight);
  -webkit-box-shadow: 0 0 0 1000px rgba(20,14,2,0.95) inset, inset 0 2px 3px rgba(0,0,0,0.55);
  caret-color: var(--gold-highlight);
  transition: background-color 9999s ease-in-out 0s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOUTON SIGN IN — relief or
   ═══════════════════════════════════════════════════════════════════════════ */

.btn-sign-in {
  width: 100%;
  padding: 16px 24px;
  border-radius: 6px;
  border: 1px solid rgba(40,25,5,0.6);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 2.6vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--gold-engraved);
  cursor: pointer;
  /* Bouton en relief : sheen vertical clair → mid → sombre */
  background:
    linear-gradient(180deg,
      #f4d585 0%,
      #e2bc60 15%,
      #d4ad53 50%,
      #b8923c 85%,
      #d4ad53 100%
    );
  box-shadow:
    /* Highlight haut */
    inset 0 2px 0 rgba(255,245,200,0.7),
    inset 0 -2px 0 rgba(60,40,10,0.5),
    inset 2px 0 0 rgba(255,240,200,0.25),
    inset -2px 0 0 rgba(60,40,10,0.25),
    /* Cadre embossé */
    inset 0 0 0 4px rgba(255,235,170,0.1),
    inset 0 0 0 5px rgba(60,40,10,0.18),
    /* Ombre portée pour décollement */
    0 4px 10px rgba(0,0,0,0.35);
  text-shadow:
    0 1px 0 rgba(255,240,200,0.55),
    0 -1px 0 rgba(40,25,5,0.25);
  transition: all 0.18s ease;
  margin-bottom: 26px;
}

.btn-sign-in:hover {
  background:
    linear-gradient(180deg,
      #f8df95 0%,
      #ecc670 15%,
      #ddb55c 50%,
      #c39a44 85%,
      #ddb55c 100%
    );
  box-shadow:
    inset 0 2px 0 rgba(255,250,210,0.8),
    inset 0 -2px 0 rgba(60,40,10,0.5),
    inset 2px 0 0 rgba(255,240,200,0.3),
    inset -2px 0 0 rgba(60,40,10,0.3),
    inset 0 0 0 4px rgba(255,235,170,0.13),
    inset 0 0 0 5px rgba(60,40,10,0.2),
    0 6px 14px rgba(0,0,0,0.4);
}

.btn-sign-in:active {
  /* Enfoncé : on inverse le sheen */
  background:
    linear-gradient(180deg,
      #b8923c 0%,
      #d4ad53 50%,
      #f4d585 100%
    );
  box-shadow:
    inset 0 3px 5px rgba(40,25,5,0.5),
    inset 0 -1px 0 rgba(255,240,200,0.3),
    0 1px 3px rgba(0,0,0,0.25);
  transform: translateY(1px);
}

.btn-sign-in:focus-visible {
  outline: 2px solid rgba(255,240,180,0.7);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PIED DE PLAQUE — "Not a partner yet ?"
   ═══════════════════════════════════════════════════════════════════════════ */

.plate-footer-text {
  font-family: 'Jost', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--gold-engraved);
  text-align: center;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(255,240,200,0.45);
}

.apply-link {
  color: var(--gold-engraved);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

.apply-link:hover {
  color: #1a0e02;
  text-decoration-thickness: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Visually-hidden but accessible */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot : invisible aux humains, présent dans le DOM pour les bots */
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .login-card {
    padding: 14px;
    border-radius: 18px;
  }
  .gold-plate {
    border-radius: 5px;
  }
  .plate-title {
    margin-bottom: 24px;
  }
  .input-tray input {
    font-size: 14px;
    padding: 13px 18px;
  }
  .btn-sign-in {
    padding: 14px 20px;
  }
  .plate-footer-text {
    font-size: 12.5px;
  }
}

@media (max-width: 380px) {
  .login-wrap { padding-top: 24px; }
  .gold-plate { padding: 28px 20px 32px; }
  .logo-svg--embossed { width: 60%; }
}