/* Page de connexion Kortex.
   Charte : socle Kortex Santé (/kx/tokens.css), thème posé par marque.js selon le portail
   (Conseil rouge sur crème, Pharma vert, outils internes bleu). Vitrine marine commune.
   Seules couleurs hors tokens : les translucides sur marine, faute de token dédié. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

/* ---------- Vitrine (gauche) : l'ADN marine, l'accent de la marque ---------- */
.vitrine {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px;
  background: var(--marine); color: var(--on-marine);
}
.vitrine::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 0% 100%, var(--accent), transparent 60%);
  opacity: .22;
}
.vitrine > * { position: relative; }
.vitrine-logo { height: 44px; width: auto; align-self: flex-start; }
.vitrine-texte { max-width: 24ch; }
.kicker {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--on-marine-soft);
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
.vitrine-phrase {
  margin: 0; font-size: clamp(28px, 3vw, 40px); font-weight: 600; line-height: 1.15; letter-spacing: -.02em;
}
.vitrine-pied {
  margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .4px; color: var(--on-marine-mute);
}
.vitrine-croix {
  position: absolute; right: -90px; bottom: -90px; width: 380px; height: auto;
  opacity: .2; pointer-events: none;
}

/* ---------- Panneau (droite) : le formulaire ---------- */
.panneau { display: grid; place-items: center; padding: 40px 24px; background: var(--bg-soft); }
.carte { width: 100%; max-width: 400px; animation: entree var(--dur-slow) var(--ease) both; }
.carte-logo { display: none; height: 34px; width: auto; margin-bottom: 28px; }

h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.chapo { margin: 10px 0 30px; font-size: 15.5px; line-height: 1.55; color: var(--text-soft); }

.champ { display: block; margin-bottom: 18px; }
.champ > span:first-child {
  display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 600; color: var(--text);
}
.champ input {
  width: 100%; height: 50px; padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--text);
  background: white; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.champ input:hover { border-color: var(--text-mute); }
.champ input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.champ-mdp { position: relative; display: block; }
.champ-mdp input { padding-right: 92px; }
.voir {
  position: absolute; right: 6px; top: 6px; height: 38px; padding: 0 12px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-soft);
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.voir:hover { color: var(--text); background: var(--bg-soft); }

.case {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 22px;
  font-size: 14.5px; color: var(--text-soft); cursor: pointer;
}
.case input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }

.erreur {
  margin: 0 0 18px; padding: 12px 14px;
  font-size: 14px; line-height: 1.45; color: var(--alerte);
  background: color-mix(in srgb, var(--alerte) 9%, white);
  border: 1px solid color-mix(in srgb, var(--alerte) 30%, white);
  border-radius: var(--radius-sm);
}

.bouton {
  width: 100%; height: 52px;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: 0; border-radius: var(--radius-pill); box-shadow: var(--shadow-accent); cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}
.bouton:hover { transform: translateY(-1px); filter: brightness(1.05); }
.bouton:active { transform: none; }
.bouton:disabled { opacity: .65; cursor: progress; transform: none; }

.voir:focus-visible, .bouton:focus-visible, .case input:focus-visible, .aide a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

.aide { margin: 26px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-mute); }
.aide a { color: var(--text-soft); text-underline-offset: 3px; }
.aide a:hover { color: var(--text); }

@keyframes entree { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Écrans étroits : plus de vitrine, le logo passe au-dessus du formulaire ---------- */
@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; }
  .vitrine { display: none; }
  .carte-logo { display: block; }
  .panneau { place-items: start center; padding: 40px 20px; }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .carte { animation: none; }
  .bouton, .champ input { transition: none; }
  .bouton:hover { transform: none; }
}
