:root {
  --paper: #F3F0E7;
  --paper-deep: #ECE8DD;
  --paper-quiet: #F7F5EF;
  --ink: #22211D;
  --muted: #68625B;
  --line: #D7D1C5;
  --vermilion: #B43A2B;
  --vermilion-soft: #EFE2DC;
  --moss: #657064;
  --moss-soft: #E3E8E1;
  --white: #FFFEFA;
  --radius: 5px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Roboto Mono", "Cascadia Mono", monospace;
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
}

.screen {
  min-height: 100dvh;
  padding: calc(22px + var(--safe-top)) 20px calc(104px + var(--safe-bottom));
}

.screen--plain {
  padding-bottom: calc(34px + var(--safe-bottom));
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-small {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  letter-spacing: .07em;
  font-weight: 500;
}

.brand-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.utility-button,
.back-button,
.text-action,
.icon-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.utility-button {
  min-height: 42px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.back-button {
  min-height: 42px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.page-title,
.departure-title,
.final-word {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.025em;
}

.page-title {
  font-size: clamp(36px, 9vw, 52px);
  line-height: 1.02;
}

.departure-title {
  font-size: clamp(32px, 8vw, 46px);
  line-height: 1.04;
}

.meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.home-intro {
  margin-bottom: 42px;
}

.departure-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.departure-card__body {
  padding: 22px 20px 20px;
}

.departure-card__label {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.departure-card__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(29px, 7.5vw, 42px);
  line-height: 1.06;
  font-weight: 500;
}

.departure-card__date {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.departure-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.departure-stat {
  padding-top: 11px;
  border-top: 1px solid rgba(34, 33, 29, .13);
}

.departure-stat__value {
  display: block;
  font-family: var(--mono);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.04em;
}

.departure-stat__label {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.card-primary {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
  cursor: pointer;
}

.home-secondary {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.text-action {
  padding: 10px 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
}

.empty-state {
  margin-top: 42px;
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.empty-state p {
  color: var(--muted);
  line-height: 1.6;
}

.form {
  margin-top: 30px;
}

.form-block {
  margin-bottom: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--paper-quiet);
}

.form-label {
  display: block;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.form-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.field,
.select-field {
  width: 100%;
  min-height: 50px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
}

.field:focus,
.select-field:focus {
  border-bottom-color: var(--ink);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--paper-deep);
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-mark {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1.4px solid var(--muted);
  border-radius: 50%;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.choice input:checked + .choice-mark {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--paper-deep);
}

.choice:active .choice-mark {
  transform: scale(.92);
}

.choice-label {
  font-size: 15px;
}

.context-disclosure {
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}

.context-disclosure__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.context-disclosure__symbol {
  color: var(--muted);
  font-size: 19px;
}

.context-panel {
  display: none;
  padding-top: 16px;
}

.context-panel.is-open {
  display: block;
}

.context-summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-actions {
  margin-top: 20px;
}

.primary-button,
.secondary-button,
.danger-button {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.danger-button {
  border: 1px solid var(--vermilion);
  background: transparent;
  color: var(--vermilion);
}

.prepare-screen {
  padding-top: var(--safe-top);
}

.prepare-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -20px;
  padding: 16px 20px 10px;
  background: rgba(243, 240, 231, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: padding 180ms ease, box-shadow 180ms ease;
}

.prepare-header.is-condensed {
  padding-top: 8px;
  box-shadow: 0 1px 0 rgba(34, 33, 29, .08);
}

.prepare-header__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prepare-header__identity {
  margin-top: 8px;
  transition: margin 180ms ease;
}

.prepare-header.is-condensed .prepare-header__identity {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 14px;
}

.prepare-header__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 7.8vw, 43px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -.025em;
  transition: font-size 180ms ease;
}

.prepare-header.is-condensed .prepare-header__title {
  font-size: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prepare-header__meta {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  transition: opacity 120ms ease, max-height 180ms ease, margin 180ms ease;
  max-height: 24px;
}

.prepare-header.is-condensed .prepare-header__meta {
  max-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
}

.prepare-header__count {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  transition: margin 180ms ease;
}

.prepare-header.is-condensed .prepare-header__count {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}

.filter-row {
  margin-top: 17px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.prepare-header.is-condensed .filter-row {
  margin-top: 10px;
}

.filter-button {
  min-height: 34px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-button.is-active {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.prepare-body {
  padding-top: 14px;
}

.moment-card {
  width: 100%;
  min-height: 72px;
  margin-bottom: 16px;
  padding: 15px 16px 15px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--vermilion-soft);
  display: grid;
  grid-template-columns: 3px 1fr auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.moment-card__mark {
  width: 3px;
  height: 34px;
  border-radius: 2px;
  background: var(--vermilion);
}

.moment-card__title {
  display: block;
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.moment-card__count {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.moment-card__arrow {
  color: var(--vermilion);
  font-size: 18px;
}

.section-card {
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-quiet);
  transition: background-color 180ms ease, opacity 180ms ease;
}

.section-card.is-complete {
  background: var(--moss-soft);
}

.section-card__header {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
}

.section-card__index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.section-card__title {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-card__count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.section-card.is-complete .section-card__count {
  color: var(--moss);
}

.section-card__content {
  padding: 0 12px 8px;
}

.section-card.is-collapsed .section-card__content {
  display: none;
}

.item-row {
  position: relative;
  min-height: 64px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 0 4px;
  border-top: 1px solid rgba(119, 115, 107, .17);
  cursor: pointer;
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.item-row:first-child {
  border-top: 0;
}

.item-row.is-completing {
  opacity: 0;
  transform: translateY(-6px);
}

.item-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.item-check {
  width: 22px;
  height: 22px;
  border: 1.4px solid var(--muted);
  border-radius: 50%;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.item-row input:checked + .item-check {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--paper-quiet);
}

.section-card.is-complete .item-row input:checked + .item-check {
  box-shadow: inset 0 0 0 4px var(--moss-soft);
}

.item-row:active .item-check {
  transform: scale(.9);
}

.item-copy {
  padding: 12px 0;
}

.item-label {
  display: block;
  font-size: 16px;
  line-height: 1.28;
}

.item-row.is-checked .item-label {
  color: var(--muted);
}

.item-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.item-badge {
  display: block;
  margin-top: 5px;
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 650;
}

.item-quantity {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  white-space: nowrap;
}

.add-item-button {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  cursor: pointer;
}

.fixed-action {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: min(100%, 760px);
  min-height: calc(74px + var(--safe-bottom));
  padding: 0 20px var(--safe-bottom);
  transform: translateX(-50%);
  background: rgba(236, 232, 221, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  box-shadow: 0 -1px 0 rgba(34, 33, 29, .08);
}

.fixed-action__count {
  font-family: var(--mono);
  font-size: 19px;
  letter-spacing: -.04em;
}

.fixed-action__button {
  min-height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.final-header {
  margin-bottom: 30px;
}

.final-number {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-size: clamp(88px, 26vw, 140px);
  line-height: .82;
  font-weight: 500;
  letter-spacing: -.055em;
}

.final-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.final-group {
  margin-bottom: 14px;
  padding: 10px 14px 8px;
  border-radius: var(--radius);
  background: var(--paper-quiet);
}

.final-group--vermilion {
  background: var(--vermilion-soft);
}

.final-group__header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.final-group__title {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.final-group--vermilion .final-group__title {
  color: var(--vermilion);
}

.final-group__count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.final-item {
  min-height: 62px;
  display: grid;
  grid-template-columns: 30px 28px 1fr;
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(119, 115, 107, .17);
}

.final-item__number {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.final-item .item-row {
  display: contents;
}

.final-alert {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--vermilion-soft);
  color: var(--vermilion);
  font-size: 13px;
  line-height: 1.45;
}

.final-complete {
  margin: 60px 0 48px;
  text-align: center;
}

.final-word {
  font-size: clamp(76px, 22vw, 122px);
  letter-spacing: .07em;
}

.final-complete p {
  margin: 15px 0 0;
  color: var(--moss);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  background: rgba(34, 33, 29, .32);
}

.bottom-sheet {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 22px 20px calc(22px + var(--safe-bottom));
  border-radius: 8px 8px 0 0;
  background: var(--paper);
}

.bottom-sheet__handle {
  width: 36px;
  height: 3px;
  margin: 0 auto 24px;
  border-radius: 2px;
  background: var(--line);
}

.bottom-sheet__title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
}

.sheet-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-row {
  min-height: 52px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-row span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.settings-row span:last-child {
  font-family: var(--mono);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  z-index: 100;
  width: calc(min(100%, 760px) - 40px);
  padding: 13px 16px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 13px;
}

@media (min-width: 620px) {
  .screen {
    padding-left: 36px;
    padding-right: 36px;
  }

  .prepare-header {
    margin-left: -36px;
    margin-right: -36px;
    padding-left: 36px;
    padding-right: 36px;
  }

  .fixed-action {
    padding-left: 36px;
    padding-right: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.final-item {
  position: relative;
  grid-template-columns: 30px 28px 1fr auto;
  transition: opacity 180ms ease, transform 180ms ease;
  cursor: pointer;
}

.final-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.final-item.is-completing {
  opacity: 0;
  transform: translateY(-6px);
}

.final-item input:checked + .item-check {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--paper-quiet);
}

.final-group--vermilion .final-item input:checked + .item-check {
  box-shadow: inset 0 0 0 4px var(--vermilion-soft);
}


/* V0.002 — identité PARÉ */
.brand-lockup {
  display: grid;
  justify-items: start;
}

.brand-logo {
  display: block;
  width: 118px;
  height: auto;
}

.back-button--brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.back-button--brand img {
  display: block;
  width: 54px;
  height: auto;
}

.final-logo {
  display: block;
  width: min(68vw, 280px);
  height: auto;
  margin: 0 auto 18px;
}

@media (min-width: 600px) {
  .brand-logo { width: 132px; }
  .back-button--brand img { width: 58px; }
}

/* V0.003 — préparation contractile */
.moment-card {
  transition: background-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.moment-card.is-active {
  background: #E9D8D1;
}

.moment-card:disabled {
  opacity: .54;
  cursor: default;
}

.moment-card:not(:disabled):active {
  transform: scale(.992);
}

.section-card__header:not(button) {
  cursor: default;
}

.section-card__status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.section-card__chevron {
  width: 14px;
  color: var(--moss);
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.section-card.is-complete:not(.is-collapsed) .section-card__content {
  animation: section-reveal 180ms ease both;
}

@keyframes section-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.item-row.is-required::before,
.final-item.is-required::before {
  content: "";
  position: absolute;
  left: -8px;
  width: 2px;
  height: 26px;
  border-radius: 2px;
  background: var(--vermilion);
}

.item-badge--quiet {
  color: var(--muted);
}

.item-quantity {
  min-width: 40px;
  display: grid;
  justify-items: end;
  gap: 2px;
  line-height: 1;
}

.item-quantity strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 550;
}

.item-quantity small {
  max-width: 62px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.15;
  text-align: right;
  text-transform: lowercase;
}

.prepare-empty {
  min-height: 148px;
  margin: 18px 0;
  padding: 28px 20px;
  border-radius: var(--radius);
  background: var(--moss-soft);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
}

.prepare-empty img {
  width: 34px;
  height: auto;
  opacity: .72;
}

.prepare-empty p {
  margin: 0;
  color: var(--moss);
  font-size: 13px;
  line-height: 1.5;
}

.settings-row--control {
  position: relative;
  min-height: 68px;
  cursor: pointer;
}

.settings-row--control > span:first-child {
  display: grid;
  gap: 4px;
}

.settings-row--control strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.settings-row--control small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--line);
  transition: background-color 160ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(34, 33, 29, .16);
  transition: transform 160ms ease;
}

.switch-input:checked + .switch {
  background: var(--moss);
}

.switch-input:checked + .switch::after {
  transform: translateX(18px);
}

.switch-input:focus-visible + .switch {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .section-card.is-complete:not(.is-collapsed) .section-card__content {
    animation: none;
  }
}


/* V0.004 — contrôle final orienté geste */
.final-screen {
  padding-bottom: calc(42px + var(--safe-bottom));
}

.final-header {
  margin-bottom: 20px;
}

.final-overview {
  margin-top: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 28px;
}

.final-overview .final-number {
  margin-top: 12px;
}

.final-stage-summary {
  min-width: 0;
  padding: 0 0 5px 18px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.final-stage-summary__index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
}

.final-stage-summary__label {
  max-width: 190px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.final-sequence {
  height: 3px;
  margin: 4px 0 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.final-sequence__step {
  border-radius: 2px;
  background: var(--line);
}

.final-sequence__step.is-open {
  background: var(--ink);
}

.final-sequence__step.is-complete {
  background: var(--moss);
}

.final-group {
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
  background: var(--paper-quiet);
}

.final-group--vermilion {
  background: var(--vermilion-soft);
}

.final-group--moss {
  background: var(--moss-soft);
}

.final-group__header {
  min-height: 72px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
}

.final-group__phase {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.final-group__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.final-group__title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.final-group--vermilion .final-group__title {
  color: var(--vermilion);
}

.final-group--moss .final-group__title {
  color: var(--moss);
}

.final-group__note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.final-group__count {
  min-width: 27px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}

.final-group__items {
  padding: 0 14px 8px;
}

.final-item {
  min-height: 68px;
  grid-template-columns: 30px 28px 1fr auto;
  gap: 9px;
  border-top-color: rgba(119, 115, 107, .16);
}

.final-item__number {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
}

.final-item .item-copy {
  padding: 13px 0;
}

.final-item .item-label {
  font-size: 16px;
}

.final-group--moss .final-item input:checked + .item-check {
  box-shadow: inset 0 0 0 4px var(--moss-soft);
}

.final-alert {
  margin-top: 20px;
  padding: 14px 15px;
  border-left: 3px solid var(--vermilion);
  background: var(--vermilion-soft);
}

.final-actions {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

@media (max-width: 380px) {
  .final-overview {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .final-stage-summary {
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .final-stage-summary__label {
    max-width: none;
  }
}


/* V0.005 — sélection et mémoire des modèles */
.models-intro {
  margin-top: 28px;
  max-width: 610px;
}

.models-intro__note {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.model-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.model-card {
  width: 100%;
  min-height: 128px;
  padding: 18px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper-quiet);
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 13px;
  align-items: start;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.model-card:active {
  transform: scale(.994);
  background: var(--paper-deep);
}

.model-card__index {
  padding-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.model-card__body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.model-card__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.model-card__title {
  font-family: var(--serif);
  font-size: clamp(23px, 6vw, 31px);
  line-height: 1.04;
  font-weight: 500;
}

.model-card__tag,
.model-card__memory {
  color: var(--vermilion);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.model-card__description {
  max-width: 480px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.model-card__meta {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.55;
}

.model-card__memory {
  color: var(--moss);
}

.model-card__arrow {
  align-self: center;
  color: var(--muted);
  font-size: 25px;
}

.form-block--model {
  background: var(--paper-deep);
}

.selected-model {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}

.selected-model__title {
  display: block;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.08;
  font-weight: 500;
}

.selected-model__description {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.selected-model__change {
  min-height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 410px) {
  .model-card__topline {
    display: grid;
    justify-content: start;
  }

  .selected-model {
    grid-template-columns: 1fr;
  }

  .selected-model__change {
    justify-self: start;
  }
}


/* V0.006 — historiques, profils, électronique et bagage */
.entry-menu {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: transparent;
  color: var(--muted, #79766e);
  font-size: 18px;
  letter-spacing: .08em;
  padding: 8px;
  z-index: 2;
}
.entry-menu--inline { position: static; flex: 0 0 auto; }
.departure-card { position: relative; }
.bag-inline { margin: 12px 0 0; color: var(--moss, #657064); font-size: 13px; }
.history-section { margin-top: 48px; }
.history-section__head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.history-list { display:grid; gap:10px; }
.history-entry { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 2px; border-bottom:1px solid var(--line, #d7d2c6); }
.history-entry h3 { margin:0; font-size:16px; font-weight:600; }
.history-entry p { margin:5px 0 0; color:var(--muted, #79766e); font-size:12px; }
.inline-add { width:100%; border:0; background:transparent; padding:15px 0 3px; text-align:left; color:var(--moss, #657064); font-size:12px; letter-spacing:.06em; }
.bag-card { margin-bottom:14px; padding:17px 18px; background:#e9ece7; border-radius:4px; display:grid; gap:4px; }
.bag-card__label { color:#657064; text-transform:uppercase; letter-spacing:.12em; font-size:10px; font-weight:700; }
.bag-card strong { font-size:17px; font-weight:600; }
.bag-card__meta { color:#68625B; font-size:11px; line-height:1.4; }
.settings-link { width:100%; border:0; background:transparent; padding:16px 0; border-bottom:1px solid var(--line, #d7d2c6); display:flex; justify-content:space-between; align-items:center; font-size:14px; }
.person-list { display:grid; gap:8px; margin-top:26px; }
.person-row { width:100%; border:0; background:#ede9de; border-radius:4px; padding:15px 16px; display:grid; grid-template-columns:38px 1fr auto; gap:13px; align-items:center; text-align:left; }
.person-row__initial { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; background:#f3f0e7; font-family:Georgia, serif; font-size:17px; }
.person-row strong { display:block; font-size:15px; }
.person-row small { display:block; margin-top:3px; color:#68625B; font-size:11px; }


/* V0.006.1 — direction naïve japonaise, décor en fichiers image */
:root {
  --indigo: #274B8F;
  --paper-festival: #F8F4EA;
  --line-red: rgba(180, 58, 43, .65);
}

.screen--festival {
  background: var(--paper-festival);
  overflow-x: clip;
}

.screen--festival-home {
  position: relative;
  padding-top: calc(24px + var(--safe-top));
  padding-bottom: calc(280px + var(--safe-bottom));
}

.screen--festival-home > * {
  position: relative;
  z-index: 1;
}

.festival-home__lanterns,
.festival-home__fireflies,
.festival-home__stalls,
.create-intro__firefly,
.form-block--model::after,
.form-block--dates::after,
.form-block--conditions::after {
  pointer-events: none;
}

.festival-home__lanterns,
.festival-home__fireflies,
.festival-home__stalls {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.home-intro {
  margin-bottom: 210px;
}

.festival-home__lanterns {
  top: 122px;
  width: min(100%, 560px);
  height: 152px;
  background-image: url('./art/home-lanterns-v008.png');
}

.festival-home__fireflies {
  top: 250px;
  width: min(100%, 420px);
  height: 252px;
  background-image: url('./art/home-fireflies-v008.png');
}

.festival-home__stalls {
  left: 50%;
  bottom: 18px;
  width: min(calc(100% - 24px), 560px);
  height: 232px;
  background-image: url('./art/home-stalls-v008.png');
}

.screen--festival-home .topline {
  align-items: start;
}

.empty-state--festival,
.departure-card--festival {
  position: relative;
  border: 1.5px solid var(--line-red);
  border-radius: 12px;
  background: rgba(255, 252, 247, .95);
  box-shadow: 0 12px 28px rgba(34, 33, 29, .04);
}

.empty-state--festival {
  padding: 24px 24px 26px;
  max-width: 440px;
  margin: 0 auto 22px;
}

.empty-state--festival .eyebrow {
  color: var(--vermilion);
  margin-bottom: 14px;
}

.empty-state--festival .page-title {
  font-size: clamp(42px, 10vw, 62px);
  line-height: .96;
  max-width: 9ch;
}

.empty-state--festival p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.6;
  color: #5F5A52;
  max-width: 24ch;
}

.departure-card--festival .departure-card__label {
  color: var(--vermilion);
}

.departure-card--festival .card-primary,
.primary-button--festival,
.primary-button,
.card-primary,
.fixed-action__button,
.danger-button {
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #1f1f1d 0%, #121211 100%);
  color: #FFFEFA;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.primary-button,
.card-primary,
.fixed-action__button,
.danger-button { min-height: 56px; }

.home-secondary,
.history-section {
  position: relative;
  z-index: 1;
}

.history-section {
  margin-top: 18px;
  padding: 14px 14px 12px;
  border-radius: 10px;
  border: 1px solid rgba(180, 58, 43, .18);
  background: rgba(255,252,247,.62);
}

.history-entry,
.archive-entry,
.people-card {
  border-radius: 10px;
  border: 1px solid rgba(180, 58, 43, .14);
  background: rgba(255, 254, 251, .88);
}

.models-screen,
.screen--festival-create {
  position: relative;
}

.create-intro {
  position: relative;
  margin-top: 20px;
  margin-bottom: 14px;
  min-height: 140px;
}

.create-intro__firefly {
  position: absolute;
  right: -6px;
  top: -2px;
  width: 216px;
  height: 135px;
  background: url('./art/firefly-large-v008.png') center/contain no-repeat;
}

.form--festival {
  position: relative;
}

.form-block--festival {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--line-red);
  border-radius: 12px;
  background: rgba(255, 252, 247, .95);
  box-shadow: 0 10px 24px rgba(34, 33, 29, .03);
}

.form-block--festival + .form-block--festival {
  margin-top: 18px;
}

.form-label {
  color: var(--vermilion);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
}

.selected-model,
.choice,
.select-field,
.field,
.settings-row {
  background: rgba(255,255,255,.56);
}

.selected-model {
  padding-right: 96px;
}

.form-block--model::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 140px;
  height: 106px;
  background: url('./art/shaved-ice-v008.png') center/contain no-repeat;
}

.form-block--travelers .choice-list,
.form-block--conditions .choice-grid,
.form-block--equipment .choice-grid {
  gap: 10px;
}

.form-block--travelers .choice {
  min-height: 58px;
  border-radius: 10px;
  border: 1px solid rgba(34,33,29,.06);
  background: rgba(255,255,255,.6);
}

.form-block--travelers .choice-label { font-size: 18px; }

.choice-mark {
  width: 28px;
  height: 28px;
  border-width: 2px;
}

.choice input:checked + .choice-mark {
  border-color: var(--vermilion);
  box-shadow: inset 0 0 0 6px var(--vermilion), 0 0 0 2px #fff;
}

.form-block--dates::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 86px;
  height: 123px;
  background: url('./art/lantern-single-v008.png') center/contain no-repeat;
}

.form-block--dates .field-row { padding-right: 86px; }

.form-block--conditions::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 170px;
  height: 122px;
  background: url('./art/firefly-large-v008.png') center/contain no-repeat;
}

.form-block--conditions .choice-grid {
  padding-right: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-block--conditions .choice-grid .choice:last-child {
  grid-column: span 2;
  max-width: calc(50% - 5px);
}

.choice-grid .choice {
  min-height: 62px;
  border-radius: 10px;
  border: 1px solid rgba(34,33,29,.05);
}

.inline-add,
.selected-model__change,
.text-action,
.utility-button,
.back-button,
.context-disclosure {
  color: #5F5A52;
}

.context-disclosure {
  width: 100%;
}

.context-summary,
.form-hint,
.models-intro__note,
.meta,
.departure-card__date,
.bag-inline,
.prepare-header__meta,
.prepare-header__count,
.fixed-action__count {
  color: #676159;
}

.model-card {
  border: 1px solid rgba(180,58,43,.18);
  border-radius: 12px;
  background: rgba(255,252,247,.9);
}

.model-card__tag,
.model-card__memory {
  color: var(--vermilion);
  background: rgba(180,58,43,.08);
  border-radius: 999px;
}

.prepare-screen .bag-card,
.prepare-screen .moment-card,
.prepare-screen .check-section,
.prepare-empty,
.final-group,
.final-complete,
.settings-sheet,
.confirm-sheet {
  border-radius: 12px;
  border: 1px solid rgba(180,58,43,.14);
  background: rgba(255,252,247,.9);
}

.prepare-header__title,
.page-title,
.departure-card__title,
.final-word {
  letter-spacing: -.035em;
}

.fixed-action {
  background: rgba(248,244,234,.96);
  backdrop-filter: blur(14px);
}

@media (max-width: 420px) {
  .festival-home__lanterns { top: 136px; width: calc(100% - 12px); }
  .festival-home__fireflies { top: 262px; width: calc(100% - 60px); }
  .empty-state--festival { padding: 22px 18px 22px; }
  .form-block--model::after { width: 120px; height: 92px; right: 10px; }
  .create-intro__firefly { width: 176px; right: -20px; }
}


/* V0.007 — retour d’usage */
.review-screen {
  background: var(--paper-festival);
}

.review-intro {
  margin-bottom: 18px;
}

.review-meta {
  margin-top: 10px;
  color: #676159;
  font-size: 14px;
}

.review-block {
  margin-bottom: 18px;
}

.field-row--review,
.field-row--review-mute {
  align-items: stretch;
}

.choice-list--review {
  margin-top: 12px;
}

.choice--compact {
  min-height: 50px;
}

.review-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.review-line {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(180,58,43,.14);
  background: rgba(255,255,255,.62);
}

.review-line strong,
.review-line small {
  display: block;
}

.review-line small {
  margin-top: 4px;
  color: #676159;
}

.review-notes {
  width: 100%;
  resize: vertical;
  line-height: 1.5;
}

.secondary-button--inline {
  min-height: 54px;
  white-space: nowrap;
}

.review-actions {
  margin-top: 8px;
}


/* V0.008 — correction de mise en page et stabilisation mobile */
.screen--festival-home {
  padding-bottom: calc(276px + var(--safe-bottom));
}

.screen--festival-home .home-intro {
  min-height: 408px;
  margin-bottom: 18px;
}

.festival-home__lanterns {
  top: 142px;
  width: min(calc(100% - 28px), 620px);
  height: 156px;
}

.festival-home__fireflies {
  top: 266px;
  width: min(calc(100% - 80px), 500px);
  height: 188px;
}

.festival-home__stalls {
  bottom: 20px;
  width: min(calc(100% - 32px), 590px);
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
}

.empty-state--festival,
.departure-card--festival {
  z-index: 2;
}

.empty-state--festival .page-title {
  max-width: 10ch;
}

.create-intro {
  min-height: 164px;
  padding-top: 12px;
  margin-bottom: 20px;
}

.create-intro .page-title {
  max-width: 7.2ch;
  font-size: clamp(48px, 12vw, 72px);
  line-height: .95;
}

.create-intro__firefly {
  right: 2px;
  top: 20px;
  width: 150px;
  height: 134px;
}

.form-block--festival {
  overflow: hidden;
}

.form-block--model::after {
  right: 14px;
  top: 68px;
  bottom: auto;
  width: 92px;
  height: 118px;
}

.form-block--model .selected-model {
  min-width: 0;
  padding-right: 104px;
}

.form-block--model .selected-model__title,
.form-block--model .selected-model__description {
  overflow-wrap: anywhere;
}

.form-block--model .selected-model__change {
  position: absolute;
  right: 16px;
  top: 18px;
  z-index: 2;
}

.form-block--dates::after {
  right: 16px;
  bottom: 16px;
  width: 58px;
  height: 70px;
}

.form-block--dates .field-row {
  padding-right: 70px;
}

.form-block--conditions::after {
  right: 12px;
  top: 8px;
  bottom: auto;
  width: 72px;
  height: 66px;
  opacity: .95;
}

.form-block--conditions .form-label {
  display: block;
  padding-right: 82px;
  min-height: 38px;
}

.form-block--conditions .choice-grid {
  padding-right: 0;
}

.form-block--conditions .choice-grid .choice:last-child {
  grid-column: span 1;
  max-width: none;
}

.choice-grid .choice,
.form-block--travelers .choice {
  min-width: 0;
}

.choice-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-list {
  max-height: min(62vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 440px) {
  .screen--festival-home .home-intro {
    min-height: 360px;
  }

  .festival-home__lanterns {
    top: 132px;
    width: calc(100% - 18px);
    height: 132px;
  }

  .festival-home__fireflies {
    top: 238px;
    width: calc(100% - 66px);
    height: 160px;
  }

  .create-intro {
    min-height: 148px;
  }

  .create-intro__firefly {
    width: 118px;
    height: 106px;
    top: 32px;
    right: -2px;
  }

  .create-intro .page-title {
    max-width: 6.4ch;
    font-size: clamp(44px, 13vw, 58px);
  }

  .form-block--model::after {
    width: 72px;
    height: 92px;
    top: 78px;
  }

  .form-block--model .selected-model {
    padding-right: 78px;
  }

  .form-block--dates .field-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-right: 54px;
  }

  .form-block--dates::after {
    width: 46px;
    height: 56px;
  }

  .field-row--review,
  .field-row--review-mute {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   PARÉ V0.008.1 — consolidation graphique canonique
   Corrections graphiques seulement. Aucun comportement fonctionnel modifié.
   ========================================================================== */
:root {
  --pare-ivory: #F8F3E8;
  --pare-card: #FFF9F0;
  --pare-night: #061F3E;
  --pare-night-deep: #031A36;
  --pare-vermilion: #B8392D;
  --pare-card-line: rgba(184, 57, 45, .72);
  --pare-ink: #1D1D1A;
  --pare-muted: #68625B;
  --pare-radius: 12px;
}

html,
body,
.app-shell,
.screen--festival {
  background: var(--pare-ivory);
}

body {
  overflow-x: hidden;
}

.screen--festival {
  position: relative;
  overflow-x: clip;
}

/* Home: composition validée, uniquement régularisée. */
.screen--festival-home {
  padding: calc(24px + var(--safe-top)) 20px calc(360px + var(--safe-bottom));
  background: var(--pare-ivory);
}

.screen--festival-home .home-intro {
  min-height: clamp(370px, 104vw, 520px);
  margin-bottom: 18px;
}

.festival-home__lanterns,
.festival-home__fireflies,
.festival-home__stalls {
  z-index: 0;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.festival-home__lanterns {
  top: clamp(118px, 34vw, 162px);
  width: min(calc(100% - 8px), 725px);
  height: clamp(145px, 35vw, 245px);
  background-image: url('./assets/v0081/home-lanterns-v0081g3.png');
}

.festival-home__fireflies {
  top: clamp(245px, 66vw, 350px);
  width: min(calc(100% - 30px), 725px);
  height: clamp(180px, 45vw, 310px);
  background-image: url('./assets/v0081/home-fireflies-v0081g3.png');
}

.festival-home__stalls {
  bottom: 0;
  width: min(100%, 725px);
  height: clamp(250px, 47vw, 322px);
  border-radius: 0;
  background-image: url('./assets/v0081/home-stalls-v0081g3.png');
  background-position: center bottom;
  overflow: visible;
}

.screen--festival-home .topline,
.screen--festival-home .empty-state,
.screen--festival-home .departure-card,
.screen--festival-home .history-section,
.screen--festival-home .home-secondary {
  z-index: 2;
}

.empty-state--festival,
.departure-card--festival {
  border: 1.35px solid var(--pare-card-line);
  border-radius: var(--pare-radius);
  background: rgba(255, 249, 240, .975);
  box-shadow: none;
}

.empty-state--festival {
  width: 100%;
  max-width: 638px;
  margin: 0 auto 24px;
  padding: clamp(24px, 5vw, 38px);
}

.empty-state--festival .eyebrow {
  margin-bottom: 14px;
  color: var(--pare-vermilion);
}

.empty-state--festival .page-title {
  max-width: 9.2ch;
  font-size: clamp(43px, 11.6vw, 74px);
  line-height: .93;
  letter-spacing: -.038em;
}

.empty-state--festival p:not(.eyebrow) {
  max-width: 25ch;
  margin-top: 20px;
  color: var(--pare-muted);
  font-size: clamp(15px, 3.8vw, 19px);
  line-height: 1.52;
}

.empty-state--festival .form-actions {
  margin-top: 22px;
}

.screen--festival-home .brand-logo {
  width: clamp(122px, 35vw, 158px);
}

.screen--festival-home .brand-note {
  color: #68625B;
}

/* Nouveau départ: introduction ivoire et scène nocturne franche. */
.screen--festival-create {
  padding: calc(22px + var(--safe-top)) 20px 0;
  background: var(--pare-ivory);
}

.screen--festival-create > .topline,
.screen--festival-create > .create-intro {
  position: relative;
  z-index: 3;
}

.create-intro {
  min-height: clamp(205px, 58vw, 300px);
  margin: 18px 0 0;
  padding: 20px 0 26px;
}

.create-intro .eyebrow {
  margin-bottom: 18px;
  color: var(--pare-vermilion);
  font-size: 11px;
}

.create-intro .page-title {
  position: relative;
  z-index: 2;
  max-width: 5.8ch;
  font-size: clamp(54px, 15vw, 94px);
  line-height: .91;
  letter-spacing: -.045em;
}

.create-intro__firefly {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: -6px;
  width: clamp(140px, 39vw, 255px);
  height: auto;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.form--festival {
  position: relative;
  isolation: isolate;
  margin: 0 -20px;
  padding: 20px 20px calc(30px + var(--safe-bottom));
  background-color: var(--pare-night);
  background-image:
    radial-gradient(circle at 7% 8%, rgba(255,255,255,.96) 0 1px, transparent 1.6px),
    radial-gradient(circle at 91% 13%, rgba(255,255,255,.8) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 14% 28%, rgba(184,57,45,.9) 0 1.2px, transparent 2px),
    radial-gradient(circle at 83% 34%, rgba(255,255,255,.86) 0 1px, transparent 1.7px),
    radial-gradient(circle at 4% 52%, rgba(255,255,255,.74) 0 1px, transparent 1.7px),
    radial-gradient(circle at 95% 62%, rgba(184,57,45,.9) 0 1.2px, transparent 2px),
    radial-gradient(circle at 12% 76%, rgba(255,255,255,.84) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 88% 86%, rgba(255,255,255,.72) 0 1px, transparent 1.7px);
  background-size: 180px 240px, 220px 270px, 260px 310px, 210px 280px, 240px 330px, 190px 250px, 280px 350px, 230px 310px;
  background-position: 0 0, 20px 40px, 0 60px, 0 20px, 0 0, 10px 20px, 0 0, 0 50px;
  border-radius: 52% 48% 0 0 / 18px 18px 0 0;
}

.form--festival::before,
.form--festival::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.form--festival::before {
  inset: 0;
  background:
    repeating-linear-gradient(76deg, transparent 0 32px, rgba(2,18,36,.22) 33px 34px, transparent 35px 74px),
    linear-gradient(180deg, rgba(255,255,255,.015), rgba(0,0,0,.08));
  opacity: .45;
}

.form--festival::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  background:
    radial-gradient(ellipse at 5% 100%, rgba(0,8,20,.9) 0 18%, transparent 19%),
    radial-gradient(ellipse at 22% 100%, rgba(0,8,20,.75) 0 13%, transparent 14%),
    radial-gradient(ellipse at 80% 100%, rgba(0,8,20,.78) 0 15%, transparent 16%),
    radial-gradient(ellipse at 98% 100%, rgba(0,8,20,.9) 0 19%, transparent 20%);
  opacity: .65;
}

.form-block--festival {
  position: relative;
  z-index: 2;
  overflow: visible;
  margin: 0 0 14px;
  padding: clamp(18px, 4.4vw, 28px);
  border: 1.35px solid var(--pare-card-line);
  border-radius: var(--pare-radius);
  background: var(--pare-card);
  box-shadow: none;
}

.form-block--festival + .form-block--festival {
  margin-top: 0;
}

.form-label {
  margin-bottom: 14px;
  color: var(--pare-vermilion);
  font-size: 11px;
  letter-spacing: .14em;
}

.selected-model,
.choice,
.field,
.select-field,
.settings-row {
  background: transparent;
}

/* Model module: train belongs only here. */
.form-block--model {
  min-height: clamp(205px, 49vw, 290px);
  padding-right: clamp(26px, 6vw, 44px);
}

.form-block--model::after,
.form-block--dates::after,
.form-block--conditions::after {
  content: none !important;
}

.model-train-art {
  position: absolute;
  right: 18px;
  bottom: 10px;
  width: clamp(145px, 38vw, 280px);
  height: auto;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
}

.form-block--model .selected-model {
  position: static;
  padding: 0;
}

.form-block--model .selected-model > div {
  max-width: min(57%, 410px);
}

.form-block--model .selected-model__title {
  font-family: var(--serif);
  font-size: clamp(26px, 7vw, 43px);
  line-height: 1.05;
  font-weight: 500;
}

.form-block--model .selected-model__description {
  max-width: 28ch;
  margin-top: 12px;
  color: var(--pare-muted);
  font-size: 14px;
  line-height: 1.45;
}

.form-block--model .selected-model__change {
  position: absolute;
  z-index: 3;
  top: 22px;
  right: 22px;
  min-width: 74px;
  min-height: 42px;
  color: var(--pare-vermilion);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.form-block--model .form-hint {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 4.4vw, 28px);
  right: clamp(18px, 4.4vw, 28px);
  bottom: 18px;
  max-width: 56%;
  margin: 0;
}

/* Travelers: same interaction, compact horizontal arrangement. */
.form-block--travelers {
  padding-right: clamp(60px, 13vw, 90px);
}

.travelers-firefly-art {
  position: absolute;
  right: 7px;
  top: 42px;
  width: clamp(55px, 13vw, 92px);
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.form-block--travelers .choice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.form-block--travelers .choice {
  min-height: 60px;
  padding: 0 12px;
  border: 1px solid rgba(184,57,45,.27);
  border-radius: 8px;
  background: rgba(255,255,255,.25);
}

.form-block--travelers .choice-label {
  font-size: clamp(13px, 3.5vw, 17px);
}

.inline-add {
  min-height: 44px;
  padding-top: 14px;
  color: var(--pare-muted);
}

/* Dates: lantern remains peripheral and never overlaps fields. */
.form-block--dates {
  min-height: 150px;
  padding-right: clamp(76px, 19vw, 135px);
}

.dates-lantern-art {
  position: absolute;
  right: 12px;
  top: 18px;
  width: clamp(60px, 14vw, 95px);
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.form-block--dates .field-row {
  padding-right: 0;
  gap: clamp(12px, 3.5vw, 28px);
}

.field,
.select-field {
  min-height: 52px;
  border-bottom-color: rgba(29,29,26,.18);
  font-size: clamp(14px, 3.8vw, 17px);
}

/* Conditions and electronics: no decorative image inside controls. */
.form-block--conditions .form-label {
  min-height: 0;
  padding-right: 0;
}

.form-block--conditions .choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.form-block--conditions .choice-grid .choice:last-child {
  grid-column: span 1;
  max-width: none;
}

.form-block--equipment .choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.choice-grid .choice {
  min-height: 58px;
  min-width: 0;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid rgba(184,57,45,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.22);
}

.choice-mark {
  width: 25px;
  height: 25px;
  border: 1.6px solid #6E6B64;
}

.choice input:checked + .choice-mark {
  border-color: var(--pare-vermilion);
  background: var(--pare-ink);
  box-shadow: inset 0 0 0 7px var(--pare-vermilion);
}

.choice-label {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--pare-ink);
  font-size: clamp(13px, 3.4vw, 16px);
  overflow-wrap: normal;
}

.choice-icon {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: #242A2C;
}

.choice-icon--rain::before { content: "☂"; font-size: 25px; line-height: 22px; }
.choice-icon--cold::before { content: "❄"; font-size: 23px; line-height: 22px; }
.choice-icon--heat::before { content: "☀"; font-size: 24px; line-height: 22px; }
.choice-icon--beach::before { content: "≋"; font-size: 27px; line-height: 18px; font-weight: 700; }

.choice-icon--long::before {
  content: "";
  position: absolute;
  left: 2px; top: 5px;
  width: 18px; height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  box-shadow: 5px 0 0 -3px var(--pare-card), 5px 0 0 -1.5px currentColor;
}
.choice-icon--long::after {
  content: "••";
  position: absolute;
  left: 3px; top: 11px;
  font-size: 11px;
  letter-spacing: 6px;
}

.choice-icon--headphones {
  border: 1.7px solid currentColor;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  transform: scale(.72);
}
.choice-icon--headphones::before,
.choice-icon--headphones::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 5px;
  height: 11px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}
.choice-icon--headphones::before { left: -3px; }
.choice-icon--headphones::after { right: -3px; }

.choice-icon--speaker {
  border: 1.7px solid currentColor;
  border-radius: 6px;
}
.choice-icon--speaker::before,
.choice-icon--speaker::after {
  content: "";
  position: absolute;
  left: 50%;
  border: 1.4px solid currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
}
.choice-icon--speaker::before { top: 4px; width: 4px; height: 4px; }
.choice-icon--speaker::after { bottom: 3px; width: 9px; height: 9px; }

.choice-icon--laptop::before {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 17px; height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.choice-icon--laptop::after {
  content: "";
  position: absolute;
  left: 0; bottom: 3px;
  width: 24px; height: 2px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.choice-icon--tablet::before {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 14px; height: 21px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}
.choice-icon--tablet::after {
  content: "";
  position: absolute;
  left: 11px; bottom: 3px;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: currentColor;
}

/* Context card and lower peripheral festival artwork. */
.form-block--context {
  width: min(72%, 500px);
  min-height: 108px;
  margin-bottom: 0;
}

.context-disclosure {
  min-height: 42px;
}

.context-disclosure__title {
  color: var(--pare-vermilion);
}

.context-disclosure__symbol {
  color: var(--pare-vermilion);
  font-size: 32px;
  font-weight: 300;
}

.context-summary {
  color: var(--pare-ink);
  font-size: 15px;
}

.festival-create__footer-art {
  position: relative;
  z-index: 1;
  height: clamp(118px, 28vw, 190px);
  margin-top: -72px;
  pointer-events: none;
}

.festival-create__footer-lantern,
.festival-create__footer-stall {
  position: absolute;
  height: auto;
  object-fit: contain;
}

.festival-create__footer-lantern {
  left: -10px;
  bottom: -22px;
  width: clamp(66px, 15vw, 100px);
}

.festival-create__footer-stall {
  right: -8px;
  bottom: -24px;
  width: clamp(155px, 38vw, 270px);
}

.form-actions--festival {
  position: relative;
  z-index: 4;
  width: min(78%, 560px);
  margin: -52px auto 0;
  padding-bottom: 10px;
}

.primary-button--festival {
  min-height: 66px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 10px;
  background: linear-gradient(180deg, #20201E 0%, #11110F 100%);
  color: #FFFDF8;
  font-size: 12px;
}

/* Responsive checks: 360, 393, 412, 430 px. */
@media (max-width: 430px) {
  .screen--festival-home {
    padding-left: 18px;
    padding-right: 18px;
  }

  .screen--festival-create {
    padding-left: 18px;
    padding-right: 18px;
  }

  .form--festival {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .form-block--travelers {
    padding-right: 54px;
  }

  .travelers-firefly-art {
    width: 52px;
    right: 3px;
    top: 44px;
  }

  .form-block--model .selected-model > div {
    max-width: 64%;
  }

  .form-block--model .form-hint {
    max-width: 63%;
  }
}

@media (max-width: 393px) {
  .create-intro {
    min-height: 188px;
  }

  .create-intro .page-title {
    font-size: clamp(51px, 14.6vw, 62px);
  }

  .form-block--festival {
    padding: 18px;
  }

  .form-block--travelers {
    padding-right: 18px;
  }

  .travelers-firefly-art {
    top: auto;
    right: 3px;
    bottom: 38px;
    width: 47px;
  }

  .form-block--travelers .choice-list {
    gap: 6px;
  }

  .form-block--travelers .choice {
    min-height: 56px;
    gap: 7px;
    padding: 0 8px;
  }

  .form-block--travelers .choice-mark {
    width: 23px;
    height: 23px;
  }

  .form-block--conditions .choice-grid {
    gap: 7px;
  }

  .choice-grid .choice {
    min-height: 56px;
    padding: 0 8px;
    gap: 6px;
  }

  .choice-icon {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
    transform: scale(.88);
  }

  .form-block--dates {
    padding-right: 70px;
  }

  .dates-lantern-art {
    width: 55px;
  }

  .form-block--context {
    width: 72%;
  }
}

@media (max-width: 360px) {
  .screen--festival-home .home-intro {
    min-height: 355px;
  }

  .empty-state--festival .page-title {
    font-size: 41px;
  }

  .create-intro__firefly {
    width: 128px;
    right: -12px;
  }

  .form-block--model {
    min-height: 238px;
  }

  .model-train-art {
    width: 132px;
  }

  .form-block--model .selected-model > div,
  .form-block--model .form-hint {
    max-width: 64%;
  }

  .form-block--travelers .choice-label,
  .choice-label {
    font-size: 12px;
  }

  .form-block--travelers .choice {
    padding: 0 6px;
  }

  .choice-grid .choice {
    padding: 0 6px;
  }

  .choice-icon {
    display: none;
  }

  .form-block--dates {
    padding-right: 58px;
  }

  .form-block--dates .field-row {
    gap: 8px;
  }

  .field {
    font-size: 13px;
  }

  .festival-create__footer-stall {
    width: 150px;
  }
}

/* Final responsive corrections after visual verification. */
.screen--festival-home {
  padding-bottom: calc(250px + var(--safe-bottom));
}

.form-block--travelers {
  padding-right: clamp(18px, 4.4vw, 28px);
  padding-bottom: 22px;
}

.travelers-firefly-art {
  top: auto;
  right: 8px;
  bottom: 8px;
  width: clamp(44px, 10vw, 62px);
}

.form-block--travelers .inline-add {
  padding-right: 58px;
}

@media (max-width: 430px) {
  .form-block--conditions .choice-grid {
    gap: 7px;
  }

  .form-block--conditions .choice {
    min-height: 54px;
    gap: 4px;
    padding: 0 6px;
  }

  .form-block--conditions .choice-mark {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
  }

  .form-block--conditions .choice-label {
    font-size: 11.5px;
    line-height: 1.08;
  }

  .form-block--conditions .choice-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
    transform: scale(.78);
    transform-origin: center;
  }
}

@media (max-width: 393px) {
  .travelers-firefly-art {
    top: auto;
    right: 6px;
    bottom: 8px;
    width: 43px;
  }

  .form-block--travelers .inline-add {
    padding-right: 50px;
  }
}

@media (max-width: 360px) {
  .form-block--conditions .choice-label {
    font-size: 10.8px;
  }

  .form-block--conditions .choice-icon {
    display: block;
    transform: scale(.68);
  }
}

/* ==========================================================================
   PARÉ V0.008.1 FINAL — corrections responsive après contrôle 360–430 px
   ========================================================================== */

/* The model card keeps a stable text/art split on every supported width. */
.form-block--model {
  min-height: clamp(252px, 58vw, 304px);
  padding-bottom: clamp(82px, 20vw, 108px);
}

.form-block--model .selected-model {
  display: block;
  width: 100%;
}

.form-block--model .selected-model > div {
  max-width: calc(100% - 88px);
}

.form-block--model .selected-model__title {
  font-size: clamp(25px, 6.4vw, 40px);
  overflow-wrap: normal;
  hyphens: none;
}

.form-block--model .selected-model__description {
  max-width: calc(100% - clamp(108px, 29vw, 184px));
  margin-top: 10px;
}

.model-train-art {
  right: 12px;
  bottom: 9px;
  width: clamp(118px, 31vw, 226px);
  max-height: 102px;
}

.form-block--model .form-hint {
  right: auto;
  width: calc(100% - clamp(154px, 39vw, 264px));
  max-width: 310px;
  line-height: 1.38;
}

/* Guard rails against accidental horizontal overflow. */
.screen--festival-create,
.form--festival,
.form-block--festival,
.choice-list,
.choice-grid,
.field-row {
  max-width: 100%;
}

.form-block--festival,
.choice,
.field,
.select-field,
.primary-button,
.secondary-button,
.inline-add,
.context-disclosure,
.selected-model__change {
  touch-action: manipulation;
}

.back-button,
.utility-button,
.selected-model__change,
.inline-add,
.context-disclosure {
  min-height: 44px;
}

@media (max-width: 430px) {
  .form-block--model .selected-model > div {
    max-width: calc(100% - 82px);
  }

  .form-block--model .selected-model__description {
    max-width: calc(100% - 126px);
  }

  .form-block--model .form-hint {
    max-width: none;
    width: calc(100% - 152px);
  }
}

@media (max-width: 393px) {
  .form-block--model {
    min-height: 262px;
    padding-bottom: 92px;
  }

  .form-block--model .selected-model > div {
    max-width: calc(100% - 76px);
  }

  .form-block--model .selected-model__description {
    max-width: calc(100% - 112px);
    font-size: 13px;
  }

  .form-block--model .form-hint {
    width: calc(100% - 138px);
    font-size: 12px;
  }

  .model-train-art {
    width: 124px;
  }
}

@media (max-width: 360px) {
  .form-block--model {
    min-height: 272px;
    padding-bottom: 98px;
  }

  .form-block--model .selected-model > div {
    max-width: calc(100% - 70px);
  }

  .form-block--model .selected-model__title {
    font-size: 25px;
  }

  .form-block--model .selected-model__description {
    max-width: calc(100% - 104px);
    font-size: 12.5px;
  }

  .form-block--model .form-hint {
    width: calc(100% - 130px);
    bottom: 16px;
    font-size: 11.5px;
  }

  .model-train-art {
    right: 8px;
    width: 116px;
  }
}

/* Model card final text flow: title/description remain readable; train stays in the lower edge. */
.form-block--model .selected-model > div {
  max-width: 100% !important;
}

.form-block--model .selected-model__title {
  display: block;
  max-width: 100%;
  padding-right: 0;
}

.form-block--model .selected-model__description {
  max-width: min(100%, 31ch) !important;
}

.form-block--model .selected-model__change {
  top: 8px;
  min-height: 34px;
}

@media (max-width: 430px) {
  .form-block--model .selected-model__description {
    max-width: 100% !important;
  }
}

/* Keep the compact “Changer” control visually aligned while preserving a 44 px touch target. */
.form-block--model .selected-model__change {
  top: -2px;
  min-height: 44px;
}


/* ==========================================================================
   PARÉ V0.008.2 — corrections de mise en page et responsive uniquement
   ========================================================================== */

html,
body,
.app-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell {
  width: min(100%, 760px);
}

/* Accueil : même composition, rythme vertical resserré. */
.screen--festival-home {
  padding-inline: 0;
  padding-bottom: calc(clamp(220px, 55vw, 322px) + var(--safe-bottom));
}

.screen--festival-home .topline,
.screen--festival-home .empty-state,
.screen--festival-home .departure-card,
.screen--festival-home .history-section,
.screen--festival-home .home-secondary {
  margin-inline: clamp(18px, 5vw, 32px);
}

.screen--festival-home .home-intro {
  min-height: clamp(320px, 88vw, 438px);
  margin: 0 0 10px;
  padding-inline: clamp(18px, 5vw, 32px);
}

.festival-home__lanterns {
  top: clamp(105px, 29vw, 142px);
  left: 0;
  right: 0;
  width: 100%;
  height: clamp(128px, 31vw, 205px);
  transform: none;
  background-size: min(100%, 707px) auto;
}

.festival-home__fireflies {
  top: clamp(214px, 57vw, 296px);
  left: 0;
  right: 0;
  width: 100%;
  height: clamp(152px, 38vw, 240px);
  transform: none;
  background-size: min(calc(100% - 26px), 687px) auto;
}

.empty-state--festival {
  max-width: 638px;
  margin-top: 0;
  padding: clamp(22px, 5vw, 34px);
}

.empty-state--festival .page-title {
  max-width: 11.7ch;
  font-size: clamp(40px, 10.6vw, 68px);
  line-height: .94;
}

.empty-state--festival p:not(.eyebrow) {
  margin-top: 16px;
}

.festival-home__stalls {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 725 / 322;
  transform: none;
  background-size: 100% auto;
  background-position: center bottom;
  background-color: transparent;
}

/* Nouveau départ : introduction ivoire compacte, scène indigo pleine largeur. */
.screen--festival-create {
  width: 100%;
  max-width: 100%;
  padding: calc(20px + var(--safe-top)) 0 0;
  overflow-x: hidden;
}

.screen--festival-create > .topline,
.screen--festival-create > .create-intro {
  width: auto;
  margin-inline: clamp(18px, 5vw, 30px);
}

.create-intro {
  min-height: clamp(176px, 45vw, 232px);
  margin-top: 12px;
  padding: 18px 0 14px;
}

.create-intro .eyebrow {
  margin-bottom: 14px;
}

.create-intro .page-title {
  max-width: 6.4ch;
  font-size: clamp(49px, 13.4vw, 78px);
  line-height: .92;
}

.create-intro__firefly {
  top: 18px;
  right: clamp(2px, 2vw, 14px);
  width: clamp(112px, 31vw, 188px);
  max-width: 42%;
}

.form--festival {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 18px clamp(18px, 5vw, 30px) calc(28px + var(--safe-bottom));
  border-radius: 46% 54% 0 0 / 14px 14px 0 0;
  overflow: hidden;
}

.form-block--festival {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: clamp(17px, 4.4vw, 25px);
  border-width: 1.25px;
  border-radius: 11px;
}

.form-block--festival + .form-block--festival {
  margin-top: 0;
}

/* Modèle habituel : carte plus basse, texte réservé, train en bas à droite. */
.form-block--model {
  min-height: clamp(220px, 52vw, 270px);
  padding-bottom: clamp(72px, 17vw, 92px);
}

.form-block--model .selected-model > div {
  max-width: 100% !important;
  padding-right: clamp(72px, 18vw, 108px);
}

.form-block--model .selected-model__title {
  max-width: 100%;
  font-size: clamp(25px, 6.3vw, 39px);
}

.form-block--model .selected-model__description {
  max-width: min(100%, 31ch) !important;
  padding-right: clamp(54px, 14vw, 94px);
  font-size: clamp(12.5px, 3.3vw, 14px);
}

.form-block--model .selected-model__change {
  top: 8px;
  right: clamp(16px, 4vw, 24px);
  min-width: 72px;
  min-height: 44px;
}

.form-block--model .form-hint {
  left: clamp(17px, 4.4vw, 25px);
  right: auto;
  bottom: 16px;
  width: calc(100% - clamp(142px, 36vw, 242px));
  max-width: 340px;
  font-size: clamp(11.5px, 3vw, 13px);
  line-height: 1.38;
}

.model-train-art {
  right: 10px;
  bottom: 8px;
  width: clamp(108px, 29vw, 205px);
  max-height: 92px;
}

/* Voyageurs : trois colonnes si possible, retour propre sinon. */
.form-block--travelers {
  padding-right: clamp(17px, 4.4vw, 25px);
  padding-bottom: 20px;
}

.form-block--travelers .choice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.form-block--travelers .choice {
  min-width: 0;
  min-height: 60px;
  padding: 0 10px;
}

.form-block--travelers .choice-label {
  min-width: 0;
  font-size: clamp(12px, 3.3vw, 16px);
  white-space: nowrap;
}

.travelers-firefly-art {
  right: 7px;
  bottom: 7px;
  width: clamp(40px, 10vw, 58px);
}

.form-block--travelers .inline-add {
  padding-right: 54px;
}

/* Dates : espace constant et lampion périphérique. */
.form-block--dates {
  min-height: 142px;
  padding-right: clamp(68px, 17vw, 112px);
}

.dates-lantern-art {
  right: 10px;
  top: 18px;
  width: clamp(54px, 13vw, 82px);
}

.form-block--dates .field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 3vw, 22px);
}

/* Options : trois zones nettes, aucun chevauchement texte/pictogramme. */
.form-block--conditions .choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.form-block--equipment .choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.choice-grid .choice,
.form-block--conditions .choice,
.form-block--equipment .choice {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 58px;
  padding: 0 10px;
}

.choice-grid .choice-mark {
  grid-column: 1;
}

.choice-grid .choice-label {
  grid-column: 2;
  min-width: 0;
  font-size: clamp(12px, 3vw, 15px);
  line-height: 1.15;
  overflow-wrap: normal;
}

.choice-grid .choice-icon {
  grid-column: 3;
  justify-self: end;
  width: 22px;
  height: 22px;
  flex: none;
  transform: none;
}

/* Contexte et lisière basse : illustration hors cartes, bouton sans recouvrement. */
.form-block--context {
  width: 100%;
  max-width: 100%;
  min-height: 104px;
  margin-bottom: 14px;
}

.festival-create__footer-art {
  width: 100%;
  height: clamp(112px, 27vw, 165px);
  margin: 0;
}

.festival-create__footer-lantern {
  left: -8px;
  bottom: 0;
  width: clamp(58px, 14vw, 86px);
}

.festival-create__footer-stall {
  right: -6px;
  bottom: 0;
  width: clamp(132px, 34vw, 230px);
}

.form-actions--festival {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 0 0 8px;
}

.primary-button--festival {
  width: 100%;
  min-height: 64px;
}

/* Choix du modèle : corrections de largeur et d’alignement seulement. */
.models-screen {
  width: 100%;
  max-width: 760px;
  padding-inline: clamp(18px, 5vw, 30px);
  overflow-x: hidden;
}

.models-screen .topline,
.models-intro,
.model-list {
  width: 100%;
  max-width: 100%;
}

.model-list {
  gap: 12px;
}

.model-card {
  width: 100%;
  max-width: 100%;
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  padding: 17px 15px;
  overflow: hidden;
}

.model-card__body,
.model-card__topline,
.model-card__description,
.model-card__meta {
  min-width: 0;
  max-width: 100%;
}

.model-card__title,
.model-card__description,
.model-card__meta {
  overflow-wrap: anywhere;
}

@media (max-width: 430px) {
  .screen--festival-home .home-intro {
    min-height: clamp(315px, 84vw, 360px);
  }

  .empty-state--festival .page-title {
    max-width: 10.8ch;
    font-size: clamp(39px, 10.3vw, 45px);
  }

  .create-intro {
    min-height: clamp(170px, 43vw, 190px);
  }

  .create-intro__firefly {
    width: clamp(108px, 29vw, 128px);
    right: 4px;
  }

  .form-block--conditions .choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .choice-grid .choice,
  .form-block--conditions .choice,
  .form-block--equipment .choice {
    gap: 6px;
    padding-inline: 8px;
  }

  .choice-grid .choice-label {
    font-size: 12px;
  }
}

@media (max-width: 393px) {
  .screen--festival-home .home-intro {
    min-height: 318px;
  }

  .festival-home__lanterns {
    top: 102px;
    height: 126px;
  }

  .festival-home__fireflies {
    top: 208px;
    height: 150px;
  }

  .empty-state--festival .page-title {
    max-width: 10.4ch;
    font-size: 40px;
  }

  .create-intro {
    min-height: 168px;
  }

  .create-intro .page-title {
    font-size: 50px;
  }

  .create-intro__firefly {
    top: 20px;
    width: 104px;
    right: 4px;
  }

  .form-block--travelers .choice-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-block--travelers .choice {
    gap: 6px;
    padding-inline: 7px;
  }

  .form-block--travelers .choice-label {
    font-size: 12px;
  }

  .form-block--conditions .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-block--conditions .choice-grid .choice:last-child {
    grid-column: span 2;
    width: calc(50% - 5px);
  }

  .choice-grid .choice,
  .form-block--conditions .choice,
  .form-block--equipment .choice {
    grid-template-columns: 25px minmax(0, 1fr) 23px;
    min-height: 58px;
  }

  .choice-grid .choice-label {
    font-size: 12.5px;
  }

  .form-block--dates {
    padding-right: 64px;
  }
}

@media (max-width: 360px) {
  .screen--festival-home .home-intro {
    min-height: 306px;
  }

  .festival-home__lanterns {
    top: 98px;
    height: 120px;
  }

  .festival-home__fireflies {
    top: 196px;
    height: 144px;
  }

  .empty-state--festival {
    padding: 21px 18px 23px;
  }

  .empty-state--festival .page-title {
    max-width: 10.2ch;
    font-size: 38px;
  }

  .create-intro .page-title {
    font-size: 47px;
  }

  .create-intro__firefly {
    top: 24px;
    right: 2px;
    width: 96px;
  }

  .form-block--model {
    min-height: 228px;
    padding-bottom: 76px;
  }

  .form-block--model .selected-model > div {
    padding-right: 66px;
  }

  .form-block--model .selected-model__description {
    padding-right: 42px;
  }

  .form-block--model .form-hint {
    width: calc(100% - 132px);
  }

  .model-train-art {
    width: 104px;
  }

  .form-block--travelers .choice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-block--travelers .choice:last-child {
    grid-column: span 2;
  }

  .form-block--travelers .choice-label {
    font-size: 13px;
  }

  .form-block--conditions .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-block--conditions .choice-grid .choice:last-child {
    grid-column: span 2;
    width: calc(50% - 5px);
  }

  .choice-grid .choice,
  .form-block--conditions .choice,
  .form-block--equipment .choice {
    grid-template-columns: 24px minmax(0, 1fr) 22px;
    gap: 6px;
    padding-inline: 8px;
  }

  .choice-grid .choice-label {
    font-size: 12px;
  }

  .choice-grid .choice-icon {
    display: block;
    width: 21px;
    height: 21px;
  }

  .form-block--dates {
    padding-right: 58px;
  }

  .dates-lantern-art {
    width: 48px;
  }

  .model-card {
    grid-template-columns: 24px minmax(0, 1fr) 18px;
    gap: 9px;
    padding-inline: 12px;
  }
}

/* V0.008.2 final: two-column option grid on all validated mobile widths. */
@media (max-width: 430px) {
  .form-block--conditions .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-block--conditions .choice-grid .choice:last-child {
    grid-column: auto;
    width: 100%;
  }

  .form-block--conditions .choice-label,
  .form-block--equipment .choice-label {
    font-size: 12.5px;
  }
}


/* ==========================================================================
   PARÉ V0.008.3 — correction ciblée des régressions de défilement et largeur
   Aucun changement graphique ou fonctionnel.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  height: auto;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  position: static;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
}

.app-shell {
  width: min(100%, 760px);
  max-width: 100%;
  min-height: 100%;
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

.screen,
.screen--plain,
.screen--festival,
.screen--festival-home,
.screen--festival-create,
.models-screen {
  height: auto;
  max-height: none;
  overflow-y: visible;
}

/* Les wrappers restent dans le flux du document ; le viewport coupe seul les débordements latéraux. */
.screen--festival,
.screen--festival-create,
.models-screen,
.form--festival {
  overflow: visible;
}

.screen--festival-create,
.form--festival,
.models-screen,
.model-list,
.form-block--festival {
  min-height: 0;
  height: auto;
  max-height: none;
}

/* Accueil : corrige width:100% + marges latérales, cause du dépassement à droite. */
.screen--festival-home .topline,
.screen--festival-home .empty-state,
.screen--festival-home .departure-card,
.screen--festival-home .history-section,
.screen--festival-home .home-secondary {
  width: min(calc(100% - clamp(36px, 10vw, 64px)), 696px);
  max-width: calc(100% - 36px);
  margin-left: auto;
  margin-right: auto;
}

.screen--festival-home .empty-state--festival,
.screen--festival-home .departure-card--festival {
  max-width: 638px;
}

.screen--festival-home .empty-state--festival .form-actions,
.screen--festival-home .empty-state--festival .primary-button,
.screen--festival-home .departure-card--festival .card-primary {
  width: 100%;
  max-width: 100%;
}

/* Décors absolus : ne définissent jamais la largeur du document. */
.festival-home__lanterns,
.festival-home__fireflies,
.festival-home__stalls,
.create-intro__firefly,
.model-train-art,
.travelers-firefly-art,
.dates-lantern-art,
.festival-create__footer-lantern,
.festival-create__footer-stall {
  max-width: 100%;
}

/* Nouveau départ : scène indigo pleine largeur et croissance naturelle. */
.screen--festival-create {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
}

.form--festival {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: auto;
  overflow: visible;
}

.form-block--festival,
.form-actions--festival,
.festival-create__footer-art {
  max-width: 100%;
}

/* Choisir un modèle : liste longue dans le flux naturel. */
.models-screen {
  width: min(100%, 760px);
  max-width: 100%;
  min-height: 100%;
  overflow: visible;
}

.model-list {
  height: auto;
  max-height: none;
  overflow: visible;
}

@media (max-width: 430px) {
  .screen--festival-home .topline,
  .screen--festival-home .empty-state,
  .screen--festival-home .departure-card,
  .screen--festival-home .history-section,
  .screen--festival-home .home-secondary {
    width: calc(100% - 36px);
    max-width: calc(100% - 36px);
  }
}


/* V0.009 — modèles et éléments configurables */
.template-manager-screen,
.template-editor-screen {
  min-height: 100%;
  overflow-x: clip;
}

.template-manager-intro {
  position: relative;
  padding-right: 92px;
}

.template-manager-firefly {
  position: absolute;
  right: 0;
  top: 8px;
  width: 78px;
  height: auto;
  object-fit: contain;
}

.template-manager-list {
  display: grid;
  gap: 12px;
}

.template-manage-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 17px 16px 14px;
  border: 1.5px solid rgba(180, 58, 43, .48);
  border-radius: 12px;
  background: rgba(255, 252, 247, .94);
  color: var(--ink);
}

.template-manage-card.is-archived {
  opacity: .62;
  border-style: dashed;
}

.template-manage-card__index {
  padding-top: 3px;
  color: var(--vermilion);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.template-manage-card__body,
.template-manage-card__topline {
  min-width: 0;
}

.template-manage-card__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.template-manage-card h2 {
  margin: 0;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1.05;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.template-manage-card__topline > span {
  flex: 0 0 auto;
  color: var(--vermilion);
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 9px;
  font-weight: 800;
}

.template-manage-card p {
  margin: 8px 0 7px;
  color: #5f5a52;
  font-size: 13px;
  line-height: 1.45;
}

.template-manage-card small {
  display: block;
  color: #777168;
  font-size: 11px;
  line-height: 1.4;
}

.template-manage-card__actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(34, 33, 29, .08);
}

.template-card-action {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--vermilion);
  padding: 0;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 10px;
  font-weight: 800;
}

.template-manager-footer-art {
  height: 142px;
  margin: 16px 0 -16px;
  position: relative;
  pointer-events: none;
}

.template-manager-footer-art img:first-child {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 58px;
  height: auto;
}

.template-manager-footer-art img:last-child {
  position: absolute;
  right: -4px;
  bottom: 0;
  width: 142px;
  height: auto;
}

.template-manager-actions {
  margin-top: 0;
}

.model-list-actions {
  margin-top: 20px;
}

.template-editor-intro .page-title {
  max-width: 10ch;
}

.template-editor-form {
  width: 100%;
}

.field-label {
  display: block;
  margin: 15px 0 5px;
  color: #6c665e;
  font-size: 11px;
  font-weight: 700;
}

.template-description-field {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.template-editor-grid,
.template-item-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}

.template-editor-grid label,
.template-item-editor-grid label {
  min-width: 0;
}

.template-editor-travelers .choice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-items-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.template-items-heading .form-hint {
  margin: 7px 0 0;
}

.template-items-heading .inline-add {
  flex: 0 0 auto;
  min-height: 44px;
}

.template-item-list,
.template-trash {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.template-item-row,
.template-trash-row {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(34, 33, 29, .07);
  border-radius: 10px;
  background: rgba(255, 255, 255, .62);
  color: var(--ink);
  padding: 11px 13px;
  text-align: left;
}

.template-item-row strong,
.template-item-row small {
  display: block;
}

.template-item-row strong {
  font-size: 14px;
}

.template-item-row small {
  margin-top: 4px;
  color: #746e65;
  font-size: 10px;
  line-height: 1.35;
}

.template-items-empty {
  margin: 18px 0 0;
  color: #746e65;
  font-size: 13px;
}

.template-trash {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(180, 58, 43, .2);
}

.template-trash-row {
  min-height: 50px;
  color: #6c665e;
  font-size: 12px;
}

.template-trash-row span:last-child {
  color: var(--vermilion);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 9px;
  font-weight: 800;
}

.template-editor-actions {
  position: relative;
  z-index: 2;
}

.template-item-sheet {
  max-height: min(92dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.template-item-flags,
.template-target-list {
  margin-top: 14px;
}

.template-target-label {
  display: block;
  margin-top: 22px;
}

.template-target-list .choice {
  min-height: 50px;
}

@media (max-width: 390px) {
  .template-manager-intro {
    padding-right: 70px;
  }

  .template-manager-firefly {
    width: 64px;
  }

  .template-manage-card {
    grid-template-columns: 28px minmax(0, 1fr);
    padding-inline: 13px;
  }

  .template-manage-card__topline {
    display: grid;
    gap: 5px;
  }

  .template-manage-card__topline > span {
    justify-self: start;
  }

  .template-editor-grid,
  .template-item-editor-grid {
    grid-template-columns: 1fr;
  }

  .template-editor-travelers .choice-list {
    grid-template-columns: 1fr;
  }
}

/* V0.009 — ajustements de finition des nouvelles pages */
.template-items-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.template-items-heading > div {
  min-width: 0;
}

.template-items-heading .form-hint {
  max-width: 28ch;
}

.template-manager-footer-art {
  margin-bottom: 12px;
}

.template-manager-actions {
  position: relative;
  z-index: 2;
}

@media (max-width: 390px) {
  .template-items-heading {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .template-items-heading .inline-add {
    justify-self: start;
  }
}


/* V0.010 — profils personnels complets */
.people-screen,
.person-editor-screen {
  background: var(--paper-festival);
}

.people-intro {
  position: relative;
  min-height: 150px;
  padding-right: 92px;
}

.people-intro__firefly {
  position: absolute;
  right: 4px;
  top: 34px;
  width: 78px;
  height: auto;
  object-fit: contain;
}

.person-list--complete {
  display: grid;
  gap: 12px;
}

.person-card {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border: 1.5px solid rgba(180, 58, 43, .34);
  border-radius: 12px;
  background: rgba(255, 252, 247, .94);
  text-align: left;
}

.person-card__initial {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--vermilion);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
}

.person-card__copy,
.person-card__copy strong,
.person-card__copy small {
  display: block;
  min-width: 0;
}

.person-card__copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
}

.person-card__copy small {
  margin-top: 5px;
  color: #676159;
  font-size: 12px;
  line-height: 1.4;
}

.people-archived {
  margin-top: 22px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(180,58,43,.15);
  background: rgba(255,252,247,.72);
}

.people-footer-art {
  margin-top: 22px;
}

.people-actions {
  position: relative;
  z-index: 2;
}

.person-editor-intro {
  min-height: 150px;
}

.person-editor-intro .page-title {
  max-width: 65%;
}

.profile-group .template-items-heading {
  align-items: start;
}

.profile-item-list {
  margin-top: 12px;
}

.profile-item-row {
  min-height: 62px;
}

.profile-item-row small {
  line-height: 1.35;
}

.profile-items-add-block {
  min-height: 128px;
}

.profile-trash {
  margin-top: 22px;
}

.person-item-sheet {
  max-height: min(92dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.person-editor-actions {
  position: relative;
  z-index: 2;
}

@media (max-width: 390px) {
  .people-intro {
    min-height: 138px;
    padding-right: 70px;
  }

  .people-intro__firefly {
    width: 62px;
  }

  .person-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding-inline: 12px;
  }

  .person-card__initial {
    width: 40px;
    height: 40px;
    font-size: 21px;
  }

  .person-editor-intro .page-title {
    max-width: 62%;
  }
}

/* V0.011 — lieux connus */
.locations-screen,
.location-editor-screen {
  background: var(--paper-festival);
}

.locations-intro {
  position: relative;
  min-height: 154px;
  padding-right: 92px;
}

.locations-intro__firefly {
  position: absolute;
  right: 4px;
  top: 36px;
  width: 76px;
  height: auto;
  object-fit: contain;
}

.location-list {
  display: grid;
  gap: 12px;
}

.location-card {
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border: 1.5px solid rgba(180, 58, 43, .34);
  border-radius: 12px;
  background: rgba(255, 252, 247, .94);
  color: var(--ink);
  text-align: left;
}

.location-card__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  line-height: 1;
}

.location-card__copy,
.location-card__copy strong,
.location-card__copy small,
.location-card__copy span {
  display: block;
  min-width: 0;
}

.location-card__copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.08;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.location-card__copy small {
  margin-top: 5px;
  color: #635e56;
  font-size: 12px;
  line-height: 1.35;
}

.location-card__copy span {
  margin-top: 5px;
  color: #847e75;
  font-size: 10px;
  line-height: 1.35;
}

.location-empty small {
  display: block;
  margin-top: 8px;
  color: #756f66;
  line-height: 1.45;
}

.locations-archived {
  margin-top: 22px;
}

.locations-footer-art {
  margin-top: 22px;
}

.locations-actions,
.location-editor-actions {
  position: relative;
  z-index: 2;
}

.location-editor-intro {
  min-height: 150px;
}

.location-editor-intro .page-title {
  max-width: 65%;
}

.location-context-note {
  margin: 8px 0 0;
  min-height: 0;
}

.location-context-note:empty {
  display: none;
}

.location-context-manage {
  margin-top: 8px;
  min-height: 44px;
}

.location-items-block .template-items-heading {
  align-items: start;
}

.location-stored-row small {
  color: #777168;
}

.location-item-sheet {
  max-height: min(92dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.template-location-field {
  grid-column: 1 / -1;
}

@media (max-width: 390px) {
  .locations-intro {
    min-height: 140px;
    padding-right: 70px;
  }

  .locations-intro__firefly {
    width: 62px;
  }

  .location-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding-inline: 12px;
  }

  .location-card__mark {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }

  .location-editor-intro .page-title {
    max-width: 62%;
  }
}

/* V0.012 — moteur logique complet et explicable */

.form-block--context.is-open {
  width: min(100%, 720px);
}

.context-subsection {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(139, 38, 53, .2);
}

.context-subsection > .form-label {
  display: block;
  margin-bottom: 12px;
}

.choice-list--advanced {
  gap: 9px;
}

.choice-list--two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-row--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.compact-field-label {
  min-width: 0;
  display: grid;
  align-content: start;
}

.compact-field-label > span {
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.compact-field-label > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.logic-card {
  width: 100%;
  min-height: 72px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(139, 38, 53, .28);
  border-radius: var(--radius);
  background: var(--paper-quiet);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.logic-card__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.logic-card__label {
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.logic-card strong {
  font-size: 16px;
  font-weight: 650;
}

.logic-card__copy > span:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.logic-card__arrow {
  color: var(--vermilion);
  font-size: 22px;
}

.item-row {
  display: block;
  padding: 0 4px;
  cursor: default;
}

.item-row__main {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}

.item-row__main .item-copy {
  min-width: 0;
  padding: 11px 0 6px;
}

.item-why {
  min-height: 32px;
  margin: -2px 0 8px 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.item-row.is-checked .item-why {
  color: var(--muted);
}

.logic-sheet {
  max-height: min(90dvh, 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.logic-sheet > .eyebrow {
  margin: 0 0 8px;
}

.logic-sheet__reasons {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
}

.logic-sheet__reasons p,
.logic-sheet__intro,
.logic-report-list p,
.logic-sheet__calculation p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.logic-sheet__calculation {
  margin: 18px 0;
  padding: 15px 16px;
  border-left: 3px solid var(--vermilion);
  background: var(--vermilion-soft);
}

.logic-sheet__calculation > span {
  display: block;
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.logic-sheet__calculation strong {
  display: block;
  margin: 5px 0 4px;
  font-family: var(--mono);
  font-size: 18px;
}

.logic-sheet__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 20px;
}

.logic-sheet__flags span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
}

.logic-sheet__intro {
  margin: -8px 0 22px;
}

.logic-report-section {
  margin-top: 24px;
}

.logic-report-section h3 {
  margin: 0 0 10px;
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.logic-report-list {
  display: grid;
  gap: 8px;
}

.logic-report-list article {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-quiet);
}

.logic-report-list article strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.logic-report-list--excluded article {
  border-color: rgba(139, 38, 53, .22);
}

.logic-report-section--warnings article {
  border-left: 3px solid var(--vermilion);
  background: var(--vermilion-soft);
}

.logic-report-empty {
  padding: 12px 0;
}

.logic-sheet--report > .primary-button {
  margin-top: 24px;
}

@media (max-width: 430px) {
  .field-row--three {
    grid-template-columns: 1fr 1fr;
  }

  .field-row--three .compact-field-label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 380px) {
  .choice-list--two-columns {
    grid-template-columns: 1fr;
  }

  .logic-card {
    padding-inline: 14px;
  }
}


/* PARÉ V0.013 — édition réversible du départ actif */
.item-row__actions {
  min-height: 34px;
  margin: -2px 0 8px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.item-action {
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.item-row.is-checked .item-action {
  color: var(--muted);
}

.item-why {
  margin: 0;
}

.removed-items-card {
  width: 100%;
  min-height: 62px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid rgba(139, 38, 53, .28);
  border-radius: var(--radius);
  background: var(--paper-quiet);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.removed-items-card__label {
  display: block;
  margin-bottom: 4px;
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.removed-items-card strong {
  font-size: 14px;
  font-weight: 600;
}

.departure-item-sheet {
  max-height: min(92dvh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.departure-item-sheet > .eyebrow {
  margin: 0 0 8px;
}

.field-row--item-editor {
  margin: 14px 0;
  grid-template-columns: minmax(96px, .65fr) minmax(0, 1.35fr);
}

.departure-item-choices {
  margin-top: 16px;
}

.restore-list {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.restore-item {
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-quiet);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.restore-item strong,
.restore-item small {
  display: block;
}

.restore-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.restore-item > span:last-child {
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.toast--action {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
}

.toast--action button {
  min-width: 72px;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
}

.review-line--action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.review-line--action > span:first-child {
  min-width: 0;
}

.review-line__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.review-line__actions button {
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--vermilion);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 380px) {
  .field-row--item-editor {
    grid-template-columns: 1fr;
  }

  .review-line--action {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-line__actions {
    justify-content: flex-start;
  }
}

.toast,
.toast--action {
  pointer-events: none;
}

.toast--action button {
  pointer-events: auto;
}


/* V0.014 — bagages réels, répartition et calibration */
.bag-card--calibrated {
  width: 100%;
  border: 1px solid rgba(92, 107, 88, .22);
  color: var(--ink);
  text-align: left;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  cursor: pointer;
}
.bag-card__copy { min-width: 0; display: grid; gap: 4px; }
.bag-card__secondary { margin-top: 5px; color: #4f5850; font-size: 11px; line-height: 1.4; }
.bag-card__secondary b { margin-right: 5px; color: var(--vermilion); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; }
.bag-card__warning { margin-top: 5px; color: var(--vermilion); font-size: 10px; line-height: 1.35; }
.bag-card__arrow { color: #657064; font-size: 28px; }
.item-badge--packing { color: var(--indigo); border-color: rgba(39, 75, 143, .28); }
.bag-plan-sheet,
.bag-editor-sheet { max-height: min(92dvh, 860px); overflow-y: auto; overscroll-behavior: contain; }
.bag-volume-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 5px; }
.bag-volume-summary span { min-width: 0; padding: 12px 8px; border: 1px solid rgba(180,58,43,.2); border-radius: 10px; background: rgba(255,252,247,.74); text-align: center; }
.bag-volume-summary b,
.bag-volume-summary small { display: block; }
.bag-volume-summary b { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; }
.bag-volume-summary small { margin-top: 3px; color: #6d675e; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.bags-screen { background: var(--paper-festival); }
.bags-intro { position: relative; min-height: 154px; padding-right: 92px; }
.bags-intro__firefly { position: absolute; right: 4px; top: 36px; width: 76px; height: auto; object-fit: contain; }
.bag-calibration-card { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 14px 15px; border: 1px solid rgba(180,58,43,.18); border-radius: 12px; background: rgba(255,252,247,.8); }
.bag-calibration-card span,
.bag-calibration-card b,
.bag-calibration-card small { display: block; min-width: 0; }
.bag-calibration-card b { font-size: 13px; }
.bag-calibration-card small { margin-top: 4px; color: #6c665e; font-size: 10px; line-height: 1.35; }
.bag-calibration-card button { min-height: 44px; border: 0; background: transparent; color: var(--vermilion); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bag-manager-list { display: grid; gap: 12px; }
.bag-manage-card { width: 100%; min-height: 82px; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 13px 15px; border: 1.5px solid rgba(180,58,43,.34); border-radius: 12px; background: rgba(255,252,247,.94); color: var(--ink); text-align: left; }
.bag-manage-card__capacity { width: 50px; height: 50px; display: grid; place-content: center; border-radius: 50%; background: var(--indigo); color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: .9; text-align: center; }
.bag-manage-card__capacity small { display: block; margin-top: 2px; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 8px; letter-spacing: .08em; }
.bag-manage-card__copy,
.bag-manage-card__copy strong,
.bag-manage-card__copy small { display: block; min-width: 0; }
.bag-manage-card__copy strong { font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.08; font-weight: 500; overflow-wrap: anywhere; }
.bag-manage-card__copy small { margin-top: 5px; color: #635e56; font-size: 11px; line-height: 1.35; }
.bags-footer-art { margin-top: 20px; }
.bags-actions { position: relative; z-index: 2; }
.review-bag-apply { margin-top: 14px; }
@media (max-width: 390px) {
  .bags-intro { min-height: 140px; padding-right: 70px; }
  .bags-intro__firefly { width: 62px; }
  .bag-volume-summary { grid-template-columns: 1fr 1fr; }
  .bag-volume-summary span:last-child { grid-column: 1 / -1; }
  .bag-manage-card { grid-template-columns: 48px minmax(0,1fr) auto; padding-inline: 12px; }
  .bag-manage-card__capacity { width: 44px; height: 44px; font-size: 18px; }
}

/* V0.015 — pérennité des données */
.settings-link:disabled {
  opacity: 0.46;
  cursor: default;
}

.settings-row--stacked {
  align-items: flex-start;
}

.settings-row--stacked > span:last-child {
  display: grid;
  justify-items: end;
  gap: 3px;
  max-width: 58%;
  text-align: right;
}

.settings-row--stacked small {
  color: var(--muted, #6f6a61);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.storage-warning {
  margin: 10px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--red, #a83232);
  border-radius: 14px;
  background: rgba(168, 50, 50, 0.06);
  color: var(--ink, #171714);
  font-size: 13px;
  line-height: 1.45;
}

.modal-backdrop--storage {
  z-index: 1200;
}

.storage-sheet {
  max-height: min(88dvh, 720px);
  overflow-y: auto;
}

.storage-sheet__message,
.storage-sheet__detail {
  margin: 0 0 16px;
  color: var(--ink, #171714);
  font-size: 15px;
  line-height: 1.55;
}

.storage-sheet__detail {
  padding: 12px 14px;
  border-left: 2px solid var(--red, #a83232);
  background: rgba(168, 50, 50, 0.05);
  color: var(--muted, #6f6a61);
  font-size: 13px;
}

@media (max-width: 380px) {
  .settings-row--stacked > span:last-child {
    max-width: 52%;
  }
}


/* V0.016 — cycle de mise à jour PWA explicite et non bloquant */
.pwa-update-notice {
  position: fixed;
  z-index: 1200;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 32px));
  margin-inline: auto;
  padding: 14px;
  display: grid;
  gap: 12px;
  color: #f7f1df;
  background: #101f3d;
  border: 1px solid #b33a2f;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(5, 12, 27, 0.28);
}

.pwa-update-notice__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pwa-update-notice__copy strong {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.08rem;
  line-height: 1.15;
}

.pwa-update-notice__copy span {
  color: rgba(247, 241, 223, 0.82);
  font-size: 0.82rem;
  line-height: 1.35;
}

.pwa-update-notice__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px;
}

.pwa-update-notice__later,
.pwa-update-notice__install {
  min-height: 44px;
  border-radius: 12px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pwa-update-notice__later {
  color: #f7f1df;
  background: transparent;
  border: 1px solid rgba(247, 241, 223, 0.42);
}

.pwa-update-notice__install {
  color: #101f3d;
  background: #f7f1df;
  border: 1px solid #f7f1df;
}

.pwa-update-notice__install:disabled {
  opacity: 0.62;
}

.settings-link--update {
  color: #8f2d25;
}

@media (min-width: 440px) {
  .pwa-update-notice {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .pwa-update-notice__actions {
    width: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-update-notice {
    scroll-behavior: auto;
  }
}


/* ========================================================================== 
   PARÉ V0.018 — accessibilité, lisibilité et nettoyage technique
   Aucun changement de direction graphique ni de logique métier.
   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(16px + var(--safe-top));
}

body {
  line-height: 1.5;
}

.skip-link {
  position: fixed;
  top: calc(8px + var(--safe-top));
  left: 12px;
  z-index: 10000;
  max-width: calc(100% - 24px);
  padding: 11px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 750;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

main:focus,
h1:focus {
  outline: none;
}

:where(button, a[href], input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--vermilion);
  outline-offset: 3px;
}

.field:focus-visible,
.select-field:focus-visible,
textarea.field:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-bottom-color: var(--ink);
}

.choice:has(input:focus-visible),
.settings-row--control:has(input:focus-visible),
.final-item:has(input:focus-visible),
.item-row__main:has(input:focus-visible) {
  outline: 3px solid var(--vermilion);
  outline-offset: 3px;
}

button,
[role="button"],
select,
input,
textarea {
  touch-action: manipulation;
}

.utility-button,
.back-button,
.selected-model__change,
.filter-button,
.item-action,
.inline-add,
.review-line__actions button,
.entry-menu {
  min-height: 44px;
}

.entry-menu {
  min-width: 44px;
}

.form-label,
.field-label,
.choice-label,
.item-label,
.model-card__title,
.selected-model__title,
.page-title,
.departure-title {
  overflow-wrap: anywhere;
}

.filter-button[aria-pressed="true"]::before {
  content: "✓";
  margin-right: .45em;
  font-size: .9em;
}

[aria-disabled="true"],
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

.modal-backdrop [role="dialog"]:focus {
  outline: none;
}

@media (max-width: 430px) {
  .field-row {
    min-width: 0;
  }

  .field-row > *,
  .choice-grid > *,
  .selected-model > * {
    min-width: 0;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #4F4B45;
    --pare-muted: #4F4B45;
    --line: #8A8378;
    --pare-card-line: #9B2E25;
  }

  .form-block--festival,
  .empty-state--festival,
  .departure-card--festival,
  .model-card,
  .choice {
    border-width: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-delay: 0s !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* V0.018 — cible tactile minimale des filtres compacts. */
.filter-button { min-width: 44px; }
