/* Pages d'inscription et de remerciement.
   Couleurs tirées du logo Vivre en Bourse (bleu, cyan) ; l'or est réservé au billet de date. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --nuit: #0a2f5e;        /* bleu profond du bandeau */
  --bleu: #0a6bb8;        /* bleu du logo : boutons, liens */
  --bleu-fonce: #08528f;
  --cyan: #19b5e8;        /* cœur du logo : accents */
  --or: #f4b942;          /* billet de date */
  --encre: #14253d;
  --gris: #51627a;
  --trait: #c9d6e5;
  --fond: #f3f7fb;
  --danger: #b42318;
  --titre: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--texte); font-size: 1.0625rem; line-height: 1.55; color: var(--encre); background: var(--fond); }
a { color: var(--bleu); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ---------- Structure : en-tête dans le bandeau, formulaire à cheval sur sa bordure ---------- */
.page {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 64px;
  grid-template-areas: "entete carte" "programme carte";
}
/* Bandeau pleine largeur : border-image déborde du cadre sans élargir la page (pas de défilement horizontal) */
.entete {
  grid-area: entete; padding: 28px 0 64px; color: #fff;
  border-image: linear-gradient(180deg, #0e78c4 0%, #0a4f96 38%, var(--nuit) 78%) fill 0 / 0 / 0 100vw;
}
.logo { display: block; width: 76px; height: 76px; margin-bottom: 40px; }
.entete h1 {
  font-family: var(--titre); font-weight: 800; font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; max-width: 15em;
}
.surtitre { font-weight: 600; color: #bfe6fa; margin-bottom: 10px; }
.accroche { font-size: 1.15rem; line-height: 1.5; color: #d7e7f6; max-width: 34em; margin-top: 18px; }
.date { font-weight: 700; margin-top: 22px; }

/* ---------- Billet : la date du rendez-vous ---------- */
.billet {
  display: inline-grid; grid-template-columns: auto 1fr; margin-top: 30px;
  background: var(--or); color: var(--encre); border-radius: 10px;
  /* encoches de part et d'autre de la ligne de découpe */
  -webkit-mask: radial-gradient(circle 9px at var(--pli) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 9px at var(--pli) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 9px at var(--pli) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 9px at var(--pli) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  --pli: 7.25rem;
}
.billet-jour { width: var(--pli); padding: 12px 0 14px; text-align: center; border-right: 2px dashed rgba(20, 37, 61, 0.35); }
.billet-num { display: block; font-family: var(--titre); font-weight: 800; font-size: 3.4rem; line-height: 0.95; letter-spacing: -0.03em; }
.billet-mois { display: block; font-weight: 700; font-size: 0.95rem; }
.billet-detail { display: flex; flex-direction: column; justify-content: center; padding: 12px 26px 12px 22px; }
.billet-detail strong { font-family: var(--titre); font-weight: 700; font-size: 1.35rem; line-height: 1.2; }
.billet-detail span { font-size: 0.95rem; color: #3b3320; }

/* ---------- Carte du formulaire ---------- */
.carte {
  grid-area: carte; align-self: start; margin: 144px 0 48px;
  background: #fff; border-radius: 16px; padding: 28px 26px 26px;
  box-shadow: 0 24px 48px -24px rgba(10, 47, 94, 0.55), 0 0 0 1px rgba(10, 47, 94, 0.06);
}
.carte h2 { font-family: var(--titre); font-weight: 700; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 14px; }

.invitation { border-left: 4px solid var(--cyan); background: #eaf5fc; border-radius: 0 10px 10px 0; padding: 12px 14px; margin-bottom: 6px;
  font-size: 0.9rem; font-weight: 700; color: var(--bleu-fonce); }

form label { display: block; font-size: 0.92rem; font-weight: 600; margin: 14px 0 5px; }
form input[type="text"], form input[type="email"] {
  width: 100%; font: inherit; color: inherit; background: #fff;
  padding: 12px 14px; border: 1.5px solid var(--trait); border-radius: 10px;
}
form input[type="text"]:hover, form input[type="email"]:hover { border-color: #9fb4cc; }
form input[type="text"]:focus-visible, form input[type="email"]:focus-visible { outline: 0; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(25, 181, 232, 0.35); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; font-weight: 400; line-height: 1.45; color: var(--gris); margin: 18px 0; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--bleu); }
.btn {
  width: 100%; font-family: var(--titre); font-size: 1.15rem; font-weight: 700; color: #fff;
  background: var(--bleu); border: 0; border-radius: 10px; padding: 15px; cursor: pointer;
}
.btn:hover { background: var(--bleu-fonce); }
.mention { font-size: 0.86rem; color: var(--gris); text-align: center; margin-top: 12px; }
.erreur { background: #fef3f2; color: var(--danger); border-left: 4px solid var(--danger); border-radius: 0 10px 10px 0; padding: 10px 12px; font-size: 0.92rem; font-weight: 600; }

/* ---------- Capture d'écran : remonte dans le bandeau, déborde en dessous ---------- */
.avec-apercu { grid-template-areas: "entete carte" "apercu carte" "programme carte"; }
.avec-apercu .entete { padding-bottom: 236px; }
.apercu { grid-area: apercu; margin-top: -180px; }
.apercu img {
  display: block; width: 100%; height: auto; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 28px 56px -28px rgba(4, 20, 44, 0.75);
}
.apercu figcaption { font-size: 0.9rem; color: var(--gris); margin-top: 12px; }
.avec-apercu .programme { padding-top: 40px; }

/* ---------- Programme ---------- */
.programme { grid-area: programme; padding: 48px 0 56px; }
.programme h2 { font-family: var(--titre); font-weight: 700; font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 8px; }
.points { list-style: none; max-width: 34em; }
.points li { position: relative; padding: 16px 0 16px 30px; border-bottom: 1px solid var(--trait); font-size: 1.1rem; }
.points li:last-child { border-bottom: 0; }
/* Puce en forme de chandelier, comme ceux du logo */
.points li::before { content: ""; position: absolute; left: 6px; top: 1.05em; width: 2px; height: 1.5em; background: var(--bleu); }
.points li::after { content: ""; position: absolute; left: 2px; top: 1.35em; width: 10px; height: 0.85em; border-radius: 2px; background: var(--cyan); }

/* ---------- Pied de page ---------- */
.pied { max-width: 1080px; margin: 0 auto; padding: 0 24px 40px; font-size: 0.86rem; color: var(--gris); }

/* ---------- Page de remerciement ---------- */
.page-merci { display: block; }
.page-merci .entete { padding-bottom: 56px; }
.page-merci .accroche { color: #fff; }
.note { max-width: 34em; padding: 32px 0 40px; color: var(--gris); }

/* ---------- Écrans étroits : une colonne, le formulaire juste sous l'en-tête ---------- */
@media (max-width: 900px) {
  .page { display: block; padding: 0 18px; }
  .entete { padding: 20px 0 76px; }
  .logo { width: 64px; height: 64px; margin-bottom: 26px; }
  .accroche { font-size: 1.05rem; }
  .carte { margin: -44px 0 0; padding: 24px 20px 22px; }
  /* la capture passe sous le formulaire, sur fond clair */
  .avec-apercu .entete { padding-bottom: 76px; }
  .apercu { margin-top: 36px; }
  .apercu img { border-color: rgba(10, 47, 94, 0.15); box-shadow: 0 18px 36px -22px rgba(10, 47, 94, 0.6); }
  .programme { padding: 40px 0 44px; }
  .pied { padding: 0 18px 32px; }
}
@media (max-width: 380px) {
  .billet { --pli: 6rem; }
  .billet-num { font-size: 2.8rem; }
  .billet-detail { padding: 10px 16px 10px 16px; }
  .billet-detail strong { font-size: 1.15rem; }
}
