/* Catalogue — expérience type sites de réservation (repris du mockup fourni :
   en-tête éditorial, panneau de recherche à cercle décoratif, grille de
   cartes "maison + chambres"). Palette alignée sur tokens.css (teal/ocre) —
   pas de nouvelles couleurs "en dur" : seule la composition change. */

.catalogue-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px calc(5.5rem + 20px);
}

/* ── En-tête éditorial de la page (façon "hero" du mockup) ── */
.catalogue-hero {
    padding: 30px 4px 22px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.catalogue-hero__kicker {
    margin: 0 0 10px;
    color: var(--ocre-deep, var(--ocre));
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
}

.catalogue-hero h1 {
    margin: 0;
    color: var(--deep-teal, var(--ink));
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
    line-height: 1.35;
    font-weight: 800;
}

.catalogue-hero p {
    margin: 10px 0 0;
    max-width: 480px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.catalogue-hero__note {
    max-width: 220px;
    margin: 0;
    padding-inline-end: 14px;
    border-inline-end: 2px solid var(--ocre);
    color: var(--thermal);
    font-size: 11px;
    line-height: 1.9;
}

@media (max-width: 640px) {
    .catalogue-hero {
        display: block;
        padding-top: 20px;
    }

    .catalogue-hero__note {
        max-width: none;
        margin-top: 16px;
        padding-inline-end: 0;
        border-inline-end: 0;
        border-inline-start: 2px solid var(--ocre);
        padding-inline-start: 14px;
    }
}

/* ── Barre de recherche — carte "hero" de la page, cercles décoratifs en coin. ── */
.search-bar {
    position: relative;
    overflow: hidden;
    padding: 26px 26px 22px;
    margin: 4px 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    border: 1px solid rgba(213, 219, 211, 0.85);
    border-radius: var(--radius-lg, 22px);
}

.search-bar::before,
.search-bar::after {
    content: '';
    position: absolute;
    border: 20px solid rgba(232, 214, 175, 0.35);
    border-radius: 50%;
}

.search-bar::before {
    width: 120px;
    height: 120px;
    inset-inline-start: -56px;
    top: -66px;
}

.search-bar::after {
    width: 140px;
    height: 140px;
    inset-inline-end: 6px;
    bottom: -80px;
    border-color: rgba(202, 225, 216, 0.4);
}

.search-bar__row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.search-bar__field,
.filter-chips,
.search-bar__submit {
    position: relative;
}

.search-bar__field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--thermal);
    margin-bottom: 0.4rem;
}

.search-bar__field-box {
    height: 44px;
    padding: 0 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--line, rgba(31, 110, 106, 0.22));
    border-radius: 10px;
    background: rgba(255, 254, 250, 0.85);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-bar__field-box:focus-within {
    border-color: var(--ocre);
    box-shadow: 0 0 0 3px rgba(198, 134, 47, 0.12);
}

.search-bar__field-box svg {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--thermal);
}

.search-bar__field input,
.search-bar__field select {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink);
}

.search-bar__bottom {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.search-bar__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    background: var(--ocre);
    color: #fffaf0;
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 7px 14px rgba(166, 107, 32, 0.18);
    transition: filter 0.15s ease, transform 0.15s ease;
}

.search-bar__submit:hover {
    background: var(--ocre-deep, var(--ocre));
    transform: translateY(-1px);
}

/* ── Résultats : titre + compteur, façon results-head du mockup ── */
.results-head {
    margin-top: 6px;
    padding: 0 4px 16px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.results-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
}

.catalogue-status {
    min-height: 1.2rem;
    color: var(--muted);
    font-size: 12px;
}

/* ── Grille de cartes ── */
.catalogue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem;
}

.tile {
    background: rgba(251, 250, 245, 0.94);
    border: 1px solid #e0e3db;
    border-top: 3px solid var(--deep-teal, var(--ink));
    border-radius: 17px;
    box-shadow: 0 9px 22px rgba(41, 75, 66, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 27px rgba(41, 75, 66, 0.1);
}

.tile--attente { border-top-color: var(--etat-attente-fg); }
.tile--reservee { border-top-color: var(--etat-reservee-fg); }
.tile--indisponible { border-top-color: var(--etat-indisponible-fg); }

.tile__body {
    padding: 17px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.tile__top {
    min-height: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.tile__nom {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    color: var(--deep-teal, var(--ink));
    margin: 0;
}

.tile__type {
    flex: none;
    font-size: 9px;
    font-weight: 700;
    color: var(--ocre-deep, var(--ocre));
    background: rgba(198, 134, 47, 0.1);
    border: 1px solid rgba(198, 134, 47, 0.3);
    border-radius: 999px;
    padding: 4px 9px;
    white-space: nowrap;
}

.tile__meta {
    font-size: 11px;
    color: var(--muted);
    margin: 0;
}

.tile__etat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 9px;
    font-weight: 700;
    width: fit-content;
}

.tile__etat svg {
    width: 14px;
    height: 14px;
    flex: none;
}

.tile--libre .tile__etat {
    color: var(--etat-libre-fg);
    background: var(--etat-libre-bg);
}

.tile--attente .tile__etat {
    color: var(--etat-attente-fg);
    background: var(--etat-attente-bg);
}

.tile--reservee .tile__etat {
    color: var(--etat-reservee-fg);
    background: var(--etat-reservee-bg);
}

.tile--indisponible .tile__etat {
    color: var(--etat-indisponible-fg);
    background: var(--etat-indisponible-bg);
}

.tile__rule {
    margin: 2px 0 0;
    border-top: 1px solid #e5e7df;
}

/* Prix de la carte (type booking : montant + mention période) */
.tile__price {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid #edf0e9;
    font-size: 11px;
}

.tile__price .price__amount {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 17px;
    color: var(--deep-teal, var(--ink));
}

.tile__price .price__currency {
    font-weight: 700;
    color: var(--thermal);
}

.tile__price .price__hint {
    margin-inline-start: 0.35rem;
    color: var(--muted);
}

.catalogue-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    font-size: 12px;
}

/* Sélection */
.tile__select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--thermal);
    min-height: 40px;
    cursor: pointer;
}

.tile__select input {
    width: 18px;
    height: 18px;
    accent-color: var(--thermal);
}

.tile__chambres {
    display: flex;
    flex-direction: column;
    margin-top: 2px;
    border-top: 1px solid #edf0e9;
}

.chambre-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 8px 1px;
    border-bottom: 1px solid #edf0e9;
    font-size: 0.82rem;
}

.chambre-row:last-child {
    border-bottom: none;
}

.chambre-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 28px;
    cursor: pointer;
}

.chambre-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--ocre);
}

.chambre-row__side {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chambre-row__prix {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--thermal);
    white-space: nowrap;
}

.chambre-row__waitlist {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ocre-deep, var(--ocre));
    text-decoration: none;
    padding: 0.15rem 0.55rem;
    border: 1px solid rgba(198, 134, 47, 0.35);
    border-radius: 999px;
    background: rgba(198, 134, 47, 0.08);
    white-space: nowrap;
}

.chambre-row__waitlist:hover {
    background: rgba(198, 134, 47, 0.16);
}

.tile__waitlist {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    color: var(--ocre-deep, var(--ocre));
    background: rgba(198, 134, 47, 0.08);
    border: 1px solid rgba(198, 134, 47, 0.3);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    min-height: 38px;
    justify-content: center;
    margin-top: 0.2rem;
}

.tile__waitlist:hover {
    background: rgba(198, 134, 47, 0.18);
}

.chambre-row .etat-badge {
    font-size: 0.68rem;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-weight: 700;
    white-space: nowrap;
}

.chambre-row .etat-badge--libre { color: var(--etat-libre-fg); background: var(--etat-libre-bg); }
.chambre-row .etat-badge--attente { color: var(--etat-attente-fg); background: var(--etat-attente-bg); }
.chambre-row .etat-badge--reservee { color: var(--etat-reservee-fg); background: var(--etat-reservee-bg); }
.chambre-row .etat-badge--indisponible { color: var(--etat-indisponible-fg); background: var(--etat-indisponible-bg); }

/* ── Barre de sélection collante (compteur + total + CTA) ── */
.selection-bar {
    position: fixed;
    bottom: 1rem;
    inset-inline: 1rem;
    max-width: 1068px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--deep-teal, var(--ink));
    color: var(--vapeur);
    border-radius: 16px;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 12px 32px rgba(16, 75, 77, 0.35);
    z-index: 10;
}

/* [hidden] doit gagner sur `display:flex` ci-dessus : un attribut hidden
   n'est un simple style UA (display:none) qu'en l'absence de règle "auteur"
   plus prioritaire — sans ce contre-sélecteur, la barre resterait visible en
   permanence même à 0 sélection (bug constaté à la vérification visuelle). */
.selection-bar[hidden] {
    display: none;
}

.selection-bar__info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.9rem;
}

.selection-bar__total {
    font-weight: 800;
    font-size: 1.05rem;
    color: #e8c98a;
}

.selection-bar .btn.selection-bar__cta {
    width: auto;
    min-width: 170px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    background: var(--ocre);
    /* Texte foncé : blanc sur ocre ne tient que 3.06:1 (sous le seuil AA 4.5). */
    color: var(--ink);
}

/* ── Chips de filtres (type, état) — pastilles pleine largeur sous la barre de
   recherche, sélection multiple par facette, aucune sélection = pas de
   restriction. Checkbox native masquée sous le chip entier : le clic et le
   clavier (Tab + Espace) restent nativement accessibles. */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.2rem;
}

.filter-chips__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.filter-chips__label {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    margin-inline-end: 0.1rem;
}

.chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 33px;
    padding: 0 0.85rem;
    border: 1px solid #ccd9d3;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: var(--thermal);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
    border-color: var(--ocre);
    color: var(--ocre-deep, var(--ocre));
}

.chip input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

/* Coché : jamais la couleur seule (contexte déjà porté par le texte du chip
   lui-même, qui reste lisible dans les deux états — pas d'info perdue). */
.chip:has(input:checked) {
    background: var(--deep-teal, var(--ink));
    border-color: var(--deep-teal, var(--ink));
    color: #f7f0df;
}

.chip:has(input:focus-visible) {
    outline: 3px solid var(--ocre);
    outline-offset: 2px;
}

.filter-chips__clear {
    background: none;
    border: none;
    min-height: 33px;
    padding: 0.4rem 0;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 640px) {
    .search-bar {
        padding: 20px 16px 18px;
        border-radius: 16px;
    }

    .search-bar__bottom {
        display: block;
    }

    .filter-chips {
        padding-bottom: 12px;
    }

    .search-bar__submit {
        width: 100%;
        margin-top: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tile,
    .search-bar__submit,
    .chip {
        transition: none;
    }

    .tile:hover {
        transform: none;
    }
}
