/*
Theme Name: DTH
Theme URI: https://www.danseterrehappy.fr/
Author: Danse Terre Happy
Description: Theme bloc sur mesure pour l'association Danse Terre Happy. Identite noir, rouge et blanc, pensee pour le Rock'n'Roll, les cours, le planning et l'agenda annuel.
Version: 3.90.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: dth
Tags: block-patterns, full-site-editing, custom-colors, custom-logo, one-column
*/


/* DTH v1.9 - plage de dates pour les vacances */
.dth-upcoming-event__date--range {
    min-width: 96px;
}
.dth-upcoming-event__date--range strong {
    font-size: 1.05rem;
    line-height: 1.1;
}
.dth-upcoming-event__date--range span {
    font-size: .78rem;
    white-space: nowrap;
}

/* ==========================================================
   DTH v3.6 - Ajouter / s'abonner a l'agenda
   ========================================================== */
.dth-calendar-subscribe {
    width: min(100%, 1180px);
    margin: 24px auto 34px;
    padding: 20px 22px;
    border: 2px solid var(--wp--preset--color--dth-red, #c8102e);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    background: #fff;
    box-sizing: border-box;
}
.dth-calendar-subscribe__text {
    display: grid;
    gap: 4px;
}
.dth-calendar-subscribe__text strong {
    font-size: 1.06rem;
}
.dth-calendar-subscribe__text span {
    font-size: .94rem;
    line-height: 1.45;
    opacity: .78;
}
.dth-calendar-menu {
    position: relative;
    flex: 0 0 auto;
}
.dth-calendar-menu > summary {
    list-style: none;
    cursor: pointer;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    background: var(--wp--preset--color--dth-red, #c8102e);
    color: #fff;
    white-space: nowrap;
    user-select: none;
}
.dth-calendar-menu > summary::-webkit-details-marker { display: none; }
.dth-calendar-menu[open] > summary {
    background: #000;
}
.dth-calendar-menu__panel {
    position: absolute;
    z-index: 30;
    right: 0;
    top: calc(100% + 9px);
    min-width: 250px;
    padding: 8px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 12px;
    box-shadow: 0 14px 38px rgba(0,0,0,.15);
}
.dth-calendar-menu__panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #111;
    text-decoration: none;
    font-weight: 700;
}
.dth-calendar-menu__panel a:hover,
.dth-calendar-menu__panel a:focus-visible {
    background: #f3f3f3;
    color: var(--wp--preset--color--dth-red, #c8102e);
}
.dth-agenda-item__calendar {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 8px 0 15px 16px;
    padding: 7px 11px;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}
.dth-agenda-item__calendar:hover,
.dth-agenda-item__calendar:focus-visible {
    border-color: var(--wp--preset--color--dth-red, #c8102e);
    color: var(--wp--preset--color--dth-red, #c8102e);
}
@media (max-width: 760px) {
    .dth-calendar-subscribe {
        width: calc(100% - 40px);
        margin: 20px auto 28px;
        padding: 18px;
        align-items: stretch;
        flex-direction: column;
    }
    .dth-calendar-menu > summary {
        text-align: center;
        white-space: normal;
    }
    .dth-calendar-menu__panel {
        position: static;
        margin-top: 8px;
        min-width: 0;
        box-shadow: none;
    }
    .dth-agenda-item__calendar {
        margin-left: 12px;
        margin-bottom: 13px;
    }
}


/* ==========================================================
   DTH v3.9 - Boutons plus premium / plus "sexy" dans la charte
   ========================================================== */
.wp-block-button .wp-block-button__link,
.dth-pricing-card__button,
.dth-calendar-menu > summary,
.dth-agenda-item__calendar,
.dth-premium-offer__actions--payment .dth-swpm-premium-button,
.dth-premium-offer__actions--payment .wp-element-button,
.dth-premium-offer__actions--payment button {
    position: relative;
    overflow: hidden;
    border-radius: 999px !important;
    font-weight: 800 !important;
    letter-spacing: .02em;
    box-shadow: 0 3px 8px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.wp-block-button .wp-block-button__link::before,
.dth-pricing-card__button::before,
.dth-calendar-menu > summary::before,
.dth-agenda-item__calendar::before,
.dth-premium-offer__actions--payment .dth-swpm-premium-button::before,
.dth-premium-offer__actions--payment .wp-element-button::before,
.dth-premium-offer__actions--payment button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.22) 50%, rgba(255,255,255,0) 80%);
    transform: translateX(-130%);
    transition: transform .45s ease;
    pointer-events: none;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus-visible,
.dth-pricing-card__button:hover,
.dth-pricing-card__button:focus-visible,
.dth-calendar-menu > summary:hover,
.dth-calendar-menu > summary:focus-visible,
.dth-agenda-item__calendar:hover,
.dth-agenda-item__calendar:focus-visible,
.dth-premium-offer__actions--payment .dth-swpm-premium-button:hover,
.dth-premium-offer__actions--payment .dth-swpm-premium-button:focus-visible,
.dth-premium-offer__actions--payment .wp-element-button:hover,
.dth-premium-offer__actions--payment .wp-element-button:focus-visible,
.dth-premium-offer__actions--payment button:hover,
.dth-premium-offer__actions--payment button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,.10);
}

.wp-block-button .wp-block-button__link:hover::before,
.wp-block-button .wp-block-button__link:focus-visible::before,
.dth-pricing-card__button:hover::before,
.dth-pricing-card__button:focus-visible::before,
.dth-calendar-menu > summary:hover::before,
.dth-calendar-menu > summary:focus-visible::before,
.dth-agenda-item__calendar:hover::before,
.dth-agenda-item__calendar:focus-visible::before,
.dth-premium-offer__actions--payment .dth-swpm-premium-button:hover::before,
.dth-premium-offer__actions--payment .dth-swpm-premium-button:focus-visible::before,
.dth-premium-offer__actions--payment .wp-element-button:hover::before,
.dth-premium-offer__actions--payment .wp-element-button:focus-visible::before,
.dth-premium-offer__actions--payment button:hover::before,
.dth-premium-offer__actions--payment button:focus-visible::before {
    transform: translateX(130%);
}

.wp-block-button.is-style-fill .wp-block-button__link,
.wp-block-button.is-style-dth-red .wp-block-button__link,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
.dth-pricing-card__button,
.dth-calendar-menu > summary,
.dth-premium-offer__actions--payment .dth-swpm-premium-button,
.dth-premium-offer__actions--payment .wp-element-button,
.dth-premium-offer__actions--payment button {
    background-image: linear-gradient(135deg, #e01939 0%, var(--wp--preset--color--dth-red, #c8102e) 58%, #98091f 100%) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-dth-white .wp-block-button__link,
.dth-agenda-item__calendar {
    background-image: none !important;
}

.wp-block-button .wp-block-button__link:focus-visible,
.dth-pricing-card__button:focus-visible,
.dth-calendar-menu > summary:focus-visible,
.dth-agenda-item__calendar:focus-visible,
.dth-premium-offer__actions--payment .dth-swpm-premium-button:focus-visible,
.dth-premium-offer__actions--payment .wp-element-button:focus-visible,
.dth-premium-offer__actions--payment button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 6px rgba(200,16,46,.22), 0 6px 14px rgba(0,0,0,.10);
}

.dth-calendar-menu > summary {
    padding: 13px 20px;
}

.dth-agenda-item__calendar {
    border: 2px solid var(--wp--preset--color--dth-red, #c8102e);
    color: var(--wp--preset--color--dth-red, #c8102e);
    background: #fff;
}

@media (max-width: 760px) {
    .wp-block-button .wp-block-button__link,
    .dth-pricing-card__button,
    .dth-calendar-menu > summary,
    .dth-agenda-item__calendar,
    .dth-premium-offer__actions--payment .dth-swpm-premium-button,
    .dth-premium-offer__actions--payment .wp-element-button,
    .dth-premium-offer__actions--payment button {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-block-button .wp-block-button__link,
    .dth-pricing-card__button,
    .dth-calendar-menu > summary,
    .dth-agenda-item__calendar,
    .dth-premium-offer__actions--payment .dth-swpm-premium-button,
    .dth-premium-offer__actions--payment .wp-element-button,
    .dth-premium-offer__actions--payment button,
    .wp-block-button .wp-block-button__link::before,
    .dth-pricing-card__button::before,
    .dth-calendar-menu > summary::before,
    .dth-agenda-item__calendar::before,
    .dth-premium-offer__actions--payment .dth-swpm-premium-button::before,
    .dth-premium-offer__actions--payment .wp-element-button::before,
    .dth-premium-offer__actions--payment button::before {
        transition: none !important;
    }
}


/* ==========================================================
   DTH v3.12 - Correction débordement bouton agenda mobile
   ========================================================== */
.dth-calendar-menu > summary,
.dth-agenda-item__calendar,
.wp-block-button .wp-block-button__link,
.dth-pricing-card__button,
.dth-premium-offer__actions--payment .dth-swpm-premium-button,
.dth-premium-offer__actions--payment .wp-element-button,
.dth-premium-offer__actions--payment button {
    box-sizing: border-box;
}

@media (max-width: 760px) {
    .dth-calendar-menu {
        width: 100%;
    }

    .dth-calendar-menu > summary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 13px 18px;
        line-height: 1.25;
        white-space: normal;
        word-break: normal;
    }

    .dth-calendar-subscribe {
        overflow: hidden;
    }
}

/* ==========================================================
   DTH v3.13 - Premium par virement bancaire
   ========================================================== */
.dth-premium-bank__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}
.dth-premium-bank__price {
    margin: .25rem 0 1rem;
    color: var(--wp--preset--color--dth-red, #c8102e);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1;
}
.dth-premium-bank__details {
    margin: 1rem 0;
}
.dth-premium-bank__details > div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0,0,0,.10);
}
.dth-premium-bank__details dt { font-weight: 800; }
.dth-premium-bank__details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dth-premium-bank__details code { font-size: .92em; }
.dth-premium-bank__details .is-reference {
    margin-top: 10px;
    padding: 12px;
    border: 2px solid var(--wp--preset--color--dth-red, #c8102e);
    border-radius: 12px;
    background: #fff7f8;
}
.dth-premium-bank__instructions { color: #555; }
.dth-premium-bank__form { margin-top: 18px; }
.dth-premium-bank__form .wp-element-button { width: 100%; }
.dth-premium-message {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 700;
}
.dth-premium-message.is-success { background: #e8f7ed; color: #156a31; border: 1px solid #b8e2c6; }
.dth-premium-message.is-pending { background: #fff7da; color: #684f00; border: 1px solid #ead58a; }
.dth-premium-bank__status { margin-bottom: 24px; }
@media (max-width: 820px) {
    .dth-premium-bank__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .dth-premium-bank__details > div { grid-template-columns: 1fr; gap: 4px; }
}


/* ==========================================================
   DTH v3.24 - Correction hover boutons rouges
   ========================================================== */
/* Le dégradé rouge v3.9 utilisait background-image !important.
   Il restait donc visible au survol malgré le fond blanc défini
   dans theme.css. On neutralise explicitement l'image de fond. */
.wp-block-button.is-style-fill .wp-block-button__link:hover,
.wp-block-button.is-style-fill .wp-block-button__link:focus-visible,
.wp-block-button.is-style-dth-red .wp-block-button__link:hover,
.wp-block-button.is-style-dth-red .wp-block-button__link:focus-visible,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):focus-visible,
.wp-block-button .wp-block-button__link.has-dth-red-background-color:hover,
.wp-block-button .wp-block-button__link.has-dth-red-background-color:focus-visible,
.dth-pricing-card__button:hover,
.dth-pricing-card__button:focus-visible,
.dth-calendar-menu > summary:hover,
.dth-calendar-menu > summary:focus-visible,
.dth-premium-offer__actions--payment .dth-swpm-premium-button:hover,
.dth-premium-offer__actions--payment .dth-swpm-premium-button:focus-visible,
.dth-premium-offer__actions--payment .wp-element-button:hover,
.dth-premium-offer__actions--payment .wp-element-button:focus-visible,
.dth-premium-offer__actions--payment button:hover,
.dth-premium-offer__actions--payment button:focus-visible {
    background: #fff !important;
    background-image: none !important;
    color: var(--wp--preset--color--dth-red, #c8102e) !important;
    border: 2px solid var(--wp--preset--color--dth-red, #c8102e) !important;
}


/* ==========================================================
   DTH v3.36 - Header : logo a gauche, menu + connexion a droite
   ========================================================== */
header.wp-block-template-part .dth-site-header,
header.wp-block-template-part > .wp-block-group:first-child,
header.wp-block-template-part .wp-block-group.dth-site-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
}

header.wp-block-template-part .dth-logo-link,
header.wp-block-template-part .wp-block-site-logo,
header.wp-block-template-part .dth-header-logo,
header.wp-block-template-part .wp-block-shortcode:has(.dth-logo-link) {
    flex: 0 0 auto !important;
    margin-right: auto !important;
}

header.wp-block-template-part .wp-block-navigation,
header.wp-block-template-part .dth-header-nav,
header.wp-block-template-part .dth-header-actions,
header.wp-block-template-part .dth-header-login,
header.wp-block-template-part .dth-member-login-wrap {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
}

header.wp-block-template-part .wp-block-navigation {
    margin-left: auto !important;
}

header.wp-block-template-part .wp-block-navigation__container {
    justify-content: flex-end !important;
}

@media (min-width: 783px) {
    header.wp-block-template-part .dth-site-header,
    header.wp-block-template-part > .wp-block-group:first-child {
        flex-wrap: nowrap !important;
    }

    header.wp-block-template-part .wp-block-navigation,
    header.wp-block-template-part .dth-header-login,
    header.wp-block-template-part .dth-member-login-wrap {
        align-self: center !important;
    }
}

@media (max-width: 782px) {
    header.wp-block-template-part .dth-site-header,
    header.wp-block-template-part > .wp-block-group:first-child {
        justify-content: space-between !important;
        gap: 12px !important;
    }

    header.wp-block-template-part .dth-logo-link,
    header.wp-block-template-part .wp-block-site-logo,
    header.wp-block-template-part .dth-header-logo,
    header.wp-block-template-part .wp-block-shortcode:has(.dth-logo-link) {
        margin-right: auto !important;
    }

    header.wp-block-template-part .wp-block-navigation,
    header.wp-block-template-part .dth-header-login,
    header.wp-block-template-part .dth-member-login-wrap {
        margin-left: 0 !important;
    }
}


/* ==========================================================
   DTH v3.37 - Header pleine largeur : logo gauche, navigation droite
   ========================================================== */
@media (min-width: 783px) {
    /* Le groupe alignwide était limité à 1240px : sur grand écran cela
       recentrait artificiellement le logo et le bloc menu/connexion. */
    header.wp-block-template-part .dth-site-header__inner,
    header.wp-block-template-part .dth-site-header > .wp-block-group,
    header.wp-block-template-part .dth-site-header > .wp-block-group.alignwide,
    header.wp-block-template-part > .wp-block-group:first-child > .wp-block-group {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    header.wp-block-template-part .dth-site-header__inner,
    header.wp-block-template-part .dth-site-header > .wp-block-group,
    header.wp-block-template-part > .wp-block-group:first-child > .wp-block-group {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 24px !important;
    }

    header.wp-block-template-part .dth-site-header__inner > .wp-block-shortcode:first-child,
    header.wp-block-template-part .dth-site-header__inner > .dth-logo-link,
    header.wp-block-template-part .dth-site-header__inner > .wp-block-site-logo {
        flex: 0 0 auto !important;
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    header.wp-block-template-part .dth-header-nav-account-wrap {
        flex: 0 1 auto !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        justify-content: flex-end !important;
    }
}
