/**
 * Styles frontend - RH WooCommerce Séjours
 *
 * @package RHWooCommerceSejours
 */


/* Bouton réserver : annule le float WooCommerce pour rester dans son conteneur */
.woocommerce div.product form.cart .button {
    float: none;
    width: 100%;
}

/* Galerie produit WC : espace entre image principale et thumbnails */
.woocommerce div.product div.images .flex-control-thumbs {
    margin-top: 10px;
}
.woocommerce div.product div.images .flex-control-thumbs li {
    padding: 0 10px 4px 0;
}

/* =====================================================
   Galerie mosaïque séjour
   ===================================================== */
.rhws-gallery {
    margin-bottom: 30px;
}

.rhws-gallery-grid {
    display: grid;
    gap: 6px;
    border-radius: 12px;
    overflow: hidden;
}

/* 1 seule image */
.rhws-gallery-grid--1 {
    grid-template-columns: 1fr;
}

/* 2 images : 1 grande + 1 petite */
.rhws-gallery-grid--2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 360px;
}

/* 3 images : 1 grande à gauche, 2 petites à droite */
.rhws-gallery-grid--3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 180px 180px;
}
.rhws-gallery-grid--3 .rhws-gallery-item--hero {
    grid-row: 1 / 3;
}

/* 4 images : 1 grande à gauche, 3 petites (pas assez pour +N) */
.rhws-gallery-grid--4 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 120px 120px 120px;
}
.rhws-gallery-grid--4 .rhws-gallery-item--hero {
    grid-row: 1 / 4;
}

/* 5 images (cas nominal) : 1 grande en haut, 4 petites en grille 2×2 */
.rhws-gallery-grid--5 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 360px 200px;
}
.rhws-gallery-grid--5 .rhws-gallery-item--hero {
    grid-column: 1 / 3;
}

.rhws-gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
    min-height: 0;
}

.rhws-gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block;
    max-height: none !important;
    transition: transform 0.3s ease;
}

.rhws-gallery-item:hover img {
    transform: scale(1.03);
}

/* Overlay "+ X photos" */
.rhws-gallery-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Responsive mobile : grille empilée */
@media (max-width: 600px) {
    .rhws-gallery-grid--5 {
        grid-template-rows: 240px 140px;
    }

    .rhws-gallery-grid--3,
    .rhws-gallery-grid--4 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 140px;
    }
    .rhws-gallery-grid--3 .rhws-gallery-item--hero,
    .rhws-gallery-grid--4 .rhws-gallery-item--hero {
        grid-column: 1 / 3;
        grid-row: auto;
    }
}

/* =====================================================
   Lightbox galerie
   ===================================================== */
.rhws-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.rhws-lightbox--open {
    display: flex;
}

.rhws-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.rhws-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rhws-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
}

.rhws-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.rhws-lightbox-close:hover { opacity: 1; }

.rhws-lightbox-prev,
.rhws-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 50%;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
}
.rhws-lightbox-prev:hover,
.rhws-lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}
.rhws-lightbox-prev { left: 16px; }
.rhws-lightbox-next { right: 16px; }

.rhws-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 15px;
    opacity: 0.8;
    z-index: 2;
}

/* =====================================================
   Vendor Enquiry (renseignements vendeur)
   ===================================================== */
.rhws-vendor-enquiry__empty-msg {
    color: #666;
    font-style: italic;
    margin: 0 0 16px;
}

.rhws-vendor-enquiry__list {
    margin-bottom: 20px;
}

.rhws-vendor-enquiry__item {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.rhws-vendor-enquiry__item:last-child {
    border-bottom: none;
}

.rhws-vendor-enquiry__meta {
    font-size: 13px;
    color: #999;
    font-weight: normal;
}

.rhws-vendor-enquiry__reply {
    margin-top: 8px;
    padding-left: 16px;
    border-left: 3px solid #C15618;
    color: #333;
}

.rhws-vendor-enquiry__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #C15618;
    color: #fff !important;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.rhws-vendor-enquiry__btn:hover {
    background: #9b3f0a;
}

.rhws-vendor-enquiry__btn .wcfmfa {
    font-size: 16px;
}

/* =====================================================
   Vendor Link (lien vers la boutique)
   ===================================================== */
.rhws-vendor-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: inherit !important;
    padding: 10px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.rhws-vendor-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.rhws-vendor-link__avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0;
}

.rhws-vendor-link__info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.rhws-vendor-link__label {
    font-size: 12px;
    color: #888;
}

.rhws-vendor-link__name {
    font-weight: 600;
    font-size: 15px;
    color: #C15618;
}

/* Section hébergements */
.rhws-hebergements-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.rhws-section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1d2327;
}

/* Carte */
.rhws-map {
    height: 350px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    z-index: 1;
}

/* Marqueurs personnalisés */
.rhws-marker-pin {
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -18px 0 0 -12px;
}

.rhws-marker-sejour {
    background: #3A1A0A;
    border: 2px solid #291105;
    width: 28px;
    height: 28px;
    margin: -20px 0 0 -14px;
}

.rhws-marker-heb {
    background: #C15618;
    border: 2px solid #9b3f0a;
}

.rhws-marker-pin::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.rhws-sejour-marker,
.rhws-heb-marker {
    background: transparent !important;
    border: none !important;
}

/* Popups carte */
.rhws-map-popup {
    text-align: center;
    width: 150px;
}

.leaflet-popup-content {
    margin: 8px !important;
    width: 150px !important;
}

.rhws-map-popup img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
}

.rhws-map-popup h4 {
    margin: 0 0 4px;
    font-size: 13px;
}

.rhws-map-popup h4 a {
    color: #1d2327;
    text-decoration: none;
}

.rhws-map-popup h4 a:hover {
    color: #C15618;
}

.rhws-map-distance {
    font-size: 12px;
    color: #666;
}

.rhws-map-price {
    color: #C15618;
    font-weight: 600;
    font-size: 13px;
}

/* Grille hébergements */
.rhws-hebergements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Carte hébergement */
.rhws-hebergement-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rhws-hebergement-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.rhws-hebergement-card.rhws-card-highlight {
    box-shadow: 0 0 0 3px #C15618;
    transform: translateY(-2px);
}

.rhws-card-image {
    display: block;
    overflow: hidden;
}

.rhws-card-image img {
    width: 100% !important;
    height: 160px !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.3s ease;
}

.rhws-hebergement-card:hover .rhws-card-image img {
    transform: scale(1.05);
}

.rhws-card-body {
    padding: 14px;
}

.rhws-card-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.rhws-card-title a {
    color: #1d2327;
    text-decoration: none;
}

.rhws-card-title a:hover {
    color: #2e7d32;
}

.rhws-card-city {
    display: inline-block;
    font-size: 12px;
    color: #666;
    margin-right: 8px;
}

.rhws-card-distance {
    display: inline-block;
    font-size: 12px;
    color: #C15618;
    font-weight: 600;
}

.rhws-card-badge-linked {
    display: inline-block;
    font-size: 11px;
    background: #2e7d32;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
}

.rhws-card-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #888;
    margin: 8px 0;
}

.rhws-card-price {
    margin: 8px 0;
}

.rhws-card-price strong {
    font-size: 16px;
    color: #2e7d32;
}

.rhws-card-price span {
    font-size: 12px;
    color: #888;
}

.rhws-card-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: #C15618;
    text-decoration: none;
    font-weight: 600;
}

.rhws-card-link:hover {
    color: #9b3f0a;
    text-decoration: underline;
}

/* Sessions dans les cards séjour */
.rhws-card-session {
    margin: 8px 0 4px;
    padding: 8px 10px;
    background: #f0f7ff;
    border-left: 3px solid #C15618;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

.rhws-card-session-label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rhws-card-session strong {
    color: #333;
}

.rhws-card-session-dates {
    display: block;
    font-weight: 500;
    color: #333;
    margin-top: 2px;
}

.rhws-card-session-places {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: #d4edda;
    color: #155724;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.rhws-card-session-full {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.rhws-card-sessions-count {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #888;
    font-style: italic;
}

/* Champs dynamiques selon type */
.rhws-search-field[data-for-type] {
    transition: opacity 0.2s, max-height 0.2s;
}

/* Reset global Leaflet tiles — éviter bordures/grilles imposées par le thème */
.leaflet-tile-pane img {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Reset Leaflet pour compatibilité thème */
.rhws-map .leaflet-control a::before,
.rhws-map .leaflet-control a::after {
    display: none !important;
    content: none !important;
}

.rhws-map .leaflet-control-zoom.leaflet-bar a {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #333 !important;
    background: #fff !important;
    text-shadow: none !important;
    overflow: hidden !important;
    padding: 0 !important;
}

/* ============================================
   Carte générale [rhws_general_map]
   ============================================ */

/* Forcer la largeur sur toute la chaîne de conteneurs */
.rhws-general-map-section,
.rhws-gmap-content,
.rhws-gmap-map-wrap {
    width: 100%;
    box-sizing: border-box;
    display: block;
}

/* Container carte */
.rhws-general-map {
    width: 100%;
    box-sizing: border-box;
    height: 500px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    z-index: 1;
}

/* Légende interactive */
.rhws-gmap-legend {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 18px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
}

.rhws-gmap-legend label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #1d2327;
}

.rhws-gmap-legend input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.rhws-legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rhws-legend-dot-sejour {
    background: #451d14;
    border: 2px solid #451409;
}

.rhws-legend-dot-logement {
    background: #C15618;
    border: 2px solid #C15618;
}

/* Badges popup */
.rhws-popup-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    margin-bottom: 4px;
}

.rhws-popup-badge-sejour {
    background: #451d14;
}

.rhws-popup-badge-logement {
    background: #C15618;
}

.rhws-map-city {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

/* Layout horizontal (carte + liste côte à côte) */
.rhws-layout-horizontal {
    box-sizing: border-box;
}

.rhws-layout-horizontal .rhws-gmap-content {
    display: flex;
    gap: 20px;
    align-items: stretch;
    height: 80vh;
    box-sizing: border-box;
}

.rhws-layout-horizontal .rhws-gmap-map-wrap {
    flex: 1 1 50%;
    min-width: 0;
}

.rhws-layout-horizontal .rhws-gmap-map-wrap .rhws-general-map {
    height: 100% !important;
    min-height: 400px;
}

.rhws-layout-horizontal .rhws-gmap-list-wrap {
    flex: 1 1 50%;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.rhws-layout-horizontal .rhws-gmap-grid {
    margin-top: 0;
}

@media (max-width: 992px) {
    .rhws-layout-horizontal .rhws-gmap-content {
        flex-direction: column;
        height: auto;
    }
    .rhws-layout-horizontal .rhws-gmap-map-wrap {
        position: static;
    }
    .rhws-layout-horizontal .rhws-gmap-map-wrap .rhws-general-map {
        height: 300px !important;
        min-height: unset;
    }
    .rhws-layout-horizontal .rhws-gmap-list-wrap {
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        overflow-x: hidden;
    }
    .rhws-layout-horizontal .rhws-gmap-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .rhws-layout-horizontal .rhws-gmap-grid {
        grid-template-columns: 1fr !important;
    }
    .rhws-layout-horizontal .rhws-gmap-map-wrap .rhws-general-map {
        height: 300px !important;
    }
}

/* Grille de cartes */
.rhws-gmap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.rhws-gmap-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rhws-gmap-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.rhws-gmap-card.rhws-card-highlight {
    box-shadow: 0 0 0 3px #f1bfa2;
    transform: translateY(-2px);
}

.rhws-gmap-card:hover .rhws-card-image img {
    transform: scale(1.05);
}

/* Badge type sur carte */
.rhws-card-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    margin-bottom: 6px;
}

.rhws-card-type-sejour {
    background: #451d14;
}

.rhws-card-type-logement {
    background: #C15618;
}

/* Overlay geste tactile mobile */
.rhws-gesture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.rhws-gesture-overlay span {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    pointer-events: none;
}

.rhws-gesture-overlay.rhws-gesture-visible {
    opacity: 1;
}

/* Fix conflits thème WordPress sur les images Leaflet */
.leaflet-container img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    width: 256px !important;
    height: 256px !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.leaflet-container img {
    max-width: none;
    max-height: none;
}

/* Reset Leaflet carte générale */
.rhws-general-map .leaflet-control a::before,
.rhws-general-map .leaflet-control a::after {
    display: none !important;
    content: none !important;
}

.rhws-general-map .leaflet-control-zoom.leaflet-bar a {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #333 !important;
    background: #fff !important;
    text-shadow: none !important;
    overflow: hidden !important;
    padding: 0 !important;
}

/* Bouton agrandir carte */
.rhws-map-expand-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s;
}

.rhws-map-expand-btn:hover {
    background: #f4f4f4;
}

/* Carte en plein écran */
.rhws-map-expanded {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    flex: none !important;
}

/* Le wrapper ne doit pas clipper le plein écran */
.rhws-gmap-map-wrap:has(.rhws-map-expanded),
.rhws-gmap-content:has(.rhws-map-expanded) {
    overflow: visible !important;
    position: static !important;
    z-index: 99999 !important;
}

/* Empêcher le scroll body en plein écran */
body.rhws-map-fullscreen-active {
    overflow: hidden !important;
}

/* Décalage barre admin WP en plein écran */
.admin-bar .rhws-map-expanded {
    top: 32px !important;
    height: calc(100vh - 32px) !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .rhws-map-expanded {
        top: 46px !important;
        height: calc(100vh - 46px) !important;
    }
}

/* Fullscreen natif (API Fullscreen) */
:-webkit-full-screen .rhws-general-map,
:-webkit-full-screen .rhws-map,
:fullscreen .rhws-general-map,
:fullscreen .rhws-map {
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 99999 !important;
}

/* Responsive */
@media (max-width: 992px) {
    .rhws-hebergements-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .rhws-gmap-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .rhws-hebergements-grid {
        grid-template-columns: 1fr !important;
    }

    .rhws-gmap-grid {
        grid-template-columns: 1fr !important;
    }

    .rhws-map {
        height: 250px;
    }

    .rhws-general-map {
        height: 300px !important;
    }

    /* Garantir que le wrapper carte a une hauteur visible sur mobile */
    .rhws-gmap-map-wrap {
        min-height: 300px;
    }

    /* Images de cartes plus grandes sur mobile */
    .rhws-card-image img,
    .rhws-gmap-card .rhws-card-image img {
        height: 250px !important;
    }

    .rhws-gmap-legend {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .rhws-section-title {
        font-size: 20px;
    }
}

/* ============================================
   Formulaire de recherche [rhws_search_form]
   ============================================ */

.rhws-search-section {
    position: relative;
    margin-bottom: 25px;
}

.rhws-search-form {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.rhws-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.rhws-search-field {
    flex: 1 1 140px;
    min-width: 0;
    max-width: 250px;
}

.rhws-search-field-half {
    flex: 0 1 100px;
    min-width: 0;
}

.rhws-search-field label {
    font-family: "Poppins", Sans-serif;
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 10px;
}

.rhws-search-field input,
.rhws-search-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #1d2327;
    box-sizing: border-box;
}

.rhws-search-field input:focus,
.rhws-search-field select:focus {
    border-color: #2e7d32;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15);
}

.rhws-search-field-sejour,
.rhws-search-field-logement {
    flex: 0 1 90px;
    min-width: 0;
}

.rhws-search-field-type {
    flex: 0 1 110px;
    min-width: 0;
}

.rhws-search-field-submit {
    flex: 0 0 auto;
    min-width: auto;
}

.rhws-search-button {
    display: inline-block;
    padding: 9px 24px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.rhws-search-button:hover {
    background: #256428;
}

/* Overlay loading */
.rhws-search-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    border-radius: 8px;
    z-index: 10;
}

.rhws-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #2e7d32;
    border-radius: 50%;
    animation: rhws-spin 0.7s linear infinite;
}

@keyframes rhws-spin {
    to { transform: rotate(360deg); }
}

/* Bouton toggle filtres (mobile uniquement) */
.rhws-search-toggle {
    display: none;
    width: 100%;
    padding: 8px 20px !important;
    background: #CA7847;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    margin-bottom: 8px;
}

button.rhws-search-toggle.rhws-collapsed {
    border-radius: 50px;
    width: 50%;
    border-color: #000;
    color: #000;
}

.rhws-search-toggle-badge {
    display: inline-block;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 12px;
    margin-left: 6px;
    vertical-align: middle;
}

.rhws-search-toggle-arrow {
    float: right;
    transition: transform 0.2s;
}

.rhws-search-toggle.is-open .rhws-search-toggle-arrow {
    transform: rotate(180deg);
}

/* Collapse mobile */
.rhws-search-form.rhws-collapsed .rhws-search-row {
    display: none;
}

@media (max-width: 768px) {
    .rhws-search-toggle {
        display: block;
    }

    .rhws-search-form {
        padding: 0;
        background: none;
        border: none;
    }

    .rhws-search-form:not(.rhws-collapsed) .rhws-search-row {
        background: #f8f9fa;
        border: 1px solid #e0e0e0;
        border-radius: 0 0 8px 8px;
        padding: 16px;
        gap: 12px;
    }

    .rhws-search-field {
        flex: 1 1 100%;
    }

    .rhws-search-field-half,
    .rhws-search-field-sejour,
    .rhws-search-field-logement,
    .rhws-search-field-type {
        flex: 1 1 calc(50% - 6px);
    }

    .rhws-search-field-submit {
        flex: 1 1 100%;
    }

    .rhws-search-button {
        width: 100%;
        padding: 13px;
        font-size: 16px;
    }
}

/* Résultats standalone */
.rhws-search-results {
    margin-top: 20px;
}

.rhws-search-results-count {
    font-size: 14px;
    color: #555;
    margin-bottom: 14px;
    font-weight: 500;
}

.rhws-search-no-results {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    font-size: 15px;
}

/* Compteurs légende */
.rhws-legend-count {
    font-weight: 700;
}

/* ============================================
   Sélecteur de sessions sur la fiche produit
   ============================================ */

.rhws-sessions-selector {
    margin: 20px 0;
    padding: 0;
}

.rhws-sessions-selector h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1d2327;
}

.rhws-sessions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rhws-sessions-list .rhws-session-option {
    flex: 0 1 calc(33.333% - 7px);
    min-width: 180px;
    box-sizing: border-box;
}

.rhws-session-option {
    display: block;
    cursor: pointer;
    position: relative;
    
}

.rhws-session-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rhws-session-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-left: 4px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
}

.rhws-session-option:hover .rhws-session-card {
    border-color: #bbb;
    border-left-color: #bbb;
    background: #fafafa;
}

.rhws-session-option.rhws-session-selected .rhws-session-card,
.rhws-session-option input[type="radio"]:checked ~ .rhws-session-card {
    border-color: #2e7d32;
    border-left-color: #2e7d32;
    border-left-width: 4px;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.12);
    background: #f5faf5;
}

.rhws-session-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rhws-session-label {
    font-weight: 600;
    font-size: 15px;
    color: #1d2327;
}

.rhws-session-price {
    font-weight: 700;
    font-size: 16px;
    color: #2e7d32;
}

.rhws-session-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.rhws-session-dates {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #555;
}

.rhws-session-dates svg {
    flex-shrink: 0;
    color: #888;
}

.rhws-session-days {
    color: #888;
    font-size: 12px;
}

.rhws-session-places {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}

.rhws-session-places svg {
    flex-shrink: 0;
}

p.rhws-no-session-notice {
    margin-top: .7rem;
}

/* Formulaire ajout panier — layout horizontal quantité + bouton */
form.cart:has(.rhws-sessions-selector) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 14px;
}

form.cart:has(.rhws-sessions-selector) .rhws-sessions-selector {
    flex: 0 0 100%;
}

form.cart:has(.rhws-sessions-selector) .rhws-quantity-label {
    flex: 0 0 100%;
    font-size: 14px;
    font-weight: 600;
    margin: 4px 0 -8px;
}

form.cart:has(.rhws-sessions-selector) .quantity {
    width: auto !important;
    margin: 0 !important;
}

form.cart:has(.rhws-sessions-selector) .quantity input[type="number"] {
    width: 72px !important;
    padding: 9px 10px !important;
    text-align: center;
    font-size: 15px;
    box-sizing: border-box;
}

form.cart:has(.rhws-sessions-selector) .single_add_to_cart_button {
    flex: 1 1 0;
    max-width: 320px;
    padding: 14px 24px;
    box-sizing: border-box;
}

/* Label "Nb de personnes" — fallback hors form.cart */
.rhws-quantity-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin: 16px 0 6px;
}

/* ============================================
   Séjours liés sur la page logement (compact)
   ============================================ */

.rhws-linked-sejours {
    margin-top: 30px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.rhws-linked-sejours-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1d2327;
}

.rhws-linked-sejours-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rhws-linked-sejour-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rhws-linked-sejour-item:hover {
    border-color: #2e7d32;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.rhws-linked-sejour-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.rhws-linked-sejour-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rhws-linked-sejour-name {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rhws-linked-sejour-session {
    font-size: 12px;
    color: #888;
}

.rhws-linked-sejour-price {
    font-weight: 700;
    font-size: 15px;
    color: #2e7d32;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================
   Suggestions logements dans panier/checkout
   ============================================ */

.rhws-cart-suggestions {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.rhws-suggestions-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    color: #1d2327;
}

.rhws-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.rhws-suggestion-card {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rhws-suggestion-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.rhws-suggestion-card-image {
    overflow: hidden;
}

.rhws-suggestion-card-image img {
    width: 100% !important;
    height: 120px !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.3s ease;
}

.rhws-suggestion-card:hover .rhws-suggestion-card-image img {
    transform: scale(1.05);
}

.rhws-suggestion-card-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rhws-suggestion-card-name {
    font-weight: 600;
    font-size: 13px;
    color: #1d2327;
    line-height: 1.3;
}

.rhws-suggestion-card-details {
    font-size: 11px;
    color: #888;
}

.rhws-suggestion-card-price {
    font-weight: 700;
    font-size: 14px;
    color: #2e7d32;
    margin-top: 2px;
}

.rhws-suggestion-card-price small {
    font-weight: 400;
    font-size: 11px;
    color: #888;
}

/* ============================================
   Shortcode [rhws_linked_sejours] — cartes grille
   ============================================ */

.rhws-linked-sejours-section {
    margin: 30px 0;
}

.rhws-linked-sejours-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #1d2327;
}

.rhws-linked-sejours-grid {
    display: grid;
    gap: 16px;
}

.rhws-sejour-card {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rhws-sejour-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.rhws-sejour-card-image {
    overflow: hidden;
}

.rhws-sejour-card-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.rhws-sejour-card:hover .rhws-sejour-card-image img {
    transform: scale(1.05);
}

.rhws-sejour-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rhws-sejour-card-name {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.3;
}

.rhws-sejour-card-session {
    font-size: 12px;
    color: #888;
}

.rhws-sejour-card-price {
    font-weight: 700;
    font-size: 15px;
    color: #2e7d32;
    margin-top: 2px;
}

@media (max-width: 600px) {
    .rhws-linked-sejours-grid {
        grid-template-columns: 1fr !important;
    }
    .rhws-suggestions-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Responsive sessions */
@media (max-width: 768px) {
    .rhws-sessions-list .rhws-session-option {
        flex: 0 1 calc(50% - 5px);
    }
}

@media (max-width: 600px) {
    .rhws-sessions-list {
        flex-direction: column;
    }
    .rhws-sessions-list .rhws-session-option {
        flex: 0 1 100%;
    }
    .rhws-session-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .rhws-session-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Responsive séjours liés compacts */
@media (max-width: 600px) {
    .rhws-linked-sejours {
        max-width: 100%;
        padding: 12px;
    }
    .rhws-linked-sejour-thumb {
        width: 48px;
        height: 36px;
    }
}

/* Responsive recherche */
@media (max-width: 768px) {
    .rhws-search-row {
        flex-direction: column;
        gap: 10px;
    }

    .rhws-search-field,
    .rhws-search-field-half {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .rhws-search-field-submit {
        flex: 1 1 100%;
    }

    .rhws-search-button {
        width: 100%;
        text-align: center;
    }
}

/* Acompte / dépôt sur les cartes session */
.rhws-session-deposit {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #e0e0e0;
}

.rhws-session-deposit.rhws-full-payment {
    color: #9da5ae;
    font-weight: 600;
}

/* Session complète */
.rhws-session-sold-out {
    opacity: 0.5;
    pointer-events: none;
}

.rhws-session-sold-out .rhws-session-card {
    border-color: #ccc !important;
    background: #f5f5f5 !important;
}

.rhws-session-places.rhws-sold-out {
    color: #c00;
    font-weight: 600;
}

/* Notice solde (page remerciement + Mon Compte) */
.rhws-balance-notice {
    margin: 20px 0;
    padding: 16px 20px;
    border-radius: 6px;
}

.rhws-balance-notice h3 {
    margin: 0 0 8px;
    font-size: 1.1em;
}

.rhws-balance-notice p {
    margin: 0 0 10px;
}

.rhws-balance-notice p:last-child {
    margin-bottom: 0;
}

.rhws-balance-pending {
    background: #fff8e1;
    border-left: 4px solid #ff9800;
}

.rhws-balance-paid {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

/* ============================================
   Emplacements / Itinéraire (fiche produit)
   ============================================ */

.rhws-emplacements-section {
    position: relative;
}

.rhws-emplacements-map {
    width: 100% !important;
    height: 400px;
    min-height: 300px;
}

/* Leaflet tiles : forcer le rendu complet, sans bordures parasites */
.rhws-emplacements-map .leaflet-tile-pane {
    width: 100% !important;
    height: 100% !important;
}

.rhws-emplacements-map img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Marqueur numéroté frontend */
.rhws-emp-marker {
    background: transparent !important;
    border: none !important;
}

.rhws-emp-marker-pin {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3A1A0A;
    border: 2px solid #291105;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Reset pointer-events Leaflet — le thème/Elementor peut les écraser */
.rhws-emplacements-map .leaflet-popup-pane,
.rhws-emplacements-map .leaflet-tooltip-pane,
.rhws-emplacements-map .leaflet-shadow-pane,
.rhws-emplacements-map .leaflet-overlay-pane {
    pointer-events: none !important;
}

.rhws-emplacements-map .leaflet-marker-pane {
    pointer-events: auto !important;
}

.rhws-emplacements-map .leaflet-popup {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.rhws-emplacements-map .leaflet-popup .leaflet-popup-content-wrapper {
    background: #fff !important;
    color: #333 !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.25) !important;
    padding: 14px 16px !important;
    margin-bottom: 0 !important;
}

.rhws-emplacements-map .leaflet-popup .leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
    min-width: 160px !important;
    max-width: 260px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #333 !important;
}

.rhws-emplacements-map .leaflet-popup .leaflet-popup-tip-container {
    margin-top: -1px !important;
}

.rhws-emp-popup-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    padding-right: 14px;
    color: #222;
}

.rhws-emp-popup-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3A1A0A;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-right: 4px;
    vertical-align: middle;
}

.rhws-emp-popup-desc {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    border-top: 1px solid #eee;
    padding-top: 4px;
    margin-top: 2px;
}

.rhws-emplacements-map .leaflet-popup-tip {
    background: #fff !important;
}

.rhws-emplacements-map .leaflet-popup-close-button {
    color: #999 !important;
    font-size: 20px !important;
    top: 2px !important;
    right: 4px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    text-align: center !important;
    padding: 0 !important;
    pointer-events: auto !important;
}

/* Section emplacements — pas de overflow:hidden pour ne pas clipper les popups Leaflet */
.rhws-emplacements-section {
    position: relative;
}

.rhws-emplacements-map {
    position: relative;
}

/* Marqueur interactif — curseur pointer */
.rhws-emplacements-map .leaflet-marker-icon {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Reset Leaflet pour la carte emplacements */
.rhws-emplacements-map .leaflet-control a::before,
.rhws-emplacements-map .leaflet-control a::after {
    display: none !important;
    content: none !important;
}

.rhws-emplacements-map .leaflet-control-zoom.leaflet-bar a {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #333 !important;
    background: #fff !important;
    text-shadow: none !important;
    overflow: hidden !important;
    padding: 0 !important;
}

/* Liste des étapes sous la carte */
.rhws-emplacements-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 16px;
}

.rhws-emplacement-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-left: 3px solid #3A1A0A;
    background: #fff;
    transition: background 0.2s ease;
    cursor: pointer;
}

.rhws-emplacement-step:hover {
    background: #fef5f4;
}

.rhws-emplacement-step:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.rhws-emplacement-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #3A1A0A;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.rhws-emplacement-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rhws-emplacement-name {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
}

.rhws-emplacement-desc {
    font-size: 12px;
    color: #888;
}

/* Layout horizontal : carte à gauche, étapes à droite */
.rhws-emplacements-content {
    display: block;
}

.rhws-emplacements-horizontal .rhws-emplacements-content {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.rhws-emplacements-horizontal .rhws-emplacements-map-wrap {
    flex: 1 1 55%;
    min-width: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.rhws-emplacements-horizontal .rhws-emplacements-list-wrap {
    flex: 1 1 45%;
    min-width: 0;
    max-height: 500px;
    overflow-y: auto;
}

.rhws-emplacements-horizontal .rhws-emplacements-list {
    margin-top: 0;
}

@media (max-width: 768px) {
    .rhws-emplacements-horizontal .rhws-emplacements-content {
        flex-direction: column;
    }

    .rhws-emplacements-horizontal .rhws-emplacements-map-wrap {
        position: relative;
        top: 0;
        align-self: stretch;
        width: 100%;
    }

    .rhws-emplacements-horizontal .rhws-emplacements-list-wrap {
        max-height: none;
    }
}

@media (max-width: 600px) {
    .rhws-emplacements-map {
        height: 280px;
    }

    .rhws-emplacement-step {
        padding: 10px 12px;
        gap: 10px;
    }
}

/* Responsive [rhws_linked_sejours] — écrase l'inline style columns */
@media (max-width: 992px) {
    .rhws-linked-sejours-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .rhws-linked-sejours-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ─────────────────────────────────────────────────────────────────
   Wishlist (favoris)
   ───────────────────────────────────────────────────────────────── */

/* Bouton coeur — fiche produit */
.rhws-wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: #888;
    padding: 0;
    line-height: 1;
}

.rhws-wishlist-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.rhws-wishlist-btn.rhws-wishlist-active {
    color: #e25555;
}

.rhws-wishlist-btn.rhws-wishlist-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Positionner le bouton par rapport au formulaire add-to-cart */
.woocommerce div.product form.cart {
    position: relative;
}

/* Bouton coeur dans la boucle WC (archives) + cartes carte générale */
.woocommerce ul.products li.product,
.rhws-gmap-card {
    position: relative;
}

.woocommerce ul.products li.product .rhws-wishlist-btn,
.rhws-gmap-card .rhws-wishlist-btn,
button.rhws-wishlist-btn {
    top: 8px !important;
    right: 8px !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5)) !important;
}

button.rhws-wishlist-btn.rhws-wishlist-active {
    color: #fff !important;
}

button.rhws-wishlist-btn.rhws-wishlist-active .rhws-heart-icon {
    fill: currentColor !important;
}

.woocommerce ul.products li.product .rhws-wishlist-btn .rhws-heart-icon,
.rhws-gmap-card .rhws-wishlist-btn .rhws-heart-icon,
button.rhws-wishlist-btn .rhws-heart-icon {
    width: 20px !important;
    height: 20px !important;
}

/* Toast notification */
.rhws-wishlist-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.rhws-wishlist-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Shortcode [rhws_wishlist] — grille de cartes ── */

.rhws-wishlist-grid {
    display: grid;
    gap: 20px;
}

.rhws-wishlist-cols-1 { grid-template-columns: 1fr; }
.rhws-wishlist-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rhws-wishlist-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rhws-wishlist-cols-4 { grid-template-columns: repeat(4, 1fr); }

.rhws-wishlist-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rhws-wishlist-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

.rhws-wishlist-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.rhws-wishlist-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.rhws-wishlist-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rhws-wishlist-card:hover .rhws-wishlist-card-image img {
    transform: scale(1.05);
}

.rhws-wishlist-card-type {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
}

.rhws-wishlist-card-type-sejour {
    background: rgba(58, 26, 10, 0.85);
}

.rhws-wishlist-card-type-hebergement {
    background: rgba(193, 86, 24, 0.85);
}

.rhws-wishlist-card-body {
    padding: 14px 16px 16px;
}

.rhws-wishlist-card-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #1d2327;
}

.rhws-wishlist-card-city {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.rhws-wishlist-card-city svg {
    flex-shrink: 0;
}

.rhws-wishlist-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}

.rhws-wishlist-card-price small {
    font-size: 12px;
    font-weight: 400;
    color: #888;
}

/* Bouton retirer sur les cartes wishlist */
.rhws-wishlist-card-remove {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Message vide / login */
.rhws-wishlist-empty,
.rhws-wishlist-login {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 15px;
}

.rhws-wishlist-login a {
    color: #C15618;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .rhws-wishlist-cols-3,
    .rhws-wishlist-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .rhws-wishlist-cols-2,
    .rhws-wishlist-cols-3,
    .rhws-wishlist-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Niveau / Difficulté ([rhws_niveau])
   ===================================================== */
.rhws-niveau {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rhws-niveau__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rhws-niveau__icon {
    font-size: 1.1em;
}

.rhws-niveau__type {
    font-weight: 600;
}

.rhws-niveau__separator {
    color: #888;
}

.rhws-niveau__label {
    color: #c15718;
    font-weight: 500;
    cursor: default;
}

.rhws-niveau__bar {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.rhws-niveau__bar-segment {
    width: 28px;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    transition: background 0.2s;
}

.rhws-niveau__bar-segment--active {
    background: #c15718;
}

.rhws-niveau__age {
    margin-top: 4px;
}

.rhws-niveau__age-label {
    color: #888;
    margin-right: 8px;
}

.rhws-niveau__age-value {
    font-weight: 500;
}

/* =====================================================
   Détails du prix ([rhws_price_details])
   ===================================================== */
.rhws-price-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rhws-price-details__title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 12px;
}

.rhws-price-details__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rhws-price-details__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.rhws-price-details__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.rhws-price-details__icon--check {
    color: #22c55e;
}

.rhws-price-details__icon--cross {
    color: #ef4444;
}

/* =====================================================
   Hébergement info ([rhws_hebergement_info])
   ===================================================== */
.rhws-hebergement-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rhws-hebergement-info__header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rhws-hebergement-info__icon {
    font-size: 1.4em;
}

.rhws-hebergement-info__type {
    font-weight: 600;
}

.rhws-hebergement-info__days {
    color: #888;
}

.rhws-hebergement-info__description {
    line-height: 1.6;
}

.rhws-hebergement-info__description p:last-child {
    margin-bottom: 0;
}

/* =====================================================
   Fiche technique ([rhws_fiche_technique])
   ===================================================== */
.rhws-fiche-technique__list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rhws-fiche-technique__list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.rhws-fiche-technique__icon {
    flex-shrink: 0;
    color: #22c55e;
    margin-top: 3px;
}

.rhws-fiche-technique__download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #c15718;
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 500;
    transition: background 0.2s;
}

.rhws-fiche-technique__download:hover {
    background: #a34a14;
}

.rhws-fiche-technique__download svg {
    flex-shrink: 0;
    stroke: currentColor;
}

/* =====================================================
   Encadrement ([rhws_encadrement])
   ===================================================== */
.rhws-encadrement {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rhws-encadrement__intro {
    margin: 0;
    line-height: 1.6;
}

.rhws-encadrement__group {
    margin: 0;
}

.rhws-encadrement__card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 8px;
}

.rhws-encadrement__avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.rhws-encadrement__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rhws-encadrement__type {
    font-weight: 600;
    font-size: 1.05em;
}

.rhws-encadrement__description {
    line-height: 1.6;
}

.rhws-encadrement__description p:last-child {
    margin-bottom: 0;
}

/* =====================================================
   Sessions grid ([rhws_sessions_grid])
   ===================================================== */
.rhws-sessions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rhws-sessions-grid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.rhws-sessions-grid__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    min-width: 72px;
    border-radius: 12px;
    background: #1e293b;
    color: #fff;
    font-weight: 600;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.rhws-sessions-grid__item:first-child .rhws-sessions-grid__date {
    border-color: #c15718;
}

.rhws-sessions-grid__days {
    font-size: 0.8em;
    text-transform: lowercase;
    white-space: nowrap;
}

.rhws-sessions-grid__year {
    font-size: 1.05em;
}

.rhws-sessions-grid__price {
    font-size: 0.9em;
    font-weight: 600;
    color: inherit;
}

.rhws-sessions-grid__item--full .rhws-sessions-grid__date {
    opacity: 0.5;
}

.rhws-sessions-grid__full {
    color: #ef4444;
    font-size: 0.8em;
}

