/*
Theme Name: Obillet
Theme URI:
Author: mhun
Author URI:
Description: Thème graphique Obillet
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.7
Version:
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: obillet
Tags:
*/

:root {
--ep-warning-color: #2C3E50 !important;
--ep-warning-text: #2C3E50 !important;
}

body .ep-modal-xxl {
--ep-modal-width: 1800px;
}

body .ep-seat-plan-wrap {
max-height: 2000px;
}

#ep_event_ticket_modal_right_image {
display:none;
}

.titre-text-shadow {
text-shadow: 10px 10px #000000
}

.ep-gap-1 {
gap:0.25rem;
}

.ep-gap-2 {
gap:0.5rem;
}

.ep-gap-3 {
gap:1rem;
}

.ep-box-wrap .ep-checkout-img-icon {
max-height: none;
}

#ep_ls_ticket_modal_load_seats_colors, #ep_ls_ticket_modal_load_seats_colors .ep-box-col-3 {
display:none;
}

.ep-options-legend .ep-seat-legend-item-available, .ep-options-legend .ep-seat-booking-status-available {
    display: none;
}

@media all and (min-width: 1068px) {
    #ep_ls_ticket_modal_load_seats_colors .ep-box-col-9 {
        max-width: 100%;
        flex: 0 0 100%;
        -ms-flex: 0 0 100%;
    }
}

@media all and (max-width:760px){
    .ep-ls-area-align-center .ep_ls_single_area_seats {
        justify-content: flex-start;
    }
    .ep-csc-legend-item {
        width: auto;
    }
    .ep-options-legend > div {
        width: auto;
    }
    body .ep-modal-xxl {
        width: 100%;
        margin: 0;
    }
    .ep-modal-view {
        padding:0;
    }
    #ep-sl-right-area {
        width:100% !important;
    }
    .wp-block-gallery .wp-block-image {
        width:100% !important;
    }
    /* Un seul bloc « autres dates » visible en mobile : celui de l'entête
       (date-time.php). #ep-sl-right-area = encadré billetterie (tickets.php). */
    #ep-sl-right-area .obillet-other-dates-block {
        display: none;
    }
}

/* ── Boutons EventPrime primary & warning — couleur #DE8295 ─────────────── */
.emagic .ep-btn-primary {
    background-color: #DE8295;
}

.emagic .ep-btn-primary:hover {
    background-color: #C87586;
}

.emagic .ep-btn-warning {
    --ep-btn-color: #000;
    --ep-btn-bg: #DE8295;
    --ep-btn-border-color: #DE8295;
    --ep-btn-hover-color: #000;
    --ep-btn-hover-bg: #C87586;
    --ep-btn-hover-border-color: #C87586;
    --ep-btn-focus-shadow-rgb: 222,130,149;
    --ep-btn-active-color: #000;
    --ep-btn-active-bg: #BD6E7F;
    --ep-btn-active-border-color: #BD6E7F;
    --ep-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --ep-btn-disabled-color: #000;
    --ep-btn-disabled-bg: #DE8295;
    --ep-btn-disabled-border-color: #DE8295;
}

/* ── Bouton "En savoir plus" (cartes event / widgets catégorie) — #DE8295 ─
   Scope via .ep-card-footer : .ep-btn-dark est aussi utilisé par le bouton
   "Close" des popups produits WooCommerce, qui ne doit pas être affecté. */
.emagic .ep-card-footer .ep-btn-dark {
    --ep-btn-color: #000;
    --ep-btn-bg: #DE8295;
    --ep-btn-border-color: #DE8295;
    --ep-btn-hover-color: #000;
    --ep-btn-hover-bg: #C87586;
    --ep-btn-hover-border-color: #C87586;
    --ep-btn-focus-shadow-rgb: 222,130,149;
    --ep-btn-active-color: #000;
    --ep-btn-active-bg: #BD6E7F;
    --ep-btn-active-border-color: #BD6E7F;
    --ep-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --ep-btn-disabled-color: #000;
    --ep-btn-disabled-bg: #DE8295;
    --ep-btn-disabled-border-color: #DE8295;
}

/* ── Bouton "Réserver maintenant" (page event) — #DE8295 ────────────────
   Scope volontaire via #ep_single_event_ticket_now_wrapper : .ep-btn-dark
   est réutilisé ailleurs (Close modale, Cancel checkout, Find Events...)
   qui doivent rester sombres. */
#ep_single_event_ticket_now_wrapper .ep-btn-dark,
.emagic .ep-sticky-book-bar .ep-sticky-book-btn {
    --ep-btn-color: #000;
    --ep-btn-bg: #DE8295;
    --ep-btn-border-color: #DE8295;
    --ep-btn-hover-color: #000;
    --ep-btn-hover-bg: #C87586;
    --ep-btn-hover-border-color: #C87586;
    --ep-btn-focus-shadow-rgb: 222,130,149;
    --ep-btn-active-color: #000;
    --ep-btn-active-bg: #BD6E7F;
    --ep-btn-active-border-color: #BD6E7F;
    --ep-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --ep-btn-disabled-color: #000;
    --ep-btn-disabled-bg: #DE8295;
    --ep-btn-disabled-border-color: #DE8295;
}

/* ── Page event : masquer la plage de dates de la série (rendue par
   l'override date-time.php) ── */
#ep_sl_event_date_range {
    display: none;
}

/* ── Mobile : onglet « Les Cookies » (Complianz) en bandeau vertical sur le bord
   droit, pour ne plus masquer la barre « Réserver » collante en bas d'écran.
   Complianz le pose en bas à droite avec une animation sur `bottom` : on la coupe,
   et on double :hover/:focus pour passer devant sa règle d'animation au survol. ── */
@media (max-width: 767px) {
    body #cmplz-manage-consent .cmplz-manage-consent,
    body #cmplz-manage-consent .cmplz-manage-consent:hover,
    body #cmplz-manage-consent .cmplz-manage-consent:focus {
        animation: none;
        top: 60%;
        bottom: auto;
        right: 0;
        left: auto;
        min-width: 0;
        height: auto;
        padding: 12px 6px;
        writing-mode: vertical-rl;
        transform: none;
        border-radius: 10px 0 0 10px;
        font-size: 12px;
    }
}

/* header search form */
#obillet-header-search {
    width: 100%;
	max-width:420px;
	padding: 0 1em;
}

.obillet-search-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    transition: background 0.2s, border-color 0.2s;
}

.obillet-search-wrap:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 0, 0, 0.6);
}

.obillet-search-wrap input[type="search"] {
    border: none;
    background: transparent;
    padding: 12px 12px 12px 14px;
    font-size: 0.875rem;
    color: inherit;
    width: 100%;
    outline: none;
    -webkit-appearance: none;
}

.obillet-search-wrap input[type="search"]::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

.obillet-search-wrap button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 12px 12px 12px 6px;
    color: inherit;
    display: flex;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.obillet-search-wrap button:hover {
    opacity: 1;
}

/* ── Header — bascule burger / navigation dépliée ──────────────────────────
   Le bloc Navigation de core déplie le menu dès 600px : la règle
   `@media (min-width:600px) { .wp-block-navigation__responsive-container:not(
   .hidden-by-default):not(.is-menu-open) { display:block } }` de
   `wp-includes/blocks/navigation/style.min.css` sort le conteneur de son état
   fermé, et la règle jumelle masque le bouton burger. Mesuré en prod le
   12/08/2026 à 768px comme à 1024px : les 5 entrées ne tiennent pas sur une
   ligne et se replient sur 2 (le bloc Navigation est en `flexWrap` par
   défaut) ; le header fait alors ~107px contre ~102px avec le burger. Le gain
   est donc surtout horizontal — la nav dépliée dispute sa ligne au logo, à la
   recherche et aux trois icônes (compte, agenda, panier) — et marginal en
   hauteur.

   On repousse donc la bascule à 1068px, le seuil de la grille EventPrime déjà
   utilisé plus haut dans ce fichier : burger jusqu'en tablette paysage
   (iPad 1024px inclus), nav dépliée en desktop seulement.

   Écrit en mobile-first — état burger inconditionnel, puis dépliage en
   `min-width` — et non en `max-width:1067px` : deux bornes entières laisseraient
   les viewports fractionnaires (zoom, écrans HiDPI) entre 1067 et 1068 sans
   burger NI nav.

   Les sélecteurs sont préfixés par `header` pour deux raisons : la spécificité
   passe au-dessus de celle de core (identique sinon — les `:not()` comptent
   comme des classes), donc l'override ne dépend plus de l'ordre du CSS
   combiné ; et la portée reste le header, sans toucher à un éventuel autre
   bloc Navigation. Le `:not(.is-menu-open)` est repris de core : sans lui, le
   menu ouvert serait masqué avec le conteneur fermé. */
header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
	display: none;
}

header .wp-block-navigation__responsive-container-open:not(.always-shown) {
	display: flex;
}

@media all and (min-width: 1068px) {
	header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: block;
	}

	header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}
}

.home .wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption {
	background: #FFFFFF;
	border-radius: 0 0 10px 10px;
}

/* Woocommerce */
.woocommerce-account .wp-block-post-title, .woocommerce-account main .woocommerce, .woocommerce-cart .wp-block-post-title, .woocommerce-cart main .woocommerce, .woocommerce-checkout .wp-block-post-title, .woocommerce-checkout main .woocommerce {
	max-width: 1440px;
	margin: auto;
}

/* Mon compte, déconnecté : formulaire de connexion resserré (le sélecteur
   dépasse en spécificité la règle 1440px ci-dessus). */
body.woocommerce-account:not(.logged-in) main .woocommerce {
	max-width: 540px;
}

.woocommerce-page table.shop_table {
	width:100%
}

.woocommerce td.product-name .wc-item-meta p, .woocommerce td.product-name .wc-item-meta:last-child, .woocommerce td.product-name dl.variation p, .woocommerce td.product-name dl.variation:last-child {
	margin-block-start: 0;
}

@media all and (min-width:1024px){
	.woocommerce-checkout-review-order {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-column-gap: 20px;
		align-items: start;
	}
}

/* Checkout — mention sous la case « Créer un compte ? », rendue par
   mhun-functions (§5). Alignée sur le libellé de la case et allégée, pour rester
   une explication et non un second libellé. Le sélecteur cible `p.create-account`
   et non `.create-account` : WooCommerce donne aussi cette classe au <div> qui
   contient les champs de mot de passe. Le préfixe `.woocommerce form` est
   nécessaire : sans lui, `.woocommerce form .form-row` (woocommerce.css) est plus
   spécifique et garde la main sur les marges. */
.woocommerce form .woocommerce-account-fields p.create-account {
	margin-bottom: 0.4rem;
}

.woocommerce form .woocommerce-account-fields .mhun-create-account-hint {
	margin: 0 0 1.25rem 1.5rem;
	font-size: 0.85rem;
	line-height: 1.45;
	opacity: 0.75;
}

/* ── Fiche event — « autres dates » : repli par mois et modale calendrier ──
   Le rendu est produit par obillet/inc/event-other-dates.php. */
.obillet-other-dates-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.75rem;
}

.obillet-other-dates-more > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #C87586;
    padding: 0.35rem 0;
    list-style: none;
}

.obillet-other-dates-more > summary::-webkit-details-marker {
    display: none;
}

.obillet-other-dates-more > summary::marker {
    content: '';
}

.obillet-other-dates-more > summary:hover {
    text-decoration: underline;
}

.obillet-other-dates-more > summary::after {
    content: '';
    width: 0.4em;
    height: 0.4em;
    margin-top: -0.2em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s;
}

.obillet-other-dates-more[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: 0.2em;
}

/* Lien secondaire : ne doit pas concurrencer « Réserver maintenant ». */
.obillet-other-dates-calendar-btn {
    display: inline-block;
    background: none;
    border: 0;
    padding: 0.35rem 0;
    cursor: pointer;
    color: #C87586;
    text-decoration: underline;
}

#obillet-other-dates-calendar .fc-event {
    background-color: rgba(222, 130, 149, 0.2);
    border-color: #DE8295;
    color: #2C3E50;
    cursor: pointer;
}

#obillet-other-dates-calendar .fc-event.obillet-fc-current {
    background-color: #2C3E50;
    border-color: #2C3E50;
    color: #FFFFFF;
}

#obillet-other-dates-calendar .fc-toolbar-title {
    font-size: 1.125rem;
}

/* Fiche spectacle — logo de la salle déformé.
   LiteSpeed injecte width/height sur l'<img>, le max-width:100% inline rabat la
   largeur mais laisse la hauteur figée, et la règle EventPrime prévue pour ça
   (.ep-sl-venue .ep-venue-card-thumb img) ne matche pas notre override
   #ep-sl-venue-detail. On rétablit le ratio ; object-fit:contain évite le
   recadrage d'un logo si une hauteur est réimposée en amont. */
#ep-sl-venue-detail #ep_event_venue_main_image,
#ep-sl-venue-detail .ep-image-slider .thumbnail img {
    height: auto;
    object-fit: contain;
}
/* Fiche spectacle — navigation « précédent / suivant » en cartes.
   Le markup est produit par inc/event-nav-cards.php, en remplacement du rendu de
   core/post-navigation-link. Le <nav> parent vient du template : il est en flex nowrap
   avec justify-content:space-between, d'où le flex-basis des cartes et l'override de
   flex-wrap sur mobile — on ne peut pas le styler par une classe qu'on maîtrise, on le
   cible par la présence de nos cartes. */
.obillet-event-nav__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 0;
    max-width: 48%;
    text-decoration: none;
    color: inherit;
}

.obillet-event-nav__link--next {
    flex-direction: row-reverse;
    text-align: right;
    margin-inline-start: auto;
}

.obillet-event-nav__link:hover .obillet-event-nav__title,
.obillet-event-nav__link:focus-visible .obillet-event-nav__title {
    text-decoration: underline;
}

.obillet-event-nav__arrow {
    flex: 0 0 auto;
    font-size: 1.25rem;
    line-height: 1;
    color: #2C3E50;
}

.obillet-event-nav__media {
    flex: 0 0 auto;
    width: 96px;
    overflow: hidden;
    border-radius: 4px;
    background: #F2F2F2;
}

.obillet-event-nav__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.obillet-event-nav__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.obillet-event-nav__kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #767676;
}

.obillet-event-nav__title {
    font-weight: 700;
    line-height: 1.2;
}

.obillet-event-nav__date {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Le prix est rendu par EventPrime (ep-event-list-price) : ep-mt-auto y pousserait la
   ligne en bas de la carte, sans intérêt dans une pile de hauteur libre. */
.obillet-event-nav__price .ep-event-list-price {
    margin-top: 0;
    font-size: 0.875rem;
}

.obillet-event-nav__link--next .obillet-event-nav__price .ep-event-list-price {
    justify-content: flex-end;
}

.obillet-event-nav__desc {
    font-size: 0.8125rem;
    color: #767676;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 781px) {
    nav.wp-block-group:has(> .obillet-event-nav__link) {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .obillet-event-nav__link {
        flex-basis: 100%;
        max-width: 100%;
    }

    .obillet-event-nav__link--next {
        margin-inline-start: 0;
    }
}

/* ── Mobile : modale billetterie — marge basse sous « Fermer ».
   EventPrime met `padding-bottom: 0` sur .ep-modal-body (≤575px) en prévision de sa
   barre d'actions sticky (`.ep-ticket-modal-actions`). Notre gabarit tickets.php n'a
   pas cette classe : les boutons sont dans un simple bloc et « Fermer » touchait le
   bord. On rend de l'air au corps de la modale (encoche iOS incluse). ── */
@media (max-width: 575px) {
    body #ep-event-ticket-checkout-modal .ep-modal-body:has(#ep_event_ticket_modal_right) {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }
}
