/* Papi Events — pages publiques.
   Parti pris : éditorial et sobre. Titres en empattements, papier chaud, filets fins, une seule couleur d'accent ;
   pas d'ombres, pas de dégradés, pas de cartes arrondies. Lisible d'abord sur téléphone (WhatsApp, Messenger). */
:root {
  /* [2026-10-10 FEAT-FIELD-HEIGHT] Hauteur des champs de saisie : -10 % à la demande de l'utilisateur (hauteur réelle ≈ 53,2 px → ≈ 48 px).
     AVANT : --field-min-height: 50px; --field-pad-y: 12px;  (pour revenir en arrière, remettre ces deux valeurs). */
  --field-min-height: 45px;
  --field-pad-y: 9.4px;
  --paper: #faf8f3;
  --ink: #1b2433;
  --muted: #5f6675;
  --rule: #d8d2c4;
  --accent: #123b7a;
  --accent-ink: #ffffff;
  --accent-tint: #e9eef7;
  --gold: #b98a2a;
  --gold-tint: #f6ecd2;
  --danger: #a3261d;
  --danger-tint: #fbebe9;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* [2026-10-10 FEAT-PAYMENT-THEMES] Réglages typographiques que les thèmes peuvent redéfinir (public/themes/<id>/theme.css) : graisse,
     espacement et facteur de taille des titres. Valeurs par défaut = rendu d'origine de la page. */
  --title-weight: 600;
  --title-tracking: -.01em;
  --title-scale: 1;
  /* [2026-10-10 FEAT-PAYMENT-THEMES] Pages publiques TOUJOURS claires, même sur un téléphone en mode sombre (décision de l'utilisateur : une
     page de paiement sombre inspire moins confiance). Le mode sombre qui existait ici a été supprimé. */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.0625rem/1.6 var(--sans); }
.wrap { width: 100%; max-width: 40rem; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-bottom: 72px; }
a { color: var(--accent); text-underline-offset: 3px; }
.link { font-weight: 600; }

/* [2026-10-10 FEAT-PAYMENT-THEMES] Fond du bandeau : BLANC dans tous les thèmes (volontairement hors variables). Le logo de l'organisateur est
   imprévisible ; un JPEG à fond blanc doit se fondre dans le bandeau au lieu d'y dessiner un rectangle sur un papier teinté. */
.masthead { background: #fff; border-top: 4px solid var(--gold); border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
.masthead .wrap { padding-top: 14px; padding-bottom: 14px; }
.masthead__name { font-family: var(--serif); display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
/* [2026-10-10 FEAT-ORGANISER-LOGO] Logo de l'organisateur : hauteur bornée, proportions conservées, jamais déformé ni débordant sur mobile. */
.masthead__logo { display: block; height: auto; width: auto; max-height: 48px; max-width: 160px; flex: 0 1 auto; }

.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.title { margin: 0 0 22px; font: var(--title-weight) calc(clamp(1.9rem, 6.2vw, 2.7rem) * var(--title-scale))/1.12 var(--serif); letter-spacing: var(--title-tracking); text-wrap: balance; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; }
.section { margin: 40px 0 14px; padding-top: 14px; border-top: 1px solid var(--rule); font: 700 .8rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.facts { margin: 0 0 24px; display: grid; gap: 10px; }
.facts > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 12px; align-items: baseline; }
.facts dt { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.facts dd { margin: 0; font-size: 1.12rem; font-weight: 500; }
/* [2026-10-10 FEAT-LOCATION-URL] Lien « Voir sur Google Maps » sous le lieu ; texte d'aide réservé aux lecteurs d'écran. */
.facts__map { display: block; margin-top: 2px; font-size: .95rem; font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.reference { font-variant-numeric: tabular-nums; letter-spacing: .04em; font-weight: 700 !important; }

.prose { margin: 0 0 1em; max-width: 36rem; }
.prose--first { font-size: 1.12rem; }

.notice { margin: 20px 0; padding: 14px 16px; border-left: 4px solid var(--gold); background: var(--accent-tint); }
/* [2026-10-10 FEAT-CLOSED-BANNER] Événement fermé : bandeau bien visible (fond doré teinté, filet épais, texte plus grand et gras, icône). */
.notice--closed { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 18px 20px; border-left: 6px solid var(--gold); background: var(--gold-tint); font-size: 1.2rem; font-weight: 600; line-height: 1.35; }
.notice--closed .notice__icon { flex: none; color: var(--gold); }

/* Liste des événements ouverts */
.agenda { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.agenda__item { border-bottom: 1px solid var(--rule); }
.agenda__link { display: grid; gap: 2px; padding: 18px 0; color: inherit; text-decoration: none; }
.agenda__link:hover .agenda__name, .agenda__link:focus-visible .agenda__name { text-decoration: underline; text-underline-offset: 4px; }
.agenda__date { color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.agenda__name { font: var(--title-weight) 1.45rem/1.25 var(--serif); color: var(--accent); }
.agenda__place { color: var(--muted); }

/* Formulaire */
.form { display: grid; gap: 28px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 12px; font: 700 .8rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fields { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.optional { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="tel"], input[type="email"] {
  width: 100%; min-height: var(--field-min-height); padding: var(--field-pad-y) 14px; font: inherit; color: var(--ink); background: transparent;
  border: 1px solid var(--rule); border-bottom-color: var(--ink); border-radius: 2px;
}
input:focus-visible, .button:focus-visible, a:focus-visible, .choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--danger); border-bottom-color: var(--danger); }
.field__error { color: var(--danger); font-weight: 600; font-size: .95rem; }
.error-summary { margin: 0 0 24px; padding: 14px 16px; border-left: 4px solid var(--danger); background: var(--danger-tint); color: var(--ink); }
.error-summary p { margin: 0 0 6px; font-weight: 700; }
.error-summary ul { margin: 0; padding-left: 1.2em; }
.error-summary a { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tarifs : lignes simples, montants alignés à droite */
.price { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0; padding: 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.price__label { font-weight: 600; }
/* [2026-10-10 FEAT-PAYMENT-THEMES] Why : un montant à payer doit se lire sans ambiguïté ; police de texte, chiffres tabulaires (certaines polices de titre, comme Cormorant, ont des chiffres elbeux). */
.price__amount, .rates__amount, .choice__amount { font: 700 1.35rem/1.2 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.choices { display: grid; gap: 0; }
.choices legend { float: left; width: 100%; margin: 6px 0 14px; }
.choices .choice:first-of-type { border-top: 1px solid var(--ink); }
.choices .field__error { display: block; margin-bottom: 8px; clear: both; }
.choice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; min-height: 60px; padding: 12px 8px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.choice:hover { background: var(--accent-tint); }
.choice:has(input:checked) { background: var(--accent-tint); box-shadow: inset 4px 0 0 var(--accent); }
.choice input { width: 1.3rem; height: 1.3rem; accent-color: var(--accent); }
.choice__label { font-weight: 600; }
.rates { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rates__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }

.button {
  display: block; width: 100%; min-height: 56px; padding: 14px 20px; font: 700 1.05rem/1.2 var(--sans); letter-spacing: .02em;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 3px; cursor: pointer;
}
.button:hover:not(:disabled) { filter: brightness(1.12); }
.button:disabled { opacity: .6; cursor: not-allowed; }
.legal { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; max-width: 34rem; }

@media (min-width: 640px) {
  .masthead { margin-bottom: 56px; }
  .button { width: auto; min-width: 16rem; }
}

/* [2026-10-08 FEAT-EVENT-TWO-COLUMNS] Page d'événement : sur téléphone, informations puis paiement empilés ; dès la tablette, informations à
   gauche et paiement à droite, pour qu'une description longue ne repousse plus le formulaire sous la ligne de flottaison. */
@media (min-width: 768px) {
  .wrap--wide { max-width: 66rem; }
  .event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(21rem, 27rem); column-gap: 56px; row-gap: 0; align-items: start; }
  .event > .notice--closed { grid-column: 1 / -1; }
  .event__pay > .section:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
  .event__pay .button { width: 100%; min-width: 0; }
  .event .prose { max-width: none; }

  /* [2026-10-10 FEAT-COMPACT-PUBLIC-FORM] Why : la colonne « Participer » doit tenir sans défiler sur un 14 pouces (mesuré : 695 px de colonne
     + 143 px au-dessus pour un viewport utile d'environ 650 px). Resserrement UNIQUEMENT dès 768 px (téléphone inchangé : cibles tactiles
     confortables). La mention légale reste visible, seulement un peu plus petite ; la légende « Vos informations » reste pour les lecteurs
     d'écran. Pour revenir en arrière : supprimer ce bloc. */
  .masthead:has(.wrap--wide) { margin-bottom: 24px; }
  .masthead:has(.wrap--wide) .wrap { padding-top: 10px; padding-bottom: 10px; }
  .event__pay .form { gap: 18px; }
  .event__pay .fields { gap: 12px; }
  .event__pay .fields > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
  .event__pay .fields__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .event__pay .field { gap: 4px; }
  .event__pay .field label { line-height: 1.3; }
  .event__pay input[type="text"], .event__pay input[type="tel"], .event__pay input[type="email"] { line-height: 1.3; }
  .event__pay .price { padding: 10px 0; }
  .event__pay .choice { min-height: 48px; padding-top: 8px; padding-bottom: 8px; }
  .event__pay .button { min-height: 48px; padding-top: 11px; padding-bottom: 11px; }
  .event__pay .legal { font-size: .8rem; line-height: 1.4; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .choice { transition: filter .12s ease, background-color .12s ease; }
}

/* Paiement : relance, bouton discret, formulaire en ligne */
.inline-form { display: inline; margin: 0; }
.button--quiet { display: inline-block; width: auto; min-height: 44px; padding: 10px 16px; color: var(--accent); background: transparent; border: 1px solid var(--rule); font-weight: 600; }
.button--quiet:hover:not(:disabled) { background: var(--accent-tint); filter: none; }
.prose .button--quiet { margin-left: 4px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--accent-tint); padding: 1px 5px; border-radius: 2px; }

.facts--wide > div { grid-template-columns: 8.5rem 1fr; }
