/* ==========================================================================
   Design « Herbier » — planche botanique, encre verte sur papier écru
   ========================================================================== */

:root {
    --ecru: #f2ecdc;
    --ecru-2: #e9e2cf;
    --sheet: #f7f3e7;
    --ink: #24402f;          /* 10:1 sur écru */
    --ink-muted: #46584a;    /* 6.6:1 */
    --sage: #8a9a6e;
    --wash: #dfe4cc;
    --rust: #8b4a2b;         /* numéros : 6.3:1 */
    --rule: rgba(36, 64, 47, .28);
    --mono: "Courier Prime", "Courier New", ui-monospace, monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    background: var(--ecru-2); color: var(--ink); font-family: var(--text); font-size: 1.1rem; line-height: 1.7; overflow-x: hidden;
    background-image: radial-gradient(rgba(139, 74, 43, .05) 1px, transparent 1.5px); background-size: 9px 9px;
}
::selection { background: var(--wash); color: var(--ink); }
a { color: var(--ink); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--ecru); padding: .5rem 1rem; font-family: var(--mono); text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* --- La planche ----------------------------------------------------------- */
.hb-plate {
    max-width: 1180px; margin: clamp(0px, 2vw, 2rem) auto; background: var(--ecru);
    border: 1px solid var(--rule); box-shadow: inset 0 0 0 6px var(--ecru), inset 0 0 0 7px var(--rule), 0 30px 70px -50px rgba(36, 64, 47, .6);
    padding: clamp(1.1rem, 4vw, 3rem);
}
.hb-masthead { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--mono); font-size: .92rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding: .4rem 0 .6rem; }
.hb-nav { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: .7rem 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
.hb-nav-label { font-family: var(--mono); font-size: .88rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-muted); }
.hb-nav .menu-links { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.hb-nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.hb-nav a span { font-family: var(--mono); color: var(--rust); font-weight: 700; }
.hb-nav a:hover, .hb-nav a.is-active { border-color: var(--ink); }

/* --- Ouverture : planche, spécimen, étiquette ------------------------------ */
.hb-hero { display: grid; gap: 2rem; padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 4rem); grid-template-areas: "title" "mount" "plant" "legend"; }
@media (min-width: 900px) {
    .hb-hero { grid-template-columns: 1fr 1fr; grid-template-areas: "title title" "plant mount" "legend mount"; column-gap: clamp(2rem, 5vw, 4.5rem); row-gap: 1.5rem; align-items: start; }
}
.hb-title { grid-area: title; text-align: center; }
.hb-to { display: inline-flex; gap: .6rem; align-items: baseline; font-family: var(--mono); font-size: 1rem; border: 1px solid var(--ink); padding: .3rem .8rem; margin: 0 0 1.2rem; }
.hb-to span { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-muted); }
.hb-kicker { font-family: var(--mono); font-weight: 700; letter-spacing: .3em; text-transform: uppercase; font-size: .92rem; color: var(--rust); margin: 0 0 .4rem; }
.hb-names { font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(3.6rem, 12vw, 7.4rem); line-height: .92; margin: 0 0 1rem; letter-spacing: -.01em; }
.hb-names span { display: inline; }
.hb-amp { font-style: normal; color: var(--sage); margin: 0 .12em; }
@media (max-width: 599.98px) { .hb-names span { display: block; } }
.hb-date { font-size: 1.2rem; margin: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: inline-block; padding: .3rem 1.4rem; }

.hb-specimen { grid-area: plant; margin: 0; }
.hb-plant { display: block; width: min(100%, 420px); height: auto; margin: 0 auto; overflow: visible; }
.hb-plant path, .hb-plant ellipse { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.hb-plant .hb-wash { fill: var(--wash); }
.hb-plant .hb-olive { fill: #6f7d4f; stroke: var(--ink); }
.hb-plant .hb-dot { fill: var(--rust); }
.hb-plant .hb-tape { fill: rgba(222, 205, 160, .85); stroke: rgba(36, 64, 47, .2); }
.hb-plant .hb-leader { stroke: var(--rust); stroke-width: .8; stroke-dasharray: 3 3; }
.hb-plant .hb-num-ring { fill: var(--ecru); stroke: var(--rust); stroke-width: 1; }
.hb-plant .hb-num { font-family: var(--mono); font-weight: 700; font-size: 13px; fill: var(--rust); text-anchor: middle; }
@media (prefers-reduced-motion: no-preference) {
    .js .hb-plant path[pathLength], .js .hb-plant ellipse[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hb-draw 2.6s var(--ease) .2s forwards; }
    .js .hb-plant .hb-wash { fill-opacity: 0; animation: hb-draw 2.6s var(--ease) .2s forwards, hb-wash 1.2s ease 1.8s forwards; }
}
@keyframes hb-draw { to { stroke-dashoffset: 0; } }
@keyframes hb-wash { to { fill-opacity: 1; } }

.hb-legend { grid-area: legend; list-style: none; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--ink); display: grid; gap: .4rem; font-size: 1.02rem; }
.hb-legend li { position: relative; padding-left: 1.8rem; }
.hb-legend-n { position: absolute; left: 0; top: 0; font-family: var(--mono); font-weight: 700; color: var(--rust); }
.hb-legend em { font-style: italic; }

/* Photo montée sur la planche, coins de papier, étiquette */
.hb-mount { grid-area: mount; margin: 0; }
.hb-photo { position: relative; padding: 12px; background: var(--sheet); border: 1px solid var(--rule); box-shadow: 0 18px 30px -24px rgba(36, 64, 47, .7); }
.hb-photo .carousel { aspect-ratio: 4 / 5; overflow: hidden; }
.hb-photo .carousel-inner, .hb-photo .carousel-item { height: 100%; }
.hb-photo .carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(.12) saturate(.9); }
.hb-photo .carousel-indicators [data-bs-target] { width: 22px; height: 3px; border: 0; background: var(--ecru); opacity: .6; margin: 0 3px; }
.hb-photo .carousel-indicators .active { opacity: 1; }
.hb-corner { position: absolute; z-index: 3; width: 54px; height: 18px; background: rgba(222, 205, 160, .9); box-shadow: 0 1px 2px rgba(36, 64, 47, .2); }
.hb-corner--tl { top: 6px; left: -14px; transform: rotate(-40deg); }
.hb-corner--br { bottom: 6px; right: -14px; transform: rotate(-40deg); }

.hb-label { margin: 1.4rem 0 0 auto; max-width: 400px; background: var(--sheet); border: 1px solid var(--ink); padding: .9rem 1.1rem; font-family: var(--mono); font-size: .98rem; line-height: 1.5; box-shadow: 3px 3px 0 var(--wash); }
.hb-label-head { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .9rem; border-bottom: 1px solid var(--ink); padding-bottom: .4rem; margin: 0 0 .5rem; }
.hb-label-head span { color: var(--rust); }
.hb-label dl { margin: 0; }
.hb-label dl div { display: grid; grid-template-columns: 6.6rem 1fr; gap: .5rem; padding: .15rem 0; border-bottom: 1px dotted var(--rule); }
.hb-label dl div:last-child { border-bottom: 0; }
.hb-label dt { font-weight: 400; color: var(--ink-muted); }
.hb-label dd { margin: 0; font-weight: 700; }

/* --- Notices du catalogue -------------------------------------------------- */
.hb-entry { display: grid; grid-template-columns: 1fr; gap: .6rem; padding: clamp(2.5rem, 6vw, 4rem) 0; border-top: 1px solid var(--ink); }
@media (min-width: 760px) { .hb-entry { grid-template-columns: 8rem 1fr; gap: 2rem; } }
.hb-entry-num { display: flex; gap: .8rem; align-items: baseline; }
@media (min-width: 760px) { .hb-entry-num { flex-direction: column; gap: .2rem; position: sticky; top: 1.5rem; align-self: start; } }
.hb-entry-num span { font-family: var(--display); font-size: clamp(3rem, 7vw, 4.6rem); line-height: .9; color: var(--rust); }
.hb-entry-num small { font-family: var(--mono); font-size: .88rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-muted); }
.hb-entry-body { max-width: 760px; min-width: 0; }
.hb-h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 6vw, 3.8rem); line-height: 1; margin: 0 0 1rem; }
.hb-h3 { font-family: var(--mono); font-weight: 700; font-size: .92rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); margin: 2.4rem 0 .8rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule); }
.hb-lead { font-size: 1.2rem; }
.hb-sub { font-size: 1.2rem; font-weight: 600; margin: .6rem 0 .3rem; }
.hb-intro { color: var(--ink-muted); margin: 0 0 1.6rem; }
.hb-sprig { display: block; width: 120px; height: 40px; }
.hb-sprig path { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round; }

/* Notice : clé / valeur */
.hb-record { margin: 1.8rem 0 0; border-top: 1px solid var(--ink); }
.hb-record div { display: grid; grid-template-columns: 1fr; padding: .55rem 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 520px) { .hb-record div { grid-template-columns: 9rem 1fr; gap: 1rem; } }
.hb-record dt { font-family: var(--mono); font-weight: 400; font-size: .95rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted); padding-top: .15rem; }
.hb-record dd { margin: 0; font-weight: 600; }

/* Programme */
.programme-list { margin: 0; display: grid; gap: 0; }
.programme-row { display: grid; grid-template-columns: 1fr; padding: .8rem 0; border-bottom: 1px dotted var(--rule); }
@media (min-width: 520px) { .programme-row { grid-template-columns: 9rem 1fr; gap: 1rem; } }
.programme-list dt { font-family: var(--mono); font-weight: 700; font-size: 1.1rem; color: var(--rust); }
.programme-list dd { margin: 0; }
.programme-list strong { font-weight: 700; }
.programme-list small { display: block; color: var(--ink-muted); font-size: 1.02rem; font-style: italic; }

/* Compte à rebours : trois étiquettes de spécimen */
.countdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 440px; border: 1px solid var(--ink); background: var(--sheet); font-variant-numeric: tabular-nums lining-nums; }
.countdown .cell { padding: .9rem .4rem .7rem; text-align: center; }
.countdown .cell + .cell { border-left: 1px solid var(--ink); }
.countdown b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 9vw, 3.2rem); line-height: 1; }
.countdown span { font-family: var(--mono); font-size: .86rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted); }

/* Tenue : tableau de catalogue */
.hb-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.hb-table th, .hb-table td { padding: .85rem .4rem .85rem 0; vertical-align: top; border-bottom: 1px solid var(--rule); text-align: left; }
.hb-table tr:last-child th, .hb-table tr:last-child td { border-bottom: 0; }
.hb-table th { font-family: var(--display); font-weight: 400; font-style: italic; font-size: 1.5rem; line-height: 1.2; width: 38%; white-space: normal; }
.hb-ref { display: block; font-family: var(--mono); font-style: normal; font-size: .85rem; font-weight: 700; color: var(--rust); letter-spacing: .1em; }
@media (max-width: 519.98px) {
    .hb-table, .hb-table tbody, .hb-table tr, .hb-table th, .hb-table td { display: block; width: auto; }
    .hb-table th { border-bottom: 0; padding-bottom: 0; }
}

/* --- Réponse : fiche cartonnée --------------------------------------------- */
.hb-card {
    position: relative; background: var(--sheet); border: 1px solid var(--ink); padding: clamp(1.8rem, 5vw, 2.8rem) clamp(1.1rem, 5vw, 2.6rem);
    background-image: linear-gradient(var(--rust), var(--rust)), repeating-linear-gradient(transparent 0 calc(2.2rem - 1px), rgba(36, 64, 47, .09) calc(2.2rem - 1px) 2.2rem);
    background-size: 100% 2px, 100% 100%; background-position: 0 4.2rem, 0 0; background-repeat: no-repeat, repeat;
    box-shadow: 6px 6px 0 var(--wash);
}
.hb-card::before { content: ""; position: absolute; top: .9rem; right: 1rem; width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid var(--ink); background: var(--ecru-2); }
.hb-card-ref { font-family: var(--mono); font-size: .88rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-muted); margin: 0 0 2.4rem; }
.rsvp-deadline { font-style: italic; color: var(--ink-muted); margin: 0 0 1.8rem; }
.rsvp-note { margin: 0; padding: 1rem 1.2rem; border-left: 3px solid var(--rust); background: var(--ecru); }
.rsvp-done { padding: 1.2rem 1.4rem; border: 1px solid var(--ink); background: var(--ecru); margin-bottom: 1.6rem; }
.done-head { font-family: var(--display); font-style: italic; font-size: 2rem; margin: 0; line-height: 1.1; }
.done-text { margin: .3rem 0 .8rem; }
.btn-link-gold { background: none; border: 0; padding: 0; color: var(--rust); font-family: var(--mono); font-weight: 700; font-size: .98rem; text-transform: uppercase; letter-spacing: .08em; text-decoration: underline; text-underline-offset: .3em; cursor: pointer; }

.rsvp-form .field { border: 0; padding: 0; margin: 0 0 1.6rem; min-width: 0; }
.rsvp-form label:not(.guest-pill), .rsvp-form legend { float: none; display: block; width: auto; padding: 0; margin: 0 0 .4rem; font-family: var(--mono); font-weight: 700; font-size: .92rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.rsvp-form small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-muted); }
.form-control.engraved { border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; padding: .5rem .1rem; color: var(--ink); font-family: var(--text); font-size: 1.1rem; }
.form-control.engraved:focus { background: rgba(223, 228, 204, .5); box-shadow: 0 1px 0 var(--ink); color: var(--ink); }
textarea.form-control.engraved { border: 1px solid var(--ink); background: var(--ecru); padding: .6rem .8rem; }
.form-control.engraved[readonly] { border-bottom-color: transparent; background: transparent; font-family: var(--display); font-style: italic; font-size: 2.2rem; line-height: 1.1; padding-left: 0; }
.guests-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.guest-pill { min-width: 3rem; height: 3rem; display: grid; place-items: center; border: 1px solid var(--ink); background: var(--ecru); cursor: pointer; font-family: var(--mono); font-weight: 700; font-size: 1.15rem; transition: background-color .2s var(--ease); }
.guest-pill:hover { background: var(--wash); }
.btn-check:checked + .guest-pill { background: var(--ink); color: var(--ecru); }
.btn-check:focus-visible + .guest-pill { outline: 2px solid var(--rust); outline-offset: 3px; }
.hint { font-size: .98rem; color: var(--ink-muted); margin: .5rem 0 0; }
.choice { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 520px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice-tile {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .1rem; min-height: 6.6rem; padding: 1rem 1.2rem;
    border: 1px solid var(--ink); border-radius: 0; background: var(--ecru); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.choice-tile:first-child { background: var(--ink); color: var(--ecru); }
.choice-tile:hover, .choice-tile:focus-visible { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--wash); }
.choice-head { font-family: var(--display); font-style: italic; font-size: 2.1rem; line-height: 1; }
.choice-text { font-size: 1rem; }
.choice-current { font-family: var(--mono); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-top: .2rem; }
.rsvp-form.is-sending .choice-tile { opacity: .6; pointer-events: none; }
.rsvp-errors { border: 1px solid #8a2d1c; border-left-width: 4px; background: #f6e3d9; color: #7a2414; padding: .9rem 1.1rem; margin-bottom: 1.4rem; }
.rsvp-errors p { margin: 0; }

/* --- Pied de planche ------------------------------------------------------ */
.hb-foot { border-top: 1px solid var(--ink); padding: 2.4rem 0 1.4rem; text-align: center; }
.hb-foot .hb-sprig { margin: 0 auto; }
.hb-foot-names { font-family: var(--display); font-style: italic; font-size: 2.6rem; margin: .4rem 0 0; line-height: 1.1; }
.hb-credits { font-family: var(--mono); font-size: .9rem; color: var(--ink-muted); margin: 1rem 0 0; }
