﻿:root {
  --red: #ff3b30;
  --red2: #ff5f57;
  --cyan: #38bdf8;
  --violet: #a78bfa;

  /* Thème neutre (page sans bascule clair/sombre) : mêmes tokens
     sémantiques que commun.css — --accent reste la seule couleur
     d'interaction, --danger réservé aux erreurs. */
  --accent: #e08a3c;
  --danger: var(--red);

  --bg0: #050814;
  --bg1: #0b1230;

  --card: rgba(255, 255, 255, 0.92);
  --cardBorder: rgba(255, 255, 255, 0.2);

  --text: #0b1220;
  --muted: #64748b;

  --input-bg: rgba(255, 255, 255, 0.92);
  --input-border: #e5e7eb;

  --shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  --shadowSoft: 0 18px 48px rgba(0, 0, 0, 0.25);
  --ring: color-mix(in srgb, var(--accent) 20%, transparent);
}

* {
  box-sizing: border-box;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
}
html,
body {
  height: 100%;
}

body.theme-split-startup {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      900px 560px at 18% 20%,
      rgba(255, 59, 48, 0.4),
      transparent 60%
    ),
    radial-gradient(
      820px 520px at 85% 70%,
      rgba(56, 189, 248, 0.22),
      transparent 55%
    ),
    radial-gradient(
      600px 360px at 65% 10%,
      rgba(167, 139, 250, 0.18),
      transparent 55%
    ),
    linear-gradient(160deg, var(--bg0), var(--bg1));
  overflow-x: hidden;
}

/* subtle grain overlay */
body.theme-split-startup::before {
  content: "";
  position: fixed;
  inset: 0;
  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='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0.25;
}

/* Layout */
.shell {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
}

/* LEFT BRAND */
.brand {
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-inner {
  max-width: 560px;
  color: #e5e7eb;
  position: relative;
}

/* decorative blobs */
.brand-inner::before,
.brand-inner::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.35;
  z-index: -1;
}
.brand-inner::before {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 59, 48, 0.95),
    transparent 60%
  );
  top: -40px;
  left: -60px;
}
.brand-inner::after {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(56, 189, 248, 0.9),
    transparent 60%
  );
  bottom: -60px;
  right: -60px;
}

@keyframes floaty {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(10px, -8px) scale(1.03);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}
.brand-inner::before {
  animation: floaty 9s ease-in-out infinite;
}
.brand-inner::after {
  animation: floaty 11s ease-in-out infinite;
}

.badge {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(10px);
  font-size: 30px;
}

.brand-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}
.brand h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.brand-tag {
  font-size: 14px;
  color: rgba(229, 231, 235, 0.78);
  letter-spacing: 0.02em;
}

.brand-desc {
  margin: 18px 0 18px;
  color: rgba(229, 231, 235, 0.78);
  line-height: 1.65;
  font-size: 15px;
}

.highlights {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
  font-size: 13px;
}

.brand-foot {
  margin-top: 24px;
}
.trust {
  font-size: 12px;
  color: rgba(229, 231, 235, 0.72);
}

/* RIGHT PANEL */
.panel {
  padding: 56px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 440px;
  border-radius: 24px;
  padding: 30px;
  background: var(--card);
  border: 1px solid var(--cardBorder);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

/* top accent gradient line */
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    rgba(255, 59, 48, 1),
    rgba(56, 189, 248, 0.95),
    rgba(167, 139, 250, 0.9)
  );
}

.card-head h2 {
  margin: 10px 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.card-head p {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

/* Form */
.form {
  display: grid;
  gap: 14px;
}

.field span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  transition:
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

input:focus {
  box-shadow: 0 0 0 5px var(--ring);
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ghost {
  border: 1px solid var(--input-border);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.12);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
}

.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border-radius: 5px;
  border: 2px solid var(--input-border);
  background: var(--input-bg);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}
.check input[type="checkbox"]::after {
  content: "";
  width: 4px;
  height: 8px;
  margin-bottom: 2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.check input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.check input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}
.check input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
}
.link:hover {
  text-decoration: underline;
}

.primary {
  position: relative;
  background: linear-gradient(135deg, var(--accent), #b3661f);
  border: none;
  color: #fff;
  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 35%, transparent);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}
.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--accent) 42%, transparent);
  filter: saturate(1.05);
}
.primary:active {
  transform: translateY(0px);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.hint.small {
  font-size: 11px;
}

.error {
  display: block;
  min-height: 16px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--danger);
}

/* Loading state */
.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #fff;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}
.primary.is-loading .btn-text {
  opacity: 0.85;
}
.primary.is-loading .btn-loader {
  display: block;
}

/* MODAL */
.modal {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  max-width: 540px;
  margin: 10vh auto 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 22px;
  position: relative;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.18s ease;
}
.modal.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-desc {
  margin: 10px 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.x {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 1px solid var(--input-border);
  background: #fff;
  border-radius: 14px;
  padding: 8px 10px;
  cursor: pointer;
}

.brand-logo {
  width: auto;
  height: 200px;
}

/* Responsive */

/* Tablette (portrait, ~769-1024px) : on garde le split 2 colonnes mais
   resserré, pour que tout tienne sur un seul écran sans scroll vertical. */
@media (min-width: 769px) and (max-width: 1024px) {
  .brand {
    padding: 36px;
  }

  .brand-inner {
    max-width: 440px;
  }

  .brand-logo {
    height: 140px;
  }

  .brand h1 {
    font-size: 34px;
  }

  .brand-desc {
    font-size: 13px;
    margin: 12px 0;
    line-height: 1.5;
  }

  .highlights {
    margin-top: 12px;
  }

  .brand-foot {
    margin-top: 14px;
  }

  .panel {
    padding: 32px 24px;
  }
}

@media (max-width: 1024px) {
  /* Le grain décoratif fait apparaître les coutures de la tuile SVG en
     quadrillage sur les pages plus hautes (mobile) ; on le retire dès la
     tablette pour un fond lisse. */
  body.theme-split-startup::before {
    display: none;
  }
}

/* Mobile (≤768px) : le bloc marque devient un bandeau compact en haut,
   aux coins bas arrondis, sur lequel la carte de connexion vient
   légèrement chevaucher (cf. maquette mobile). */
@media (max-width: 768px) {
  html,
  body {
    height: 100%;
  }

  .shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .brand {
    padding: 20px 24px 32px;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    flex: 0 1 auto;
    min-height: 0;
  }

  .brand-inner {
    max-width: 480px;
    text-align: center;
  }

  .brand-logo {
    height: 96px;
  }

  .brand-title {
    margin-top: 8px;
  }

  .brand h1 {
    font-size: 28px;
  }

  .brand-tag {
    font-size: 12px;
  }

  .brand-desc {
    font-size: 12px;
    line-height: 1.4;
    margin: 10px 0;
  }

  /* Les halos décoratifs sont calibrés pour la largeur desktop et
     deviennent asymétriques (rouge/cyan) une fois le bloc recentré :
     on les retire pour un rendu propre et équilibré. */
  .brand-inner::before,
  .brand-inner::after {
    display: none;
  }

  .brand-title {
    align-items: center;
  }

  .highlights {
    justify-content: center;
    margin-top: 10px;
  }

  .pill {
    font-size: 11px;
    padding: 5px 9px;
  }

  .brand-foot {
    text-align: center;
    margin-top: 10px;
  }

  .panel {
    padding: 0 20px 24px;
    margin-top: -24px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .card {
    z-index: 1;
    padding: 20px;
  }

  .card-head h2 {
    font-size: 19px;
  }

  .card-head p {
    margin: 6px 0 12px;
    font-size: 13px;
  }

  .form {
    gap: 10px;
  }

  .field span {
    margin-bottom: 4px;
  }

  .hint {
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .brand {
    padding: 16px 20px 28px;
  }

  .brand-logo {
    height: 80px;
  }

  .brand h1 {
    font-size: 25px;
  }

  .panel {
    padding: 0 16px 20px;
    margin-top: -20px;
  }

  .card {
    padding: 18px;
    border-radius: 20px;
  }

  .modal-card {
    margin: 6vh auto 0;
    padding: 18px;
  }
}
