/* ============================================================
   Autocut Studio v3 — Public/Auth UI
   Visual language aligned with dashboard (mobile-first premium)
   ============================================================ */

:root {
  --ac-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";

  --ac-bg: #0b1020;
  --ac-bg2: #0f172a;
  --ac-surface: rgba(255, 255, 255, 0.06);
  --ac-surface-2: rgba(255, 255, 255, 0.09);
  --ac-border: rgba(255, 255, 255, 0.12);
  --ac-text: rgba(255, 255, 255, 0.92);
  --ac-muted: rgba(255, 255, 255, 0.66);

  --ac-primary: #10b981;
  --ac-primary-hover: #059669;
  --ac-primary-soft: rgba(16, 185, 129, 0.14);
  --ac-info: #60a5fa;
  --ac-danger: #ef4444;
  --ac-danger-bg: rgba(239, 68, 68, 0.12);

  --ac-gray-50: #f8fafc;
  --ac-gray-100: #f1f5f9;
  --ac-gray-200: #e2e8f0;
  --ac-gray-300: #cbd5e1;
  --ac-gray-400: #94a3b8;
  --ac-gray-500: #64748b;
  --ac-gray-700: #334155;

  --ac-radius-sm: 10px;
  --ac-radius-md: 14px;
  --ac-radius-lg: 18px;
  --ac-radius-xl: 24px;

  --ac-shadow-sm: 0 8px 24px rgba(2, 6, 23, 0.24);
  --ac-shadow-md: 0 14px 40px rgba(2, 6, 23, 0.34);
  --ac-shadow-xl: 0 24px 64px rgba(2, 6, 23, 0.45);

  --ac-ease: cubic-bezier(.4, 0, .2, 1);
  --ac-dur: .2s;
}

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

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

body {
  font-family: var(--ac-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ac-text);
  background:
    radial-gradient(1000px 720px at 20% -8%, rgba(16, 185, 129, 0.22), transparent 56%),
    radial-gradient(760px 560px at 98% 4%, rgba(96, 165, 250, 0.14), transparent 58%),
    linear-gradient(180deg, var(--ac-bg) 0%, var(--ac-bg2) 100%);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.9);
  outline-offset: 2px;
}

/* --- Utility ----------------------------------------------- */
.ac-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.ac-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Buttons ----------------------------------------------- */
.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 700 14px/1 var(--ac-font);
  cursor: pointer;
  transition: all var(--ac-dur) var(--ac-ease);
}

.ac-btn--primary {
  background: linear-gradient(180deg, var(--ac-primary) 0%, var(--ac-primary-hover) 100%);
  border-color: rgba(16, 185, 129, 0.34);
  color: rgba(3, 7, 18, 0.96);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.24);
}

.ac-btn--primary:hover,
.ac-btn--primary:focus-visible {
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.30);
}

.ac-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
}

.ac-btn--ghost:hover,
.ac-btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.24);
}

.ac-btn--full {
  width: 100%;
}

.ac-btn--lg {
  min-height: 48px;
}

/* --- Hero / Landing ---------------------------------------- */
.ac-hero {
  min-height: 60svh;
  min-height: 60vh;
  position: relative;
  overflow: hidden;
}

.ac-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 16, 32, 0.36);
}

.ac-nav__brand {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ac-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.ac-hero__body {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  padding: 22px 20px 14px;
}

.ac-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ac-primary-soft);
  border: 1px solid rgba(16, 185, 129, 0.30);
  color: rgba(167, 243, 208, 0.95);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
}

.ac-hero__title {
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
  margin-bottom: 14px;
}

.ac-hero__subtitle {
  max-width: 620px;
  margin: 0 auto 34px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ac-muted);
}

.ac-hero__ctas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
  justify-items: center;
}

.ac-hero__cta-main {
  font-size: 18px;
}

/* --- Sections ---------------------------------------------- */
.ac-section {
  padding: 48px 0;
}

.ac-section--alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

/* First section should appear above the fold */
#comment-ca-marche {
  padding-top: 20px;
}

.ac-section__header {
  text-align: center;
  margin-bottom: 24px;
}

.ac-section__title {
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 860;
  margin-bottom: 8px;
}

.ac-section__lead {
  color: var(--ac-muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: 15px;
}

.ac-steps,
.ac-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ac-step,
.ac-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius-lg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  padding: 18px 16px;
}

.ac-step__num,
.ac-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.ac-step__num {
  background: var(--ac-primary-soft);
  color: var(--ac-primary);
}

.ac-card__icon--indigo,
.ac-card__icon--emerald,
.ac-card__icon--amber {
  background: var(--ac-primary-soft);
  color: var(--ac-primary);
}

.ac-step__title,
.ac-card__title {
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.ac-step__text,
.ac-card__text {
  font-size: 14px;
  color: var(--ac-muted);
}

/* --- Footer ------------------------------------------------ */
.ac-footer {
  padding: 40px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  margin-top: 12px;
}

.ac-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ac-footer__brand {
  font-size: 16px;
  font-weight: 800;
}

.ac-footer__tagline {
  font-size: 13px;
  color: var(--ac-muted);
  margin-top: 4px;
}

.ac-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ac-footer__link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.76);
}

.ac-footer__copy {
  font-size: 12px;
  color: var(--ac-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  margin-top: 16px;
}

/* --- Auth / onboarding pages ------------------------------- */
.ac-auth {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
}

.ac-auth__box {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius-xl);
  box-shadow: var(--ac-shadow-xl);
  padding: 24px 18px;
}

.ac-auth__box--wide {
  max-width: 520px;
}

.ac-auth__brand {
  font-size: 14px;
  letter-spacing: -0.01em;
  font-weight: 860;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.88);
}

.ac-auth__heading {
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 900;
  margin-bottom: 8px;
}

.ac-auth__lead {
  color: var(--ac-muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.ac-auth__error {
  background: var(--ac-danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.30);
  color: rgba(254, 202, 202, 0.95);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.ac-auth__divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  margin: 16px 0;
}

.ac-auth__hint {
  text-align: center;
  color: var(--ac-muted);
  margin-top: 12px;
  font-size: 12px;
}

.ac-auth__footer {
  text-align: center;
  margin-top: 14px;
  color: var(--ac-muted);
  font-size: 13px;
}

.ac-auth__footer a {
  color: rgba(167, 243, 208, 0.95);
  font-weight: 700;
}

/* --- Form fields ------------------------------------------- */
.ac-field {
  margin-bottom: 12px;
}

.ac-field__label {
  display: block;
  margin-bottom: 7px;
  color: var(--ac-muted);
  font-size: 12px;
  font-weight: 700;
}

.ac-field__input {
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
  font: 500 14px/1.2 var(--ac-font);
}

.ac-field__input::placeholder {
  color: rgba(255, 255, 255, 0.44);
}

.ac-field__input:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

/* --- Responsive -------------------------------------------- */
@media (min-width: 720px) {
  .ac-container {
    padding: 0 22px;
  }

  .ac-nav {
    padding: 16px 24px;
  }

  .ac-nav__brand {
    font-size: 18px;
  }

  .ac-hero__title {
    font-size: 52px;
  }

  .ac-hero__subtitle {
    font-size: 18px;
  }

  .ac-hero__ctas {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .ac-hero {
    min-height: 68svh;
    min-height: 68vh;
  }

  .ac-hero__body {
    padding: 24px 20px 16px;
  }

  .ac-hero__cta-main {
    width: auto;
    min-width: 300px;
    font-size: 18px;
  }

  #comment-ca-marche {
    padding-top: 10px;
  }

  .ac-section {
    padding: 64px 0;
  }

  .ac-steps,
  .ac-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .ac-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .ac-auth__box {
    padding: 30px 24px;
  }
}
