/* ─────────────────────────────────────────────────────────────
   Landing lead magnet — maeven.
   Tokens repris de maeven-lp/app/globals.css pour rester aligné
   sur l'identité de maeven.fr.
   ───────────────────────────────────────────────────────────── */

:root {
  --primary: #6C73E2;
  --primary-hover: #5960C7;
  --primary-soft: #EDEDFA;

  --ink: #000000;
  --ink-light: #3A3A3A;
  --ink-muted: #666666;
  --ink-subtle: #8F8F8F;

  --bg: #FFFFFF;
  --bg-subtle: #FAFAFA;
  --bg-elevated: #F4F4F5;

  --border: #EAEAEA;
  --border-strong: #D4D4D4;

  --danger: #E5484D;
  --success: #0F8A5F;

  --radius-card: 12px;
  --radius-btn: 8px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ───────────────────────── Structure ───────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  /* `clip` et non `hidden` : on contient le halo qui déborde sur les côtés
     sans créer de conteneur de défilement qui masquerait le bas de la page
     sur un écran court. */
  overflow-x: clip;
}

/* Grille de fond, estompée sur les bords — même motif que maeven.fr. */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(108, 115, 226, 0.16), transparent 68%);
  filter: blur(28px);
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: 1fr 396px;
  gap: 56px;
  align-items: center;
}

/* ───────────────────────── Colonne contenu ───────────────────────── */

/* `block` obligatoire : en inline-block, le logo et le badge `.eyebrow`
   (inline-flex) partagent la même ligne et le badge se retrouve décalé. */
.brand {
  display: block;
  width: fit-content;
  margin-bottom: 16px;
}
.brand img {
  display: block;
  height: 26px;
  width: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 115, 226, 0.18);
}

h1 {
  margin: 0 0 13px;
  /* Plafonné pour que chaque phrase tienne sur une ligne dans la colonne :
     c'est ce qui permet à la page entière de tenir dans un écran. */
  font-size: clamp(25px, 2.7vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.032em;
  color: var(--ink);
}
h1 .hl { color: var(--primary); }

.lede {
  margin: 0 0 18px;
  max-width: 64ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.lede strong {
  color: var(--ink-light);
  font-weight: 600;
}

/* ───────────────────────── Carte ressource ───────────────────────── */

/* Visuel et bénéfices côte à côte : le visuel reste sur une demi-colonne,
   les 4 blocs occupent l'autre. */
.content-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  max-width: 700px;
}

/* Au déblocage, la ressource reprend toute la largeur : une vidéo sur une
   demi-colonne serait trop petite. */
.content-row.is-unlocked { grid-template-columns: 1fr; }
.content-row.is-unlocked .chips { grid-template-columns: 1fr 1fr; }

.resource {
  max-width: none;
  margin-bottom: 0;
}

/* Visuel d'illustration — remplacé par la ressource après déblocage. */
.visual {
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  box-shadow: 0 18px 46px -24px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.1, 1);
}
.resource:hover .visual { transform: translateY(-2px); }

.visual img {
  display: block;
  width: 100%;
  height: auto;
}

.resource[data-state="unlocked"] .visual { display: none; }

/* ── États débloqués ── */

.res-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #000;
  box-shadow: 0 18px 46px -24px rgba(0, 0, 0, 0.3);
}
.res-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.res-file,
.res-pending {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 18px 46px -24px rgba(0, 0, 0, 0.3);
}
.res-file-label {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.res-file .submit { margin-top: 0; }

.res-pending {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.res-pending-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}
.res-pending-icon svg { width: 16px; height: 16px; }
.res-pending p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ───────────────────────── Chips « ce que ça contient » ───────────────────────── */

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  align-content: start;
}
.chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-light);
}
.chip-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
}
.chip-icon svg { width: 14px; height: 14px; }
.chip code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--ink-light);
}

/* ───────────────────────── Carte formulaire ───────────────────────── */

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 24px 70px -30px rgba(0, 0, 0, 0.22);
}

.card-title {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.22;
}
.card-sub {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.card-sub a { color: var(--primary); }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: block;
  margin-bottom: 11px;
  border: 0;
  padding: 0;
  min-width: 0;
}
fieldset.field { margin-inline: 0; }

.label {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}
.opt {
  font-weight: 400;
  color: var(--ink-subtle);
  font-size: 11.5px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--ink-subtle); }
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 115, 226, 0.16);
}
input[aria-invalid="true"] { border-color: var(--danger); }

.err {
  display: none;
  margin-top: 5px;
  font-size: 12px;
  color: var(--danger);
}
.err.on { display: block; }

/* Choix « Vous êtes » — en pastilles qui se replient : deux lignes au lieu de
   trois blocs pleine largeur, soit une trentaine de pixels gagnés en hauteur. */
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-light);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.choice:hover { border-color: var(--border-strong); }
.choice .radio {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.choice[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--ink);
}
.choice[aria-pressed="true"] .radio {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 9px var(--primary);
}

/* Consentement */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.consent .box {
  flex: 0 0 auto;
  margin-top: 1px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border-strong);
  border-radius: 5px;
  color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.consent .box svg { width: 10px; height: 10px; }
.consent[aria-pressed="true"] .box {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.consent-text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.server-err {
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(229, 72, 77, 0.28);
  border-radius: var(--radius-btn);
  background: rgba(229, 72, 77, 0.06);
  font-size: 12.5px;
  color: var(--danger);
}

/* Bouton principal */
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}
.submit:hover { background: #1a1a1a; }
.submit:disabled { opacity: 0.55; cursor: not-allowed; }
.submit .arrow {
  width: 15px;
  height: 15px;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.1, 1);
}
.submit:hover .arrow { transform: translateX(3px); }
.submit.as-link { background: var(--primary); }
.submit.as-link:hover { background: var(--primary-hover); }

.note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-subtle);
}

/* Pot de miel : hors écran, mais pas display:none (certains bots l'ignorent). */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Confirmation */
.done-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}
.done-icon svg { width: 20px; height: 20px; }

.agency-line {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-subtle);
}
.agency-line strong { color: var(--ink-muted); font-weight: 600; }

/* ───────────────────────── Apparition ───────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.brand, .eyebrow, h1, .lede, .content-row, .card, .agency-line {
  animation: rise 0.62s cubic-bezier(0.2, 0, 0.1, 1) both;
}
.eyebrow { animation-delay: 0.04s; }
h1 { animation-delay: 0.08s; }
.lede { animation-delay: 0.12s; }
.content-row { animation-delay: 0.16s; }
.card { animation-delay: 0.1s; }
.agency-line { animation-delay: 0.24s; }

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr 370px; gap: 36px; }
}

/* ── Écrans peu hauts ──
   L'objectif est que toute la page tienne dans un écran, sans défilement.
   On resserre par paliers plutôt que de masquer du contenu. */

@media (min-width: 881px) and (max-height: 880px) {
  .hero { padding: 28px 24px; }
  h1 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 11px; }
  .brand { margin-bottom: 12px; }
  .lede { margin-bottom: 14px; }
  .resource { margin-bottom: 12px; }
  .card { padding: 20px; }
  .card-sub { margin-bottom: 14px; }
  .field { margin-bottom: 9px; }
}

@media (min-width: 881px) and (max-height: 780px) {
  .hero { padding: 20px 24px; }
  h1 { font-size: clamp(22px, 2.1vw, 28px); }
  .eyebrow { margin-bottom: 10px; }
  .lede { font-size: 13.5px; margin-bottom: 12px; }
  .chip { padding: 7px 9px; font-size: 12px; }
  .chip-icon { width: 23px; height: 23px; }
  .card { padding: 18px; }
  input[type="text"], input[type="email"], input[type="tel"] { padding: 8px 11px; }
  .submit { padding: 11px 20px; margin-top: 12px; }
  .agency-line { margin-top: 9px; }
}

@media (max-width: 880px) {
  .hero { padding: 36px 20px 48px; align-items: flex-start; }
  .shell { grid-template-columns: 1fr; gap: 28px; max-width: 520px; }
  h1 { font-size: clamp(26px, 7vw, 33px); }
  .lede { font-size: 14.5px; margin-bottom: 20px; }
  .content-row { grid-template-columns: 1fr; gap: 12px; max-width: none; }
  .chips { grid-template-columns: 1fr 1fr; }
  .card { padding: 22px; }
  .choice { flex: 1 1 auto; justify-content: flex-start; }
}

@media (max-width: 560px) {
  .chips,
  .content-row.is-unlocked .chips { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .row-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
