/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* Celeste Images: ACF presentation, native Blocksy layout. */
.entry-content .horizontal-scroll .celeste-formules, .entry-content .celeste-formules { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 24px; align-items: stretch !important; }
.celeste-formules > .wp-block-column { grid-column: span 2; }
.celeste-formules > .wp-block-column:only-child { grid-column: 3 / span 2; }
.celeste-formules:has(> :nth-child(2):last-child) > :first-child { grid-column: 2 / span 2; }
.celeste-formules:has(> :nth-child(4):last-child) > .wp-block-column { grid-column: span 3; }
.celeste-formules:has(> :nth-child(5):last-child) > :nth-child(4) { grid-column: 2 / span 2; }
.celeste-formules > .wp-block-column { margin-block-start: 0 !important; align-self: stretch !important; }
.celeste-formules > .wp-block-column > div { height: 100%; }
.celeste-formules .wp-block-column .wp-block-column { box-shadow: none; }
.entry-content .wp-block-group:has(> .celeste-reassurance) { margin-block-start: 0 !important; }
.entry-content .wp-block-cover:has(.celeste-formules) { margin-block-end: 0 !important; }
.ct-content-block .wp-block-group:has(> .wp-block-cover):has(.celeste-formules) { margin-block-end: 0 !important; }
@media (max-width: 781px) { .entry-content .horizontal-scroll .celeste-formules, .entry-content .celeste-formules { grid-template-columns: 1fr; } .celeste-formules > .wp-block-column:nth-child(n) { grid-column: 1 !important; } }
#header [data-transparent-row="yes"] { background: linear-gradient(to bottom, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .38) 45%, rgba(0, 0, 0, .12) 78%, transparent 100%); }
.celeste-reassurance { gap: clamp(16px, 3vw, 40px); }
html { scrollbar-gutter: stable; }

.entry-content .celeste-formules > .wp-block-column { width: auto !important; min-width: 0 !important; max-width: none !important; margin-inline: 0 !important; }
.entry-content .horizontal-scroll:has(.celeste-formules) { overflow: visible; }

/* Cartes de formules : fond blanc et prix clairement séparé du descriptif. */
.entry-content .celeste-formule-card {
    padding: clamp(24px, 2.5vw, 36px) !important;
    background: #ffffff !important;
    border: 1px solid #cda994;
    border-top: 4px solid #cda994;
    border-radius: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .17);
    color: #000000;
}
.entry-content .celeste-formule-card h3 {
    text-align: left;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.2;
    margin: 0 0 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #cda994;
}
.entry-content .celeste-formule-card ul { padding-left: 20px; margin-block: 0 24px; }
.entry-content .celeste-formule-card li { margin-block: 9px; line-height: 1.55; }
.entry-content .celeste-formule-card li::marker { color: #cda994; }
.entry-content .celeste-formule-card > p:last-child {
    margin: 24px 0 0;
    padding: 16px 18px;
    border-top: 1px solid var(--theme-palette-color-1, #cda994);
    text-align: left;
    background: #ffffff;
    border-radius: 0;
    font-size: 18px;
    line-height: 1.5;
    color: #000000;
}
.entry-content .celeste-formule-card > p:last-child strong { font-weight: 700 !important; }

/* Description headings keep their typography and introduce the text with the brand accent. */
.entry-content h2:is(.ci-if-ci_description_1_titre, .ci-if-ci_description_2_titre) {
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--theme-palette-color-1, #cda994);
}

/* Reassurance: white, square cards with a shared icon and text rhythm. */
.entry-content .celeste-reassurance {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
    margin-top: 32px;
}
.entry-content .celeste-reassurance:has(> :nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry-content .celeste-reassurance > .wp-block-column {
    margin: 0;
    min-width: 0;
    padding: 28px 24px;
    border: 1px solid var(--theme-palette-color-1, #cda994);
    border-radius: 0;
    background: #fff;
}
.celeste-reassurance > .wp-block-column > .wp-block-group { height: 100%; }
.celeste-reassurance img {
    display: block;
    width: 56px !important;
    height: 56px !important;
    object-fit: contain;
    margin: 0 auto 22px;
}
.celeste-reassurance p { margin: 0; font-size: 16px; line-height: 1.6; color: #000; }
.celeste-reassurance p + p { margin-top: 12px; }
@media (max-width: 999px) {
    .entry-content .celeste-reassurance, .entry-content .celeste-reassurance:has(> :nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
    .entry-content .celeste-reassurance, .entry-content .celeste-reassurance:has(> :nth-child(5)) { grid-template-columns: 1fr; gap: 16px; }
}

/* Native Blocksy mega menu: compact links and clear category headings. */
@media (min-width: 1000px) {
    #header-menu-1 .menu-item-2579 > .sub-menu > li { display: flex; flex-direction: column; }
    #header-menu-1 .menu-item-2579 > .sub-menu > li > .entry-content { order: -1; margin: 0 0 18px; }
    #header-menu-1 .ci-menu-category-photo { margin: 0; }
    #header-menu-1 .ci-menu-category-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; }
    #header-menu-1 .menu-item-2579 > .sub-menu {
        background: #fff;
        border-top: 3px solid #cda994;
        border-radius: 0;
        max-height: calc(100dvh - 180px);
        overflow-y: auto;
    }
    #header-menu-1 .menu-item-2579 .ct-column-heading {
        padding: 0;
        margin: 0;
        border-bottom: 0;
    }
    #header-menu-1 .menu-item-2579 .sub-menu .sub-menu .ct-menu-link {
        padding-top: 8px;
        padding-bottom: 8px;
        line-height: 1.5;
    }
}

/* Home: native Gutenberg sections, photo-first category access and consistent spacing. */
.home #main { background: #fff; }
.home .ci-home-hero > .wp-block-columns { gap: 0; min-height: min(760px, 95svh); }
.home .ci-home-hero > .wp-block-columns > :first-child { padding: 144px clamp(28px, 4vw, 72px) 56px !important; }
.home .ci-home-hero h1 { font-size: clamp(36px, 3.2vw, 54px); font-weight: 400; line-height: 1.15; max-width: 16ch; padding-bottom: 24px; border-bottom: 1px solid #cda994; }
.home .ci-home-hero p { max-width: 58ch; line-height: 1.7; }
.home .ci-home-hero .col-img figure, .home .ci-home-hero .col-img img { height: 100%; margin: 0; }
.home .ci-home-hero .col-img img { width: 100%; object-fit: cover; object-position: center; }
.home .ci-home-hero .wp-block-buttons { margin-top: 30px; gap: 14px; }
.home .ci-home-hero .wp-block-button { flex: 1; width: auto; }
.home .ci-home-categories { padding-block: clamp(48px, 6vw, 88px); }
.home .ci-home-categories > h2 { margin-bottom: 36px; }
.home .ci-home-categories > .wp-block-columns { gap: 24px; }
.home .ci-home-categories figure { margin: 0 0 20px; overflow: hidden; }
.home .ci-home-categories img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 0; }
.home .ci-home-categories h3 { font-size: 26px; font-weight: 400; margin: 0; padding-bottom: 16px; border-bottom: 1px solid #cda994; }
.home .ci-home-categories h3 a { color: #000; }
.home .ci-home-categories h3 a:hover { color: #ac8974; }
.home .ci-home-selection { background: #fff; padding-block: clamp(48px, 5vw, 80px) !important; border-top: 1px solid #cda994; }
.home .ci-home-selection > h2 { max-width: 850px; margin: 0 auto 32px; font-size: clamp(28px, 2.5vw, 38px); line-height: 1.25; font-weight: 400; }
.home .ci-home-selection .entries { gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home .ci-home-selection article { background: #fff; border-radius: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .10); border-bottom: 2px solid #cda994; overflow: hidden; }
.home .ci-home-selection article img { aspect-ratio: 3 / 2 !important; object-fit: cover; }
.home .ci-home-selection article h2 { font-size: 25px; font-weight: 400; line-height: 1.25; padding: 22px 24px; margin: 0; }
.home .ci-home-selection .ct-dynamic-filter { gap: 10px 24px; flex-wrap: wrap; justify-content: center; }
.home .ci-home-story { background: #fff !important; gap: 0; width: calc(100% - 48px); max-width: 1320px; margin: clamp(48px, 5vw, 80px) auto !important; padding: 0 !important; align-items: stretch; }
.home .ci-home-story > .wp-block-column:not(.full-height-image) { padding: clamp(28px, 3vw, 52px) !important; align-self: center; }
.home .ci-home-story h2 { font-size: clamp(28px, 2vw, 34px); font-weight: 400; line-height: 1.25; padding-bottom: 22px; border-bottom: 1px solid #cda994; }
.home .ci-home-story p { max-width: 62ch; line-height: 1.7; padding-inline: 0 !important; }
.home .ci-home-story .full-height-image figure { height: 100%; margin: 0; }
.home .ci-home-story .full-height-image img { height: 100%; width: 100%; object-fit: cover; }
.home .ci-home-audiences { gap: 0; align-items: stretch !important; }
.home .ci-home-audiences > .wp-block-column { align-self: stretch !important; }
.home .ci-home-audiences .wp-block-cover { height: 100%; padding: 40px 24px !important; }
.home .ci-home-audiences h3 { font-size: 28px; font-weight: 400; padding-bottom: 20px; border-bottom: 1px solid #cda994; }
.home .ci-home-audiences > .wp-block-column + .wp-block-column { border-left: 1px solid #cda994; }
.home .ci-home-audiences .wp-block-cover__inner-container > .wp-block-group { padding: 0 !important; }
.home .ci-home-audiences p { line-height: 1.7; }
.home .ci-home-booking { padding: 80px 24px !important; min-height: 420px; }
.home .ci-home-booking p { max-width: 760px; margin-inline: auto; line-height: 1.7; }
.home .ci-home-booking h2 { font-size: clamp(28px, 2.5vw, 38px); font-weight: 400; line-height: 1.25; }
.home .ci-home-booking .wp-block-cover__background { opacity: .72; }
.home .ci-home-booking .wp-block-buttons { gap: 16px; }
.home .ci-home-booking .wp-block-button { flex: 1; width: auto; }
.home :is(.ci-home-hero,.ci-home-booking,.ci-home-audiences) .wp-block-button__link { border-radius: 0; min-height: 52px; }
@media (max-width: 999px) {
    .home .ci-home-selection .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home .ci-home-categories > .wp-block-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home .ci-home-categories .wp-block-column { margin: 0; }
}
@media (max-width: 781px) {
    .home .ci-home-hero > .wp-block-columns { min-height: 0; }
    .home .ci-home-hero > .wp-block-columns > :first-child { padding: 120px 24px 40px !important; }
    .home .ci-home-hero h1 { max-width: none; text-align: left; }
    .home .ci-home-hero .col-img { height: 440px; }
    .home .ci-home-story .full-height-image { height: 420px; }
    .home .ci-home-story { width: 100%; margin-block: 48px !important; }
    .home .ci-home-audiences > .wp-block-column + .wp-block-column { border-left: 0; border-top: 1px solid #cda994; }
    .home .ci-home-celine > .full-height-image { order: -1; }
    .home .ci-home-categories { padding-inline: 24px; }
    .home .ci-home-categories h3 { font-size: 23px; }
    .home .ci-home-selection { padding-inline: 24px; }
    .home .ci-home-story > .wp-block-column:not(.full-height-image) { padding: 40px 24px !important; }
    .home .ci-home-booking { padding-block: 56px !important; }
}
@media (max-width: 479px) {
    .home .ci-home-selection .entries { grid-template-columns: 1fr; }
    .home .ci-home-categories > .wp-block-columns { gap: 24px 16px; }
    .home .ci-home-categories h3 { font-size: 20px; }
    .home :is(.ci-home-hero,.ci-home-booking) .wp-block-button { flex-basis: 100%; }
}

/* Mobile navigation keeps Blocksy's native drawer, focus handling and submenus. */
@media (max-width: 999px) {
    #offcanvas {
        --side-panel-width: min(100%, 460px);
        --vertical-alignment: flex-start;
        background: rgba(0, 0, 0, .72);
        backdrop-filter: blur(8px);
    }
    #offcanvas .ct-panel-inner { background: #fff; border-left: 1px solid #cda994; }
    #offcanvas .ct-panel-actions {
        padding: max(16px, env(safe-area-inset-top)) 24px 0;
        min-height: 60px;
        flex-shrink: 0;
    }
    #offcanvas .ct-toggle-close {
        --theme-icon-color: #000;
        --theme-icon-hover-color: #000;
        width: 44px;
        height: 44px;
        border: 1px solid #cda994;
        border-radius: 0;
        background: #fff;
        margin-left: auto;
    }
    #offcanvas .ct-toggle-close svg { width: 16px; height: 16px; }
    #offcanvas .ct-panel-content[data-device="mobile"] { justify-content: flex-start; }
    #offcanvas [data-device="mobile"] .ct-panel-content-inner {
        width: 100%;
        padding: 12px 28px max(32px, env(safe-area-inset-bottom));
        gap: 0;
        align-items: stretch;
    }
    #offcanvas [data-id="widget-area-1"] { display: contents; }
    #offcanvas .widget_media_image { order: 0; margin: 8px 0 30px; }
    #offcanvas .widget_media_image figure { margin: 0; }
    #offcanvas .widget_media_image img { width: min(100%, 260px); height: auto; }
    #offcanvas .mobile-menu { order: 1; width: 100%; margin: 0 0 28px; }
    #offcanvas .mobile-menu > ul > li { border-bottom: 1px solid #cda994; }
    #offcanvas .mobile-menu > ul > li:first-child { border-top: 1px solid #cda994; }
    #offcanvas .mobile-menu > ul > li > .ct-menu-link,
    #offcanvas .mobile-menu > ul > li > .ct-sub-menu-parent > .ct-menu-link {
        font-family: Baskervville, serif;
        font-weight: 400;
        font-size: 28px;
        line-height: 1.25;
        padding: 18px 0;
        color: #000;
    }
    #offcanvas .ct-toggle-dropdown-mobile {
        width: 44px;
        height: 44px;
        min-width: 44px;
        margin-left: 12px;
        border: 1px solid #cda994;
        border-radius: 0;
        color: #000;
        --theme-icon-color: #000;
        background: #fff;
    }
    #offcanvas .mobile-menu .sub-menu { padding: 0 0 16px 16px; }
    #offcanvas .mobile-menu .sub-menu .ct-menu-link {
        font-size: 17px;
        line-height: 1.4;
        min-height: 44px;
        padding: 10px 0;
        color: #000;
    }
    #offcanvas .widget_block:has(.wp-block-buttons) { order: 2; margin: 0 0 20px; }
    #offcanvas .wp-block-buttons { display: grid; grid-template-columns: 1fr; gap: 12px; }
    #offcanvas .wp-block-button { width: 100%; margin: 0; }
    #offcanvas .wp-block-button__link {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 52px;
        padding: 14px 18px !important;
        font-size: 15px;
        font-weight: 600;
        border-radius: 0;
        background: #fff;
        color: #000;
        border: 1px solid #cda994;
    }
    #offcanvas .wp-block-button:has(a[href$="/contact/"]) { order: -1; }
    #offcanvas .wp-block-button .wp-block-button__link { color: #cda994; }
    #offcanvas .wp-block-button a[href$="/contact/"] { background: #cda994; color: #fff; }
    #offcanvas .ct-header-cta { order: 3; margin: 0; width: 100%; }
    #offcanvas .ct-header-cta .ct-button {
        width: 100%;
        min-height: 48px;
        border-radius: 0;
        background: #fff;
        color: #000;
        border: 1px solid #000;
        font-size: 14px;
        --theme-icon-color: #000;
    }
    #offcanvas :is(a, button):focus-visible { outline: 2px solid #000; outline-offset: 4px; }
    #offcanvas .ct-menu-link:hover { color: #ac8974; }
}

