/* ============================================================
   AnaForge landing — main.css
   Mobile-first, breakpoints : 500px, 900px
   Palette stricte du brief, typo Nunito (Google Fonts).
   ============================================================ */

/* --- Design system --------------------------------------- */
:root {
  --bg: #0a1a1f;
  --bg-card: #112229;
  --accent: #23dd92;
  --accent-dim: rgba(35, 221, 146, 0.12);
  --text: #ffffff;
  --text-secondary: #a0b3bb;
  --text-muted: #6b7d85;
  --danger: #ff6b6b;
  --border: rgba(160, 179, 187, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --maxw: 1180px;
  --pad-x: 24px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-cta: 0 6px 24px rgba(35, 221, 146, 0.28);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* --- Container partagé ----------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* --- Animations au scroll -------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal--visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* --- Navigation fixe ------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 26, 31, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad-x);
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.nav__brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
}

/* --- Boutons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover,
.btn--primary:focus-visible { transform: translateY(-1px); outline: none; }
.btn--primary:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* --- Section générique ----------------------------------- */
section { padding: 64px 0; }
.section-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
  line-height: 1.15;
}
.section-lead {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 36px;
  max-width: 640px;
}

/* --- Hero ------------------------------------------------ */
.hero {
  padding: 120px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: stretch;
}
.hero__tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 12px;
  border-radius: 999px;
  align-self: flex-start;
}
.hero__title {
  font-size: clamp(40px, 9vw, 76px);
  font-weight: 900;
  margin: 18px 0 8px;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--accent);
}
.hero__slogan {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.2;
}
.hero__sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 28px;
}
.hero__cta { align-self: flex-start; }
.hero__phone {
  width: min(280px, 100%);
  margin: 0 auto;
  border-radius: 36px;
  background: #000;
  padding: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}
.hero__phone img {
  border-radius: 24px;
  width: 100%;
}

/* --- Stats band ----------------------------------------- */
.stats {
  padding: 40px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  text-align: center;
}
.stat__num {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1;
}
.stat__label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* --- Features ------------------------------------------- */
.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
}
.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 900;
}
.feature__title {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 8px;
}
.feature__text {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* --- How it works --------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  counter-reset: step;
}
.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.step__num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
}
.step__body h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 4px 0 4px;
}
.step__body p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Showcase ------------------------------------------- */
.showcase__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.showcase__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
}
.showcase__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.showcase__placeholder {
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px;
  text-align: center;
}

/* --- Audiences ------------------------------------------ */
.audiences__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.audience {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
}
.audience__title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--accent);
}
.audience__text {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* --- Data trust (encart vert) ---------------------------- */
.trust {
  padding: 48px 0;
}
.trust__card {
  background: linear-gradient(135deg, var(--accent), #1cb377);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
}
.trust__icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.trust__title {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.trust__text {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  opacity: 0.85;
}

/* --- CTA final + formulaire beta ------------------------ */
.beta {
  padding: 72px 0;
  text-align: center;
}
.beta__title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
  line-height: 1.15;
}
.beta__text {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 auto 28px;
  max-width: 560px;
}
.beta__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.beta__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
/* Défensif — garantit la visibilité des champs du formulaire beta
   à tous les breakpoints, y compris si une règle tierce (extension,
   user agent stylesheet, cache CSS désynchronisé) tentait de les
   masquer. Aucun `!important` : la spécificité du sélecteur suffit. */
.beta__form > .beta__field {
  display: flex;
  visibility: visible;
  width: auto;
}
.beta__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
}
.beta__input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.beta__input:focus {
  outline: none;
  border-color: var(--accent);
}
.beta__input[aria-invalid="true"] {
  border-color: var(--danger);
}
.beta__error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  font-weight: 600;
}
.beta__success {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  margin-top: 12px;
  min-height: 22px;
}

/* --- Footer --------------------------------------------- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-top: 32px;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.footer__brand {
  font-weight: 900;
  font-size: 18px;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--accent);
  outline: none;
}
.footer__copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   Responsive — breakpoints 500px et 900px
   ============================================================ */

@media (min-width: 500px) {
  :root { --pad-x: 32px; }
  section { padding: 80px 0; }
  .section-title { font-size: 32px; }
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .beta__form { flex-direction: row; align-items: flex-end; gap: 12px; }
  .beta__field { flex: 1; }
  .beta__submit { white-space: nowrap; height: 48px; }
}

@media (min-width: 900px) {
  :root { --pad-x: 40px; }
  section { padding: 100px 0; }
  .section-title { font-size: 38px; }
  .hero { padding: 160px 0 100px; }
  .hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
  }
  .hero__phone {
    width: min(320px, 100%);
    margin: 0;
  }
  .features__grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .showcase__grid { grid-template-columns: repeat(4, 1fr); }
  .showcase__item { aspect-ratio: 9 / 19; }
  .audiences__grid { grid-template-columns: repeat(3, 1fr); }
  .trust__card { padding: 48px 40px; }
}
