/* =========================================================================
   Framewark OS — Écrans d'authentification
   Palette officielle · Dark White #f8f8f8 · Lime #ccfc8a · Ink #22242b
   ========================================================================= */

html:has(.auth-os),
body:has(.auth-os) {
  background-color: #f8f8f8 !important;
  color: #22242b;
}

.auth-os {
  --auth-bg: #f8f8f8;
  --auth-ink: #22242b;
  --auth-ink-soft: rgba(18, 20, 22, 0.8);
  --auth-muted: rgba(18, 20, 22, 0.56);
  --auth-border: rgba(18, 20, 22, 0.08);
  --auth-lime: #ccfc8a;
  --auth-lemon: #d1ffb2;
  --auth-lavender: #e7ffd6;
  --auth-periwinkle: #d4f5c0;
  --auth-mint: #d4f5c0;
  --auth-teal: #022d22;
  --auth-card: #ffffff;
  --auth-radius: 1.25rem;
  --auth-shadow: 0 20px 50px -25px rgba(18, 20, 22, 0.25);
  --auth-shadow-lime: 0 6px 14px -6px rgba(204, 252, 138, 0.55);

  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: transparent;
  font-family: 'Onest', ui-sans-serif, system-ui, sans-serif;
  color: var(--auth-ink);
  -webkit-font-smoothing: antialiased;
  padding: 0;
}

/* Fond unique plein écran — une seule couche, pas de rupture entre colonnes */
.auth-os::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 90% at 4% 18%, rgba(204, 252, 138, 0.38) 0%, transparent 72%),
    radial-gradient(ellipse 45% 70% at 0% 92%, rgba(231, 255, 214, 0.72) 0%, transparent 68%),
    linear-gradient(
      to right,
      #e6f9cc 0%,
      #eafcd4 12%,
      #edfde0 22%,
      #f0fde8 32%,
      #f3fdf0 42%,
      #f5fdf4 52%,
      #f7fdf7 62%,
      #f9fcfa 72%,
      #fafaf9 82%,
      #f8f8f8 92%,
      #f8f8f8 100%
    );
}

@media (min-width: 1024px) {
  .auth-os {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 0;
    padding: 0;
  }
}

.auth-os__showcase,
.auth-os__panel {
  background: transparent;
}

/* ------------------------------ Showcase (gauche) ------------------------ */

.auth-os__showcase {
  position: relative;
  display: none;
  overflow: hidden;
  padding: 3.25rem 3.75rem 2.75rem;
  background: transparent;
  border: none;
  color: var(--auth-teal);
  z-index: 0;
}

@media (min-width: 1024px) {
  .auth-os__showcase {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
  }
}

.auth-os__showcase .auth-os__brand {
  color: var(--auth-teal);
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

.auth-os__showcase-inner {
  position: relative;
  z-index: 2;
  max-width: 32rem;
  margin: auto 0;
  padding-bottom: 2.5rem;
}

.auth-os__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--auth-ink);
  position: relative;
  z-index: 1;
}

.auth-os__brand .os-logo--mark {
  width: min(100%, 13rem);
  height: auto;
  max-height: 2.375rem;
  background: transparent;
}

/* —— Kicker —— */

.auth-os__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(2, 45, 34, 0.55);
  animation: auth-os-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-os__kicker::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: linear-gradient(90deg, var(--auth-teal), rgba(2, 45, 34, 0.1));
}

/* —— Headline éditoriale —— */

.auth-os__headline {
  font-size: clamp(2.5rem, 3.8vw, 3.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: var(--auth-teal);
}

.auth-os__headline-line {
  display: block;
  animation: auth-os-rise 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-os__headline-line:nth-child(1) { animation-delay: 80ms; }
.auth-os__headline-line:nth-child(2) { animation-delay: 180ms; }
.auth-os__headline-line:nth-child(3) { animation-delay: 280ms; }

/* Mot accentué : coup de marqueur lime, signature du site */
.auth-os__headline em {
  font-style: normal;
  position: relative;
  z-index: 0;
  color: var(--auth-teal);
  white-space: nowrap;
}

.auth-os__headline em::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: -0.06em;
  right: -0.1em;
  bottom: 0.02em;
  height: 0.46em;
  background: var(--auth-lime);
  border-radius: 0.16em;
  transform: skewX(-8deg) rotate(-0.6deg);
}

.auth-os__lead {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(2, 45, 34, 0.62);
  max-width: 25rem;
  animation: auth-os-rise 800ms cubic-bezier(0.22, 1, 0.36, 1) 400ms both;
}

/* —— Pied de panneau —— */

.auth-os__showcase-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(2, 45, 34, 0.1);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(2, 45, 34, 0.45);
  animation: auth-os-fade 900ms ease 550ms both;
}

.auth-os__showcase-foot-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #289848;
  opacity: 0.9;
}

/* —— Décor : halos, grain —— */

.auth-os__glow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(90px);
}

.auth-os__glow--lime {
  width: 22rem;
  height: 22rem;
  top: -10%;
  left: -6%;
  right: auto;
  background: rgba(204, 252, 138, 0.32);
}

.auth-os__glow--lavender {
  width: 20rem;
  height: 20rem;
  bottom: -12%;
  left: -10%;
  background: rgba(255, 255, 255, 0.45);
}

.auth-os__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 42%, transparent 72%);
  mask-image: linear-gradient(to right, #000 0%, #000 42%, transparent 72%);
}

@keyframes auth-os-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-os-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-os__kicker,
  .auth-os__headline-line,
  .auth-os__lead,
  .auth-os__showcase-foot {
    animation: none;
  }
}

/* ------------------------------ Panneau (droite) ------------------------- */

.auth-os__panel {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 2.5rem;
  min-height: 100vh;
  background: transparent;
}

@media (min-width: 640px) {
  .auth-os__panel {
    padding: 2.5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .auth-os__panel {
    min-height: 0;
  }
}

.auth-os__card {
  width: 100%;
  max-width: 27.5rem;
  padding: 2.25rem 2rem;
  border-radius: 1.5rem;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  box-shadow: var(--auth-shadow);
}

@media (min-width: 640px) {
  .auth-os__card {
    padding: 2.5rem 2.5rem 2.25rem;
  }
}

.auth-os__brand--mobile {
  display: flex;
  margin-bottom: 1.75rem;
}

@media (min-width: 1024px) {
  .auth-os__brand--mobile {
    display: none;
  }
}

.auth-os__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background-color: var(--auth-lime);
  color: var(--auth-ink);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  box-shadow: var(--auth-shadow-lime);
}

.auth-os__title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 0.4rem;
}

.auth-os__subtitle {
  font-size: 0.84375rem;
  color: var(--auth-muted);
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

/* —— Boutons sociaux —— */

.auth-os__social-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 0.25rem;
}

.auth-os__social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  height: 2.875rem;
  border-radius: 0.875rem;
  border: 1.5px solid rgba(18, 20, 22, 0.12);
  background: #ffffff;
  color: var(--auth-ink);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.auth-os__social-btn:hover {
  border-color: var(--auth-ink);
  background: var(--auth-bg);
}

.auth-os__social-btn:active {
  transform: scale(0.99);
}

.auth-os__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.375rem 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--auth-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-os__divider::before,
.auth-os__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

/* —— Formulaire —— */

.auth-os__form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.auth-os__field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--auth-ink);
  margin-bottom: 0.4rem;
}

.auth-os__field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.auth-os__field-head label {
  margin-bottom: 0;
}

.auth-os__link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--auth-teal);
  text-decoration: none;
}

.auth-os__link:hover {
  text-decoration: underline;
}

.auth-os__input-wrap {
  position: relative;
}

/* Uniquement l'icône décorative de gauche — pas celle du bouton œil */
.auth-os__input-wrap > .ph {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.125rem;
  color: var(--auth-muted);
  pointer-events: none;
  transition: color 150ms ease;
}

.auth-os__input-wrap:focus-within > .ph {
  color: var(--auth-ink);
}

.auth-os__input-toggle .ph {
  position: static;
  transform: none;
  pointer-events: none;
  color: inherit;
  font-size: inherit;
}

.auth-os__input {
  width: 100%;
  height: 2.95rem;
  padding: 0 1rem 0 2.75rem;
  border-radius: 0.875rem;
  border: 1.5px solid rgba(2, 45, 34, 0.1);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.84375rem;
  font-weight: 500;
  color: var(--auth-ink);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
  box-sizing: border-box;
}

.auth-os__input-wrap--password .auth-os__input {
  padding-right: 2.85rem;
}

/* Autofill navigateur : fond blanc au lieu du jaune par défaut */
.auth-os__input:-webkit-autofill,
.auth-os__input:-webkit-autofill:hover,
.auth-os__input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: var(--auth-ink);
  caret-color: var(--auth-ink);
  transition: background-color 99999s ease-out 0s;
}

.auth-os__input::placeholder {
  color: var(--auth-muted);
  font-weight: 400;
}

.auth-os__input:hover {
  border-color: rgba(2, 45, 34, 0.18);
}

.auth-os__input:focus {
  outline: none;
  border-color: var(--auth-teal);
  box-shadow: 0 0 0 3px rgba(204, 252, 138, 0.45);
  background: #ffffff;
}

.auth-os__input-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  transition: color 150ms ease, background-color 150ms ease;
}

.auth-os__input-toggle:hover {
  color: var(--auth-teal);
  background-color: rgba(231, 255, 214, 0.65);
}

.auth-os__input-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(204, 252, 138, 0.7);
}

.auth-os__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.15rem;
  cursor: pointer;
  user-select: none;
}

.auth-os__checkbox input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.1rem 0 0;
  border-radius: 0.35rem;
  border: 1.5px solid rgba(2, 45, 34, 0.16);
  background: #ffffff;
  cursor: pointer;
  position: relative;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.auth-os__checkbox input::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.28rem;
  height: 0.5rem;
  border: solid transparent;
  border-width: 0 1.75px 1.75px 0;
  transform: translate(-50%, -55%) rotate(45deg) scale(0.6);
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease;
}

.auth-os__checkbox input:hover {
  border-color: rgba(2, 45, 34, 0.28);
  background: rgba(231, 255, 214, 0.35);
}

.auth-os__checkbox input:checked {
  background: var(--auth-teal);
  border-color: var(--auth-teal);
}

.auth-os__checkbox input:checked::after {
  border-color: var(--auth-lime);
  opacity: 1;
  transform: translate(-50%, -55%) rotate(45deg) scale(1);
}

.auth-os__checkbox input:focus-visible {
  outline: none;
  border-color: var(--auth-teal);
  box-shadow: 0 0 0 3px rgba(204, 252, 138, 0.45);
}

.auth-os__checkbox input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.auth-os__checkbox span {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--auth-ink-soft);
}

.auth-os__error {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b3401f;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.auth-os__alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.8rem 0.95rem;
  border-radius: 0.875rem;
  background: rgba(255, 114, 79, 0.12);
  color: #8c3115;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
}

/* Champs conditionnels (ex. profil freelance) — [hidden] doit gagner sur tout display */
.auth-os__freelance-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.875rem;
  background: rgba(204, 252, 138, 0.18);
  border: 1px solid rgba(2, 45, 34, 0.08);
}

.auth-os__freelance-fields[hidden] {
  display: none !important;
}

.auth-os__alert .ph-fill {
  color: #ff724f;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.auth-os__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 3.125rem;
  border: none;
  border-radius: 999px;
  background: var(--auth-teal);
  color: var(--auth-lime);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
  box-shadow: 0 14px 28px -14px rgba(2, 45, 34, 0.6);
}

.auth-os__submit:hover {
  transform: translateY(-1px);
  background: #0a3d2f;
  box-shadow: 0 18px 32px -14px rgba(2, 45, 34, 0.65);
}

.auth-os__submit:active {
  transform: scale(0.99);
}

.auth-os__submit .ph {
  transition: transform 150ms ease;
}

.auth-os__submit:hover .ph {
  transform: translateX(3px);
}

.auth-os__footer-text {
  margin-top: 0.375rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--auth-muted);
}

.auth-os__copyright {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--auth-muted);
  max-width: 27.5rem;
}

.auth-os__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-muted);
  text-decoration: none;
}

.auth-os__back:hover {
  color: var(--auth-ink);
}
