/* ============================================================
   WEB APP MOBILE - FINAL INTEGRAL V107
   (LOGIQUE MENU UNIVERSELLE + MODE KIOSQUE SAMSUNG A7)
   ============================================================ */

/* 0. MAPPING COULEURS */
:root {
    --text-color-title: var(--sppb-text-color-title); --background-color: var(--sppb-background-color); --text-color: var(--sppb-text-color); --background-color-menu: var(--sppb-background-color-menu); --text-color-menu: var(--sppb-text-color-menu); --icon-color-menu: var(--sppb-icon-color-menu); --icon-color-content: var(--sppb-icon-color-content); --background-color-alert: var(--sppb-background-color-alert); --border-color-alert: var(--sppb-border-color-alert); --button-text-color: var(--sppb-button-text-color); --button-bg-color: var(--sppb-button-bg-color); --button-text-color-hover: var(--sppb-button-text-color-hover); --button-bg-color-hover: var(--sppb-button-bg-color-hover); --text-color-title-fb: var(--sppb-text-color-title-fb); --text-color-content-fb: var(--sppb-text-color-content-fb); --bg-color-fb: var(--sppb-bg-color-fb); --border-color-fb: var(--sppb-border-color-fb);
    --maincolor: #d4af37;
}

/* ============================================================
   1. LOGIQUE DUAL-MENU (CORRECTION FORCE BRUTE)
   Cette partie force le masquage par défaut.
   ============================================================ */

/* A. ÉTAT PAR DÉFAUT (SITE PUBLIC / MOBILE PERSO) */
/* ------------------------------------------------ */

/* SÉCURITÉ : On cache le menu Kiosque de force */
/* On cible la classe Helix .sp-module pour être sûr de gagner */
.sp-module.nav-kiosk-only,
.mobile-app-menu.nav-kiosk-only { 
    display: none !important; 
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* On s'assure que le menu Guest est bien là */
.sp-module.nav-guest-only,
.mobile-app-menu.nav-guest-only { 
    display: block !important; 
}


/* B. ÉTAT MODE KIOSQUE (TABLETTE) */
/* ------------------------------------------------ */
/* S'active UNIQUEMENT si le body a la classe .kiosk-mode */

/* 1. On cache le menu invité */
body.kiosk-mode .sp-module.nav-guest-only,
body.kiosk-mode .mobile-app-menu.nav-guest-only { 
    display: none !important; 
}

/* 2. On affiche le menu borne */
body.kiosk-mode .sp-module.nav-kiosk-only,
body.kiosk-mode .mobile-app-menu.nav-kiosk-only { 
    display: flex !important; 
    visibility: visible !important; 
    opacity: 1 !important;
    height: 90px !important; /* On restaure la hauteur */
    overflow: visible !important;
    
    /* Positionnement fixe */
    position: fixed !important; bottom: 0 !important; left: 0 !important; width: 100% !important;
    z-index: 99999 !important;
    background: #ffffff !important;
    border-top: 2px solid #d4af37 !important;
}


/* ============================================================
   2. CONFIGURATION TACTILE STRICTE (MODE KIOSQUE)
   Objectif : Scroll 1 doigt fluide, Zoom 2 doigts BLOQUÉ
   ============================================================ */
html.kiosk-mode, body.kiosk-mode, 
body.kiosk-mode .body-wrapper, 
body.kiosk-mode .sp-page-builder, 
body.kiosk-mode .sp-component {
    height: auto !important; min-height: 100% !important;
    
    /* SCROLL VERTICAL : OUI */
    overflow-y: auto !important; 
    -webkit-overflow-scrolling: touch !important;
    
    /* ZOOM & SCROLL HORIZONTAL : NON (pan-y autorise que le vertical) */
    touch-action: pan-y !important; 
}

/* Empêcher la sélection de texte */
body.kiosk-mode * { user-select: none !important; -webkit-user-select: none !important; touch-action: pan-y !important; }
/* Exceptions : Champs de formulaire */
body.kiosk-mode input, body.kiosk-mode textarea { user-select: text !important; -webkit-user-select: text !important; }


/* ============================================================
   3. RÈGLES MOBILE GÉNÉRALES (< 992px)
   ============================================================ */
@media (max-width: 991.98px) {

    /* CACHER MENUS PC */
    .mobile-app-menu { display: none !important; }
    /* Mais on réaffiche celui qui doit l'être (Guest ou Kiosk) via la logique ci-dessus */
    .mobile-app-menu.nav-guest-only, 
    .mobile-app-menu.nav-kiosk-only { display: block !important; }
    
    html { scroll-behavior: smooth; height: 100%; }
    .offcanvas-overlay, .body-overlay { display: none !important; pointer-events: none !important; }

    /* --- A. HEADER FIXE --- */
    #sp-header { display: flex !important; align-items: center !important; justify-content: space-between !important; position: fixed !important; top: 0 !important; left: 0 !important; width: 100%; height: 80px !important; min-height: 80px !important; background-color: #292929 !important; box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 99900 !important; border-bottom: 1px solid #333; padding: 0 10px !important; margin-top: 0 !important; transform: none !important; }
    #sp-header .row { display: flex !important; align-items: center !important; width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; }
    #sp-header #sp-logo { flex: 0 0 65% !important; max-width: 65% !important; width: 65% !important; height: 100% !important; display: flex !important; align-items: center !important; padding: 0 !important; margin: 0 !important; }
    #sp-header .logo { width: 100% !important; max-width: 100% !important; padding: 0 !important; }
    #sp-header .logo a { display: flex; align-items: center; height: 100%; }
    #sp-header .logo img, .logo-image { height: auto !important; max-height: 55px !important; width: auto !important; max-width: 100% !important; display: block !important; object-fit: contain !important; object-position: left center !important; }
    #sp-top-bar, #offcanvas-toggler, .burger-icon { display: none !important; }

    /* --- B. GTRANSLATE --- */
    .floating-lang { display: block !important; position: relative !important; z-index: 99901 !important; flex-shrink: 0; }
    .gt_float_switcher, .gt_float_switcher .gt-selected { background: transparent !important; border: 0 !important; box-shadow: none !important; width: auto !important; }
    .gt_float_switcher .gt-selected a, .gt_float_switcher .gt-selected span { font-size: 0 !important; color: transparent !important; text-decoration: none !important; }
    .gt_float_switcher .gt-selected a img, .gt_float_switcher .gt-selected span img { width: 24px !important; height: auto !important; display: inline-block !important; }
    div.gt_options { background-color: #ffffff !important; box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important; border-radius: 8px !important; padding: 10px 0 !important; top: 0px !important; }
    div.gt_options a { color: #333333 !important; padding: 10px 20px !important; display: block !important; text-decoration: none !important; font-weight: 600 !important; font-size: 14px !important; }
    div.gt_options a:hover { background-color: #f4f4f4 !important; }

    /* --- C. NAV BAS (MENU APP - DESIGN COMMUN) --- */
    html body { padding-top: 80px !important; padding-bottom: 80px !important; background-color: #f4f4f4; -webkit-overflow-scrolling: touch !important; overflow-y: auto !important; overscroll-behavior-y: none; }
    
    .mobile-app-menu { 
        position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; width: 100% !important; height: 72px; 
        background: #ffffff !important; box-shadow: 0 -4px 20px rgba(0,0,0,0.1) !important; z-index: 99990 !important; 
        border-top: 1px solid #eeeeee; margin: 0 !important; padding: 0 !important; 
    }

    .mobile-app-menu > a, .mobile-app-menu > .jmodedit, .mobile-app-menu > .btn { display: none !important; }
    .mobile-app-menu .sp-module-content { width: 100% !important; height: 100% !important; display: block !important; }
    .mobile-app-menu ul { display: flex !important; flex-direction: row !important; justify-content: space-evenly !important; align-items: center !important; height: 100% !important; margin: 0 !important; padding: 0 !important; list-style: none !important; }
    .mobile-app-menu ul > li { flex: 1 !important; display: flex !important; justify-content: center !important; align-items: center !important; height: 100%; margin: 0; padding: 0; position: static !important; }
    html body .mobile-app-menu ul > li > a, html body .mobile-app-menu ul > li > span { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: flex-start !important; width: 100% !important; height: 100% !important; padding-top: 16px !important; padding-right: 0 !important; padding-left: 0 !important; padding-bottom: 0 !important; margin: 0 !important; border: none !important; border-radius: 12px; text-transform: uppercase !important; letter-spacing: 0.5px !important; font-weight: 700 !important; color: #888 !important; text-decoration: none !important; cursor: pointer !important; font-size: 11px !important; line-height: 1.2 !important; background: transparent !important; box-shadow: none !important; text-align: center !important; }
    html body .mobile-app-menu ul > li > span.pe-2 { padding-right: 0 !important; }
    html body .mobile-app-menu ul > li.active > a, html body .mobile-app-menu ul > li.open > span, html body .mobile-app-menu ul > li > a:hover { color: var(--icon-color-menu) !important; }
    html body .mobile-app-menu ul > li > a::before, html body .mobile-app-menu ul > li > span::before { font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 20px; margin-bottom: 5px !important; display: block !important; width: 100% !important; text-align: center !important; line-height: 1; margin-right: 0 !important; margin-left: 0 !important; }

    /* MASQUAGE ACCUEIL */
    .mobile-app-menu ul > li.default { display: none !important; }
    .mobile-app-menu ul > li > a.hidden-home { display: none !important; }
    .mobile-app-menu ul > li:has(> a.hidden-home) { display: none !important; }

    /* SOUS-MENUS */
    @keyframes macFadeUp { 0% { opacity: 0; transform: translateY(15px) scale(0.9); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
    .mobile-app-menu ul > li > ul { display: none !important; position: fixed !important; bottom: 90px !important; right: 15px; width: 80px !important; z-index: 2147483647 !important; padding: 0 !important; margin: 0 !important; height: auto !important; }
    .mobile-app-menu ul > li.open > ul { display: flex !important; flex-direction: column-reverse !important; align-items: center !important; justify-content: flex-start !important; gap: 12px; }
    .mobile-app-menu ul > li > ul > li { display: block !important; width: 80px !important; height: 80px !important; background: #ffffff !important; border-radius: 18px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.12); border: 1px solid #f4f4f4; margin: 0 !important; padding: 0 !important; opacity: 0; animation: macFadeUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; flex: 0 0 80px !important; }
    .mobile-app-menu ul > li.open > ul > li:nth-child(1) { animation-delay: 0s; }
    .mobile-app-menu ul > li.open > ul > li:nth-child(2) { animation-delay: 0.08s; }
    .mobile-app-menu ul > li.open > ul > li:nth-child(3) { animation-delay: 0.16s; }
    .mobile-app-menu ul > li.open > ul > li:nth-child(4) { animation-delay: 0.24s; }
    .mobile-app-menu ul > li.open > ul > li:nth-child(5) { animation-delay: 0.32s; }
    .mobile-app-menu ul > li > ul > li > a, .mobile-app-menu ul > li > ul > li > span { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; width: 100% !important; height: 100% !important; padding: 0 5px !important; color: #333 !important; font-size: 9px !important; font-weight: 700 !important; text-transform: uppercase !important; text-decoration: none !important; line-height: 1.1 !important; cursor: pointer !important; background: transparent !important; text-align: center !important; }
    .mobile-app-menu ul > li > ul > li > a::before, .mobile-app-menu ul > li > ul > li > span::before { font-size: 24px !important; color: var(--icon-color-menu); margin-bottom: 4px !important; display: block !important; width: 100% !important; text-align: center !important; height: auto !important; line-height: 1 !important; flex: 0 0 auto !important; margin-right: 0 !important; margin-left: 0 !important; }

    /* MAPPINGS ICONES */
    .mobile-app-menu .icon-home::before { content: "\f015"; }
    .mobile-app-menu .icon-menu::before { content: "\f0c9"; }
    .mobile-app-menu .icon-bed::before { content: "\f236"; }
    .mobile-app-menu .icon-food::before { content: "\f2e7"; }
    .mobile-app-menu .icon-wifi::before { content: "\f1eb"; }
    .mobile-app-menu .icon-contact::before { content: "\f095"; }
    .mobile-app-menu .icon-info::before { content: "\f05a"; }
    .mobile-app-menu .icon-parking::before { content: "\f540"; }
    .mobile-app-menu .icon-culture::before { content: "\f66f"; }
    .mobile-app-menu .icon-hotel::before { content: "\f594"; }

    /* Support PWA */
    @media all and (display-mode: standalone) {
        #sp-header { padding-top: env(safe-area-inset-top) !important; height: calc(80px + env(safe-area-inset-top)) !important; }
        body { padding-top: calc(80px + env(safe-area-inset-top)) !important; }
        .mobile-app-menu { padding-bottom: env(safe-area-inset-bottom) !important; height: calc(72px + env(safe-area-inset-bottom)) !important; }
    }

    /* --- E. FEATURED BOXES --- */
    .sppb-column:has(.fb-infos) { margin-bottom: 50px !important; }
    .sppb-column:has(.alerte) { margin-bottom: 25px !important; }
    .sppb-column-addons .sppb-addon-feature-box.fb-infos { margin-bottom: 50px !important; margin-top: 0 !important; display: block !important; }
    .fb-infos .sppb-addon-content { padding: 15px 15px !important; min-height: auto !important; height: auto !important; }
    .fb-infos .sppb-img-container { margin-bottom: 15px !important; display: block !important; text-align: center !important; }
    .fb-infos .sppb-img-container img { max-width: none !important; width: 100% !important; height: auto !important; border-radius: 4px !important; object-fit: contain !important; }
    .fb-infos .sppb-feature-box-title { font-size: 20px !important; margin-bottom: 8px !important; line-height: 1.2 !important; }
    .fb-infos .sppb-addon-text { font-size: 14px !important; line-height: 1.4 !important; margin-bottom: 15px !important; }
    .fb-infos .sppb-btn { padding: 10px 25px !important; font-size: 14px !important; }
    .fb-infos p { margin: 0 0 0px;}

    /* PADDING CAROUSEL STANDARD */
    .sppb-carousel-inner > .sppb-item { padding: 10px!important; }

    /* --- F. HERO MOBILE (CENTRÉ & OPTIMISÉ) --- */
    body .hero-fullscreen { 
        height: calc(100vh - 160px) !important; min-height: auto !important; margin-top: 0 !important; 
        display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; 
        width: 100% !important; overflow: hidden !important; padding: 0 !important;
    }
    body .medieval-hero-card { 
        margin: 0 auto !important; width: 90% !important; max-width: 380px !important; max-height: 90% !important; overflow-y: auto !important; 
        box-sizing: border-box !important; padding: 20px 15px !important; 
        border: 2px double #d4af37 !important; background: rgba(0, 0, 0, 0.4) !important; 
        backdrop-filter: blur(8px) !important; -webkit-backdrop-filter: blur(8px) !important; 
        display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; 
    }
    body .medieval-hero-image { margin-bottom: 15px !important; padding-bottom: 15px !important; max-width: 80% !important; height: auto !important; border-bottom: 1px solid #d4af37 !important; display: block !important; margin-left: auto !important; margin-right: auto !important; }
    body .medieval-hero-text { font-family: 'Montserrat', sans-serif !important; color: #f0f0f0 !important; font-size: 0.85rem !important; line-height: 1.4 !important; text-align: center !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; display: block !important; }

    /* --- G. WHATSAPP --- */
    body .whatsapp-float { position: fixed !important; width: 50px !important; height: 50px !important; bottom: 100px !important; right: 20px !important; background-color: #25d366 !important; color: #FFF !important; border-radius: 50% !important; text-align: center !important; font-size: 28px !important; box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important; z-index: 2147483647 !important; display: flex !important; align-items: center !important; justify-content: center !important; animation: none !important; }

    /* =========================================================
       H. TABS MOBILE FIX (STYLE PC : BORDURES + ARRONDIS)
       ========================================================= */
    /* Navigation */
    .medieval-tabs .sppb-nav-tabs { display: flex !important; flex-wrap: nowrap !important; overflow-x: hidden !important; width: 100% !important; padding: 0 !important; margin: 0 !important; border-bottom: 1px solid #e5e5e5 !important; }
    .medieval-tabs .sppb-nav-tabs > li { flex: 1 1 0px !important; width: 33.33% !important; text-align: center !important; background-color: #fff !important; border-top: 1px solid #e5e5e5 !important; border-bottom: none !important; border-right: 1px solid #e5e5e5 !important; border-left: none !important; border-radius: 0 !important; }
    .medieval-tabs .sppb-nav-tabs > li:first-child { border-left: 1px solid #e5e5e5 !important; border-top-left-radius: 10px !important; border-top-right-radius: 0 !important; }
    .medieval-tabs .sppb-nav-tabs > li:last-child { border-right: 1px solid #e5e5e5 !important; border-top-right-radius: 10px !important; border-top-left-radius: 0 !important; }
    .medieval-tabs .sppb-nav-tabs > li > a { padding: 10px 2px !important; border: none !important; white-space: normal !important; font-size: 11px !important; line-height: 1.1 !important; height: 100% !important; display: flex !important; align-items: center !important; justify-content: center !important; color: #555 !important; }
    .medieval-tabs .sppb-nav-tabs > li.active { background-color: #f9f9f9 !important; border-bottom: 3px solid #d4af37 !important; }
    .medieval-tabs .sppb-nav-tabs > li.active > a { color: #d4af37 !important; }
    /* Cadre Contenu */
    .medieval-tabs .sppb-tab-content { padding: 0 !important; background: #fff !important; width: 100% !important; margin-top: 0 !important; border-left: 1px solid #e5e5e5 !important; border-right: 1px solid #e5e5e5 !important; border-bottom: 1px solid #e5e5e5 !important; border-top: none !important; border-bottom-left-radius: 10px !important; border-bottom-right-radius: 10px !important; box-shadow: 0 5px 15px rgba(0,0,0,0.03) !important; }
    /* Carrousel */
    .medieval-tabs .sppb-addon-carousel-pro, .medieval-tabs .sppb-carousel-pro-item { padding: 0 !important; margin: 0 !important; width: 100% !important; border: none !important; display: flex !important; flex-direction: column !important; }
    .medieval-tabs .sppb-carousel-pro-text { order: -1 !important; position: static !important; background: #ffffff !important; padding: 15px 10px !important; width: 100% !important; text-align: center !important; margin-bottom: 0 !important; }
    .medieval-tabs .sppb-carousel-pro-text h2 { color: #d4af37 !important; font-size: 16px !important; margin: 0 0 5px 0 !important; }
    .medieval-tabs .sppb-carousel-pro-text p { color: #555 !important; font-size: 13px !important; }
    .medieval-tabs .sppb-carousel-pro-item img { width: 100% !important; max-width: 100% !important; margin: 0 !important; height: auto !important; min-height: 200px !important; object-fit: cover !important; display: block !important; border-bottom-left-radius: 9px !important; border-bottom-right-radius: 9px !important; }
    /* Indicateurs & Flèches */
    .sppb-carousel-indicators li { border: 1px solid #d4af37 !important; background-color: transparent !important; width: 10px !important; height: 10px !important; border-radius: 50% !important; }
    .sppb-carousel-indicators .active { background-color: #d4af37 !important; }
    .sppb-carousel-arrow, .sppb-carousel-control { background: transparent !important; border: none !important; box-shadow: none !important; }
    .sppb-carousel-arrow i, .sppb-carousel-control i, .sppb-carousel-arrow span, .sppb-carousel-control span { color: #d4af37 !important; font-size: 30px !important; }

} /* FIN MEDIA QUERY */


/* ============================================================
   4. STYLES SPÉCIFIQUES MODE KIOSQUE (TABLETTE RECEPTION)
   Ces règles sont prioritaires et s'appliquent si body.kiosk-mode
   ============================================================ */

/* A. HEADER FIXE NOIR (Force Mobile) */
body.kiosk-mode #sp-header {
    display: flex !important; align-items: center !important; justify-content: center !important;
    position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important;
    height: 80px !important; background-color: #292929 !important; box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
    z-index: 99900 !important; padding: 0 10px !important;
}
body.kiosk-mode #sp-header .logo { display: block !important; width: auto !important; }
body.kiosk-mode #sp-header .logo img { height: 55px !important; width: auto !important; display: block !important; }
/* Cache le reste */
body.kiosk-mode #sp-menu, body.kiosk-mode .sp-megamenu-wrapper, body.kiosk-mode .d-none.d-lg-block, body.kiosk-mode #sp-top-bar { display: none !important; }

/* B. FOND D'ÉCRAN HERO */
body.kiosk-mode .hero-fullscreen {
    position: fixed !important; top: 0 !important; left: 0 !important; bottom: 0 !important; right: 0 !important;
    width: 100% !important; height: 100% !important;
    background-position: center 85% !important; background-size: cover !important;
    z-index: 0 !important; display: flex !important;
}
body.kiosk-mode .medieval-hero-card {
    position: relative !important; z-index: 10 !important;
    margin-top: 15vh !important; margin-bottom: 120px !important;
    background: rgba(0,0,0,0.5) !important; backdrop-filter: blur(5px);
    border: 4px double #d4af37 !important; width: 85% !important; max-width: 500px !important;
}

/* C. NETTOYAGE PIED DE PAGE */
body.kiosk-mode #sp-footer, body.kiosk-mode #sp-bottom, body.kiosk-mode .offcanvas-toggler { display: none !important; }

/* D. Marges Section Standard */
body.kiosk-mode .kiosk-2-cols { padding: 10px 0 !important; margin: 0 !important; width: 100% !important; overflow: visible !important; display: block !important; }