/* ================================================================
   Tes projets méritent une suite : feuille de style
   ================================================================ */

@font-face {
  font-family: "Baloo 2";
  src: url("fonts/baloo2-latin.woff") format("woff");
  font-weight: 400 800;            /* police variable : 400, 600, 700, 800 */
  font-style: normal;
  font-display: swap;
}

:root {
  --violet: #28009F;
  --violet-deep: #1E0078;
  --green: #03D66C;
  --green-light: #A3E6BC;
  --white: #FFFFFF;
  --ink: #28009F;             /* texte dans la carte blanche */
  --ink-soft: #4A3A8C;        /* texte secondaire dans la carte */
  --line: #8A7FC0;            /* bordure des champs (contraste ≥ 3:1 sur blanc) */
  --error: #B00030;
  --on-violet-soft: rgba(255, 255, 255, .88);
  --radius-card: 28px;
  --radius-field: 14px;
  --font: "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--violet);
  color: var(--white);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

/* ---------- Décor : cercles discrets ---------- */
.deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.deco-ring {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  border: 2px solid rgba(163, 230, 188, .16);
  top: -260px; right: -200px;
}
.deco-soft {
  position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(3, 214, 108, .14), rgba(3, 214, 108, 0) 70%);
  bottom: -160px; left: -140px;
}

/* ---------- Mise en page ---------- */
.page {
  position: relative; z-index: 1;
  width: 100%; max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px 24px;
  display: grid;
  gap: 24px;
}

.intro { position: relative; min-width: 0; }

.circle-of-dots {
  position: absolute; top: -6px; right: 0;
  width: 64px; height: 64px;
  fill: rgba(163, 230, 188, .35);
}
.circle-of-dots .on { fill: var(--green); }

.badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(163, 230, 188, .45);
  color: var(--green-light);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.4;
  max-width: calc(100% - 72px);  /* laisse la place au petit cercle de points */
}

.title {
  margin: 0 0 14px;
  font-weight: 800;
  font-size: clamp(30px, 8.6vw, 36px);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--white);
}
.title .line { display: block; }
.title .nowrap { white-space: nowrap; }

.hl {
  position: relative;
  z-index: 0;
  display: inline-block;
  color: var(--green);
}


.text {
  margin: 0 0 10px;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--on-violet-soft);
}
.text .green { color: var(--green); font-weight: 700; }
.br-desktop { display: none; }

.pills {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pills li {
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--white);
  white-space: nowrap;
}

/* ---------- Carte formulaire ---------- */
.card {
  min-width: 0;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-card);
  padding: 24px 18px 20px;
  box-shadow: 0 18px 40px rgba(14, 0, 60, .28), 0 2px 6px rgba(14, 0, 60, .12);
}
.card-title {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
}
.card-text {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--ink-soft);
}

.field { margin-bottom: 14px; }
.field > label {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
}
.field input[type="text"],
.field input[type="email"] {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-field);
  background: #FBFAFF;
  color: #1A0A55;
  font: inherit;
  font-size: 17px;          /* ≥ 16px : évite le zoom auto sur iPhone */
  line-height: 1.3;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:hover { border-color: var(--violet); }
.field input[aria-invalid="true"] { border-color: var(--error); background: #FFF6F8; }

.consent {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 10px;
  align-items: start;
  margin: 4px 0 16px;
}
.consent input[type="checkbox"] {
  width: 24px; height: 24px; margin: 2px 0 0;
  accent-color: var(--violet);
  cursor: pointer;
}
.consent label {
  font-size: 15px; line-height: 1.45;
  color: var(--ink); font-weight: 600; cursor: pointer;
}
.consent .err { grid-column: 2; }

.err {
  margin: 5px 0 0;
  min-height: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--error);
}
.err:empty { display: none; }
.err-global { margin-top: 10px; text-align: center; }

.cta {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  text-shadow: 0 1px 2px rgba(20, 0, 80, .35);  /* aide la lisibilité du blanc sur vert */
  font: inherit;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 0 #02A854;
  transition: transform .12s ease, box-shadow .12s ease, filter .15s ease;
}
.cta:hover { filter: brightness(1.04); }
.cta:active { transform: translateY(3px); box-shadow: 0 3px 0 #02A854; }
.cta[disabled] { cursor: progress; opacity: .75; transform: none; }

.fine {
  margin: 14px 0 0;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.fine a { color: var(--violet); font-weight: 700; text-underline-offset: 3px; }


.trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.success { text-align: center; padding: 12px 4px; }
.success .card-title { font-size: 28px; outline: none; }
.success .card-text { margin: 8px 0 0; font-size: 17px; color: var(--ink); }

/* ---------- Focus visible ---------- */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.card :focus-visible { outline-color: var(--violet); }
.field input:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-color: var(--violet); border-radius: var(--radius-field); }
.cta:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; border-radius: 999px; }

/* ---------- Apparition douce ---------- */
@media (prefers-reduced-motion: no-preference) {
  .intro, .card { animation: rise .5s ease-out both; }
  .card { animation-delay: .08s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------- Très petits écrans (320 px) ---------- */
@media (max-width: 359px) {
  .page { padding: 22px 12px 20px; }
  .badge { font-size: 12px; letter-spacing: .05em; max-width: 100%; }
  .circle-of-dots { display: none; }
  .title { font-size: 29px; }
  .card { padding: 20px 14px 18px; border-radius: 24px; }
  .card-title { font-size: 20px; }
  .pills li { font-size: 13.5px; padding: 4px 11px; }
  .cta { font-size: 17.5px; }
}

/* ---------- Tablette ---------- */
@media (min-width: 640px) {
  .page { padding: 48px 32px 32px; gap: 32px; max-width: 680px; }
  .title { font-size: 44px; }
  .text { font-size: 18px; }
  .card { padding: 32px 30px 26px; }
  .card-title { font-size: 25px; }
  .circle-of-dots { width: 78px; height: 78px; }
}

/* ---------- Petit ordinateur (une colonne, titre 48 px) ---------- */
@media (min-width: 900px) and (max-width: 1099px) {
  .page { max-width: 760px; }
  .title { font-size: 48px; }
  .title .line { white-space: nowrap; }
  .br-desktop { display: inline; }
}

/* ---------- Ordinateur : texte à gauche, formulaire à droite ---------- */
@media (min-width: 1100px) {
  body { font-size: 18px; }
  .page {
    max-width: 1240px;
    min-height: calc(100vh - 60px);
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center;
    column-gap: 56px;
    padding: 56px 40px 32px;
  }
  /* la taille suit la largeur de la colonne pour garder 3 lignes sans débordement */
  .title { font-size: clamp(48px, calc((100vw - 560px) / 11.4), 60px); line-height: 1.08; margin-bottom: 20px; }
  .title .line { white-space: nowrap; }       /* trois lignes fixes */
  .br-desktop { display: inline; }
  .text { font-size: 19px; margin-bottom: 14px; }
  .pills { margin-top: 22px; gap: 10px; }
  .pills li { font-size: 16px; padding: 6px 16px; }
  .circle-of-dots { top: -24px; right: 4%; width: 96px; height: 96px; }
  .badge { font-size: 14px; margin-bottom: 20px; }
  .deco-ring { width: 760px; height: 760px; top: -380px; right: -260px; }
  .deco-soft { width: 560px; height: 560px; }
}

/* ---------- Page merci (envoi sans JavaScript) ---------- */
.page.page-merci { max-width: 560px; grid-template-columns: 1fr; min-height: 0; padding-top: 18vh; }
