/* ==========================================================================
   Souper des parents – feuille de style publique
   ========================================================================== */

@font-face {
    font-family: "Zilla Slab";
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    src: url("fonts/zilla-slab-latin-600-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Zilla Slab";
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url("fonts/zilla-slab-latin-700-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
}

:root {
    --pine: #183a2c;
    --pine-2: #234f3d;
    --pine-3: #2f6650;
    --moss: #4f7a4a;
    --lantern: #f2b53a;
    --lantern-soft: #fff3d1;
    --lantern-line: #e3c57c;
    --paper: #f3f6f1;
    --white: #ffffff;
    --ink: #1a2420;
    --muted: #55635a;
    --line: #d4ddd1;
    --danger: #a8322a;
    --danger-soft: #fbeceb;
    --ok-soft: #e6f1e3;

    --font-display: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
    --font-text: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;

    --radius: 10px;
    --radius-sm: 7px;
    --wrap: 640px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--pine-3); text-underline-offset: 2px; }
a:hover { color: var(--pine); }

:focus-visible {
    outline: 3px solid var(--lantern);
    outline-offset: 2px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 .5em;
    color: var(--pine);
}
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 16px;
}

/* -------------------------------------------------------------------------
   En-tête
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    background: var(--pine);
    color: var(--white);
    padding: 44px 0 72px;
    overflow: hidden;
}
.hero-unit {
    margin: 0 0 6px;
    font-size: 1rem;
    color: #cfe0c8;
}
.hero-title {
    margin: 0;
    color: var(--white);
    font-size: clamp(2.6rem, 10vw, 4.25rem);
    line-height: .98;
    letter-spacing: -.01em;
    max-width: 9ch;
}
.hero-ridge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 56px;
    fill: var(--paper);
}

/* -------------------------------------------------------------------------
   Étapes
   ------------------------------------------------------------------------- */
.page { padding-top: 8px; padding-bottom: 56px; }

.steps {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0 0 32px;
    padding: 0;
}
.steps li {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 3px solid var(--line);
    color: var(--muted);
    font-size: .9375rem;
}
.steps .step-n {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    border: 2px solid var(--line);
    font-weight: 700;
    font-size: .875rem;
    background: var(--white);
}
.steps li.is-current { border-top-color: var(--pine); color: var(--pine); font-weight: 700; }
.steps li.is-current .step-n { background: var(--pine); border-color: var(--pine); color: var(--white); }
.steps li.is-done { border-top-color: var(--moss); color: var(--moss); }
.steps li.is-done .step-n { border-color: var(--moss); color: var(--moss); }

/* -------------------------------------------------------------------------
   Textes modifiables
   ------------------------------------------------------------------------- */
.prose { margin-bottom: 28px; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 1.5rem; margin-top: 1.2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .25em; }
.prose blockquote {
    margin: 0 0 1em;
    padding: 4px 0 4px 16px;
    border-left: 3px solid var(--lantern);
    color: var(--muted);
}
.prose-after {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

/* Visuel ou document */
.visual { margin: 0 0 28px; }
.visual img {
    width: 100%;
    border-radius: var(--radius);
    background: var(--white);
}
.visual figcaption { margin-top: 8px; color: var(--muted); font-size: .9375rem; }

.doc-link {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
}
.doc-link:hover { border-color: var(--pine-3); color: var(--ink); }
.doc-link svg { width: 34px; height: 34px; flex: none; fill: var(--pine-3); }
.doc-link strong { display: block; color: var(--pine); }
.doc-link small { color: var(--muted); font-size: .875rem; }

.closed {
    padding: 20px;
    background: var(--white);
    border-left: 4px solid var(--lantern);
    border-radius: var(--radius-sm);
    font-size: 1.125rem;
}
.closed p { margin: 0; }

/* -------------------------------------------------------------------------
   Formulaire
   ------------------------------------------------------------------------- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(24, 58, 44, .35);
}
.form { padding: 26px 22px 22px; }
.card-title { font-size: 1.625rem; margin-bottom: 18px; }

.grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 560px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .form { padding: 32px 32px 26px; }
}

.field { margin-bottom: 18px; }
.field > label,
.field > span {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="password"],
.field input[type="url"],
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    padding: 11px 14px;
    font: inherit;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid #b9c6b5;
    border-radius: var(--radius-sm);
    transition: border-color .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--moss); }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--pine);
    box-shadow: 0 0 0 3px rgba(242, 181, 58, .55);
}
.field .optional { font-weight: 400; color: var(--muted); }
.field .hint,
.field small { display: block; margin: 6px 0 0; color: var(--muted); font-size: .9375rem; }
.field.has-error input { border-color: var(--danger); background: var(--danger-soft); }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: .9375rem; font-weight: 700; }

/* Sélecteur de participants */
.stepper { display: flex; align-items: stretch; width: max-content; }
.stepper input[type="number"] {
    width: 84px;
    border-radius: 0;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    -moz-appearance: textfield;
    appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-btn {
    width: 52px;
    border: 1.5px solid #b9c6b5;
    background: var(--paper);
    color: var(--pine);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.stepper-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: 0; }
.stepper-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; }
.stepper-btn:hover { background: #e4ebe1; }
.stepper-btn:disabled { color: #a6b2a3; cursor: default; background: var(--paper); }

/* Tickets boissons */
.field select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 42px;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23183a2c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
    cursor: pointer;
}
.tickets-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tickets-row select { flex: 1 1 240px; width: auto; }
.tickets-other { display: flex; align-items: center; gap: 8px; flex: none; }
.tickets-other[hidden] { display: none; }
.field .tickets-other input[type="number"] { width: 110px; text-align: center; }
.tickets-other span { color: var(--muted); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Talon du ticket : calcul du prix */
.stub {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin: 26px -22px 22px;
    padding: 20px 22px;
    background: var(--lantern-soft);
    border-top: 2px dashed var(--lantern-line);
    border-bottom: 2px dashed var(--lantern-line);
}
.stub::before,
.stub::after {
    content: "";
    position: absolute;
    top: -12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--paper);
}
.stub::before { left: -11px; }
.stub::after { right: -11px; }
@media (min-width: 560px) {
    .stub { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
}
.stub-calc { display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.stub-calc [hidden] { display: none; }
.stub-note { font-weight: 400; color: var(--muted); font-size: .9375rem; }
.stub-total { text-align: right; }
.stub-total span { display: block; color: var(--muted); font-size: .9375rem; }
.stub-total strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2.25rem;
    line-height: 1;
    color: var(--pine);
    font-variant-numeric: tabular-nums;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 20px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.btn-primary { background: var(--pine); color: var(--white); }
.btn-primary:hover { background: var(--pine-2); color: var(--white); }
.btn-primary:active { background: #10291f; }
.btn-primary[disabled] { opacity: .7; cursor: progress; }
.btn-block { width: 100%; }
.btn-lg { min-height: 58px; font-size: 1.125rem; }

.form-foot { margin: 12px 0 0; color: var(--muted); font-size: .9375rem; text-align: center; }

/* Messages */
.alert {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--pine-3);
    background: var(--ok-soft);
}
.alert-error { border-left-color: var(--danger); background: var(--danger-soft); color: #6d1f19; }

/* -------------------------------------------------------------------------
   Étape 2 et 3 : bulletin de virement
   ------------------------------------------------------------------------- */
.intro { margin-bottom: 22px; }
.intro h2 { font-size: 1.75rem; }
.intro p { color: var(--muted); }
.intro-done h2::before {
    content: "";
    display: block;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 24px no-repeat;
}

.slip {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(24, 58, 44, .35);
    overflow: hidden;
    margin-bottom: 24px;
}
.slip-amount {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2px 12px;
    padding: 20px 22px 22px;
    background: var(--lantern-soft);
    border-bottom: 2px dashed var(--lantern-line);
}
.slip-label { grid-column: 1 / -1; color: var(--muted); font-size: .9375rem; }
.slip-total {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 9vw, 3rem);
    line-height: 1;
    color: var(--pine);
    font-variant-numeric: tabular-nums;
}
.slip-detail { grid-column: 1 / -1; margin-top: 6px; color: var(--muted); font-size: .9375rem; }

.slip-lines { margin: 0; padding: 6px 22px; }
.slip-lines > div {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.slip-lines > div:last-child { border-bottom: 0; }
.slip-lines dt { color: var(--muted); font-size: .9375rem; margin-bottom: 2px; }
.slip-lines dd {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-weight: 700;
    font-size: 1.0625rem;
}
.mono-ish { font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.slip-comm {
    background: var(--lantern-soft);
    padding: 3px 8px;
    border-radius: 5px;
    word-break: break-word;
}
.slip-missing { font-weight: 400; color: var(--muted); }

.copy {
    margin-left: auto;
    padding: 6px 12px;
    min-height: 36px;
    font: inherit;
    font-size: .875rem;
    font-weight: 700;
    color: var(--pine);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
}
.copy:hover { border-color: var(--pine-3); }
.copy.is-copied { background: var(--ok-soft); border-color: var(--moss); color: var(--moss); }

.slip-qr {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px 22px;
    border-top: 1px solid var(--line);
    background: #fafbf9;
}
.slip-qr .qr {
    width: 132px;
    height: 132px;
    flex: none;
    background: var(--white);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.slip-qr .qr svg { width: 100%; height: 100%; display: block; }
.slip-qr p { margin: 0; color: var(--muted); font-size: .9375rem; }

.recap {
    margin-bottom: 24px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.recap h3 { font-size: 1.125rem; margin-bottom: 8px; }
.recap ul { list-style: none; margin: 0 0 10px; padding: 0; }
.recap li { padding: 2px 0; }
.link { font-weight: 700; }

.confirm { margin-top: 8px; }

/* -------------------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------------------- */
.site-footer {
    padding: 22px 0 30px;
    color: var(--muted);
    font-size: .9375rem;
    border-top: 1px solid var(--line);
}

/* Sur téléphone, on ne peut pas scanner son propre écran : les boutons « Copier » suffisent */
@media (max-width: 560px) {
    .slip-qr { display: none; }
}

@media (max-width: 420px) {
    .steps .step-label { font-size: .8125rem; }
    .stub { flex-direction: column; align-items: flex-start; }
    .stub-total { text-align: left; }
}

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