/* ========== RESET & TOKENS ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 22px;
  --space-6: 28px;
  --space-7: 36px;

  --radius: 14px;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.16);

  --text: #1e1f24;
  --muted: #6b7280;
  --border: #e6e8ec;
  --panel: #ffffff;

  --brand: #ef476f;
  --blue: #4b8df8;
  --blue-2: #3c7be0;
  --focus-ring: 0 0 0 4px rgba(75, 141, 248, 0.18);
}

/* ========== FOND FLOU (conservé) ========== */
body {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  min-height: 100vh;
  background: url("IM/SE_page-0001.jpg") center/cover no-repeat fixed;
  display: grid;
  place-items: center;
  position: relative;
  overflow: auto;
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.22);
  z-index: -1;
}

/* ========== CARTE 2 COLONNES (COMPACTE) ========== */
.card {
  width: min(980px, 88vw); /* ← plus étroit */
  min-height: min(540px, 84vh); /* ← plus bas */
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 53% 47%; /* ratio équilibré */
  overflow: hidden;
}

/* ========== COLONNE GAUCHE COMPACTE ========== */
.left {
  padding: clamp(18px, 3.2vw, 34px); /* ← paddings réduits */
  display: grid;
  grid-template-rows: auto auto 1fr auto; /* head / intro / form / foot */
  row-gap: var(--space-5);
  align-content: start;
  max-width: 520px; /* largeur de lecture contenue */
}

.brand {
  color: var(--brand);
  font-weight: 700;
  font-size: 20px; /* logo plus discret */
  letter-spacing: 0.2px;
  margin-bottom: var(--space-3);
}

/* --- LOGOS EN HAUT (uniformes, centrés) --- */
.providers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.8vw, 18px);
  align-items: center;
  justify-items: center; /* ← centrés */
  max-width: 500px;
  margin-right: auto;
}
.provider {
  width: clamp(54px, 6.4vw, 66px); /* ← plus petit */
  height: clamp(34px, 4.2vw, 42px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, filter 0.2s ease;
}
.provider::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 16px;
  background: radial-gradient(
    closest-side,
    rgba(75, 141, 248, 0.1),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}
.provider:hover {
  transform: translateY(-2px);
}
.provider:hover::after {
  opacity: 1;
}
.provider img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.provider.placeholder img {
  opacity: 0.35;
}

.title {
  font-size: clamp(20px, 2.4vw, 24px); /* ← plus fin */
  line-height: 1.25;
  margin-bottom: var(--space-2);
}
.subtitle {
  color: var(--muted);
  font-size: clamp(13px, 1.2vw, 14px);
  line-height: 1.55;
}

/* ========== FORMULAIRE (ajusté) ========== */
.form {
  display: grid;
  gap: var(--space-3);
  max-width: 500px;
}
.field {
  position: relative;
}
.field input {
  width: 100%;
  padding: 14px 44px 12px 44px; /* ← un peu plus compact */
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus {
  border-color: #8ec7ff;
  background: #f7fbff;
  box-shadow: var(--focus-ring);
}
.field label {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa4b2;
  font-size: 13.5px;
  background: #fff;
  padding: 0 0.32rem;
  pointer-events: none;
  transition: all 0.18s ease;
}
.field input:placeholder-shown + label {
  top: 50%;
  font-size: 13.5px;
}
.field input:not(:placeholder-shown) + label,
.field input:focus + label {
  top: -9px;
  font-size: 11px;
  color: #6b8fbe;
}
.icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 12px;
  color: #8aa0b4;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.options {
  color: #5f6b77;
  font-size: 13px;
  margin-top: 2px;
}
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.link {
  color: #6f8db2;
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
}

/* Bouton compact */
.btn-primary {
  margin-top: var(--space-2);
  width: 100%;
  padding: 12px 14px; /* ← plus fin */
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--blue), var(--blue-2));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s, transform 0.06s, box-shadow 0.2s;
  box-shadow: 0 8px 20px rgba(75, 141, 248, 0.24); /* ombre plus légère */
}
.btn-primary:hover {
  filter: brightness(1.03);
  box-shadow: 0 10px 24px rgba(75, 141, 248, 0.3);
}
.btn-primary:active {
  transform: translateY(1px);
}

.foot-note {
  margin-top: var(--space-3);
  font-size: 13px;
  color: var(--muted);
}
.tiny-note {
  margin-top: var(--space-2);
  font-size: 11px;
  color: #c0c4cc;
}

/* ========== COLONNE DROITE (IMAGE) ========== */
.right {
  background-image: url("IM/hero.jpg"); /* ← remplace par ton image */
  background-size: cover;
  background-position: center;
  position: relative;
}
.right::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0) 35%
  );
  pointer-events: none;
}

/* ========== ACCESSIBILITÉ ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ========== RESPONSIVE ========== */
/* Tablette / petits laptops */
@media (max-width: 980px) {
  .card {
    grid-template-columns: 1fr;
    width: min(900px, 92vw);
  }
  .right {
    height: 240px;
    order: -1;
  }
  .left {
    padding: 18px 18px 26px;
  }
  .providers {
    grid-template-columns: repeat(5, minmax(50px, 1fr));
  }
}

/* Mobile */
@media (max-width: 640px) {
  .providers {
    gap: 12px;
  }
  .provider {
    width: clamp(48px, 15vw, 58px);
    height: clamp(30px, 8.5vw, 38px);
  }
  .field input {
    padding: 14px 42px 12px 42px;
  }
}

/* Très petit mobile */
@media (max-width: 420px) {
  .btn-primary {
    padding: 11px 12px;
    border-radius: 11px;
  }
}
