/* =====================================================
   AUTH (login / reset / change password)
   Responsive: mobile -> laptop 14" -> desktop
===================================================== */

/* ---- Base ---- */
:root{
  --auth-bg: #f6f7fb;
  --auth-card: #ffffff;
  --auth-orange: #F07A1A;
  --auth-orange2: #ff5200;
  --auth-text: #111827;
  --auth-muted: #6b7280;
  --auth-border: #e5e7eb;
  --auth-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

*{ box-sizing: border-box; }

.auth-body{
  margin:0;
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  background: var(--auth-bg);
  color: var(--auth-text);

  /* Autoriser le scroll si écran bas */
  overflow-y: auto;
}

.auth-bg{
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left,#fff5ea,#f6f7fb 60%);
  z-index: -1;
}

/* ---- Shell ---- */
.auth-shell{
  width: 100%;
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}

/* ---- Card ---- */
.auth-container{
  width: min(1050px, 94vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 26px;
  overflow: hidden;
  background: var(--auth-card);
  box-shadow: var(--auth-shadow);
}

/* Colonne image */
.auth-left{
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 18% 22%;
  min-height: 520px; /* base desktop */
}

/* Colonne form */
.auth-right{
  padding: 46px 56px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 18px;
  background: #fff;
  text-align:left;
}

.auth-right-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom: 6px;
}

.cie-logo{
  height: 46px;
  width:auto;
  object-fit:contain;
}

.head-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.head-kicker{
  font-size: 18px;
  font-weight: 700;
  color: var(--auth-orange);
}

.head-sub{
  font-size: 13px;
  font-weight: 800;
  color: var(--auth-orange);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ---- Titre ---- */
.auth-title{
  font-size: 30px;
  font-weight: 900;
  color: var(--auth-orange);
  margin: 4px 0 8px 0;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: normal; /* ✅ évite overflow */
}

/* ---- Info box ---- */
.info-box{
  background:#e7f1ff;
  border-left:4px solid #0B5FA5;
  padding:12px 14px;
  border-radius:10px;
  font-size:14px;
  color:#0B5FA5;
  line-height:1.4;
}

.pwd-note{
  margin: -6px 0 2px 4px;
  font-size: 13px;
  color: var(--auth-muted);
}

/* ---- Form ---- */
.auth-form{
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.input-group{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  background:#fff;
  font-size: 15px;
}

.input-icon{ font-size: 18px; opacity: .8; }

.input-group input{
  border:none;
  outline:none;
  font-size: 15px;
  width:100%;
  background:transparent;
}

.password-group{ position: relative; }

.toggle-password{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:18px;
  opacity:.7;
  transition:.18s;
  padding: 4px 6px;
}
.toggle-password:hover{ opacity: 1; transform: scale(1.05); }

/* ---- Links ---- */
.auth-links{
  text-align:right;
  font-size: 13px;
}
.forgot{
  color: #111;
  text-decoration:none;
}
.forgot:hover{ text-decoration: underline; }

.auth-footer{
  text-align:center;
  font-size: 14px;
  color:#222;
  margin-top: 6px;
}

/* ---- Buttons ---- */
.btn-primary{
  margin-top: 4px;
  background: linear-gradient(135deg, var(--auth-orange), var(--auth-orange2));
  border:none;
  color:#fff;
  font-size: 18px;
  font-weight: 800;
  padding: 14px;
  border-radius: 16px;
  cursor:pointer;
  transition: .18s;
}
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(255,90,0,.35);
}

/* ---- Variantes centrées (change password) ---- */
.auth-main-centered{
  grid-template-columns: 1fr !important;
  justify-items: center;
  align-items: center;
  padding: 0 16px !important;
}

.auth-card-centered{
  width: min(520px, 94vw);
  margin: 0 auto !important;
  padding: 32px 30px 28px !important;
}

/* =====================================================
   Responsive
===================================================== */

/* Laptop/écran bas (14 pouces typique) */
@media (max-height: 820px){
  .auth-shell{ padding: 14px; }

  .auth-left{ min-height: 420px; }

  .auth-right{
    padding: 34px 40px;
    gap: 14px;
  }

  .auth-title{ font-size: 26px; }
  .btn-primary{ font-size: 16px; padding: 12px; }
}

/* Tablette / petit laptop */
@media (max-width: 900px){
  .auth-container{
    grid-template-columns: 1fr;
  }

  .auth-left{
    min-height: 220px;
    background-position: center;
  }

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

/* Mobile */
@media (max-width: 600px){
  .auth-shell{ padding: 10px; }

  .auth-container{
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
  }

  .cie-logo{ height: 32px; }
  .head-kicker{ font-size: 14px; }
  .head-sub{ font-size: 11px; }

  .auth-title{ font-size: 22px; margin-bottom: 4px; }
  .input-group{ padding: 10px 12px; font-size: 14px; }
  .btn-primary{ font-size: 15px; padding: 11px; border-radius: 12px; }
  .auth-footer{ font-size: 13px; }
}

/* Très petit mobile */
@media (max-width: 420px){
  .auth-right{ padding: 22px 16px; }
  .auth-title{ font-size: 20px; }
  .input-group{ padding: 9px 10px; }
  .btn-primary{ padding: 10px; }
}


/* =====================================================
   AUTH — réduire la hauteur visuelle sur écrans bas
   (formulaire trop haut mais doit rester centré)
===================================================== */

@media (max-height: 650px){

  /* Réduit la hauteur globale de la carte */
  .auth-container{
    max-height: 90vh;           /* au lieu de prendre trop de place */
  }

  /* Réduit les paddings verticaux (gros gain visuel) */
  .auth-right{
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  /* Titre un peu plus compact */
  .auth-title{
    font-size: 22px !important;
    margin-bottom: 6px !important;
  }

  /* Champs plus compacts */
  .auth-form{
    gap: 10px !important;
  }

  .input-group{
    padding: 10px 12px !important;
  }

  /* Bouton un peu moins haut */
  .btn-primary{
    padding: 11px 12px !important;
    font-size: 15px !important;
  }

  /* Footer plus discret */
  .auth-footer{
    margin-top: 4px !important;
    font-size: 13px !important;
  }
}
