/* ============================================
   Auth pages — inscription / connexion
   S'appuie sur les tokens définis dans style.css
   ============================================ */

.auth-body { background: var(--cream); }

.header-hint {
  font-size: .88rem;
  color: var(--ink-soft);
}

.auth-main {
  padding: 56px 0 80px;
}

.auth-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 0;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(34, 40, 31, .22);
  border: 1px solid var(--sage-line);
}

/* ---- panneau image (gauche) ---- */
.auth-side {
  position: relative;
  min-height: 100%;
  background: var(--green-deep);
}
.auth-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
  position: absolute;
  inset: 0;
}
.auth-side-copy {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  color: var(--white);
}
.auth-side-copy .tag {
  background: var(--white);
  color: var(--green-deep);
}
.auth-side-copy h2 {
  color: var(--white);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 12px;
}
.auth-side-copy p {
  color: rgba(255,255,255,.85);
  max-width: 34ch;
}

/* ---- carte formulaire (droite) ---- */
.auth-card {
  padding: 48px 52px;
}
.auth-card h1 {
  font-size: clamp(1.7rem, 2.6vw, 2.1rem);
  margin-bottom: 6px;
}
.auth-lead {
  margin-bottom: 30px;
  font-size: .95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field select {
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--sage-line);
  background: var(--cream);
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.field input::placeholder { color: #A7AE9C; }

.field input:focus,
.field select:focus {
  border-color: var(--green-mid);
  background: var(--white);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2333553A'><path d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%2333553A' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .85rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.checkbox-field input {
  margin-top: 3px;
  accent-color: var(--green-deep);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.role-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: var(--sage);
  border: 1px solid var(--sage-line);
  border-radius: 12px;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field-link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--green-mid);
  white-space: nowrap;
}
.field-link:hover { color: var(--green-deep); }

/* Connexion : formulaire plus court, on resserre un peu la carte */
.auth-wrap-tight .auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.field-label-standalone {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 8px;
}

.competence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}

.role-fields-note {
  font-size: .8rem;
  color: var(--ink-soft);
  margin: 0;
}

.btn-block { width: 100%; justify-content: center; margin-top: 6px; }

.auth-switch {
  text-align: center;
  margin-top: 26px;
  font-size: .9rem;
  color: var(--ink-soft);
}
.auth-switch a {
  color: var(--green-deep);
  font-weight: 600;
}
.auth-switch a:hover { color: var(--green-mid); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; border-radius: 20px; }
  .auth-side { min-height: 220px; }
  .auth-card { padding: 36px 28px; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .auth-main { padding: 32px 0 56px; }
  .auth-wrap { margin: 0 20px; }
  .header-hint { display: none; }
}