/* ==========================================================================
   Booking page (/reservation), pushed by its view; the takeaway page (/a-emporter, laid out in info.css bands)
   loads it only for the readable Arabic "In short" eyebrow.
   The booking card is a printed invitation: a double gold hairline, a script eyebrow, four numbered steps. Quiet
   chips for days, guests and times; the brand gradient on the one submit button. Tokens come from custom.css.
   Flow layout in rem, em and %; logical properties only, so Arabic (dir="rtl") mirrors without extra rules.
   ========================================================================== */

/* --- "In short": the answer first, as a printed note under the title ----------------------------------------- */
.booking-essentials {
    max-width: 46rem;
    margin: 0 auto clamp(2rem, 5vw, 3.5rem);
    text-align: center;
}

.booking-essentials__label {
    margin: 0 0 0.6rem;
    color: var(--gold-deep);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    line-height: 1.5;
    text-transform: uppercase;
}

/* Arabic has no capitals and no tracking: at 0.75rem the eyebrow would be barely legible. */
[dir="rtl"] .booking-essentials__label,
[dir="rtl"] .info-essential__label {
    font-family: "Amiri", "Noto Naskh Arabic", "Times New Roman", serif;
    font-size: 1.1rem;
    letter-spacing: 0;
}

.booking-essentials__text {
    margin: 0;
    font-variant-numeric: lining-nums;
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.35rem);
    font-weight: 500;
    line-height: 1.55;
}

.booking-essentials--page {
    max-width: none;
}

/* --- Layout: the card, and the visit facts beside it on wide screens ------------------------------------------ */
.booking-layout {
    display: grid;
    /* One column as wide as the page (not "auto"): a long word wraps instead of widening it past a phone screen. */
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: start;
}

@media (min-width: 62em) {
    .booking-layout {
        grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
    }
}

/* --- The invitation card ------------------------------------------------------------------------------------- */
.booking-card {
    min-width: 0;
    scroll-margin-top: 6rem; /* the flash-message redirects land on #book-online, below the sticky header */
}

.booking-card__frame {
    position: relative;
    padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.1rem, 5vw, 3.25rem);
    border: 1px solid var(--gold-line);
    outline: 1px solid var(--gold-faint);
    outline-offset: -0.45rem;
    background: var(--card);
    color: var(--ink);
}

.booking-card__script {
    margin: 0 0 1.25rem;
    color: var(--gold);
    font-family: var(--font-script);
    font-size: clamp(2.4rem, 2rem + 2vw, 3.2rem);
    line-height: 1.1;
    text-align: center;
}

/* Messages at the top of the card: success, information, warning, error. */
.booking-message {
    margin: 0 0 1.5rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--gold-line);
    border-inline-start-width: 3px;
    background: var(--white);
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.6;
}

.booking-message p {
    margin: 0 0 0.6rem;
}

.booking-message p:last-child {
    margin-bottom: 0;
}

.booking-message--success {
    border-inline-start-color: var(--gold-deep);
    background: var(--ivory);
}

.booking-message--warning,
.booking-message--error {
    border-inline-start-color: #9b3426;
}

/* --- Steps ----------------------------------------------------------------------------------------------------- */
.reservation-form {
    margin: 0;
}

.booking-step {
    min-width: 0;
    margin: 0;
    padding: 1.5rem 0 0;
    border: 0;
    border-top: 1px solid var(--gold-faint);
}

.booking-step + .booking-step {
    margin-top: 1.5rem;
}

.booking-step__legend {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    float: inline-start; /* lets the legend sit inside the fieldset's top padding, like a heading */
    width: 100%;
    margin: 0 0 1rem;
    padding: 0;
    color: var(--heading);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
}

.booking-step > :not(.booking-step__legend) {
    clear: both;
}

.booking-step__number {
    flex: none;
    width: 1.9rem;
    height: 1.9rem;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold-deep);
    font-size: 1.05rem;
    letter-spacing: 0;
    line-height: 1.8rem;
    text-align: center;
}

/* --- Chips: days, guests, times -------------------------------------------------------------------------------- */
.booking-chips,
.booking-times__list,
.booking-card .reservation-party-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.booking-chip,
.booking-card .reservation-party-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.45em 1em;
    border: 1px solid var(--gold-line);
    border-radius: 2px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.booking-chip--time {
    min-width: 4.25rem;
    font-variant-numeric: lining-nums tabular-nums;
}

/* Day chips are links: no underline, the ink of the card (the reading column underlines its links). */
.info-page__body a.booking-chip {
    color: var(--ink);
    text-decoration: none;
}

.booking-chip:hover,
.booking-chip:focus-visible,
.info-page__body a.booking-chip:hover,
.info-page__body a.booking-chip:focus-visible,
.booking-card .reservation-party-chip:hover,
.booking-card .reservation-party-chip:focus-visible {
    border-color: var(--heading);
    background: var(--white);
    color: var(--heading);
    text-decoration: none;
}

.booking-chip:focus-visible,
.booking-card .reservation-party-chip:focus-visible,
.booking-card .reservation-party-btn:focus-visible,
.booking-card .form-control:focus-visible,
.booking-check__input:focus-visible {
    outline: 1px solid var(--heading);
    outline-offset: 0.15rem;
}

.booking-chip[aria-current],
.info-page__body a.booking-chip[aria-current],
.booking-chip[aria-pressed="true"],
.booking-card .reservation-party-chip.is-active {
    border-color: var(--heading);
    background: var(--ivory);
    color: var(--heading);
    box-shadow: inset 0 0 0 1px var(--heading);
}

/* Times: lunch and evening, each under a small-caps label. */
.booking-times__group + .booking-times__group {
    margin-top: 0.5rem;
}

.booking-times__label {
    margin: 0 0 0.45rem;
    color: var(--gold-deep-ivory);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    line-height: 1.5;
    text-transform: uppercase;
}

.booking-times__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
    margin-bottom: 0;
}

/* --- Fields ---------------------------------------------------------------------------------------------------- */
.booking-fields {
    display: grid;
    /* One column as wide as the page (not "auto"): a long word wraps instead of widening it past a phone screen. */
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem 1.25rem;
}

@media (min-width: 36em) {
    .booking-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .booking-field--wide {
        grid-column: 1 / -1;
    }
}

.booking-field {
    min-width: 0;
}

.booking-field[hidden] {
    display: none;
}

.booking-field__label {
    display: block;
    margin: 0 0 0.35rem;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.booking-card .form-control {
    display: block;
    width: 100%;
    min-height: 2.9rem;
    margin: 0;
    padding: 0.6em 0.85em;
    border: 1px solid var(--gold-line);
    border-radius: 2px;
    background: var(--white);
    box-shadow: none;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.5;
}

.booking-card textarea.form-control {
    min-height: 6rem;
    resize: vertical;
}

.booking-card .form-control::placeholder {
    color: #8b7a63;
    opacity: 1;
}

.booking-card .form-control:focus {
    border-color: var(--heading);
    outline: none;
    box-shadow: none;
}

.booking-card .form-control.is-invalid {
    border-color: #9b3426;
}

.booking-card .form-control:disabled {
    background: var(--ivory);
    color: var(--ink-soft);
}

/* The date field: a calendar icon on the side the text starts from (the picker's own field gets the room for it). */
.booking-date {
    position: relative;
}

.booking-date__icon {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0.8rem;
    width: 1.15rem;
    height: 100%;
    fill: none;
    stroke: var(--gold-deep);
    stroke-width: 1.3;
    pointer-events: none;
}

.booking-date .form-control {
    padding-inline-start: 2.6rem;
    cursor: pointer;
}

.booking-field--date {
    max-width: 20rem;
}

/* Guests: quick chips, then the stepper. */
.booking-card .reservation-party-picker {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

.booking-card .reservation-party-chips {
    margin: 0;
}

.booking-card .reservation-party-stepper {
    display: grid;
    grid-template-columns: 2.75rem minmax(3.5rem, 5rem) 2.75rem;
    gap: 0.4rem;
    align-items: center;
}

.booking-card .reservation-party-btn {
    min-height: 2.75rem;
    border: 1px solid var(--gold-line);
    border-radius: 2px;
    background: var(--white);
    color: var(--ink);
    font-size: 1.3rem;
    font-weight: 300;
}

.booking-card .reservation-party-btn:hover,
.booking-card .reservation-party-btn:focus {
    border-color: var(--heading);
    background: var(--white);
    color: var(--heading);
}

.booking-card input.reservation-party-input {
    box-sizing: border-box;
    height: 2.75rem;
    min-height: 0;
    padding: 0 0.25em;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 400;
    font-variant-numeric: lining-nums;
    line-height: 1;
    text-align: center;
}

/* The "large group, call us" hint at the online limit: the one place that asks a group to call. */
.booking-card .reservation-party-hint {
    margin-top: 0.9rem !important;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gold-faint);
    border-radius: 2px;
    background: var(--white);
    color: var(--ink);
    font-size: 0.92rem;
    text-align: start;
}

.booking-card .reservation-party-hint-link {
    color: var(--heading) !important;
    font-weight: 400;
    animation: none;
}

.booking-hint,
.booking-note {
    margin: 0.6rem 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

.booking-hint:empty {
    display: none;
}

.booking-note {
    color: var(--heading);
}

.booking-error {
    margin: 0.4rem 0 0;
    color: #9b3426;
    font-size: 0.85rem;
    line-height: 1.45;
}

.booking-error--link a {
    color: var(--heading);
}

/* Passeport Gourmand. */
.booking-check {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.1rem;
}

.booking-check__input {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    accent-color: var(--heading);
    cursor: pointer;
}

.booking-check__label {
    margin: 0;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
}

/* --- Submit: the one brand-gradient button of the page --------------------------------------------------------- */
.booking-submit {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--gold-faint);
    text-align: center;
}

.booking-card .reservation-submit-btn {
    width: 100%;
    max-width: 24rem;
    min-height: 3.1rem;
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: 0.16em;
}

.booking-submit__note {
    max-width: 30rem;
    margin: 1rem auto 0;
    color: var(--ink-soft);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* --- The visit facts beside the card --------------------------------------------------------------------------- */
.booking-aside {
    min-width: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.7;
}

.booking-aside__section + .booking-aside__section {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--gold-faint);
}

.booking-aside__title {
    margin: 0 0 0.9rem;
    color: var(--heading);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.3;
    text-transform: uppercase;
}

.booking-aside__status {
    align-items: baseline;
    margin-top: 0.9rem;
    color: var(--ink);
    font-size: 0.9rem;
}

/* On a wrapped line the lozenge stays beside the first line. */
.booking-aside__status .open-status__mark {
    transform: translateY(-0.1em) rotate(45deg);
}

.booking-aside__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.booking-aside__list li {
    position: relative;
    padding-inline-start: 1.1rem;
}

.booking-aside__list li + li {
    margin-top: 0.35rem;
}

.booking-aside__list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.62em;
    width: 0.4em;
    height: 0.4em;
    border: 1px solid var(--gold-deep);
    transform: rotate(45deg);
}

.booking-aside__note {
    margin: 0.9rem 0 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* On tablets the facts sit in columns under the card instead of one long list. */
@media (min-width: 40em) and (max-width: 61.99em) {
    .booking-aside {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
        gap: 1.75rem 2.5rem;
    }

    .booking-aside__section + .booking-aside__section {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }
}

/* --- The next doors: receptions, takeaway, questions ----------------------------------------------------------- */
.booking-doors {
    margin-top: clamp(2.5rem, 6vw, 4rem);
    padding-top: 1.75rem;
    border-top: 1px solid var(--gold-faint);
}

.booking-doors__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

.booking-doors__lead {
    margin-inline-end: 0.4em;
    color: var(--ink-soft);
}

/* --- Narrow cards (small phones): the submit label keeps one line. The tracking and the side padding ease off with
   the width of the card itself (container query), so nothing depends on a guessed screen size. ------------------ */
.booking-submit {
    container-type: inline-size;
}

@container (max-width: 20rem) {
    .booking-card .reservation-submit-btn {
        padding-inline: 0.75em;
        font-size: min(1.08rem, 6.2cqi);
        letter-spacing: 0.06em;
    }
}

/* The step titles ("Vos coordonnées") keep one line in the narrowest cards (320px phones). */
.reservation-form {
    container-type: inline-size;
}

@container (max-width: 17.5rem) {
    .booking-step__legend {
        gap: 0.6rem;
        letter-spacing: 0.06em;
    }
}
