/* Pages publiques des événements. Les couleurs viennent de /evenements/<slug>/theme.css (variables --sombre, --primaire…). */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/static/polices/figtree-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/static/polices/figtree-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --sombre: #092b5a;
  --primaire: #0f3d8e;
  --fond: #f4f6fa;
  --texte: #14213d;
  --doux: #4a5672;
  --trait: #cfd6e4;
  --carte: #ffffff;
  --erreur: #b3261e;
  --succes: #0b6e3f;
  --rayon: 14px;
  --chevauche: 2.75rem;   /* la carte blanche remonte sur le bandeau */
  --h-formes: 3rem;       /* hauteur de la bande de formes, posée sur le haut de la carte */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primaire); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--primaire);
  outline-offset: 2px;
}
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Bandeau ---------- */
.bandeau {
  background: var(--sombre);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.bandeau-contenu {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem calc(var(--chevauche) + var(--h-formes) + 1.25rem);
  position: relative;
  z-index: 1;
}
@media (min-width: 36rem) { :root { --h-formes: 4.25rem; } }
.bandeau-haut { display: flex; align-items: center; gap: 0.875rem; }
.logo { width: 4rem; height: 4rem; border-radius: 6px; background: #fff; flex: none; }
.client { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.01em; opacity: 0.92; }
.titre {
  font-size: clamp(2rem, 7.5vw, 3.1rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 0.4rem;
  text-wrap: balance;
}
.signature { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--accent, #d8e600); }
.infos {
  list-style: none; margin: 1.25rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.infos li {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.9375rem; font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  border: 1px solid rgb(255 255 255 / 0.22);
}
.infos svg { width: 1rem; height: 1rem; flex: none; }
.formes {
  position: absolute; left: 0; right: 0; bottom: var(--chevauche);
  height: var(--h-formes); width: 100%;
}

/* ---------- Carte principale ---------- */
main {
  max-width: 44rem;
  margin: calc(-1 * var(--chevauche)) auto 0;
  padding: 0 0.75rem 2rem;
  position: relative;
  z-index: 2;
}
.carte {
  background: var(--carte);
  border-radius: var(--rayon);
  box-shadow: 0 1px 2px rgb(9 43 90 / 0.06), 0 8px 28px rgb(9 43 90 / 0.08);
  padding: 1.5rem 1.25rem 1.75rem;
}
@media (min-width: 36rem) {
  .carte { padding: 2.25rem 2.5rem 2.5rem; }
  main { padding-inline: 1.25rem; }
}
.carte + .carte { margin-top: 1rem; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
.salut { font-size: 1.5rem; font-weight: 750; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.intro p { margin: 0 0 0.75rem; }
.intro p:last-child { margin-bottom: 0; }
h2 { font-size: 1.1875rem; font-weight: 750; margin: 2rem 0 0.75rem; }

/* ---------- Formulaire ---------- */
form { margin-top: 1.5rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.champ { margin: 0 0 1.75rem; }
.champ[hidden] { display: none; }
legend, .libelle {
  display: block;
  font-weight: 700;
  font-size: 1.0625rem;
  margin: 0 0 0.6rem;
  padding: 0;
}
.requis { color: var(--erreur); margin-left: 0.2em; }
.aide { margin: -0.3rem 0 0.6rem; color: var(--doux); font-size: 0.9375rem; }
.options { display: grid; gap: 0.5rem; }
.option { position: relative; display: flex; align-items: flex-start; gap: 0.75rem; }
.options .option {
  border: 1.5px solid var(--trait);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  background: #fff;
  transition: border-color 0.15s, background-color 0.15s;
}
.options .option:hover { border-color: var(--primaire); }
.options .option:has(input:checked) { border-color: var(--primaire); background: #eef2f9; background: color-mix(in srgb, var(--primaire) 7%, #fff); }
.options .option:has(input:disabled) { opacity: 0.55; }
.option input {
  flex: none;
  width: 1.375rem; height: 1.375rem;
  margin: 0.1rem 0 0;
  accent-color: var(--primaire);
}
.option label { flex: 1; cursor: pointer; }
/* La zone cliquable couvre toute la carte d'option */
.options .option label::after { content: ''; position: absolute; inset: 0; border-radius: 10px; }
.option-aide { display: block; color: var(--doux); font-size: 0.9375rem; font-weight: 400; }
.complet { color: var(--erreur); font-weight: 600; }
.champ-case .option { padding: 0.25rem 0; }
.champ-case .aide, .champ-case .erreur { margin: 0.25rem 0 0 2.125rem; }

input[type='text'], input[type='email'], input[type='password'], textarea {
  display: block; width: 100%;
  font: inherit; font-size: max(1rem, 1em);
  padding: 0.75rem 0.875rem;
  min-height: 3.125rem;
  border: 1.5px solid #8a94a8;
  border-radius: 10px;
  background: #fff;
  color: var(--texte);
}
textarea { resize: vertical; min-height: 6rem; }
input:user-invalid, textarea:user-invalid, [aria-invalid='true'] { border-color: var(--erreur); }
.deux-colonnes { display: grid; gap: 0 1rem; }
@media (min-width: 36rem) { .deux-colonnes { grid-template-columns: 1fr 1fr; } }

.presence .options { grid-template-columns: 1fr; }
@media (min-width: 36rem) { .presence .options { grid-template-columns: 1fr 1fr; } }
.presence .option { padding: 1rem; font-weight: 700; }

.details { border-top: 1px solid var(--trait); padding-top: 1.5rem; margin-top: 0.25rem; }
.details[hidden] { display: none; }

.erreur { color: var(--erreur); font-weight: 600; font-size: 0.9375rem; margin: 0 0 0.5rem; }
.erreur::before { content: '! '; font-weight: 800; }
.resume-erreurs {
  border: 2px solid var(--erreur);
  border-radius: 10px;
  padding: 1rem 1.125rem;
  margin: 0 0 1.5rem;
  background: #fdf3f2;
}
.resume-erreurs h2 { margin: 0 0 0.5rem; font-size: 1.0625rem; color: var(--erreur); }
.resume-erreurs ul { margin: 0; padding-left: 1.2rem; }

.rgpd { font-size: 0.875rem; color: var(--doux); margin: 1.5rem 0 0; }
.rgpd p { margin: 0 0 0.5rem; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1.5rem;
  margin-top: 1.5rem;
  font: inherit; font-weight: 750; font-size: 1.0625rem;
  color: #fff;
  background: var(--primaire);
  border: 0; border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s, filter 0.15s;
}
.bouton:hover { filter: brightness(1.12); }
.bouton:active { transform: translateY(1px); }
.bouton[disabled] { opacity: 0.6; cursor: progress; }
.bouton-secondaire { background: transparent; color: var(--primaire); border: 2px solid var(--primaire); }
@media (min-width: 36rem) { .bouton { width: auto; } }

/* ---------- Confirmation ---------- */
.statut {
  display: flex; gap: 0.875rem; align-items: flex-start;
  padding: 1rem 1.125rem;
  border-radius: 12px;
  background: #e9f3ee; background: color-mix(in srgb, var(--succes) 9%, #fff);
  border: 1.5px solid #a8cdb9; border: 1.5px solid color-mix(in srgb, var(--succes) 35%, #fff);
  margin-bottom: 1.25rem;
}
.statut svg { width: 1.75rem; height: 1.75rem; flex: none; color: var(--succes); }
.statut h1, .statut .titre-statut { font-size: 1.375rem; margin: 0 0 0.25rem; }
.form-lien { margin-top: 0.75rem; }
.form-lien .bouton { margin-top: 0.5rem; }
.statut p { margin: 0; }
.statut-neutre { background: #f2f4f8; border-color: var(--trait); }
.statut-neutre svg { color: var(--doux); }
.recap { margin: 0; display: grid; gap: 0.6rem; }
.recap div { display: grid; gap: 0.1rem; padding-bottom: 0.6rem; border-bottom: 1px solid #e7ebf2; }
.recap div:last-child { border-bottom: 0; }
.recap dt { font-size: 0.875rem; color: var(--doux); font-weight: 400; }
.recap dd { margin: 0; font-weight: 600; }
.qr { display: grid; justify-items: center; text-align: center; gap: 0.5rem; margin: 1.5rem 0 0.5rem; }
.qr img { width: 12rem; height: 12rem; border-radius: 8px; border: 1px solid #e3e7ef; padding: 0.5rem; background: #fff; image-rendering: pixelated; }
.qr p { margin: 0; color: var(--doux); font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0 0.75rem; }

.page-simple { text-align: center; }
.page-simple h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }

body.neutre main { margin-top: 3rem; }

footer {
  max-width: 44rem; margin: 0 auto; padding: 0 1.25rem 2.5rem;
  text-align: center; font-size: 0.875rem; color: var(--doux);
}
footer p { margin: 0.25rem 0; }
/* Liens du pied de page : zone de clic d'au moins 24 px de haut (WCAG 2.5.8). */
footer a { display: inline-block; padding-block: 0.3rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  .bandeau .formes, form, .actions, footer { display: none; }
  body { background: #fff; }
  main { margin-top: 0; }
  .carte { box-shadow: none; }
}
/* Aperçu du back-office : bandeau d'avertissement */
.bandeau-apercu { margin: 0; padding: 0.5rem 1rem; background: #fef3c7; color: #78350f; font-weight: 700; text-align: center; font-size: 0.9375rem; }
footer p + p { margin-top: 0.35rem; }
.mentions h2 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; }

/* Récapitulatif modifiable (page de retour sur le lien) ; le parcours guidé a sa propre feuille : parcours.css. */
.recap-guide dd, .recap-modifiable dd { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.modifier-ligne {
  flex: none;
  font: inherit; font-size: 0.9375rem; font-weight: 700; color: var(--primaire);
  background: none; border: 0; padding: 0.5rem 0.25rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em;
}

/* Confirmation : la forme de la personne rejoint l'œuvre collective. */
.oeuvre { margin: 0 0 1.5rem; text-align: center; }
.oeuvre svg { width: 100%; max-width: 30rem; height: auto; margin: 0 auto; overflow: visible; }
.oeuvre .piece { transform-box: fill-box; transform-origin: 50% 100%; animation: pose 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
.oeuvre .piece-0 { animation-delay: 0.05s; } .oeuvre .piece-1 { animation-delay: 0.12s; } .oeuvre .piece-2 { animation-delay: 0.19s; }
.oeuvre .piece-3 { animation-delay: 0.26s; } .oeuvre .piece-5 { animation-delay: 0.33s; } .oeuvre .piece-6 { animation-delay: 0.4s; }
.oeuvre .piece-7 { animation-delay: 0.47s; } .oeuvre .piece-8 { animation-delay: 0.54s; }
.oeuvre .piece-vous { animation: chute 0.9s cubic-bezier(0.3, 1.35, 0.5, 1) 0.75s both; }
.oeuvre .vous { font: 800 15px Figtree, system-ui, sans-serif; fill: var(--primaire); animation: fondu 0.4s ease-out 1.55s both; }
.oeuvre figcaption { margin-top: 0.75rem; font-weight: 750; color: var(--primaire); animation: fondu 0.5s ease-out 1.5s both; }
@keyframes pose { from { opacity: 0; transform: scaleY(0.15); } }
@keyframes chute { 0% { opacity: 0; transform: translateY(-7rem) rotate(-14deg); } 60% { opacity: 1; } }
@keyframes fondu { from { opacity: 0; transform: translateY(0.4rem); } }

@media (prefers-reduced-motion: reduce) {
  .oeuvre * { animation: none !important; }
}

/* Lien d'évitement : visible seulement au clavier (RGAA 12.7) */
.evitement { position: absolute; left: .75rem; top: -4rem; z-index: 10; padding: .75rem 1rem; background: #fff; color: #0b1530;
  border-radius: .5rem; font-weight: 600; text-decoration: underline; }
.evitement:focus { top: .75rem; outline: 3px solid currentColor; outline-offset: 2px; }
main:focus { outline: none; }
.mentions ul { padding-left: 1.25rem; }
