/* Lokam Industrie · Portail clients & partenaires */

:root {
  --bg: #060606;
  --surface: #0f0f0f;
  --line: #222222;
  --line-strong: #333333;
  --letter: #e7e7e7;
  --text: #f0f0f0;
  --text-soft: #a9a9a9;
  --text-muted: #8f8f8f;
  --text-faint: #6b6b6b;
  --green: #1fb14a;
  --green-hover: #26c456;
  --danger: #ff6b5e;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-serif: "Tinos", "Times New Roman", Times, serif;

  --gutter: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p { margin: 0; }

.mono {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible { outline: 1px solid var(--green); outline-offset: 3px; }

/* ---------- Barre haute ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 82px;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }

.logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--text);
}
.logo-dot { color: var(--green); }

.brand-rule { width: 22px; height: 1px; background: var(--line); }
.brand-label { color: var(--text-muted); white-space: nowrap; }

.topbar-right { display: flex; align-items: center; gap: 30px; }

.session {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  white-space: nowrap;
}
.icon-lock { width: 13px; height: 13px; color: var(--green); stroke-width: 1.8; }

.invite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.invite .icon { width: 13px; height: 13px; stroke-width: 1.8; transition: transform 0.2s ease; }
.invite:hover { color: var(--green); }
.invite:hover .icon { transform: translate(2px, -2px); }

.lang { display: inline-flex; align-items: center; gap: 9px; }
.lang button { color: var(--text-faint); letter-spacing: inherit; text-transform: uppercase; transition: color 0.15s ease; }
.lang button:hover { color: var(--text-soft); }
.lang button[aria-pressed="true"] { color: var(--text); }
.lang-sep { color: var(--line-strong); }

/* ---------- Scène principale ---------- */

.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 522fr) minmax(0, 630fr);
  grid-template-rows: 242fr auto 266fr;
  padding: 0 var(--gutter);
  position: relative;
}

.letters {
  grid-column: 1 / -1;
  padding: 0 3.125%;
  pointer-events: none;
  user-select: none;
}
.letters svg { display: block; width: 100%; height: auto; overflow: visible; }
.letters polygon,
.letters path { fill: var(--letter); }
.letters .dot { fill: var(--green); }

.letters-top { grid-row: 1; align-self: end; }
.letters-bottom { grid-row: 3; align-self: start; }

.intro {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  max-width: 48%;
  margin-bottom: 34px;
  position: relative;
  z-index: 1;
}
.intro h2 { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 12px; }
.intro p { font-size: 13px; line-height: 19.5px; color: var(--text-soft); }

.band {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 522fr) minmax(0, 630fr);
  padding: 36px 0 40px;
  position: relative;
  z-index: 1;
}

.title-block { align-self: end; padding-right: 24px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 16px;
  margin-bottom: 15px;
  color: var(--text-muted);
}
.pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(31, 177, 74, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

.title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-variant: small-caps;
  font-size: clamp(38px, 4.55vw, 70px);
  line-height: 0.75;
  letter-spacing: 0;
  color: var(--text);
  white-space: nowrap;
}
.title .accent { color: var(--green); }

/* ---------- Formulaire ---------- */

.login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  column-gap: 14px;
  align-items: end;
  position: relative;
}

.field { display: grid; gap: 10px; min-width: 0; }

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 16px;
}
.field-head label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); white-space: nowrap; }
.label-rule { width: 9px; height: 1px; background: currentColor; opacity: 0.8; }

.forgot { font-size: 12px; color: #bdbdbd; white-space: nowrap; transition: color 0.15s ease; }
.forgot:hover { color: var(--green); }

.control { position: relative; color: #8a8a8a; }
.control > .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); pointer-events: none; transition: color 0.15s ease; }

.control input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 43px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  font: 400 14.5px/1 var(--font-sans);
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.control input::placeholder { color: #808080; opacity: 1; }
.control input:hover { border-color: #2e2e2e; }
.control input:focus { border-color: var(--green); background: #111; }
.control:focus-within > .icon { color: var(--text); }
.control input[type="password"],
.control input#access-key { padding-right: 46px; }

.control input[aria-invalid="true"] { border-color: var(--danger); }

.control input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--text);
}

.reveal {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #8a8a8a;
  transition: color 0.15s ease;
}
.reveal:hover { color: var(--text); }
.reveal .icon-eye { display: none; }
.reveal[aria-pressed="true"] .icon-eye { display: block; }
.reveal[aria-pressed="true"] .icon-eye-off { display: none; }

.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 118px;
  height: 50px;
  padding: 0 22px;
  background: var(--green);
  color: #050505;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.submit .icon { width: 15px; height: 15px; stroke-width: 1.9; transition: transform 0.2s ease; }
.submit:hover { background: var(--green-hover); }
.submit:hover .icon { transform: translateX(3px); }
.submit:focus-visible { outline-offset: 2px; }
.submit[aria-busy="true"] { cursor: progress; background: #1a9a40; }
.submit[aria-busy="true"] .icon { animation: nudge 0.8s ease-in-out infinite; }

.status {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  min-height: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.status.is-error { color: var(--danger); }

/* ---------- Pied de page ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 58px;
  padding: 0 var(--gutter) 2px;
  position: relative;
  z-index: 1;
}
.legal { color: #7d7d7d; }
.footer-links { display: flex; gap: 25px; }
.footer-links a { font-size: 12px; color: #9a9a9a; white-space: nowrap; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--text); }

/* ---------- Animations ---------- */

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 177, 74, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(31, 177, 74, 0); }
}
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.letters-top svg { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.letters-bottom svg { animation: rise 0.9s 0.08s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.band, .intro { animation: rise 0.7s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .login { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .submit { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .session { display: none; }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }

  .topbar { height: 68px; }
  .topbar-right { gap: 20px; }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "top" "title" "intro" "form" "bottom";
    padding-bottom: 32px;
  }
  .band { display: contents; }

  .letters { padding: 0; }
  .letters-top { grid-area: top; margin-top: 12px; }
  .letters-bottom { grid-area: bottom; margin-top: 48px; }

  .title-block { grid-area: title; padding: 32px 0 0; }
  .title { font-size: clamp(34px, 12.5vw, 60px); }

  .intro { grid-area: intro; max-width: 34rem; margin: 26px 0 0; }

  .login {
    grid-area: form;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 18px;
    margin-top: 30px;
    padding-bottom: 28px;
  }
  .submit { width: 100%; height: 52px; }
  .status { top: auto; bottom: 0; }

  .footer {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 20px var(--gutter) 24px;
    border-top: 1px solid #141414;
  }
  .legal { line-height: 1.7; }
  .footer-links { flex-wrap: wrap; gap: 10px 22px; }
}

@media (max-width: 560px) {
  .brand-rule,
  .brand-label { display: none; }
}
