/* Widget Réservation — Manoir de Pierre Levée */
/* Toutes les classes préfixées resa- pour éviter les collisions */
/* Thème clair — compatible background blanc du site */

:root {
    --resa-accent: #b79768;
    --resa-accent-hover: #a3845a;
    --resa-accent-light: rgba(183,151,104,0.10);
    --resa-bg: #ffffff;
    --resa-text: #1a1913;
    --resa-text-muted: #8a8578;
    --resa-border: #e0dcd4;
    --resa-border-hover: #c8c2b8;
    --resa-radius: 7px;
    --resa-danger: #c0392b;
    --resa-success: #1e8449;
    --resa-input-bg: #f8f7f5;
    --resa-selected-text: #ffffff;
}

.resa-widget {
    font-family: "omnes-pro", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--resa-text);
    max-width: 720px;
    margin: 0 auto;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.resa-widget * {
    box-sizing: border-box;
}

/* Steps header */
.resa-steps {
    display: flex;
    gap: 7px;
    margin-bottom: 2.4rem;
}

.resa-step-dot {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--resa-border);
    transition: background 300ms ease;
}

.resa-step-dot.is-active {
    background: var(--resa-accent);
}

.resa-step-dot.is-done {
    background: var(--resa-accent);
    opacity: 0.45;
}

/* Back button */
.resa-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    color: var(--resa-text-muted);
    font-size: 17px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.4rem;
    transition: color 200ms;
}

.resa-back:hover {
    color: var(--resa-text);
}

.resa-back svg {
    width: 19px;
    height: 19px;
}

/* Section title */
.resa-title {
    font-size: 1.55rem;
    font-weight: 600;
    margin-bottom: 1.4rem;
    color: var(--resa-text);
}

/* Calendar */
.resa-calendar {
    user-select: none;
}

.resa-cal-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.resa-cal-quad {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
}

@media (max-width: 600px) {
    .resa-cal-duo,
    .resa-cal-quad {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.resa-cal-month-label {
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: capitalize;
    color: var(--resa-accent);
    text-align: center;
    margin-bottom: 0.8rem;
    letter-spacing: 0.3px;
}

@media (max-width: 600px) {
    .resa-cal-month-label {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}

.resa-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.resa-cal-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--resa-text);
    text-align: center;
}

.resa-cal-nav {
    background: none;
    border: 1px solid var(--resa-border);
    color: var(--resa-text);
    width: 43px;
    height: 43px;
    border-radius: var(--resa-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: border-color 200ms, background 200ms;
}

.resa-cal-nav:hover {
    border-color: var(--resa-accent);
    background: var(--resa-accent-light);
}

.resa-cal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.resa-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.resa-cal-dow {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--resa-text-muted);
    padding: 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resa-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--resa-border);
    background: #fff;
    color: #1a1913;
    transition: background 200ms, color 200ms, transform 120ms, border-color 200ms, box-shadow 200ms;
    position: relative;
}

.resa-cal-day:hover:not(.is-disabled):not(.is-empty) {
    background: var(--resa-accent-light);
    border-color: var(--resa-accent);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(183,151,104,0.18);
}

.resa-cal-day.is-selected {
    background: #b79768;
    color: #fff;
    border-color: #b79768;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(183,151,104,0.35);
}

.resa-cal-day.is-today::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--resa-accent);
}

.resa-cal-day.is-selected.is-today::after {
    background: var(--resa-selected-text);
}

.resa-cal-day.is-disabled {
    color: #ccc;
    border-color: transparent;
    background: none;
    cursor: not-allowed;
    font-weight: 500;
}

.resa-cal-day.is-empty {
    cursor: default;
    border-color: transparent;
    background: none;
}

/* Couverts pills */
.resa-couverts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.resa-couvert {
    width: 58px;
    height: 58px;
    border-radius: var(--resa-radius);
    border: 1px solid var(--resa-border);
    background: none;
    color: var(--resa-text);
    font-size: 19px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 200ms, background 200ms, transform 120ms;
}

.resa-couvert:hover {
    border-color: var(--resa-accent);
    background: var(--resa-accent-light);
    transform: scale(1.05);
}

.resa-couvert.is-selected {
    background: #b79768;
    color: #fff;
    border-color: #b79768;
}

/* Creneaux */
.resa-service-group {
    margin-bottom: 1.8rem;
}

.resa-service-label {
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--resa-text-muted);
    margin-bottom: 1rem;
}

.resa-creneaux {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.resa-creneau {
    padding: 12px 22px;
    border-radius: var(--resa-radius);
    border: 1px solid var(--resa-border);
    background: none;
    color: var(--resa-text);
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 200ms, background 200ms, transform 120ms;
}

.resa-creneau:hover {
    border-color: var(--resa-accent);
    background: var(--resa-accent-light);
    transform: translateY(-1px);
}

.resa-creneau.is-selected {
    background: #b79768;
    color: #fff;
    border-color: #b79768;
}

.resa-complet {
    color: var(--resa-text-muted);
    font-size: 17px;
    font-style: italic;
}

.resa-group-hint {
    margin-top: 16px;
    padding: 10px 14px;
    font-size: 19px;
    color: var(--resa-text-muted);
    font-style: italic;
    text-align: center;
    line-height: 1.4;
}

/* Form */
.resa-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.resa-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.resa-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--resa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.resa-input,
.resa-textarea {
    padding: 14px 17px;
    border-radius: var(--resa-radius);
    border: 1px solid var(--resa-border);
    background: var(--resa-input-bg);
    color: var(--resa-text);
    font-size: 18px;
    font-family: inherit;
    transition: border-color 200ms, box-shadow 200ms;
    outline: none;
}

.resa-input:focus,
.resa-textarea:focus {
    border-color: var(--resa-accent);
    box-shadow: 0 0 0 3px rgba(183,151,104,0.15);
    background: #fff;
}

.resa-input::placeholder,
.resa-textarea::placeholder {
    color: var(--resa-text-muted);
}

.resa-textarea {
    resize: vertical;
    min-height: 96px;
}

.resa-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

@media (max-width: 480px) {
    .resa-row {
        grid-template-columns: 1fr;
    }
}

/* Submit button — style doré identique aux CTA du site */
.resa-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 3rem;
    background: #b79768;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 400;
    font-family: inherit;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 200ms, transform 140ms, box-shadow 200ms;
    margin-top: 0.6rem;
    text-decoration: none;
}

.resa-submit:hover {
    background: #a3845a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(183,151,104,0.3);
}

.resa-submit:active {
    transform: translateY(0);
    background: #a3845a;
}

.resa-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.resa-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.6rem;
}

.resa-spinner::after {
    content: '';
    width: 38px;
    height: 38px;
    border: 3px solid var(--resa-border);
    border-top-color: var(--resa-accent);
    border-radius: 50%;
    animation: resa-spin 0.6s linear infinite;
}

@keyframes resa-spin {
    to { transform: rotate(360deg); }
}

/* Confirmation */
.resa-confirmation {
    text-align: center;
    padding: 1.2rem 0;
}

.resa-confirmation-icon {
    width: 77px;
    height: 77px;
    border-radius: 50%;
    background: rgba(30,132,73,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.8rem;
}

/* Confirmation mobile: recap compact en grille horizontale */
@media (max-width: 768px) {
    .resa-confirmation-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }

    .resa-confirmation-icon svg {
        width: 26px;
        height: 26px;
    }

    .resa-confirmation .resa-recap {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: 0.8rem;
        margin: 1rem 0;
    }

    .resa-confirmation .resa-recap-row {
        flex-direction: column;
        padding: 5px 8px;
        font-size: 13px;
        border-bottom: none;
        border-right: 1px solid var(--resa-border);
        gap: 1px;
    }

    .resa-confirmation .resa-recap-row:nth-child(2n) {
        border-right: none;
    }

    .resa-confirmation .resa-recap-row:nth-child(n+3) {
        border-top: 1px solid var(--resa-border);
    }

    .resa-confirmation .resa-recap-label {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .resa-confirmation .resa-recap-value {
        font-size: 14px;
        font-weight: 700;
    }

    .resa-confirmation .resa-title {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
}

.resa-confirmation-icon svg {
    width: 38px;
    height: 38px;
    color: var(--resa-success);
}

.resa-recap {
    background: var(--resa-input-bg);
    border: 1px solid var(--resa-border);
    border-radius: var(--resa-radius);
    padding: 1.4rem;
    margin: 1.8rem 0;
    text-align: left;
}

.resa-recap-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--resa-border);
}

.resa-recap-row:last-child {
    border-bottom: none;
}

.resa-recap-label {
    font-weight: 600;
    color: var(--resa-text-muted);
}

.resa-recap-value {
    font-weight: 500;
    color: var(--resa-text);
}

.resa-email-notice {
    font-size: 17px;
    color: var(--resa-text-muted);
    margin-top: 1.2rem;
}

/* Email confirmation box */
.resa-email-box {
    background: var(--resa-accent-light);
    border: 2px solid var(--resa-accent);
    border-radius: 12px;
    padding: 2.5rem 2.5rem;
    margin-top: 2rem;
    text-align: center;
}

.resa-email-box-icon {
    color: var(--resa-accent);
    margin-bottom: 1rem;
}

.resa-email-box-icon svg {
    width: 48px;
    height: 48px;
}

.resa-email-box-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--resa-text);
    margin-bottom: 1rem;
}

.resa-email-box-text {
    font-size: 17px;
    color: var(--resa-text);
    line-height: 1.6;
    margin: 0 0 1.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.resa-email-box-warning {
    font-size: 16px;
    font-weight: 600;
    color: var(--resa-danger);
    background: rgba(192,57,43,0.08);
    border: 1.5px solid rgba(192,57,43,0.25);
    border-radius: 8px;
    padding: 14px 20px;
    margin: 0 auto 1.5rem;
    max-width: 520px;
}

.resa-email-box-footer {
    font-size: 14px;
    color: var(--resa-text-muted);
    margin: 0;
    font-style: italic;
}

/* Error */
.resa-error {
    background: rgba(192,57,43,0.06);
    border: 1px solid rgba(192,57,43,0.25);
    border-radius: var(--resa-radius);
    padding: 14px 19px;
    color: var(--resa-danger);
    font-size: 17px;
    margin-bottom: 1.2rem;
}

/* Fade transition */
.resa-view {
    animation: resa-fadeIn 300ms ease;
}

@keyframes resa-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page réservation — intro centrée, compact */
.resa-page-intro {
    text-align: center;
    padding: 0 2rem;
    margin-top: 1.5rem;
}

.resa-page-intro p {
    margin: 0.3rem 0;
}

/* Mobile uniquement: resserrer le haut de la page réservation */
@media (max-width: 768px) {
    .resa-hide-mobile {
        display: none !important;
    }

    .rooms_header {
        height: 110px !important;
        margin-bottom: 1rem !important;
    }

    .resa-page-header {
        margin-bottom: 0.3rem !important;
        padding-bottom: 0 !important;
    }

    .resa-page-intro {
        margin-top: 50px;
    }
}

/* ─── Dernière minute (< 4h) : bloc CTA téléphone ─── */
.resa-lastminute {
    background: var(--resa-accent-light);
    border: 2px solid var(--resa-accent);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    margin: 0 0 1.5rem;
    text-align: center;
}

.resa-lastminute-icon {
    font-size: 2rem;
    line-height: 1;
    color: var(--resa-accent);
    margin-bottom: 0.6rem;
}

.resa-lastminute-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--resa-text);
    margin-bottom: 0.8rem;
    letter-spacing: -0.01em;
}

.resa-lastminute-text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--resa-text);
    margin: 0 auto 1.5rem;
    max-width: 520px;
}

.resa-lastminute-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    background: #b79768;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    cursor: pointer;
}

.resa-lastminute-btn-icon {
    flex: 0 0 auto;
    color: #fff;
}

.resa-lastminute-btn-label {
    white-space: nowrap;
}

.resa-lastminute-btn:hover,
.resa-lastminute-btn:focus {
    background: #a3845a;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(183,151,104,0.3);
    text-decoration: none;
}

.resa-lastminute-btn:active {
    transform: translateY(0);
    background: #a3845a;
}

@media (max-width: 520px) {
    .resa-lastminute {
        padding: 1.25rem 1rem;
    }
    .resa-lastminute-title {
        font-size: 1.45rem;
    }
    .resa-lastminute-btn {
        width: 100%;
        padding: 0.9rem 1rem;
        font-size: 15px;
    }
    .resa-lastminute-btn-label {
        white-space: normal;
        text-align: left;
    }
}
