/* Mise en page du site, à partir des composants de ds.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: var(--rose-600); text-underline-offset: 2px; }
a:hover { color: var(--rose-700); }
a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Bandeau du mode test ---------- */
.testbar { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; padding: var(--space-2) var(--space-4); background: #fff1d6; color: #7a4a00; font-size: 14px; line-height: 20px; border-bottom: 1px solid #f0d9a8; }
.testbar__nav { display: flex; gap: var(--space-2); margin-left: auto; flex-wrap: wrap; }
.testbar__link { color: #7a4a00; font-weight: 700; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); text-decoration: none; border: 1.5px solid #e2c27e; }
.testbar__link[aria-current="page"] { background: #7a4a00; color: #fff1d6; border-color: #7a4a00; }
.testbar__link:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------- En-tête ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4); max-width: 1120px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; display: block; }
.brand__text { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; }
.brand__sub { font-size: 13px; color: var(--ink-muted); }

/* ---------- Grille principale ---------- */
.layout { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-4) var(--space-8); display: grid; gap: var(--space-6); }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: var(--space-8); align-items: start; padding-top: var(--space-6); }
  .intro { position: sticky; top: var(--space-6); }
}

.intro { display: flex; flex-direction: column; gap: var(--space-4); }
.intro p { margin: 0; }
.intro .or-display { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; }
.intro .lead { font-size: 18px; line-height: 27px; color: var(--ink); }
.programme { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.programme li { display: flex; gap: var(--space-3); align-items: flex-start; }
.programme li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--rose-500); }
.poster { width: 100%; max-width: 420px; border-radius: var(--radius-md); box-shadow: var(--shadow-card); display: block; }
.benef { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-4); }
.benef strong { color: var(--rose-700); }
.partners { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-4); }
.partners__title { margin: 0 0 var(--space-3); font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.partners__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); align-items: center; }
.partners__list a { display: block; border-radius: 4px; }
.partners__list a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.partners__list img { display: block; max-height: 48px; max-width: 140px; width: auto; height: auto; object-fit: contain; }
.partners__name { font-weight: 700; color: var(--ink); }

/* ---------- Formulaire ---------- */
.or-card { width: 100%; }
@media (max-width: 480px) { .or-card { padding: var(--space-6) var(--space-4); } }
.form { display: flex; flex-direction: column; gap: var(--space-6); }
.form .or-field { max-width: none; }
.form-section { display: flex; flex-direction: column; gap: var(--space-4); border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section > legend { padding: 0; margin-bottom: var(--space-4); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 420px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
textarea.or-input { min-height: 96px; resize: vertical; }
select.or-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%236b5260' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

/* Choix du parcours : cartes radio avec jauge de places */
.choices { display: grid; gap: var(--space-3); }
@media (min-width: 420px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:hover { border-color: var(--rose-600); }
.choice:has(input:checked) { border-color: var(--rose-600); background: var(--rose-50); box-shadow: inset 0 0 0 1px var(--rose-600); }
.choice:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.choice:has(input:disabled) { background: var(--disabled-bg); border-color: var(--disabled-bg); cursor: not-allowed; color: var(--disabled-ink); }
.choice__head { display: flex; align-items: center; gap: var(--space-2); }
.choice__dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--white); display: grid; place-items: center; }
.choice:has(input:checked) .choice__dot { border-color: var(--rose-600); }
.choice:has(input:checked) .choice__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--rose-600); }
.choice__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 26px; }
.choice__desc { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.choice .or-places__tag { align-self: flex-start; }
.choices.is-error .choice:not(:has(input:disabled)) { border-color: var(--error); }

/* Paliers de don : pastilles */
.tiers { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tier { position: relative; }
.tier input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tier span { display: inline-flex; align-items: center; justify-content: center; min-width: 88px; min-height: 48px; padding: var(--space-3) var(--space-6); border-radius: var(--radius-pill); border: 2px solid var(--rose-600); color: var(--rose-600); background: var(--white); font-weight: 700; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.tier span:hover { background: var(--rose-100); color: var(--rose-700); }
.tier input:checked + span { background: var(--rose-600); color: var(--white); }
.tier input:focus-visible + span { box-shadow: var(--focus-ring); }
.tiers.is-error .tier span { border-color: var(--error); }
/* « Non merci » : volontairement discret, pour ne pas concurrencer les paliers */
.tier-skip { align-self: flex-start; position: relative; font-size: 14px; line-height: 20px; color: var(--ink-muted); cursor: pointer; padding: var(--space-2) 0; }
.tier-skip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tier-skip span { text-decoration: underline; text-underline-offset: 2px; }
.tier-skip:hover span { color: var(--ink); }
.tier-skip input:checked + span { color: var(--ink); text-decoration: none; }
.tier-skip input:checked + span::before { content: "✓ "; font-weight: 700; }
.tier-skip input:focus-visible + span { box-shadow: var(--focus-ring); border-radius: 4px; }
.note { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.amount { position: relative; max-width: 200px; }
.amount .or-input { padding-right: 40px; }
.amount::after { content: "€"; position: absolute; right: 16px; top: 12px; color: var(--ink-muted); }

.consents { display: flex; flex-direction: column; gap: var(--space-3); }
.or-check { max-width: none; }
.or-check a { font-weight: 700; }

/* Bandeau d'erreur ou d'info */
.banner { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: 15px; line-height: 22px; }
.banner svg { flex: none; margin-top: 3px; }
.banner.is-error { background: var(--error-bg); color: var(--error); font-weight: 700; }
.banner.is-info { background: var(--rose-100); color: var(--rose-800); }

/* Étape code SMS */
.code-step { display: flex; flex-direction: column; gap: var(--space-4); }
.code-input { font-size: 28px !important; line-height: 34px !important; letter-spacing: .4em; text-align: center; font-family: var(--font-display) !important; font-weight: 700; max-width: 260px; }
.link-btn { background: none; border: 0; padding: var(--space-2) 0; font: inherit; font-weight: 700; color: var(--rose-600); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-height: 44px; }
.link-btn:disabled { color: var(--disabled-ink); text-decoration: none; cursor: default; }
.link-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.row-between { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* Page d'attente : ruban animé, compte à rebours, présentation du projet */
.waiting { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-4); padding: var(--space-4) 0; }
.waiting__ribbon { width: 96px; height: 134px; margin-bottom: var(--space-2); }
.waiting__ribbon .fill-rect { animation-duration: 3.2s; }
.waiting__ribbon .wrap { animation-duration: 3.2s; }
.waiting.is-closed .waiting__ribbon .fill-rect, .waiting.is-closed .waiting__ribbon .wrap { animation: none; }
.waiting__title { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 34px; margin: 0; }
.waiting__when { margin: 0; font-size: 18px; line-height: 26px; font-weight: 700; color: var(--rose-700); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 72px)); gap: var(--space-2); justify-content: center; }
.countdown div { background: var(--rose-50); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-2) var(--space-1); display: flex; flex-direction: column; }
.countdown span { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 34px; font-variant-numeric: tabular-nums; color: var(--ink); }
.countdown small { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.waiting__about { text-align: left; display: flex; flex-direction: column; gap: var(--space-3); border-top: 1px solid var(--border-soft); padding-top: var(--space-6); margin-top: var(--space-2); }
.waiting__about p { margin: 0; }
.waiting__places { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
.waiting__places li { background: var(--rose-100); color: var(--rose-800); font-weight: 700; font-size: 14px; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); }

/* Modale en surimpression */
.or-overlay.is-fixed { position: fixed; inset: 0; z-index: 50; }
.or-modal__text a { font-weight: 700; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: var(--space-6) var(--space-4) var(--space-8); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.site-footer__inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover { color: var(--rose-700); }

/* ---------- Pages de texte (règlement, confidentialité) ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: 0 var(--space-4) var(--space-8); }
.prose h1 { margin: var(--space-6) 0 var(--space-6); }
.prose h2 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 28px; margin: var(--space-8) 0 var(--space-2); }
.prose p, .prose li { margin: 0 0 var(--space-3); }
.back { display: inline-flex; gap: var(--space-1); align-items: center; font-weight: 700; }
