/* =========================
   styles/login.css
   Style sobre, fond blanc, texte noir
   Accents orange #f17100
   ========================= */

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

:root{
  --brand: #f17100;
  --brand-dark:#d85e00;
  --text:#111;
  --muted:#666;
  --line:#e9e9e9;
  --shadow: 0 8px 22px rgba(0,0,0,.06);
  --radius: 14px;
}

html,body{
  height: 100%;
  background:#fff;
  color:var(--text);
}

/* ===== Wrapper (centré) ===== */
.login-page {
  min-height: 100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: clamp(16px, 4vw, 32px);
}

/* ===== Carte ===== */
.login-card{
  width: 100%;
  max-width: 430px;
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 28px);
}

/* Logo (facultatif) */
.login-logo{
  display:flex;
  justify-content:center;
  margin-bottom: 10px;
}
.login-logo img{
  height: 48px;
  width:auto;
}

/* Titres & sous-titres */
.login-title{
  font-size: 1.85rem;
  font-weight: 700;
  text-align:center;
  margin-bottom: 6px;
  letter-spacing:.2px;
}
.login-subtitle{
  text-align:center;
  color: var(--muted);
  margin-bottom: 18px;
  font-size: .98rem;
}

/* Messages */
.login-alert{
  display:none;               /* .show pour l’afficher */
  padding: 10px 12px;
  border-radius: 10px;
  border:1px solid var(--line);
  background:#fff7f0;
  color:#7a3c00;
  margin-bottom: 14px;
  line-height:1.35;
}
.login-alert.show{ display:block; }

/* ===== Form ===== */
.login-form{
  display:grid;
  gap: 12px;
}

/* Label + input group */
.form-group{
  display:grid;
  gap: 8px;
}

label{
  font-size:.95rem;
  color: var(--text);
}

.input{
  width:100%;
  padding: 12px 14px;
  border:1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background:#fff;
  color:var(--text);
}
.input::placeholder{ color:#999; }

.input:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(241,113,0,.15);
}

/* ===== Boutons ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: transform .04s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  user-select:none;
}

.btn:active{ transform: translateY(1px); }

/* Orange plein */
.btn-primary{
  background: var(--brand);
  color:#fff;
  box-shadow: 0 6px 16px rgba(241,113,0,.18);
}
.btn-primary:hover{ background: var(--brand-dark); }

/* Bouton clair (Google, etc.) */
.btn-ghost{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
}
.btn-ghost:hover{
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(241,113,0,.12);
}

/* Icône Google (20px conseillé) */
.btn-ghost img{ width:20px; height:20px; }

/* ===== Lignes & séparateur ===== */
.divider{
  position:relative;
  text-align:center;
  color:#aaa;
  margin: 14px 0;
  font-size:.9rem;
}
.divider::before,
.divider::after{
  content:"";
  position:absolute;
  top:50%;
  width:38%;
  height:1px;
  background: var(--line);
}
.divider::before{ left:0; }
.divider::after{ right:0; }

/* ===== Liens secondaires ===== */
.login-links{
  margin-top: 10px;
  display:flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .92rem;
}
.login-links a{
  color: var(--brand);
  text-decoration:none;
}
.login-links a:hover{ text-decoration:underline; }


/* ===== Footer du formulaire ===== */
.login-footer{
  margin-top: 16px;
  text-align:center;
  font-size:.95rem;
  color: var(--muted);
}
.login-footer a{
  color: var(--brand);
  text-decoration:none;
  font-weight:600;
}
.login-footer a:hover{ text-decoration: underline; }

/* ===== États & helpers ===== */
.is-hidden{ display:none !important; }
.is-error{
  border-color:#e54848 !important;
  box-shadow: 0 0 0 3px rgba(229,72,72,.15) !important;
}
.error-text{
  color:#c63535;
  font-size:.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 520px){
  .login-card{ padding: 18px; border-radius: 12px; }
  .login-title{ font-size: 1.6rem; }
}


/* ---- Sélecteur de rôle ---- */
.role-select { margin-bottom: 8px; }
.role-label { font-weight: 700; }
.role-options { display:flex; gap:16px; margin-top:6px; }
.role-options label { display:flex; align-items:center; gap:6px; font-weight:600; }
