/* ==========================================================================
   WebiaBook — charte graphique (turquoise + sable)
   Chargée après Bootstrap 5.3.3 : surcharge des variables et composants.
   ========================================================================== */

:root {
    --wb-primary: #0E9AA7;
    --wb-primary-dark: #0A7480;
    --wb-primary-light: #E3F5F6;
    --wb-primary-rgb: 14, 154, 167;
    --wb-primary-darker: #075A63;
    --wb-sand: #E8D5B0;
    --wb-sand-light: #F8F3EA;
    --wb-ink: #17323A;
    --wb-ink-rgb: 23, 50, 58;
    --wb-muted: #5B6C70; /* P31 : 5,5:1 sur blanc (#6B7C80 n'atteignait que 4,4:1) */
    --wb-accent: #F2994A;
    --wb-radius: 14px;
    --wb-shadow: 0 6px 24px rgba(23, 50, 58, .08);
    --wb-sidebar-width: 250px;
    --wb-sidebar-collapsed-width: 72px;
    --wb-topbar-height: 60px;

    --wb-font-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --wb-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Variables Bootstrap */
    --bs-primary: var(--wb-primary-dark);
    --bs-primary-rgb: 10, 116, 128;
    --bs-primary-text-emphasis: var(--wb-primary-dark);
    --bs-primary-bg-subtle: var(--wb-primary-light);
    --bs-primary-border-subtle: #A6DEE3;
    --bs-body-font-family: var(--wb-font-body);
    --bs-body-color: var(--wb-ink);
    --bs-body-color-rgb: var(--wb-ink-rgb);
    --bs-secondary-color: var(--wb-muted);
    --bs-emphasis-color: var(--wb-ink);
    --bs-heading-color: var(--wb-ink);
    --bs-link-color: var(--wb-primary-dark);
    --bs-link-color-rgb: 10, 116, 128;
    --bs-link-hover-color: var(--wb-primary);
    --bs-link-hover-color-rgb: var(--wb-primary-rgb);
    --bs-border-radius: 10px;
    --bs-border-radius-lg: var(--wb-radius);
    --bs-focus-ring-color: rgba(var(--wb-primary-rgb), .25);
}

/* --- Base ----------------------------------------------------------------- */

body {
    font-family: var(--wb-font-body);
    color: var(--wb-ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand, .wb-heading {
    font-family: var(--wb-font-heading);
    font-weight: 600;
}

.text-muted, .text-body-secondary { color: var(--wb-muted) !important; }
.text-primary { color: var(--wb-primary-dark) !important; }
.text-accent { color: #A65416 !important; } /* corail foncé : 5,4:1 sur blanc */
.bg-sand { background-color: var(--wb-sand) !important; }
.bg-sand-light { background-color: var(--wb-sand-light) !important; }
.bg-primary-light { background-color: var(--wb-primary-light) !important; }
.bg-ink { background-color: var(--wb-ink) !important; }

/* --- Boutons -------------------------------------------------------------- */

.btn { border-radius: 10px; font-weight: 500; }

.btn-primary {
    /* Texte blanc sur turquoise foncé : 5,5:1 (le turquoise vif n'offrait que 3,4:1). */
    --bs-btn-bg: var(--wb-primary-dark);
    --bs-btn-border-color: var(--wb-primary-dark);
    --bs-btn-hover-bg: var(--wb-primary-darker);
    --bs-btn-hover-border-color: var(--wb-primary-darker);
    --bs-btn-active-bg: var(--wb-primary-darker);
    --bs-btn-active-border-color: var(--wb-primary-darker);
    --bs-btn-disabled-bg: var(--wb-primary-dark);
    --bs-btn-disabled-border-color: var(--wb-primary-dark);
    --bs-btn-focus-shadow-rgb: var(--wb-primary-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--wb-primary-dark);
    --bs-btn-border-color: var(--wb-primary-dark);
    --bs-btn-hover-bg: var(--wb-primary-dark);
    --bs-btn-hover-border-color: var(--wb-primary-dark);
    --bs-btn-active-bg: var(--wb-primary-dark);
    --bs-btn-active-border-color: var(--wb-primary-dark);
    --bs-btn-disabled-color: var(--wb-primary);
    --bs-btn-disabled-border-color: var(--wb-primary);
    --bs-btn-focus-shadow-rgb: var(--wb-primary-rgb);
}

.btn-sand {
    --bs-btn-color: var(--wb-ink);
    --bs-btn-bg: var(--wb-sand);
    --bs-btn-border-color: var(--wb-sand);
    --bs-btn-hover-color: var(--wb-ink);
    --bs-btn-hover-bg: #DCC497;
    --bs-btn-hover-border-color: #DCC497;
    --bs-btn-active-bg: #DCC497;
    --bs-btn-active-border-color: #DCC497;
}

.btn-accent {
    /* Texte foncé sur corail : 6:1 (le blanc n'offrait que 2,2:1). */
    --bs-btn-color: var(--wb-ink);
    --bs-btn-bg: var(--wb-accent);
    --bs-btn-border-color: var(--wb-accent);
    --bs-btn-hover-color: var(--wb-ink);
    --bs-btn-hover-bg: #DD8236;
    --bs-btn-hover-border-color: #DD8236;
    --bs-btn-active-bg: #DD8236;
    --bs-btn-active-border-color: #DD8236;
}

/* --- Badges, liens, focus ------------------------------------------------- */

.badge { font-weight: 500; letter-spacing: .01em; }
.text-bg-primary { background-color: var(--wb-primary-dark) !important; color: #fff !important; }
.badge-accent, .text-bg-accent { background-color: var(--wb-accent) !important; color: var(--wb-ink) !important; }
.badge-soft-primary { background-color: var(--wb-primary-light); color: var(--wb-primary-dark); }

a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .nav-link:hover, .dropdown-item:hover, .navbar-brand:hover, .card a:hover { text-decoration: none; }

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--wb-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--wb-primary-rgb), .25);
}
.form-check-input:checked { background-color: var(--wb-primary); border-color: var(--wb-primary); }
.form-range::-webkit-slider-thumb { background-color: var(--wb-primary); }
.form-range::-moz-range-thumb { background-color: var(--wb-primary); }

.page-link { color: var(--wb-primary-dark); }
.page-item.active .page-link { background-color: var(--wb-primary); border-color: var(--wb-primary); }
.nav-pills .nav-link.active { background-color: var(--wb-primary-dark); }
.dropdown-item.active, .dropdown-item:active { background-color: var(--wb-primary); }
.progress-bar { background-color: var(--wb-primary); }

/* --- Cartes --------------------------------------------------------------- */

.card {
    --bs-card-border-radius: var(--wb-radius);
    --bs-card-inner-border-radius: calc(var(--wb-radius) - 1px);
    --bs-card-border-color: rgba(var(--wb-ink-rgb), .08);
}
.wb-card { border: 0; box-shadow: var(--wb-shadow); }
.wb-card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.wb-card-hover:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(23, 50, 58, .14); }
.wb-card-img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* --- Logo ----------------------------------------------------------------- */

.wb-logo {
    font-family: var(--wb-font-heading);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -.02em;
    color: var(--wb-ink);
}
.wb-logo span { color: var(--wb-primary); }
.wb-logo-light { color: #fff; }

/* ==========================================================================
   Layout public
   ========================================================================== */

.wb-navbar {
    background: #fff;
    box-shadow: 0 1px 0 rgba(var(--wb-ink-rgb), .06);
}
.wb-navbar .nav-link { color: var(--wb-ink); font-weight: 500; }
.wb-navbar .nav-link:hover, .wb-navbar .nav-link.active { color: var(--wb-primary-dark); }

.wb-hero {
    background: linear-gradient(135deg, var(--wb-primary) 0%, #4FB8B8 45%, var(--wb-sand) 100%);
    color: #fff;
    border-radius: 0 0 var(--wb-radius) var(--wb-radius);
}
.wb-hero h1 { color: #fff; }
.wb-hero-home { min-height: min(calc(100vh - 64px), 820px); min-height: min(calc(100svh - 64px), 820px); }
.wb-hero .opacity-90 { opacity: .9; }
.wb-search { border-radius: var(--wb-radius); }
.wb-suggestions { position: absolute; top: 100%; left: calc(var(--bs-gutter-x) * .5); right: calc(var(--bs-gutter-x) * .5); z-index: 1060; max-height: 320px; overflow-y: auto; margin-top: 4px; }
.wb-suggestions .list-group-item { cursor: pointer; }
.wb-suggestions .list-group-item.active { background: var(--wb-primary-light); color: var(--wb-ink); border-color: transparent; }
.wb-guests input[type=number] { -moz-appearance: textfield; }
.wb-guests input[type=number]::-webkit-inner-spin-button, .wb-guests input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Carte des résultats : marqueur = étiquette de prix */
.wb-map-marker { background: transparent; border: 0; }
.wb-map-price { display: inline-block; transform: translate(-50%, -100%); background: #fff; color: var(--wb-ink); font-weight: 600; font-size: .8rem; white-space: nowrap; padding: 3px 8px; border-radius: 999px; border: 2px solid var(--wb-primary); box-shadow: var(--wb-shadow); }
.wb-map-marker:hover .wb-map-price, .wb-map-marker:focus .wb-map-price { background: var(--wb-primary); color: #fff; }
@media (max-width: 991.98px) { #search-filters .card { box-shadow: none; } }
.wb-why-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.75rem; background: var(--wb-primary-light); color: var(--wb-primary); }

.wb-footer {
    background: var(--wb-ink);
    color: rgba(255, 255, 255, .75);
}
.wb-footer h6,
.wb-footer .h6 {
    color: #fff;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.wb-footer a { color: rgba(255, 255, 255, .75); }
.wb-footer a:hover { color: #fff; }
.wb-footer .wb-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }

/* ==========================================================================
   Layout back-office
   ========================================================================== */

.wb-bo-body { background: var(--wb-sand-light); min-height: 100vh; }

.wb-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    width: var(--wb-sidebar-width);
    background: var(--wb-ink);
    color: rgba(255, 255, 255, .8);
    display: flex;
    flex-direction: column;
    transition: width .2s ease, transform .2s ease;
    overflow-x: hidden;
}
.wb-sidebar-brand {
    height: var(--wb-topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    white-space: nowrap;
}
.wb-sidebar-brand .wb-logo { font-size: 1.3rem; }
.wb-sidebar-brand .wb-logo-short { display: none; }
.wb-sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .75rem; }
.wb-sidebar-heading {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .45);
    padding: 1rem .75rem .35rem;
    white-space: nowrap;
}
.wb-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: rgba(255, 255, 255, .8);
    border-radius: 10px;
    padding: .6rem .75rem;
    white-space: nowrap;
    margin-bottom: 2px;
}
.wb-sidebar .nav-link i { font-size: 1.1rem; width: 1.5rem; text-align: center; flex-shrink: 0; }
.wb-sidebar .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.wb-sidebar .nav-link.active { background: var(--wb-primary-dark); color: #fff; }
.wb-sidebar .nav-link .badge { margin-left: auto; }

.wb-main {
    margin-left: var(--wb-sidebar-width);
    transition: margin-left .2s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.wb-topbar {
    height: var(--wb-topbar-height);
    background: #fff;
    box-shadow: 0 1px 0 rgba(var(--wb-ink-rgb), .06);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.wb-topbar .btn-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.wb-content { padding: 1.5rem; flex: 1; }
.wb-content .breadcrumb { font-size: .875rem; margin-bottom: 1rem; }
.wb-content .breadcrumb a { color: var(--wb-muted); }

/* Sidebar repliée (desktop) : icônes seules */
@media (min-width: 992px) {
    .wb-sidebar-collapsed .wb-sidebar { width: var(--wb-sidebar-collapsed-width); }
    .wb-sidebar-collapsed .wb-main { margin-left: var(--wb-sidebar-collapsed-width); }
    .wb-sidebar-collapsed .wb-sidebar .wb-label,
    .wb-sidebar-collapsed .wb-sidebar .nav-link .badge,
    .wb-sidebar-collapsed .wb-sidebar-heading,
    .wb-sidebar-collapsed .wb-sidebar-brand .wb-logo-full { display: none; }
    .wb-sidebar-collapsed .wb-sidebar-brand { justify-content: center; padding: 0; }
    .wb-sidebar-collapsed .wb-sidebar-brand .wb-logo-short { display: inline; }
    .wb-sidebar-collapsed .wb-sidebar .nav-link { justify-content: center; }
}

/* Mobile : sidebar en tiroir */
.wb-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(var(--wb-ink-rgb), .5);
    z-index: 1035;
}
@media (max-width: 991.98px) {
    .wb-sidebar { transform: translateX(-100%); }
    .wb-main { margin-left: 0; }
    .wb-sidebar-open .wb-sidebar { transform: translateX(0); }
    .wb-sidebar-open .wb-sidebar-backdrop { display: block; }
    .wb-content { padding: 1rem; }
}

/* ==========================================================================
   Composants
   ========================================================================== */

.wb-page-header h1 { font-size: 1.5rem; margin-bottom: .15rem; }

.wb-stat-card .wb-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: var(--wb-primary-light);
    color: var(--wb-primary-dark);
    flex-shrink: 0;
}
.wb-stat-card .wb-stat-value { font-family: var(--wb-font-heading); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.wb-stat-card .wb-stat-label { color: var(--wb-muted); font-size: .875rem; }

.wb-empty-state { padding: 3rem 1rem; text-align: center; }
.wb-empty-state .wb-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--wb-primary-light);
    color: var(--wb-primary);
    margin-bottom: 1rem;
}

.alert { border-radius: var(--wb-radius); border: 0; }

/* Calendrier partenaire : grille jours × types de chambres */
.wb-calendar { border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.wb-calendar th, .wb-calendar td { border-bottom: 1px solid rgba(var(--wb-ink-rgb), .08); border-right: 1px solid rgba(var(--wb-ink-rgb), .06); }
.wb-calendar thead th { position: sticky; top: 0; background: #fff; z-index: 2; text-align: center; font-weight: 500; white-space: nowrap; padding: .35rem .25rem; }
.wb-calendar .wb-cal-room { position: sticky; left: 0; background: #fff; z-index: 3; min-width: 170px; max-width: 200px; padding: .5rem; }
.wb-calendar thead .wb-cal-room { z-index: 4; }
.wb-calendar .wb-cal-weekend { background: var(--wb-sand-light); }
.wb-calendar .wb-cal-today { box-shadow: inset 0 -3px 0 var(--wb-primary); }
.wb-cal-cell { min-width: 58px; height: 56px; padding: .25rem; text-align: center; cursor: pointer; vertical-align: middle; user-select: none; }
.wb-cal-cell:hover { outline: 2px solid var(--wb-primary-light); outline-offset: -2px; }
.wb-cal-cell .wb-cal-price { display: block; font-weight: 600; }
.wb-cal-cell .wb-cal-left { display: block; color: var(--wb-muted); }
.wb-cal-cell.is-seasonal .wb-cal-price { color: #C96E1E; }
.wb-cal-cell.is-full { background: #FDF0E6; }
.wb-cal-cell.is-closed { background: repeating-linear-gradient(45deg, #F4E1E1, #F4E1E1 6px, #FBEFEF 6px, #FBEFEF 12px); color: #9B2C2C; }
.wb-cal-cell.is-past { opacity: .5; cursor: default; }
.wb-cal-cell.is-selected { background: var(--wb-primary-light) !important; outline: 2px solid var(--wb-primary); outline-offset: -2px; }
.wb-cal-cell .wb-cal-flag { position: relative; top: -1px; font-size: .65rem; }

/* Onglets dont les panneaux sont dans un <form> (Bootstrap ne masque que les enfants directs de .tab-content). */
.tab-content > form > .tab-pane { display: none; }
.tab-content > form > .tab-pane.active { display: block; }

/* ------------------------------------------------------------------ Fiche établissement (P18) */
.wb-gallery { display: grid; gap: .5rem; grid-template-columns: 1fr; height: 260px; }
.wb-gallery-item { position: relative; padding: 0; border: 0; overflow: hidden; border-radius: var(--wb-radius); background: var(--wb-sand-light); cursor: zoom-in; }
.wb-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.wb-gallery-item:hover img, .wb-gallery-item:focus-visible img { transform: scale(1.03); }
.wb-gallery-more { position: absolute; right: .75rem; bottom: .75rem; background: rgba(23, 50, 58, .8); color: #fff; font-size: .875rem; padding: .35rem .75rem; border-radius: 999px; }
/* Écran large : grande photo à gauche, vignettes à droite (disposition selon le nombre de photos). */
@media (min-width: 768px) {
    .wb-gallery { height: 420px; }
    .wb-gallery-2 { grid-template-columns: 2fr 1fr; }
    .wb-gallery-3, .wb-gallery-4 { grid-template-columns: 2fr 1fr; }
    .wb-gallery-3 .wb-gallery-main { grid-row: 1 / 3; }
    .wb-gallery-4 .wb-gallery-main { grid-row: 1 / 4; }
    .wb-gallery-5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
    .wb-gallery-5 .wb-gallery-main { grid-row: 1 / 3; }
}
.wb-gallery-full { max-width: 100%; max-height: 78vh; object-fit: contain; }
.wb-property-map { height: 220px; }
.wb-fav-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.wb-fav-btn .bi-heart-fill { color: #d63c55; }
.wb-description { white-space: normal; line-height: 1.7; }
@media (min-width: 992px) {
    .wb-sticky-aside { position: sticky; top: 84px; }
}

/* ------------------------------------------------------------------ Tunnel de réservation (P20) */
.wb-step-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid currentColor; font-weight: 600; flex-shrink: 0; }
.wb-step-number.active { background: var(--wb-primary); border-color: var(--wb-primary); color: #fff; }
.wb-method { border-radius: var(--wb-radius); font-weight: 500; }

/* ------------------------------------------------------------------ Notes en étoiles (P24) */
.wb-stars { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.wb-stars label { font-size: 1.9rem; line-height: 1; color: #D9D2C3; cursor: pointer; transition: color .15s ease, transform .15s ease; }
.wb-stars label:hover, .wb-stars label:hover ~ label,
.wb-stars input:checked ~ label { color: var(--wb-accent); }
.wb-stars input:focus-visible + label { outline: 2px solid var(--wb-primary); outline-offset: 2px; border-radius: 4px; }
.wb-stars label:active { transform: scale(.9); }
.wb-report summary { cursor: pointer; list-style: none; display: inline; }
.wb-report summary::-webkit-details-marker { display: none; }
.wb-report summary:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ Pages de contenu (P31) */
.wb-prose { line-height: 1.75; }
.wb-prose h2 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: .75rem; }
.wb-prose h3 { font-size: 1.1rem; }
.wb-prose ul { padding-left: 1.2rem; }
.wb-prose li { margin-bottom: .35rem; }
.wb-prose .lead { font-size: 1.15rem; }

/* ---------- SEO (P33b) : aperçu du résultat Google dans Admin › SEO ---------- */
.wb-serp { background: #fff; font-family: Arial, Helvetica, sans-serif; max-width: 620px; }
.wb-serp-url { color: #202124; font-size: .85rem; }
.wb-serp-title { color: #1a0dab; font-size: 1.2rem; line-height: 1.3; margin: .15rem 0; overflow-wrap: anywhere; }
.wb-serp-desc { color: #4d5156; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.wb-seo-score { min-width: 2.4rem; }
