/* DigitalGate Login — Editorial Studio direction
 * Typographie : Fraunces (display serif) + Cabinet Grotesk (body)
 * Référence aesthetic : magazine premium / studio créatif
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;0,9..144,900;1,9..144,400&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,700,800,900&display=swap');

:root {
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Cabinet Grotesk', system-ui, -apple-system, sans-serif;
  --ink:   #1A1A1A;
  --cream: #F6F5F2;
  --cream-deep: #E7E6E2;
  --teal:  #00D4B5;
  --cyan:  #00AADF;
  --warm-gray: #8A8884;
  --warn-red: #C53B2E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body.login-body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ────────────────────────────────────────────────
   LAYOUT : split-screen 60/40
   ─────────────────────────────────────────────── */
.editorial-stage {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: 100vh;
}

/* ────────────────────────────────────────────────
   PANEL GAUCHE : sombre + grain + grande typo serif
   ─────────────────────────────────────────────── */
.editorial-left {
  position: relative;
  background: radial-gradient(ellipse at 30% 20%, #1A1B1E 0%, #0F1011 60%, #08090B 100%);
  color: var(--cream);
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Grain texture en SVG inline */
.editorial-left::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.94 0 0 0 0 0.91 0 0 0 0.42 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Trait diagonal teal en accent (coin haut-droit) */
.editorial-left::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: conic-gradient(from 130deg at 50% 50%, transparent 0deg, var(--teal) 18deg, var(--cyan) 26deg, transparent 30deg, transparent 360deg);
  filter: blur(2px);
  opacity: 0.55;
  transform: rotate(-12deg);
  pointer-events: none;
}

.editorial-top, .editorial-center, .editorial-bottom {
  position: relative;
  z-index: 2;
}

.editorial-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  opacity: 0;
  animation: fadeUp 700ms 80ms cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark img { height: 30px; width: auto; }
.brand-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.55);
  font-weight: 500;
}

.editorial-center {
  max-width: 720px;
  opacity: 0;
  animation: fadeUp 800ms 220ms cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}
.editorial-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.editorial-eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--teal);
}
.editorial-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 5.8vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  color: var(--cream);
}
.editorial-title em {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 80;
  color: var(--teal);
}
.editorial-subtitle {
  margin-top: 28px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(245, 241, 234, 0.72);
  max-width: 480px;
  font-weight: 400;
}

.editorial-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.4);
  opacity: 0;
  animation: fadeUp 700ms 400ms cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}
.editorial-bottom .seal {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(245, 241, 234, 0.55);
}

/* ────────────────────────────────────────────────
   PANEL DROIT : cream + formulaire refined
   ─────────────────────────────────────────────── */
.editorial-right {
  position: relative;
  background: var(--cream);
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
}

/* Grand "01" décoratif derrière le formulaire */
.editorial-right::before {
  content: '01';
  position: absolute;
  top: 36px;
  right: 56px;
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: 8rem;
  line-height: 0.8;
  color: rgba(15, 16, 17, 0.06);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

.login-form-block {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 800ms 320ms cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}
.login-form-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 14px;
}
.login-form-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin-bottom: 8px;
  color: var(--ink);
  font-variation-settings: 'opsz' 80, 'SOFT' 50;
}
.login-form-title em {
  font-style: italic;
  color: var(--teal);
  font-weight: 400;
}
.login-form-subtitle {
  font-size: 0.9rem;
  color: var(--warm-gray);
  margin-bottom: 40px;
  line-height: 1.55;
}

.login-form { display: flex; flex-direction: column; gap: 22px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.field-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
}
.field-input-wrap { position: relative; }
.field-input {
  width: 100%;
  border: none;
  background: transparent;
  border-bottom: 1.5px solid rgba(15, 16, 17, 0.18);
  padding: 10px 0 12px;
  font-family: var(--sans);
  font-size: 1.02rem;
  color: var(--ink);
  outline: none;
  transition: border-color 220ms ease, padding-left 220ms ease;
}
.field-input::placeholder { color: rgba(15, 16, 17, 0.3); font-weight: 400; }
.field-input:focus {
  border-bottom-color: var(--ink);
}
.field-input:focus + .field-underline,
.field-input-wrap:focus-within .field-underline {
  transform: scaleX(1);
}
.field-underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms cubic-bezier(0.6, 0.05, 0.3, 1);
  pointer-events: none;
}

.field-toggle {
  position: absolute;
  right: 0;
  bottom: 12px;
  background: none;
  border: none;
  color: var(--warm-gray);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 200ms ease;
}
.field-toggle:hover { color: var(--ink); }

.error-msg {
  font-size: 0.82rem;
  color: var(--warn-red);
  background: rgba(197, 59, 46, 0.08);
  border-left: 2px solid var(--warn-red);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  font-weight: 500;
}
.error-msg.hidden { display: none; }

.submit-btn {
  appearance: none;
  border: none;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 17px 28px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 250ms cubic-bezier(0.2, 0.85, 0.3, 1), background 250ms ease;
}
.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, transparent 30%, var(--teal) 50%, var(--cyan) 70%, transparent 100%);
  opacity: 0;
  transition: opacity 350ms ease;
}
.submit-btn:hover { transform: translateY(-1px); background: #1A1B1E; }
.submit-btn:hover::before { opacity: 0.35; }
.submit-btn:active { transform: translateY(0); }
.submit-btn span,
.submit-btn svg { position: relative; z-index: 2; }
.submit-btn svg { transition: transform 250ms cubic-bezier(0.2, 0.85, 0.3, 1); }
.submit-btn:hover svg { transform: translateX(4px); }

.login-footer {
  margin-top: 60px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(15, 16, 17, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeUp 700ms 600ms cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}
.login-footer .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}

/* ────────────────────────────────────────────────
   ANIMATIONS
   ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  body.login-body { overflow: auto; }
  .editorial-stage { grid-template-columns: 1fr; min-height: auto; }
  .editorial-left { padding: 40px 32px; min-height: 50vh; }
  .editorial-right { padding: 56px 32px; }
  .editorial-right::before { top: 16px; right: 24px; font-size: 5rem; }
  .editorial-center { max-width: none; }
}

@media (max-width: 500px) {
  .editorial-left { padding: 32px 24px; }
  .editorial-right { padding: 48px 24px; }
  .editorial-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}
