/* ============================================================
   EL ARZ — Barre de réservation & améliorations UI
   Chargé après custom-css.css sur toutes les pages.
   ============================================================ */

:root {
    --elarz-brand: #9e7256;
    --elarz-brand-dark: #7f5a42;
    --elarz-brand-darker: #6b4a36;
    --elarz-ink: #2a241f;
    --elarz-muted: #8a7f76;
    --elarz-line: #eee6df;
    --elarz-cream: #fffdfa;
}

/* ------------------------------------------------------------
   1. Barre de réservation
   ------------------------------------------------------------ */

.elarz-booking-section {
    position: relative;
    z-index: 20;
    margin-top: -64px;
    margin-bottom: 20px;
    padding: 0 24px;
}

.elarz-booking-bar {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    background: var(--elarz-cream);
    border: 1px solid rgba(158, 114, 86, 0.16);
    border-radius: 16px;
    box-shadow:
        0 30px 60px -22px rgba(35, 24, 15, 0.38),
        0 4px 14px rgba(35, 24, 15, 0.08);
    overflow: hidden;
}

.ebb-field {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 18px 22px;
    border-left: 1px solid var(--elarz-line);
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.ebb-field:first-child {
    border-left: none;
}

.ebb-field:hover,
.ebb-field:focus-within {
    background: #faf4ee;
}

.ebb-field-hotel {
    flex: 1.4 1 0;
}

.ebb-label {
    display: block;
    font-family: "Montserrat", "Open Sans", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--elarz-brand);
    white-space: nowrap;
}

.ebb-label .ebb-nights {
    color: var(--elarz-muted);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.elarz-booking-bar select,
.elarz-booking-bar input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font-family: "Montserrat", "Open Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--elarz-ink);
    line-height: 1.4;
    cursor: pointer;
    min-height: 24px;
}

.elarz-booking-bar select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239e7256' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 20px;
}

.elarz-booking-bar input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.45;
    cursor: pointer;
}

.elarz-booking-bar input[type="date"]::-webkit-datetime-edit {
    padding: 0;
}

/* Compteur adultes / enfants */
.ebb-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ebb-step {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9cec5;
    border-radius: 50%;
    background: #fff;
    color: var(--elarz-brand-dark);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.ebb-step:hover:not(:disabled) {
    background: var(--elarz-brand);
    border-color: var(--elarz-brand);
    color: #fff;
}

.ebb-step:disabled {
    opacity: 0.35;
    cursor: default;
}

.ebb-count {
    min-width: 18px;
    text-align: center;
    font-family: "Montserrat", "Open Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--elarz-ink);
}

/* Bouton Réserver */
.ebb-submit {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 170px;
    padding: 18px 30px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--elarz-brand) 0%, var(--elarz-brand-dark) 100%);
    color: #fff;
    font-family: "Montserrat", "Open Sans", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.ebb-submit:hover {
    background: linear-gradient(135deg, var(--elarz-brand-dark) 0%, var(--elarz-brand-darker) 100%);
    box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.05);
}

.ebb-submit .ebb-submit-sub {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.14em;
    opacity: 0.75;
    text-transform: none;
}

/* Responsive */
@media only screen and (max-width: 1024px) {
    .elarz-booking-bar {
        flex-wrap: wrap;
    }

    .ebb-field {
        flex: 1 1 46%;
        border-top: 1px solid var(--elarz-line);
    }

    .ebb-field:first-child,
    .ebb-field:nth-child(2) {
        border-top: none;
    }

    .ebb-field-hotel {
        flex: 1 1 100%;
    }

    .ebb-field-hotel + .ebb-field {
        border-left: none;
    }

    .ebb-submit {
        flex: 1 1 100%;
        padding: 16px 20px;
    }
}

@media only screen and (max-width: 600px) {
    .elarz-booking-section {
        padding: 0 16px;
        margin-top: -48px;
    }

    .ebb-field,
    .ebb-field:nth-child(2) {
        flex: 1 1 100%;
        border-left: none;
        border-top: 1px solid var(--elarz-line);
        padding: 14px 18px;
    }

    .ebb-field:first-child {
        border-top: none;
    }

    .ebb-field-guests {
        flex: 1 1 40% !important;
    }

    .ebb-field-guests + .ebb-field-guests {
        border-left: 1px solid var(--elarz-line);
    }
}

/* ------------------------------------------------------------
   2. Améliorations UI globales
   ------------------------------------------------------------ */

html {
    scroll-behavior: smooth;
}

/* Filet de sécurité : « elementor-invisible » met le contenu à opacity: 0 en
   attendant une animation d'entrée. Sans elarz-reveal.js (JS désactivé, script
   non chargé), ces blocs resteraient invisibles et la page s'afficherait vide.
   La règle ne s'applique donc que si le script a marqué <html>. */
html:not(.elarz-anim) .elementor-invisible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .elementor-invisible {
        opacity: 1 !important;
    }

    .animated {
        animation: none !important;
    }
}

::selection {
    background: var(--elarz-brand);
    color: #fff;
}

/* Bouton "Réserver" du header — pilule lisible sur fond transparent */
.header_client_wrapper a.client_login_link {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    letter-spacing: 0.08em;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.header_client_wrapper a.client_login_link:hover {
    background: var(--elarz-brand);
    border-color: var(--elarz-brand);
    color: #fff;
}

/* Bouton flottant "Réserver maintenant" */
a#toBook {
    background: linear-gradient(135deg, var(--elarz-brand) 0%, var(--elarz-brand-dark) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 26px;
    border-radius: 999px;
    box-shadow: 0 12px 30px -8px rgba(107, 74, 54, 0.55);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 300ms;
}

a#toBook:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -8px rgba(107, 74, 54, 0.65);
}

/* Sous 768px, responsive.css transforme ce bouton en barre pleine largeur
   collée en bas : la pilule arrondie n'a plus lieu d'être. */
@media only screen and (max-width: 767px) {
    a#toBook,
    a#toBook:hover {
        border-radius: 0;
        padding: 16px 20px;
        transform: none;
        box-shadow: 0 -8px 24px -10px rgba(35, 24, 15, 0.45);
    }
}

/* Boutons Elementor — remplissage brand au survol */
.elementor-button-link.elementor-button {
    border-radius: 3px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.elementor-button-link.elementor-button:hover {
    background-color: var(--elarz-brand);
    border-color: var(--elarz-brand);
    color: #fff;
    box-shadow: 0 10px 24px -10px rgba(107, 74, 54, 0.5);
}

/* Liens "Reserver" des chambres */
a.room_grid2_view {
    border-radius: 3px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

a.room_grid2_view:hover {
    background-color: var(--elarz-brand);
    border-color: var(--elarz-brand);
    color: #fff;
}

/* Pied de page */
#footer .widgettitle span {
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 14px;
}

#footer a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

#footer a:hover {
    color: var(--elarz-brand);
}

/* Accessibilité clavier */
.ebb-step:focus-visible,
.ebb-submit:focus-visible,
.elarz-booking-bar select:focus-visible,
.elarz-booking-bar input[type="date"]:focus-visible {
    outline: 2px solid var(--elarz-brand);
    outline-offset: 2px;
    border-radius: 4px;
}
