/*
Theme Name: Bousi
Description: A modern block-based theme for workshops
Version: 1.0
*/

body.home footer {
    margin: 0!important;
}
body.home .wp-block-post-content {
    padding-left: 0!important;
    padding-right: 0!important;
}

@media screen and (max-width: 768px) {
    .stack-on-mobile {
        flex-direction: column;
        margin-bottom: 4rem;
    }
    .wp-block-site-title {
        max-width: 70vw;
    }
    .wp-block-navigation.is-content-justification-right {
        width: 3rem;
        height: 3rem;
    }
    .wp-block-navigation__responsive-container {
        background-color: var(--wp--preset--color--custom-darker-green)!important;
    }
    .wp-block-navigation__responsive-dialog {
        font-size: 1.6rem;
        color: var(--wp--preset--color--custom-white-ish)!important;
    }
    .wp-block-navigation__responsive-container-close svg,
    .wp-block-navigation__responsive-container-open svg {
        width: 2rem;
        height: 2rem;
    }
}

.wp-block-group.wide {
    max-width: none!important;
}
.align-items-end {
    align-items: flex-end;
}

/* Workshop Cards Styling */
.workshop-card {
    margin-bottom: 2rem;
    background-color: var(--wp--preset--color--custom-white-ish);
    border-radius: 8px;
    overflow: hidden;
}

.workshop-card .wp-block-post-title {
    margin-bottom: 0.5rem;
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--large);
}

.workshop-card .wp-block-post-title a {
    text-decoration: none;
    color: inherit;
}

.workshop-card .wp-block-post-title a:hover {
    color: var(--wp--preset--color--custom-darker-green);
}

/* Layout des cards : miniatures 30% | infos 50% | bouton auto */
.workshop-card-layout {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.workshop-card-layout .workshop-miniatures {
    flex: 0 0 30%;
    min-width: 0;
}

.workshop-card-layout .workshop-card-info {
    flex: 0 0 50%;
    min-width: 0;
}

/* Miniatures : images qui remplissent le bloc */
.workshop-miniatures {
    display: flex;
    gap: 8px;
    border-radius: 6px;
    overflow: hidden;
}

.workshop-miniatures--single {
    display: block;
}

.workshop-miniatures img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.workshop-miniatures--double img {
    flex: 1 1 0;
    min-width: 0;
}

/* Bouton "Read more" : pilule vert + blanc */
.workshop-card-readmore {
    background-color: var(--wp--preset--color--custom-darker-green);
    color: #fff !important;
    border-radius: 999px;
    padding: 0.6em 1.5em;
    text-decoration: none;
    font-family: var(--wp--preset--font-family--open-sans);
    font-size: var(--wp--preset--font-size--small);
    white-space: nowrap;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.workshop-card-readmore:hover {
    background-color: var(--wp--preset--color--custom-menu-green);
    color: #fff !important;
}

@media screen and (max-width: 768px) {
    .map-container {
        flex-direction: column;
        margin: 0!important;
        padding-bottom: 2rem!important;
    }
}

/* Responsive : workshop cards empilées en mobile */
@media (max-width: 768px) {
    .workshop-card-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .workshop-card-layout .workshop-miniatures,
    .workshop-card-layout .workshop-card-info {
        flex: none;
        width: 100%;
    }

    .workshop-miniatures img {
        height: 160px;
    }

    .workshop-card-readmore {
        align-self: flex-start;
    }
}

/* ===== Workshop Detail Page ===== */

.workshop-detail-hero {
    margin-top: 8.2rem !important;
    margin-bottom: 0 !important;
}

.workshop-tutor-portrait {
    margin: 0;
}

.workshop-tutor-portrait img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.workshop-tutor-website {
    margin-top: 0.5em;
}

.workshop-tutor-website a {
    color: var(--wp--preset--color--custom-darker-green);
    font-size: var(--wp--preset--font-size--small, 14px);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.workshop-tutor-website a:hover {
    color: var(--wp--preset--color--custom-painting-yellow);
}

.workshop-detail-dates {
    font-family: var(--wp--preset--font-family--open-sans);
    color: var(--wp--preset--color--custom-darker-green);
}

.workshop-detail-gallery {
    display: grid;
    grid-template-columns: repeat(var(--gallery-columns, 4), 1fr);
    gap: 16px;
}

.workshop-detail-gallery-item {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0px;
}

.workshop-detail-gallery-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.workshop-detail-gallery-item:hover img {
    transform: scale(1.05);
}

/* Boutons Back / Book : un en haut, un en bas du bloc */
.workshop-detail-actions {
    align-self: stretch;
    justify-content: space-between !important;
}

.workshop-detail-contact {
    border-top: 2px solid var(--wp--preset--color--custom-pale-green-logo);
    margin-top: var(--wp--preset--spacing--70);
    padding-top: var(--wp--preset--spacing--80) !important;
}

.workshop-contact-form {
    max-width: 640px;
    margin: 0 auto;
}

.workshop-contact-form__honeypot {
    position: absolute;
    left: -9999px;
}

.workshop-contact-form__notice {
    max-width: 640px;
    margin: 0 auto 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid;
}

.workshop-contact-form__notice--success {
    border-color: #2f7d32;
    background-color: #e7f5e8;
    color: #1d4f20;
}

.workshop-contact-form__notice--error {
    border-color: #b3261e;
    background-color: #fdecea;
    color: #7f1d1d;
}

.workshop-contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0 0 1rem;
}

.workshop-contact-form__field label {
    color: var(--wp--preset--color--custom-darker-green);
    font-weight: 600;
}

.workshop-contact-form__field input {
    border: 1px solid var(--wp--preset--color--custom-pale-green-logo);
    border-radius: 0;
    padding: 0.7rem;
    background-color: #fff;
    color: var(--wp--preset--color--custom-darker-green);
}

.workshop-contact-form__field select,
.workshop-contact-form__field textarea {
    border: 1px solid var(--wp--preset--color--custom-pale-green-logo);
    border-radius: 0;
    padding: 0.7rem;
    background-color: #fff;
    color: var(--wp--preset--color--custom-darker-green);
}

.workshop-contact-form__field textarea {
    min-height: 110px;
    resize: vertical;
}

.workshop-contact-form__field input:focus,
.workshop-contact-form__field select:focus,
.workshop-contact-form__field textarea:focus {
    outline: 2px solid var(--wp--preset--color--custom-painting-yellow);
    outline-offset: 1px;
}

.workshop-contact-form__help {
    font-size: 0.875rem;
    line-height: 1;
    font-style: italic;
}

.workshop-contact-form__help a {
    color: var(--wp--preset--color--custom-darker-green);
}

.workshop-contact-form__actions {
    margin: 1.5rem 0 0;
}

.workshop-contact-form__actions button {
    border: 0;
    min-height: 44px;
    padding: 0.65rem 1.25rem;
    background-color: var(--wp--preset--color--custom-darker-green);
    color: var(--wp--preset--color--custom-white-ish);
    font-weight: 600;
    cursor: pointer;
}

.workshop-contact-form__actions button:hover {
    opacity: 0.9;
}

.workshop-detail-footer {
    margin-top: 5rem;
    padding-top: 1.5rem;
    padding-bottom: 4rem;
    border-top: 1px solid var(--wp--preset--color--custom-pale-green-logo);
}

.workshop-detail-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.workshop-detail-nav--only-next {
    justify-content: flex-end;
}

.workshop-detail-nav--only-prev {
    justify-content: flex-start;
}

.workshop-detail-nav__link {
    color: var(--wp--preset--color--custom-darker-green);
    text-decoration: none;
    font-weight: 600;
}

.workshop-detail-nav__link:hover {
    color: var(--wp--preset--color--custom-painting-yellow);
}

.workshop-detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.workshop-detail-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.workshop-detail-tags__item {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background-color: var(--wp--preset--color--custom-white-ish);
    color: var(--wp--preset--color--custom-darker-green);
    text-decoration: none;
    border: 1px solid var(--wp--preset--color--custom-pale-green-logo);
}

.workshop-detail-tags__item:hover {
    background-color: var(--wp--preset--color--custom-pale-green-logo);
}

@media (max-width: 768px) {
    .workshop-detail-hero {
        margin-top: 5rem !important;
    }

    .workshop-detail-hero .wp-block-post-title {
        display: none !important;
    }

    .workshop-detail-info {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
        text-align: center;
    }

    .workshop-detail-info > * {
        width: 100% !important;
    }

    .workshop-detail-info .wp-block-group {
        align-items: center !important;
    }

    .workshop-detail-actions {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 1rem !important;
    }

    .workshop-detail-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .workshop-detail-nav {
        flex-direction: column;
        align-items: flex-start;
    }
}

