/* Interface participant v2 - reprend la charte du site Section Bricolage
   (valeurs mesurées sur bricolage.cse-dsse-sections.fr) : Fira Sans, navy
   #000063 pour les actions, teal #35c4b8 pour l'état actif, cartes blanches
   sans bordure à ombre douce, pastilles arrondies. Servie uniquement quand
   l'interface v2 est active (voir ui_theme() dans app.py) ; style.css reste
   celle de l'interface d'origine. */

:root {
  --v2-navy: #000063;
  --v2-navy-hover: #00004d;
  --v2-navy-soft: #000058;
  --v2-teal: #35c4b8;
  --v2-teal-ring: #3bcfc2;
  --v2-teal-dark: #128a80;
  --v2-teal-50: #f0fdfa;
  --v2-teal-200: #99f6e4;
  --v2-teal-800: #115e59;
  --v2-gray-50: #f9fafb;
  --v2-gray-100: #f3f4f6;
  --v2-gray-200: #e5e7eb;
  --v2-gray-300: #d1d5db;
  --v2-gray-400: #9ca3af;
  --v2-gray-500: #6b7280;
  --v2-gray-600: #4b5563;
  --v2-gray-700: #374151;
  --v2-gray-900: #111827;
  --v2-blue-50: #eff6ff;
  --v2-blue-100: #dbeafe;
  --v2-blue-200: #bfdbfe;
  --v2-blue-700: #1d4ed8;
  --v2-blue-900: #1e3a8a;
  --v2-green-50: #f0fdf4;
  --v2-green-100: #dcfce7;
  --v2-green-200: #bbf7d0;
  --v2-green-700: #15803d;
  --v2-green-900: #14532d;
  --v2-amber-100: #fef3c7;
  --v2-amber-700: #b45309;
  --v2-red-100: #fee2e2;
  --v2-red-700: #b91c1c;
  --v2-red-900: #991b1b;
  --v2-purple-100: #ede9fe;
  --v2-purple-700: #5b21b6;
  --v2-lavender: #b3b3d9;
  --v2-lavender-100: #e6e6f4;
  --v2-lavender-200: #c7c7e6;
  --v2-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --v2-shadow-card: 0 4px 20px rgba(0, 0, 107, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
  --v2-shadow-pop: 0 10px 30px rgba(0, 0, 107, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --v2-radius-xl: 24px;
  --v2-radius-lg: 16px;
  --v2-radius-md: 12px;
  --v2-radius-sm: 8px;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body.v2 {
  margin: 0;
  font-family: 'Fira Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--v2-gray-900);
  background: var(--v2-gray-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* :where() keeps this default at zero specificity so any component class
   (.v2-btn, .v2-stat, .v2-mini...) can set its own colour with one class. */
:where(body.v2) a { color: var(--v2-navy); }
body.v2 h1, body.v2 h2, body.v2 h3 { margin: 0; line-height: 1.25; }
body.v2 p { margin: 0; }
body.v2 svg { flex-shrink: 0; }

.v2-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.v2-skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--v2-navy);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--v2-radius-sm);
  z-index: 100;
}
.v2-skip:focus { left: 0.5rem; }

/* ---------- Barre de navigation ---------- */

.v2-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--v2-gray-200);
  box-shadow: var(--v2-shadow-sm);
}

.v2-nav__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 65px;
}

.v2-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--v2-gray-900);
}
.v2-brand img { height: 40px; width: 40px; display: block; }
.v2-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
}
.v2-brand__name { font-weight: 700; font-size: 15px; color: var(--v2-navy); }
.v2-brand__sub { font-size: 11px; color: var(--v2-gray-500); letter-spacing: 0.02em; }

.v2-nav__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
}
.v2-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 4px 4px 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--v2-gray-700);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.v2-nav__link:hover { color: var(--v2-navy); }
.v2-nav__link[aria-current="page"] {
  color: var(--v2-teal);
  border-bottom-color: var(--v2-teal-ring);
}
.v2-nav__link svg { width: 16px; height: 16px; }

.v2-nav__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Menu compte : un <details> natif, pas de JavaScript. */
.v2-account { position: relative; }
.v2-account > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 0.5rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--v2-gray-900);
  padding: 0.4rem 0.5rem;
  border-radius: var(--v2-radius-sm);
  user-select: none;
}
.v2-account > summary::-webkit-details-marker { display: none; }
.v2-account > summary:hover { background: var(--v2-gray-100); }
.v2-account > summary svg { width: 18px; height: 18px; color: var(--v2-gray-500); }
.v2-account__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: 300px;
  background: #fff;
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-pop);
  border: 1px solid var(--v2-gray-200);
  padding: 1.25rem;
  z-index: 50;
}
.v2-account__name { font-weight: 700; font-size: 15px; }
.v2-account__trigram { font-size: 13px; color: var(--v2-gray-500); }
.v2-account__roles { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.6rem 0 0.9rem; }
.v2-account__links { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.v2-account__links a { font-size: 14px; text-decoration: none; }
.v2-account__links a:hover { text-decoration: underline; }
.v2-account__form { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.9rem; border-top: 1px solid var(--v2-gray-200); }
.v2-account__form label { font-size: 12px; font-weight: 600; color: var(--v2-gray-600); }
.v2-account__logout { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--v2-gray-200); }

/* Navigation mobile : hamburger + liste repliée sous la barre. */
.v2-nav__burger { display: none; }
.v2-nav__burger > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  padding: 0.4rem;
  border-radius: var(--v2-radius-sm);
  color: var(--v2-gray-700);
}
.v2-nav__burger > summary::-webkit-details-marker { display: none; }
.v2-nav__burger > summary svg { width: 26px; height: 26px; }
.v2-nav__mobile {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--v2-gray-200);
  box-shadow: var(--v2-shadow-card);
  padding: 0.75rem 1rem 1rem;
}
.v2-nav__mobile .v2-nav__links { flex-direction: column; align-items: stretch; gap: 0.25rem; height: auto; }
.v2-nav__mobile .v2-nav__link { padding: 0.65rem 0.5rem; border-bottom: 0; border-radius: var(--v2-radius-sm); font-size: 15px; }
.v2-nav__mobile .v2-nav__link[aria-current="page"] { background: var(--v2-teal-50); }

@media (max-width: 960px) {
  .v2-nav__links--desktop { display: none; }
  .v2-nav__burger { display: block; }
  .v2-nav__inner { gap: 1rem; }
  .v2-brand__sub { display: none; }
}
@media (max-width: 560px) {
  /* Logo + account + burger only, like the model's phone layout. */
  .v2-brand__text { display: none; }
  .v2-brand img { height: 36px; }
  .v2-nav__right { gap: 0.25rem; }
  .v2-account > summary { padding: 0.4rem 0.25rem; }
}

/* ---------- Bandeau d'annonce ---------- */

.v2-banner {
  background: var(--v2-blue-50);
  border-bottom: 1px solid var(--v2-blue-200);
  color: var(--v2-blue-900);
}
.v2-banner__inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-block: 0.85rem;
}
.v2-banner__inner > svg { width: 22px; height: 22px; color: var(--v2-blue-700); margin-top: 2px; }
.v2-banner__body { flex: 1; font-size: 15px; }
.v2-banner__title { font-weight: 700; margin-bottom: 0.15rem; }
.v2-banner__close {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--v2-blue-900);
  padding: 0.25rem;
  border-radius: var(--v2-radius-sm);
}
.v2-banner__close:hover { background: var(--v2-blue-100); }
.v2-banner__close svg { width: 22px; height: 22px; }

/* ---------- Structure de page ---------- */

.v2-main { flex: 1; padding-block: 2rem 3rem; }

.v2-page-head {
  background: #fff;
  border-bottom: 1px solid var(--v2-gray-200);
  margin: -2rem 0 2rem;
}
.v2-page-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.25rem;
}
.v2-page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }

.v2-welcome { margin-bottom: 2rem; }
.v2-welcome h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.6px; }
.v2-welcome p { font-size: 18px; color: var(--v2-gray-600); margin-top: 0.4rem; }

.v2-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 14px;
  color: var(--v2-gray-500);
  margin-bottom: 1.25rem;
}
.v2-breadcrumb a { color: var(--v2-gray-500); text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.v2-breadcrumb a:hover { color: var(--v2-navy); }
.v2-breadcrumb svg { width: 16px; height: 16px; }
.v2-breadcrumb .is-current { color: var(--v2-gray-900); font-weight: 600; }

.v2-title { font-size: 30px; font-weight: 700; letter-spacing: -0.6px; margin-bottom: 1.5rem; }

/* An event's own photo as a small thumbnail next to its title, rather than
   a large standalone block (up to 380px tall for a square photo) pushing
   every card below it far down the page - see participant_event.html. */
.v2-title-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.v2-title-row .v2-title { margin-bottom: 0.3rem; }
.v2-title-row__photo {
  width: 72px;
  height: 72px;
  border-radius: var(--v2-radius-md);
  object-fit: cover;
  background: var(--v2-gray-100);
  flex-shrink: 0;
}
.v2-title-row__meta { font-size: 15px; color: var(--v2-gray-600); }
@media (max-width: 640px) {
  .v2-title-row__photo { width: 56px; height: 56px; }
}

.v2-alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--v2-blue-50);
  border: 1px solid var(--v2-blue-200);
  color: var(--v2-blue-900);
  border-radius: var(--v2-radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 15px;
}
.v2-alert svg { width: 20px; height: 20px; margin-top: 2px; }

/* ---------- Cartes ---------- */

.v2-card {
  background: #fff;
  border-radius: var(--v2-radius-xl);
  box-shadow: var(--v2-shadow-card);
  padding: 1.5rem;
}
.v2-card + .v2-card { margin-top: 1.5rem; }
.v2-card--flush { padding: 0; overflow: hidden; }
.v2-card__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.v2-card__title svg { width: 22px; height: 22px; }
.v2-card__title--green svg { color: var(--v2-green-700); }
.v2-card__title--blue svg { color: var(--v2-blue-700); }
.v2-card__title--amber svg { color: var(--v2-amber-700); }
.v2-card__title--navy svg { color: var(--v2-navy); }
.v2-card__title--teal svg { color: var(--v2-teal-dark); }
.v2-card__footer-link {
  display: block;
  text-align: center;
  padding-top: 1.25rem;
  font-weight: 500;
  text-decoration: none;
}
.v2-card__footer-link:hover { text-decoration: underline; }

/* Collapsible sections on an event's own page (informations complémentaires,
   documents, satisfaction survey, each ayant droit) - plain <details>/
   <summary>, so open/close works the same on iPhone and Android as on
   desktop with no JavaScript at all. Open by default only when there's
   something to actually look at (a missing field, a pending survey) -
   see participant_event.html for exactly which condition drives each one -
   so a long page with several ayants droit starts mostly collapsed down
   to what needs attention, not fully expanded. */
.v2-details__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}
.v2-details__summary::-webkit-details-marker { display: none; }
.v2-details__summary-title { margin-bottom: 0; }
.v2-details__summary > svg { color: var(--v2-gray-400); flex-shrink: 0; transition: transform 0.15s ease; }
.v2-details[open] > .v2-details__summary > svg { transform: rotate(180deg); }
.v2-details__body { margin-top: 1.25rem; }

.v2-section { margin-bottom: 1.5rem; }

.v2-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
/* .v2-card + .v2-card's own margin-top is meant for cards stacked in normal
   flow - inside this grid it would otherwise push the second card down
   within its row (the bug this fixes: two side-by-side cards not lining up
   at the top), when the grid's own "gap" already spaces cards that wrap to
   a new row. */
.v2-two-col > .v2-card + .v2-card { margin-top: 0; }
@media (max-width: 900px) { .v2-two-col { grid-template-columns: 1fr; } }

/* Tuiles chiffrées */
.v2-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 1000px) { .v2-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .v2-stats { grid-template-columns: 1fr; } }
.v2-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border-radius: var(--v2-radius-md);
  box-shadow: var(--v2-shadow-sm);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}
a.v2-stat:hover { box-shadow: var(--v2-shadow-card); }
.v2-stat__label { font-size: 14px; font-weight: 500; color: var(--v2-gray-600); }
.v2-stat__value { font-size: 30px; font-weight: 700; margin-top: 0.35rem; font-variant-numeric: tabular-nums; }
.v2-stat__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-stat__icon svg { width: 24px; height: 24px; }
.v2-stat__icon--violet { background: var(--v2-purple-100); color: var(--v2-navy); }
.v2-stat__icon--green { background: var(--v2-green-100); color: var(--v2-green-700); }
.v2-stat__icon--blue { background: var(--v2-blue-100); color: var(--v2-blue-700); }
.v2-stat__icon--amber { background: var(--v2-amber-100); color: var(--v2-amber-700); }

/* État vide */
.v2-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1rem;
  gap: 0.5rem;
}
.v2-empty svg { width: 72px; height: 72px; color: var(--v2-gray-400); stroke-width: 1.4; margin-bottom: 0.75rem; }
.v2-empty h3 { font-size: 18px; font-weight: 700; }
.v2-empty p { color: var(--v2-gray-500); font-size: 15px; }
.v2-empty .v2-btn { margin-top: 1rem; }

/* Mini-cartes (derniers évènements) */
.v2-minis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.v2-mini {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--v2-gray-50);
  border-radius: var(--v2-radius-md);
  padding: 1rem;
  text-decoration: none;
  color: inherit;
}
.v2-mini:hover { background: var(--v2-gray-100); }
.v2-mini img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--v2-radius-sm); flex-shrink: 0; background: var(--v2-gray-200); }
.v2-mini__body { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.v2-mini h3 { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-mini__date { font-size: 12px; color: var(--v2-gray-500); }
.v2-mini-row { display: flex; align-items: center; gap: 0.5rem; }
.v2-mini-row .v2-mini { flex: 1; min-width: 0; }

/* Actions rapides */
.v2-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .v2-quick { grid-template-columns: 1fr; } }
.v2-quick__tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--v2-radius-lg);
  border: 1px solid;
  text-decoration: none;
  color: inherit;
}
.v2-quick__tile:hover { box-shadow: var(--v2-shadow-card); }
.v2-quick__tile--blue { background: linear-gradient(to bottom right, var(--v2-blue-50), var(--v2-blue-100)); border-color: var(--v2-blue-200); }
.v2-quick__tile--green { background: linear-gradient(to bottom right, var(--v2-green-50), var(--v2-green-100)); border-color: var(--v2-green-200); }
.v2-quick__tile--purple { background: linear-gradient(to bottom right, var(--v2-lavender-100), var(--v2-lavender-200)); border-color: var(--v2-lavender); }
.v2-quick__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--v2-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.v2-quick__icon svg { width: 24px; height: 24px; }
.v2-quick__tile--blue .v2-quick__icon { background: var(--v2-blue-700); }
.v2-quick__tile--green .v2-quick__icon { background: var(--v2-green-700); }
.v2-quick__tile--purple .v2-quick__icon { background: var(--v2-navy); }
.v2-quick h3 { font-size: 16px; font-weight: 700; }
.v2-quick p { font-size: 14px; color: var(--v2-gray-600); }

/* ---------- Boutons ---------- */

.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--v2-navy);
  color: #fff;
  border: 2px solid var(--v2-navy);
  border-radius: var(--v2-radius-sm);
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.v2-btn:hover { background: var(--v2-navy-hover); border-color: var(--v2-navy-hover); }
.v2-btn svg { width: 18px; height: 18px; }
.v2-btn--outline { background: #fff; color: var(--v2-navy); border-color: var(--v2-teal); }
.v2-btn--outline:hover { background: var(--v2-teal-50); border-color: var(--v2-teal); }
.v2-btn--ghost { background: #fff; color: var(--v2-gray-700); border-color: var(--v2-gray-300); }
.v2-btn--ghost:hover { background: var(--v2-gray-50); border-color: var(--v2-gray-400); }
.v2-btn--danger { background: #fff; color: var(--v2-red-700); border-color: var(--v2-red-700); }
.v2-btn--danger:hover { background: var(--v2-red-100); border-color: var(--v2-red-700); }
.v2-btn--block { width: 100%; }
.v2-btn--lg { padding: 0.75rem 1.25rem; font-size: 15px; }
.v2-link-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0;
  margin-top: 0.4rem;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--v2-gray-500);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.v2-link-action:hover { color: var(--v2-gray-700); }
.v2-link-action svg { width: 14px; height: 14px; }
.v2-btn:focus-visible, .v2-input:focus-visible, .v2-account > summary:focus-visible, .v2-nav__link:focus-visible {
  outline: 2px solid var(--v2-teal-ring);
  outline-offset: 2px;
}

/* ---------- Pastilles ---------- */

.v2-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.v2-pill--green { background: var(--v2-green-100); color: var(--v2-green-900); }
.v2-pill--amber { background: var(--v2-amber-100); color: var(--v2-amber-700); }
.v2-pill--lavender { background: var(--v2-lavender); color: var(--v2-navy-soft); }
.v2-pill--gray { background: var(--v2-gray-200); color: var(--v2-gray-700); }
.v2-pill--red { background: var(--v2-red-100); color: var(--v2-red-900); }
.v2-pill--purple { background: var(--v2-purple-100); color: var(--v2-purple-700); }
.v2-pill--blue { background: var(--v2-blue-100); color: var(--v2-blue-900); }
.v2-pill--strong { padding: 4px 12px; font-weight: 700; }
.v2-pill--outline { background: #fff; border: 1.5px solid var(--v2-gray-400); color: var(--v2-gray-900); font-weight: 700; padding: 3px 11px; }
.v2-pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* Same badge--* colour classes app.py already assigns to every status. */
.v2-pill.badge--confirmed { background: var(--v2-green-100); color: var(--v2-green-900); }
.v2-pill.badge--registered { background: var(--v2-blue-100); color: var(--v2-blue-900); }
.v2-pill.badge--warning { background: var(--v2-amber-100); color: var(--v2-amber-700); }
.v2-pill.badge--neutral, .v2-pill.badge--absent { background: var(--v2-gray-200); color: var(--v2-gray-700); }
.v2-pill.badge--cancelled { background: var(--v2-red-100); color: var(--v2-red-900); }
.v2-pill.badge--completed { background: var(--v2-purple-100); color: var(--v2-purple-700); }
.v2-pill.badge--locked { background: var(--v2-lavender); color: var(--v2-navy-soft); }

/* Ligne de statut personnel : point coloré + texte, un constat, pas un
   bouton - mêmes classes de couleur badge--* que l'interface d'origine. */
.v2-status {
  display: inline;
  font-size: 14px;
  font-weight: 500;
}
.v2-status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.4rem;
  vertical-align: 0.05em;
}
.v2-status.badge--confirmed { color: var(--v2-green-700); }
.v2-status.badge--registered { color: var(--v2-blue-700); }
.v2-status.badge--warning { color: var(--v2-amber-700); }
.v2-status.badge--neutral, .v2-status.badge--absent { color: var(--v2-gray-500); }
.v2-status.badge--cancelled { color: var(--v2-red-700); }
.v2-status.badge--completed { color: var(--v2-purple-700); }
.v2-status.badge--locked { color: var(--v2-gray-700); }
.v2-status.badge--strikethrough, .v2-highlight__value.badge--strikethrough, .v2-pill.badge--strikethrough { text-decoration: line-through; }

.v2-todo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--v2-amber-700);
}
.v2-todo svg { width: 15px; height: 15px; }

/* ---------- Formulaires ---------- */

.v2-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.v2-field[hidden] { display: none; }
.v2-field > label, .v2-label { font-size: 14px; font-weight: 600; color: var(--v2-gray-700); }
/* Unclassed controls inside a .v2-form (the shared fixed-field macros emit
   bare <select>/<input>/<textarea>) get the same look as the v2 classes. */
.v2-form select, .v2-form textarea,
.v2-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="hidden"]),
.v2-input, .v2-select, .v2-textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--v2-gray-900);
  background: #fff;
  border: 1px solid var(--v2-gray-300);
  border-radius: var(--v2-radius-sm);
  padding: 0 0.75rem;
  height: 44px;
}
.v2-textarea, .v2-form textarea { height: auto; min-height: 110px; padding: 0.6rem 0.75rem; resize: vertical; }
.v2-input:focus, .v2-select:focus, .v2-textarea:focus,
.v2-form select:focus, .v2-form textarea:focus, .v2-form input:focus {
  outline: none;
  border-color: var(--v2-teal);
  box-shadow: 0 0 0 3px rgba(53, 196, 184, 0.25);
}
.v2-input:disabled, .v2-select:disabled, .v2-textarea:disabled { background: var(--v2-gray-100); color: var(--v2-gray-500); }
/* Date fields: fixed-format content ("jj/mm/aaaa") never needs the full
   width of its grid cell like a free-text field does, and the native
   picker icon defaults to a small, easy-to-miss grey glyph - both make
   this field more awkward to fill in than it should be. align-self is
   the part that actually matters: .v2-field is a flex column, so a child
   left at its default align-self ("stretch") fills the full cross-axis
   width regardless of its own "width" - "auto" alone still stretched
   full-width, only visible once .v2-form-grid drops to a single column
   on mobile and that full width stopped being masked by a narrow desktop
   grid cell. A "time" field is a pair of small <select> elements instead
   (see time_field_parts() in app.py and .v2-time-parts below). */
.v2-input[type="date"], .v2-form input[type="date"] { width: auto; min-width: 9rem; align-self: flex-start; }
.v2-input[type="date"]::-webkit-calendar-picker-indicator,
.v2-form input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  margin-left: 0.5rem;
  padding: 0.3rem;
  border-radius: var(--v2-radius-sm);
  background: var(--v2-teal-50);
}
.v2-input[type="date"]:hover::-webkit-calendar-picker-indicator,
.v2-form input[type="date"]:hover::-webkit-calendar-picker-indicator {
  background: var(--v2-teal-200);
}
/* Time fields: hour + minute as two small <select> elements side by
   side (see time_field_parts() in app.py) - align-self for the same
   reason as the date field above (opt out of the flex column's default
   stretch), and each <select> kept just wide enough for two digits plus
   its own dropdown arrow rather than the full .v2-select width. */
.v2-time-parts { display: inline-flex; align-items: center; gap: 0.4rem; align-self: flex-start; }
.v2-time-parts .v2-select { width: auto; min-width: 4.5rem; }
.v2-time-parts__sep { font-weight: 700; color: var(--v2-gray-500); }
.v2-form-static {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  padding: 0 0.75rem;
  font-size: 15px;
  color: var(--v2-gray-900);
  background: var(--v2-gray-100);
  border: 1px solid var(--v2-gray-300);
  border-radius: var(--v2-radius-sm);
  margin: 0;
}
.v2-form input[type="file"] { font-size: 14px; color: var(--v2-gray-700); }
.v2-select, .v2-form select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}
.v2-checkbox { display: flex; align-items: center; gap: 0.6rem; font-size: 15px; }
.v2-checkbox input { width: 18px; height: 18px; accent-color: var(--v2-navy); }
.v2-help-text { font-size: 13px; color: var(--v2-gray-500); }

.v2-doc-list { list-style: none; margin: 0.3rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.v2-doc-list__item { display: flex; align-items: center; gap: 0.9rem; font-size: 14px; }
.v2-doc-list__item a { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--v2-navy); font-weight: 600; }
/* A trash-can button, its own tiny <form> (see
   participant_event_field_document_remove) that deletes the instant
   it's clicked - no checkbox, no "marked for removal" state to hold
   until some later save, since there's no later save to wait for any
   more. */
.v2-doc-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 7px;
  border: none;
  border-radius: var(--v2-radius-sm);
  background: none;
  color: var(--v2-gray-400);
  cursor: pointer;
}
.v2-doc-remove:hover { background: var(--v2-red-100); color: var(--v2-red-700); }
.v2-doc-remove:focus-visible { outline: 2px solid var(--v2-teal-ring); outline-offset: 2px; }

/* The native <input type="file"> is visually hidden (.v2-sr-only) behind
   its own <label for="...">, styled as a plain button - a custom trigger
   reads the same in every browser, unlike the native control's own
   "Choisir un fichier"/"Aucun fichier choisi" chrome, which Chrome,
   Safari and Firefox each render differently and can't be restyled or
   hidden piecemeal. Its own tiny <form> submits itself the instant a
   file is chosen (see participant_event.html's own {% block scripts %}),
   so there's never a "chosen but not yet saved" state to show a
   filename for either. */
.v2-file-input { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; align-self: flex-start; }

.v2-ayant-droit { padding-top: 1.25rem; }
.v2-ayant-droit--divider { margin-top: 1.25rem; border-top: 1px solid var(--v2-gray-200); }
.v2-ayant-droit__header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.v2-ayant-droit__name { font-size: 16px; font-weight: 700; }
.v2-ayant-droit__action { margin-top: 0.75rem; }
.v2-ayant-droit__form { margin-top: 0.75rem; }
.v2-ayant-droit__subtitle { display: flex; align-items: center; gap: 0.4rem; font-size: 15px; font-weight: 700; color: var(--v2-amber-700); margin-bottom: 0.5rem; }

.v2-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}
.v2-filters__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.v2-filters__title { font-size: 18px; font-weight: 700; margin-bottom: 1rem; }
.v2-result-count { text-align: center; font-size: 14px; color: var(--v2-gray-600); margin: 1.5rem 0 1rem; }

.v2-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
@media (max-width: 700px) { .v2-form-grid { grid-template-columns: 1fr; } }
.v2-form-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---------- Grille de cartes évènements (catalogue) ---------- */

.v2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.v2-product {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-card);
  overflow: hidden;
}
.v2-product__figure {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--v2-gray-100);
  overflow: hidden;
}
.v2-product__figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v2-product__body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.v2-product__top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 12px; color: var(--v2-gray-600); }
.v2-product h3 { font-size: 16px; font-weight: 700; }
.v2-product__meta { font-size: 14px; color: var(--v2-gray-500); display: flex; align-items: center; gap: 0.35rem; }
.v2-product__meta svg { width: 15px; height: 15px; }
.v2-product__date { font-size: 18px; font-weight: 700; color: var(--v2-teal-dark); }
.v2-product__date small { font-size: 13px; font-weight: 400; color: var(--v2-gray-500); }
.v2-product .v2-btn { margin-top: auto; }

/* ---------- Favoris (bouton étoile) et recherche ---------- */

.v2-favorite { display: inline-flex; flex-shrink: 0; }
.v2-favorite__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--v2-gray-300);
  border-radius: 50%;
  background: #fff;
  color: var(--v2-gray-400);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.v2-favorite__btn:hover { color: var(--v2-amber-700); border-color: var(--v2-amber-700); }
.v2-favorite--active .v2-favorite__btn { color: var(--v2-amber-700); border-color: var(--v2-amber-700); background: var(--v2-amber-100); }
.v2-favorite--active .v2-favorite__btn svg { fill: currentColor; }
.v2-favorite--sm .v2-favorite__btn { width: 28px; height: 28px; }
.v2-favorite--overlay { position: absolute; top: 10px; right: 10px; z-index: 1; }
.v2-favorite--overlay .v2-favorite__btn { background: rgba(255, 255, 255, 0.92); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); border-color: transparent; }

.v2-search-bar { display: flex; align-items: flex-end; gap: 0.75rem 1.25rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.v2-search-bar .v2-field { margin-bottom: 0; flex: 1; min-width: 220px; }
.v2-search-bar .v2-checkbox { font-size: 14px; font-weight: 600; color: var(--v2-gray-700); white-space: nowrap; padding-bottom: 0.55rem; cursor: pointer; }

/* ---------- Liste (mes inscriptions) ---------- */

.v2-list { display: flex; flex-direction: column; gap: 1rem; }
.v2-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid var(--v2-gray-200);
  border-radius: var(--v2-radius-md);
  padding: 1.25rem 1.5rem;
}
.v2-row__main { display: flex; gap: 1rem; align-items: center; min-width: 0; flex: 1; }
.v2-row img { width: 56px; height: 56px; border-radius: var(--v2-radius-sm); object-fit: cover; background: var(--v2-gray-100); flex-shrink: 0; }
.v2-row__title { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; font-size: 18px; font-weight: 700; }
.v2-row__lines { font-size: 14px; color: var(--v2-gray-600); margin-top: 0.3rem; display: flex; flex-direction: column; gap: 0.15rem; }
.v2-row__lines strong { color: var(--v2-gray-900); font-weight: 600; }
@media (max-width: 640px) {
  .v2-row { flex-direction: column; align-items: stretch; }
  .v2-row .v2-btn { width: 100%; }
}

/* ---------- Tableaux ---------- */

.v2-table-wrap { overflow-x: auto; }
.v2-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.v2-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--v2-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  background: var(--v2-gray-50);
  white-space: nowrap;
}
.v2-table td { padding: 1rem 1.5rem; border-top: 1px solid var(--v2-gray-100); vertical-align: top; }
.v2-table td.is-num { text-align: right; font-weight: 700; white-space: nowrap; }
.v2-table .is-muted { font-size: 12px; color: var(--v2-gray-500); display: block; margin-top: 0.15rem; }
.v2-table__note { padding: 1rem 1.5rem; font-size: 13px; color: var(--v2-gray-500); border-top: 1px solid var(--v2-gray-100); }

/* ---------- Fiche évènement ---------- */

.v2-detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 2rem; align-items: start; }
@media (max-width: 1000px) { .v2-detail { grid-template-columns: 1fr; } }
.v2-detail__aside { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 85px; }
@media (max-width: 1000px) { .v2-detail__aside { position: static; } }

.v2-photo {
  background: var(--v2-gray-100);
  border-radius: var(--v2-radius-xl);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.v2-photo img { max-width: 100%; max-height: 380px; border-radius: var(--v2-radius-md); object-fit: contain; }
.v2-photo figcaption { font-size: 13px; color: var(--v2-gray-500); }

.v2-panel {
  background: #fff;
  border: 2px solid var(--v2-lavender-200);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.v2-panel h2 { font-size: 22px; font-weight: 700; }
.v2-encart {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: var(--v2-radius-md);
  padding: 0.85rem 1rem;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid;
}
.v2-encart svg { width: 20px; height: 20px; }
.v2-encart--green { background: var(--v2-green-50); border-color: var(--v2-green-200); color: var(--v2-green-900); }
.v2-encart--green svg { color: var(--v2-green-700); }
.v2-encart--gray { background: var(--v2-gray-100); border-color: var(--v2-gray-200); color: var(--v2-gray-700); }
.v2-encart--red { background: var(--v2-red-100); border-color: #fecaca; color: var(--v2-red-900); }
.v2-encart--purple { background: var(--v2-purple-100); border-color: #ddd6fe; color: var(--v2-purple-700); }
.v2-encart--amber { background: var(--v2-amber-100); border-color: #fde68a; color: var(--v2-amber-700); }
.v2-encart--blue { background: var(--v2-blue-50); border-color: var(--v2-blue-200); color: var(--v2-blue-900); }
.v2-encart--sm { padding: 0.4rem 0.65rem; font-size: 13px; }
.v2-encart--sm svg { width: 16px; height: 16px; }
.v2-highlight {
  background: linear-gradient(to bottom right, var(--v2-lavender-100), var(--v2-lavender-200));
  border: 1px solid var(--v2-lavender);
  border-radius: var(--v2-radius-md);
  padding: 1rem 1.25rem;
}
.v2-highlight__label { font-size: 14px; font-weight: 600; color: var(--v2-gray-700); }
.v2-highlight__value { font-size: 22px; font-weight: 700; color: var(--v2-navy); margin-top: 0.25rem; line-height: 1.25; }
.v2-highlight__value small { font-size: 14px; font-weight: 400; color: var(--v2-gray-600); }

.v2-help {
  background: var(--v2-teal-50);
  border: 1px solid var(--v2-teal-200);
  border-radius: var(--v2-radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 0.75rem;
}
.v2-help > svg { width: 20px; height: 20px; color: var(--v2-teal-dark); margin-top: 2px; }
.v2-help h3 { font-size: 14px; font-weight: 700; color: var(--v2-navy); margin-bottom: 0.35rem; }
.v2-help p, .v2-help a { font-size: 14px; color: var(--v2-teal-800); }
.v2-help a { display: block; text-decoration: none; }
.v2-help a:hover { text-decoration: underline; }

.v2-spec { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2rem; }
@media (max-width: 640px) { .v2-spec { grid-template-columns: 1fr; } }
.v2-spec__item { border-left: 4px solid var(--v2-navy); padding-left: 1rem; }
.v2-spec__label { font-size: 14px; color: var(--v2-gray-600); }
.v2-spec__value { font-size: 16px; font-weight: 700; margin-top: 0.15rem; overflow-wrap: anywhere; }
.v2-spec__value a { text-decoration: none; }
.v2-spec__value a:hover { text-decoration: underline; }
.v2-spec__hint { font-size: 13px; color: var(--v2-gray-500); margin-top: 0.2rem; }
.v2-description { font-size: 16px; line-height: 1.65; color: var(--v2-gray-700); white-space: pre-line; }

/* Embedded map of the event's own LOCATION text (see participant_event.html)
   - a fixed aspect ratio rather than a fixed height so it scales down
   cleanly on narrow viewports instead of a tall iframe on a short card.
   A static preview: the link under the card opens Google Maps, and ignoring
   pointer events keeps the embed's hover hints and title tooltip from showing. */
.v2-map { position: relative; width: 100%; padding-top: 50%; border-radius: var(--v2-radius-md); overflow: hidden; }
.v2-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }

/* Preview of the GPS coordinates typed in an event's form (see gps_preview_script). */
.v2-gps-preview { margin-top: 0.6rem; }
.v2-gps-preview iframe { display: block; width: 100%; height: 200px; border: 0; border-radius: var(--v2-radius-md); background: var(--v2-gray-100); }

/* ---------- Pages de connexion ---------- */

.v2-auth-header { background: #fff; border-bottom: 1px solid var(--v2-gray-200); box-shadow: var(--v2-shadow-sm); }
.v2-auth-header .v2-nav__inner { justify-content: center; }
.v2-auth { max-width: 460px; margin: 2rem auto 0; }
.v2-auth .v2-card { padding: 2rem; }
.v2-auth h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }
.v2-auth__lead { color: var(--v2-gray-600); font-size: 15px; margin: 0.5rem 0 1.5rem; }
.v2-auth form { display: flex; flex-direction: column; gap: 1rem; }
.v2-auth .v2-btn { margin-top: 0.5rem; }
.v2-auth__note { text-align: center; font-size: 13px; color: var(--v2-gray-500); margin-top: 1.25rem; }
.v2-input--code { letter-spacing: 0.35em; font-size: 22px; font-weight: 600; text-align: center; height: 56px; }

/* Interface switch, shown only on the login page. */
.v2-switch-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.v2-switch-label { font-size: 13px; color: var(--v2-gray-500); }
.v2-switch {
  display: inline-flex;
  border: 1px solid var(--v2-gray-300);
  border-radius: 9999px;
  background: #fff;
  padding: 3px;
}
.v2-switch a {
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--v2-gray-600);
  text-decoration: none;
}
.v2-switch a:hover { color: var(--v2-navy); }
.v2-switch a.is-active { background: var(--v2-navy); color: #fff; }

/* ---------- Pied de page ---------- */

.v2-footer { background: #fff; border-top: 1px solid var(--v2-gray-200); margin-top: 2rem; }
.v2-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.5rem;
  font-size: 14px;
  color: var(--v2-gray-600);
}
.v2-footer__links { display: flex; gap: 1rem; }
.v2-footer__links a { color: var(--v2-teal-dark); }

/* ---------- Utilitaires ---------- */

.v2-muted { color: var(--v2-gray-500); }
.v2-small { font-size: 13px; }
.v2-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.v2-inline { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.v2-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  .v2-container { padding: 0 1rem; }
  .v2-main { padding-block: 1.25rem 2rem; }
  .v2-page-head { margin: -1.25rem 0 1.25rem; }
  .v2-welcome h1, .v2-title { font-size: 26px; }
  .v2-card { padding: 1.25rem; border-radius: var(--v2-radius-lg); }
  .v2-account__panel { width: min(300px, calc(100vw - 2rem)); }
}

/* ---------- Pages chef de projet ---------- */

.v2-field--highlight {
  background: var(--v2-lavender-100);
  border: 1px solid var(--v2-lavender);
  border-radius: var(--v2-radius-md);
  padding: 1rem;
}
.v2-group-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--v2-gray-500);
  margin: 1.25rem 0 0.6rem;
}
.v2-row--action { border-left: 4px solid var(--v2-amber-700); }
.v2-links { display: inline-flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 13px; }
.v2-links a { text-decoration: none; }
.v2-links a:hover { text-decoration: underline; }
.v2-inline-form { display: inline-flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.v2-inline-form .v2-select { height: 38px; font-size: 14px; width: auto; min-width: 210px; }
.v2-btn--sm { padding: 0.35rem 0.75rem; font-size: 13px; }
.v2-qr {
  display: block;
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
  border: 1px solid var(--v2-gray-200);
  border-radius: var(--v2-radius-sm);
  background: #fff;
}
.v2-photo--small img { max-height: 220px; }
.v2-transitions { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.v2-transitions li { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; font-size: 14px; line-height: 1.5; }
.v2-prose { font-size: 15px; line-height: 1.7; color: var(--v2-gray-700); }
.v2-prose .v2-pill { vertical-align: middle; }
.v2-prose code { font-size: 13px; background: var(--v2-gray-100); padding: 0.1rem 0.35rem; border-radius: 4px; }
.v2-actor {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--v2-teal-dark);
  margin: 1.5rem 0 0.6rem;
}
.v2-actor:first-child { margin-top: 0; }

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

/* Custom fields page (project_leader_event_fields.html). */
.v2-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.75rem 0 1rem; font-size: 14px; color: var(--v2-gray-600); }
.v2-field-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.v2-field-card { background: var(--v2-gray-50); border-radius: var(--v2-radius-md); padding: 0.9rem 1rem; }
.v2-field-card__name { font-size: 16px; font-weight: 700; margin: 0 0 0.2rem; }
.v2-field-card__settings { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1.25rem; margin-top: 0.75rem; }
@media (max-width: 640px) { .v2-field-card__settings { grid-template-columns: 1fr; } }
.v2-field-card__profile { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.v2-field-card__profile legend { font-size: 13px; font-weight: 700; color: var(--v2-gray-600); margin-bottom: 0.3rem; padding: 0; }
.v2-switch { position: relative; display: flex; align-items: center; gap: 0.55rem; cursor: pointer; font-size: 15px; }
.v2-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.v2-switch__track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--v2-gray-300); flex-shrink: 0; transition: background 0.15s ease; }
.v2-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s ease; }
.v2-switch input:checked + .v2-switch__track { background: var(--v2-teal-dark); }
.v2-switch input:checked + .v2-switch__track::after { transform: translateX(16px); }
.v2-switch input:focus-visible + .v2-switch__track { outline: 2px solid var(--v2-teal-dark); outline-offset: 2px; }
.v2-type-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.6rem; }
.v2-type-tile { position: relative; display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem; border: 2px solid var(--v2-gray-200); border-radius: var(--v2-radius-md); cursor: pointer; background: #fff; }
.v2-type-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.v2-type-tile:has(input:checked) { border-color: var(--v2-teal-dark); background: var(--v2-gray-50); }
.v2-type-tile:has(input:focus-visible) { outline: 2px solid var(--v2-teal-dark); outline-offset: 2px; }
.v2-type-tile__label { font-weight: 700; }
.v2-wizard__steps { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: 14px; color: var(--v2-gray-500); }
.v2-wizard__steps li.is-current { color: var(--v2-gray-900); font-weight: 700; }
.v2-wizard__steps li.is-done { color: var(--v2-green-700); }
.v2-wizard__title { font-size: 17px; font-weight: 700; margin: 0 0 0.75rem; }
.v2-wizard__nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.v2-wizard--js .v2-wizard__step { display: none; }
.v2-wizard--js .v2-wizard__step.is-current { display: block; }
