/* BOOKING PUBLIC - consolidation v244 + v246 + v247 */

/* ===== v244 ===== */
/* Booking Djerba V2.4.4 */

/* Admin villa photo gallery: compact thumbnails, never giant images */
.admin-photo-thumbs{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(130px,1fr))!important;gap:12px!important;margin-top:16px!important;align-items:start!important}
.admin-photo-thumbs figure{margin:0!important;position:relative!important;border:1px solid #d9e5f3!important;border-radius:10px!important;background:#fff!important;overflow:hidden!important;aspect-ratio:4/3!important;min-width:0!important;max-width:none!important}
.admin-photo-thumbs figure img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:120px!important;object-fit:cover!important;margin:0!important;border-radius:0!important}
.admin-photo-thumbs figcaption{position:absolute!important;left:6px!important;bottom:6px!important;padding:4px 7px!important;border-radius:999px!important;background:#08275c!important;color:#fff!important;font-size:10px!important;font-weight:800!important}

/* Proper delete area */
.villa-delete-zone{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:20px!important;margin:20px 0 40px!important;padding:18px!important;border:1px solid #ffd2d2!important;background:#fff8f8!important;border-radius:12px!important}
.villa-delete-zone p{margin:4px 0 0!important;color:#7e5960!important;font-size:12px!important}.villa-delete-zone form{margin:0!important}.adminbody .btn.danger{background:#c93636!important;color:#fff!important;border-color:#c93636!important}.adminbody .btn.danger:hover{background:#a92626!important;border-color:#a92626!important}

/* Reservation stays read-only until Modify is clicked */
.reservation-page-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.reservation-edit-card.is-readonly{min-height:220px}.reservation-edit-actions{display:flex;justify-content:flex-end;gap:10px;align-items:center;margin-top:4px}

/* Search by name */
.villa-search-filters{display:grid!important;grid-template-columns:minmax(230px,1.5fr) repeat(3,minmax(150px,1fr)) auto auto!important;gap:10px!important;align-items:end!important}.villa-search-filters label{display:grid!important;gap:5px!important;font-size:11px!important;font-weight:800!important;color:#526781!important}.villa-search-filters input{width:100%!important;min-height:44px!important}.villa-search-filters .btn{min-height:44px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}.reset-search{text-decoration:none!important}

/* Public villa: information grouped by category */
.villa-content-categorized{align-items:start!important}.villa-info-section{padding:0 0 24px!important;margin:0 0 24px!important;border-bottom:1px solid #e5edf6!important}.villa-info-section:last-child{border-bottom:0!important}.villa-info-section h2{margin:0 0 14px!important;color:#08275c!important}.villa-info-section>p{line-height:1.75!important;color:#3f5067!important}
.villa-location-card{display:grid;gap:10px;padding:16px;border:1px solid #dfe9f4;border-radius:12px;background:#f8fbff}.villa-location-card>div{display:grid;gap:3px}.villa-location-card span,.stay-rule-grid span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#70839b}.villa-location-card b{color:#11294d}.map-link{width:max-content!important;margin-top:4px!important;text-decoration:none!important}
.villa-spec-grid{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:10px}.villa-spec-grid>div{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;padding:13px;border:1px solid #e0e9f3;border-radius:11px;background:#fff}.villa-spec-grid>div>span{grid-row:1/3;font-size:24px}.villa-spec-grid b{font-size:16px;color:#0b2855}.villa-spec-grid small{color:#72839a}
.equipment-public-grid{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:10px}.equipment-public-grid>span{display:flex;gap:9px;align-items:center;padding:11px 12px;border:1px solid #e0e9f3;background:#fff;border-radius:10px;font-weight:700;color:#243b5d}.equipment-public-grid i{font-style:normal;font-size:20px;min-width:24px;text-align:center}
.stay-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:10px}.stay-rule-grid>div{display:flex;justify-content:space-between;gap:16px;padding:12px 14px;background:#f8fbff;border:1px solid #e0e9f3;border-radius:10px}.stay-rule-grid b{color:#142e55}.house-rules-public{margin-top:14px;padding:14px;border-radius:10px;background:#fff9ed;border:1px solid #f2dfae}.house-rules-public p{margin:7px 0 0;line-height:1.65;color:#5f553e}

@media(max-width:1150px){.villa-search-filters{grid-template-columns:repeat(2,minmax(180px,1fr))!important}.villa-spec-grid{grid-template-columns:repeat(3,minmax(110px,1fr))}.equipment-public-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}}
@media(max-width:700px){.villa-delete-zone,.reservation-page-actions{align-items:stretch!important;flex-direction:column!important}.villa-search-filters{grid-template-columns:1fr!important}.villa-spec-grid,.equipment-public-grid,.stay-rule-grid{grid-template-columns:1fr!important}.admin-photo-thumbs{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* ===== v246 ===== */
/* BOOKING DJERBA V2.4.6 — menus, pages et traductions */
.main-public-nav{display:flex;align-items:center;gap:24px}
.nav-dropdown{position:relative;display:flex;align-items:center}
.nav-dropdown-toggle{appearance:none;border:0;background:transparent;color:inherit;font:inherit;font-weight:700;cursor:pointer;padding:12px 0;display:flex;gap:5px;align-items:center}
.nav-dropdown-menu{display:none;position:absolute;z-index:120;top:calc(100% - 2px);inset-inline-start:-18px;min-width:250px;padding:9px;background:#fff;border:1px solid #dfe8f4;border-radius:14px;box-shadow:0 16px 38px rgba(8,39,92,.16)}
.nav-dropdown:hover .nav-dropdown-menu,.nav-dropdown:focus-within .nav-dropdown-menu{display:grid}
.nav-dropdown-menu a{display:block!important;padding:11px 12px!important;border-radius:9px;white-space:nowrap;color:#08275c!important;text-decoration:none}
.nav-dropdown-menu a:hover{background:#f1f6fd;color:#1267d6!important}
.page-hero-simple{min-height:auto;padding-top:70px;padding-bottom:55px}
.standalone-page-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;padding-top:36px;padding-bottom:70px}
.standalone-card{background:#fff;border:1px solid #dce7f5;border-radius:18px;padding:28px;box-shadow:0 10px 28px rgba(8,39,92,.06)}
.standalone-card h2{margin-top:0;color:#08275c}
.standalone-contact-page{padding-top:52px;padding-bottom:72px}
.contact-direct-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.contact-direct-links a{display:inline-flex;padding:12px 16px;background:#fff;border:1px solid #dce7f5;border-radius:12px;color:#0b5fc5;text-decoration:none;font-weight:700}
.faq-page{max-width:1100px;margin:auto;padding-top:40px;padding-bottom:80px}
.rtl .nav-dropdown-menu{inset-inline-start:auto;inset-inline-end:-18px;text-align:right}
@media(max-width:1000px){
 .main-public-nav{gap:12px;flex-wrap:wrap;justify-content:center}
 .nav-dropdown-menu{min-width:220px}
 .standalone-page-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
 .main-public-nav{width:100%;order:3;justify-content:flex-start;overflow-x:auto;padding:4px 0 10px}
 .main-public-nav>a,.nav-dropdown-toggle{white-space:nowrap}
 .nav-dropdown-menu{position:fixed;top:auto;left:14px;right:14px;min-width:0}
}

/* ===== v247 ===== */
/* BOOKING DJERBA V2.4.7 — contact unique, actualités, hotfix fiche villa */
.contact-combined-page{max-width:1280px;margin:0 auto;padding:0 32px 80px}.contact-about-card{margin-top:42px;background:#fff;border:1px solid #dce7f5;border-radius:20px;padding:30px;box-shadow:0 10px 28px rgba(8,39,92,.06)}.contact-about-card h2{margin:0 0 14px;color:#08275c}.contact-about-card p{font-size:17px;line-height:1.75;margin:0;color:#334766}.agency-contact-block{margin-top:36px;background:#fff;border:1px solid #dce7f5;border-radius:20px;padding:30px}.agency-contact-heading h2{margin:8px 0 24px;color:#08275c}.agency-office-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.agency-office-card{border:1px solid #dce7f5;border-radius:16px;padding:22px;background:#f8fbff}.agency-office-card h3{margin-top:0;color:#08275c}.agency-office-card p{min-height:48px;line-height:1.55}.agency-contact-strip{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px;padding-top:22px;border-top:1px solid #e1e9f4}.agency-contact-strip a{display:inline-flex;padding:11px 14px;border-radius:11px;background:#f1f6fd;color:#0b5fc5;text-decoration:none;font-weight:700}.news-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.news-card{background:#fff;border:1px solid #dce7f5;border-radius:18px;overflow:hidden;box-shadow:0 10px 28px rgba(8,39,92,.06)}.news-card> a{display:block}.news-card img{display:block;width:100%;height:230px;object-fit:cover}.news-card-body{padding:22px}.news-card time,.article-public time{font-size:13px;color:#71829c}.news-card h2{margin:8px 0 12px;font-size:21px}.news-card h2 a{color:#08275c;text-decoration:none}.news-card p{color:#53647e;line-height:1.55}.news-read,.article-back{font-weight:800;color:#1267d6;text-decoration:none}.news-pagination{padding-top:0}.article-public{max-width:980px}.article-public h1{font-size:clamp(32px,5vw,54px);color:#08275c;margin:14px 0 25px}.article-cover{width:100%;max-height:520px;object-fit:cover;border-radius:20px;margin-bottom:30px}.article-body{font-size:18px;line-height:1.8;color:#263d5d;white-space:normal}.empty-public{grid-column:1/-1;padding:40px;background:#fff;border:1px solid #dce7f5;border-radius:16px;text-align:center}.rtl .contact-about-card,.rtl .agency-contact-block,.rtl .news-card-body,.rtl .article-public{text-align:right}
@media(max-width:960px){.news-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.agency-office-grid{grid-template-columns:1fr}}
@media(max-width:700px){.contact-combined-page{padding-left:16px;padding-right:16px}.news-grid{grid-template-columns:1fr}.news-card img{height:210px}}


/* PUBLIC VILLA VIDEO V1 */

.bookingbox .villa-video-public{
    width:100%;
    max-width:none;
    margin:0 0 24px;
    padding-bottom:22px;
    border-bottom:1px solid #e4ebf4;
}

.bookingbox .villa-video-public-head{
    margin-bottom:10px;
}

.bookingbox .villa-video-public-head .eyebrow{
    font-size:10px;
}

.bookingbox .villa-video-public-head h2{
    margin:4px 0 0;
    color:#08275c;
    font-size:18px;
    line-height:1.25;
}

.bookingbox .villa-video-frame{
    position:relative;
    width:100%;
    aspect-ratio:16/9;
    overflow:hidden;
    border-radius:10px;
    background:#000;
    box-shadow:none;
}

.bookingbox .villa-video-frame iframe{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    border:0;
    display:block;
}

.bookingbox .villa-video-direct{
    display:block;
    width:100%;
    max-height:300px;
    border-radius:10px;
    background:#000;
}

@media (max-width:900px){
    .bookingbox .villa-video-public{
        width:100%;
        margin:0 0 20px;
    }
}


/* PUBLIC MOBILE RESPONSIVE V1 */

/* Sécurité globale contre les débordements horizontaux */
html,
body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
}

body{
    position:relative;
}

img,
video,
iframe,
svg{
    max-width:100%;
}

.mobile-menu-toggle{
    display:none;
}

/* ==================================================
   MOBILE / TABLETTE
   ================================================== */

@media (max-width:900px){

    /* ---------- HEADER ---------- */

    .pubhead{
        height:auto!important;
        min-height:76px!important;
        padding:9px 14px!important;
        gap:10px!important;

        display:grid!important;
        grid-template-columns:minmax(110px,1fr) auto auto!important;
        align-items:center!important;

        width:100%!important;
        max-width:100%!important;
    }

    .brand-logo{
        min-width:0!important;
        width:auto!important;
    }

    .brand-logo-image img{
        width:125px!important;
        max-width:125px!important;
        height:auto!important;
    }

    /* Ancienne règle display:none neutralisée */
    .pubhead .main-public-nav{
        display:none!important;
    }

    .mobile-menu-toggle{
        display:flex!important;
        width:42px;
        height:42px;
        padding:9px;
        border:1px solid #dce6f3;
        border-radius:9px;
        background:#fff;
        flex-direction:column;
        justify-content:center;
        gap:5px;
        cursor:pointer;
    }

    .mobile-menu-toggle span{
        display:block;
        width:100%;
        height:2px;
        border-radius:3px;
        background:#08275c;
    }

    .pub-actions{
        display:flex!important;
        align-items:center!important;
        justify-content:flex-end!important;
        gap:3px!important;
        min-width:0!important;
    }

    .pub-actions .favorites,
    .pub-actions .account{
        display:none!important;
    }

    /* LANGUE + DEVISE TOUJOURS VISIBLES */
    .pub-actions select,
    .pub-actions select:nth-of-type(2),
    #currency-switch,
    .language-switch{
        display:block!important;
        width:auto!important;
        min-width:0!important;
        max-width:66px!important;
        padding:7px 4px!important;
        border:0!important;
        background:#fff!important;
        font-size:13px!important;
        color:#08275c!important;
    }

    /* Menu ouvert */
    .pubhead.mobile-menu-open .main-public-nav{
        display:grid!important;
        grid-column:1 / -1!important;
        width:100%!important;
        max-width:100%!important;

        order:10!important;

        padding:10px 0 6px!important;
        margin:0!important;

        border-top:1px solid #e7eef7;

        gap:0!important;
        overflow:visible!important;
    }

    .pubhead.mobile-menu-open .main-public-nav > a,
    .pubhead.mobile-menu-open .nav-dropdown-toggle{
        display:flex!important;
        width:100%!important;
        padding:13px 5px!important;
        justify-content:flex-start!important;
        align-items:center!important;

        font-size:15px!important;
        color:#08275c!important;

        border-bottom:1px solid #edf2f8;
        white-space:normal!important;
    }

    /* Divers + sous-menu directement dessous */
    .pubhead.mobile-menu-open .nav-dropdown{
        display:block!important;
        width:100%!important;
    }

    .pubhead.mobile-menu-open .nav-dropdown-menu{
        position:static!important;
        display:grid!important;

        width:100%!important;
        min-width:0!important;

        padding:3px 0 8px 15px!important;
        margin:0!important;

        border:0!important;
        border-radius:0!important;
        box-shadow:none!important;
        background:#f8fbff!important;
    }

    .pubhead.mobile-menu-open .nav-dropdown-menu a{
        padding:11px 12px!important;
        font-size:14px!important;
        border-bottom:1px solid #edf2f8;
        white-space:normal!important;
    }

    /* ---------- FOOTER ---------- */

    #site-footer{
        width:100%!important;
        max-width:100%!important;

        display:grid!important;
        grid-template-columns:1fr!important;

        gap:24px!important;

        padding:38px 22px 100px!important;

        overflow:hidden!important;
    }

    #site-footer > div{
        width:100%!important;
        min-width:0!important;
    }

    #site-footer > div + div{
        padding-top:18px;
        border-top:1px solid rgba(255,255,255,.14);
    }

    #site-footer b{
        display:block!important;
        margin-bottom:12px!important;
        font-size:18px!important;
    }

    #site-footer p{
        margin:0!important;
        max-width:100%!important;
        line-height:1.65!important;
    }

    #site-footer a{
        display:inline-block;
        max-width:100%;
        overflow-wrap:anywhere;
    }

    .footer-logo-image img{
        width:175px!important;
        max-width:100%!important;
    }

    /* ---------- CONTENU GENERAL ---------- */

    .section,
    .villa-content,
    .villa-title,
    .pagehero,
    .content-hero{
        width:100%!important;
        max-width:100%!important;
    }

    .villa-content{
        padding-left:16px!important;
        padding-right:16px!important;
    }

    .cards,
    .zones,
    .benefits,
    .why > div{
        min-width:0!important;
    }

    .villa-card,
    .bookingbox,
    .summary,
    .contact-form-card,
    .contact-about-card,
    .agency-contact-block{
        max-width:100%!important;
        min-width:0!important;
    }

    input,
    select,
    textarea,
    button{
        max-width:100%;
    }
}


/* ==================================================
   PETIT MOBILE
   ================================================== */

@media (max-width:520px){

    .pubhead{
        grid-template-columns:minmax(100px,1fr) auto auto!important;
        padding-left:10px!important;
        padding-right:10px!important;
        gap:5px!important;
    }

    .brand-logo-image img{
        width:112px!important;
        max-width:112px!important;
    }

    .pub-actions{
        gap:0!important;
    }

    .pub-actions select,
    #currency-switch,
    .language-switch{
        max-width:58px!important;
        padding-left:2px!important;
        padding-right:2px!important;
        font-size:12px!important;
    }

    .mobile-menu-toggle{
        width:38px;
        height:38px;
        padding:8px;
    }

    #site-footer{
        padding-left:18px!important;
        padding-right:18px!important;
    }

    .mobile-whatsapp{
        right:14px!important;
        bottom:14px!important;
    }
}


/* RTL mobile */
@media (max-width:900px){

    html[dir="rtl"] .pubhead.mobile-menu-open .nav-dropdown-menu{
        padding-left:0!important;
        padding-right:15px!important;
    }

    html[dir="rtl"] .pubhead.mobile-menu-open .main-public-nav > a,
    html[dir="rtl"] .pubhead.mobile-menu-open .nav-dropdown-toggle{
        justify-content:flex-start!important;
        text-align:right!important;
    }
}


/* MOBILE HEADER ORDER FIX V1 */

@media (max-width:900px){

    .brand-logo{
        order:1!important;
    }

    .pub-actions{
        order:2!important;
    }

    .mobile-menu-toggle{
        order:3!important;
    }

    .pubhead{
        grid-template-columns:minmax(110px,1fr) auto auto!important;
    }
}

@media (max-width:520px){

    .pubhead{
        grid-template-columns:minmax(100px,1fr) auto auto!important;
    }
}

/* MOBILE SEARCH FORM FIX V1 */
@media (max-width:700px){

    .villa-search-filters{
        width:100%!important;
        max-width:100%!important;
        display:grid!important;
        grid-template-columns:1fr!important;
        gap:16px!important;
    }

    .villa-search-filters label{
        width:100%!important;
        max-width:none!important;
        display:block!important;
    }

    .villa-search-filters input,
    .villa-search-filters select,
    .filters input,
    .filters select{
        width:100%!important;
        max-width:none!important;
        min-width:0!important;
        height:54px!important;
        padding:0 14px!important;
        font-size:16px!important;
        border-radius:10px!important;
    }

    .villa-search-filters .btn,
    .villa-search-filters button{
        width:100%!important;
        max-width:none!important;
        min-height:54px!important;
        font-size:16px!important;
        border-radius:10px!important;
    }

    .villa-search-filters .reset-search{
        width:100%!important;
        min-height:50px!important;
        display:flex!important;
        align-items:center!important;
        justify-content:center!important;
    }
}

/* MOBILE DATE INPUT WIDTH FIX V1 */
@media (max-width:700px){

    .villa-search-filters,
    .villa-search-filters label{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
    }

    .villa-search-filters input[type="date"]{
        display:block!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;

        box-sizing:border-box!important;

        height:54px!important;
        padding:0 12px!important;

        -webkit-appearance:none!important;
        appearance:none!important;
    }

    .villa-search-filters input[type="date"]::-webkit-date-and-time-value{
        text-align:left!important;
        min-width:0!important;
    }

    .villa-search-filters input[type="date"]::-webkit-calendar-picker-indicator{
        margin:0!important;
        padding:0!important;
    }
}

/* MOBILE DATE INPUT WIDTH FIX V2 */
@media (max-width:700px){

    .search-new,
    .search-new label,
    .villa-search-filters,
    .villa-search-filters label{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
    }

    .search-new input,
    .search-new select,
    .villa-search-filters input,
    .villa-search-filters select{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        box-sizing:border-box!important;
    }

    .search-new input[type="date"],
    .villa-search-filters input[type="date"]{
        display:block!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;

        box-sizing:border-box!important;

        height:54px!important;
        padding:0 12px!important;

        -webkit-appearance:none!important;
        appearance:none!important;
    }

    .search-new input[type="date"]::-webkit-date-and-time-value,
    .villa-search-filters input[type="date"]::-webkit-date-and-time-value{
        min-width:0!important;
        text-align:left!important;
    }

    .search-new input[type="date"]::-webkit-calendar-picker-indicator,
    .villa-search-filters input[type="date"]::-webkit-calendar-picker-indicator{
        margin:0!important;
        padding:0!important;
        flex:none!important;
    }

    .search-new button,
    .villa-search-filters button{
        width:100%!important;
        max-width:100%!important;
    }
}

/* HOME MOBILE SEARCH WIDTH FIX V3 */
@media (max-width:700px){

    .hero-new .search-new{
        left:16px!important;
        right:16px!important;

        width:auto!important;
        max-width:none!important;
        min-width:0!important;

        box-sizing:border-box!important;

        padding:18px 16px!important;
        margin:0!important;
    }

    .hero-new .search-new > *{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        box-sizing:border-box!important;
    }

    .hero-new .search-new label{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
    }

    .hero-new .search-new input,
    .hero-new .search-new select,
    .hero-new .search-new button{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        box-sizing:border-box!important;
    }

    .hero-new .search-new input[type="date"]{
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
    }
}

@media (max-width:420px){

    .hero-new .search-new{
        left:12px!important;
        right:12px!important;
        padding:16px 14px!important;
    }
}
