/* Card Styling */
.card.event-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card.event-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}
/* Image */
.card.event-card .card-img-top {
    height: 200px;
    border-radius: 0.75rem;
    position: relative;
    z-index: 1;
}
/* Blurred background behind card image */
.card.event-card .position-relative {
    overflow: hidden;
}
.card.event-card .position-relative::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.9);
    transform: scale(1.1);
    z-index: 0;
}
/* Generic blurred background container (used on detail page) */
.card.event-card .card-body {
    padding: 15px;
}
.card.event-card .card-body > div:first-child {
    max-width: 100%; /* Ou une valeur fixe comme 250px */
}
.card.event-card .card-body a {
    display: block; /* ou inline-block */
    max-width: 100%; /* Limite la largeur de l'élément <a> */
    overflow: hidden; /* Cache le texte qui dépasse */
    text-overflow: ellipsis; /* Ajoute "..." si le texte est trop long */
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
}
/* Title */
.card.event-card .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    overflow: hidden; /* Cache le texte qui dépasse */
    text-overflow: ellipsis; /* Ajoute "..." si le texte est trop long */
    text-transform: uppercase;
    max-width: 100%; /* S'adapte à la largeur du conteneur parent */
    display: block; /* Nécessaire pour que text-overflow fonctionne */
}
/* Date and Location */
.card.event-card .card-text {
    font-size: 0.9rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}
/* Price */
.card.event-card .price {
    font-size: 1rem;
    font-weight: bold;
    color: #28a745;
}
/* Button */
.card.event-card .btn-danger {
    font-size: 0.9rem;
    font-weight: bold;
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 2rem;
    padding: 0.3rem;
    width: 100%;
}
/* Badges */
.badge-verified,
.badge-type {
    position: absolute;
    color: #fff;
    font-size: 12px;
    z-index: 3;
}
.badge-promo {
    top: 12px;
    right: 12px;
    position: absolute;
    color: #fff;
    font-weight: 700;
    padding: 6px 16px;
    line-height: 1.1;
    z-index: 4;
    background: linear-gradient(135deg, #0f9d58 0%, #12d064 100%);
    border-radius: 999px;
    box-shadow: 0 6px 15px rgba(15, 157, 88, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.badge-has-started {
    position: absolute;
    right: 12px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: linear-gradient(135deg, #2806d2 0%, #e70a0a 100%);
    border-radius: 999px;
    box-shadow: 0 6px 15px rgba(25, 142, 237, 0.35),
        0 0 0 rgba(25, 142, 237, 0.6);
    animation: badgePulse 2.2s ease-in-out infinite;
}
.badge-verified {
    /* background-color: #28a745; */
    top: 10px;
    left: 10px;
}
.badge-type {
    background-color: var(--complementary1);
    bottom: 10px;
    right: 10px;
}
/* Style pour le conteneur principal */
.publisher-container {
    width: 100%; /* Prend toute la largeur disponible */
}
/* Style pour le texte "Publié par" */
.publisher-container .publisher-text {
    margin-bottom: 0; /* Supprime la marge inférieure */
    font-size: 0.9rem; /* Taille de police */
    color: #555; /* Couleur du texte */
}
/* Style pour le lien "@prestataire02325" */
.publisher-container .publisher-username {
    color: #333; /* Couleur du lien */
    text-decoration: none; /* Supprime le soulignement */
    transition: color 0.3s ease; /* Transition fluide */
}
.publisher-container .publisher-username:hover {
    color: var(--primary); /* Couleur au survol */
}
/* Style pour le bouton "S'abonner" */
.publisher-container .subscribe-btn {
    font-size: 0.8rem; /* Taille de police */
    padding: 0.25rem 0.75rem; /* Padding du bouton */
    transition: background-color 0.3s ease, color 0.3s ease; /* Transition fluide */
}

.subscription-toggle-btn .subscription-toggle-spinner {
    width: 0.85rem;
    height: 0.85rem;
    border-width: 0.12em;
}
.publisher-container .subscribe-btn:hover {
    background-color: var(--secondary); /* Couleur de fond au survol */
    color: #fff; /* Couleur du texte au survol */
}
/* Like Button */
.like-button {
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    margin-bottom: -5px;
    background: none;
    border: none;
    padding: 0;
    display: block;
    outline: none;
}
.like-button i {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    font-size: 1.2rem;
}
.like-button:hover i {
    transform: scale(1.1);
}
.like-button.liked i {
    color: var(--primary);
    font-weight: 900;
}
.likes-count {
    font-size: 1rem;
    display: block;
    margin-top: 2px;
    transition: all 0.3s ease;
}
/* Animation lorsque le bouton est désactivé */
.like-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
/* Accordion Button */
.accordion-button:not(.collapsed) {
    background-color: rgba(192, 192, 192, 0.5);
    color: #212529;
}
.accordion-button:hover {
    background-color: rgba(192, 192, 192, 0.5);
    color: #212529;
}
.accordion-button {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Calendar Toolbar */
.fc-toolbar-chunk {
    margin-right: 20px;
}
.fc-toolbar-chunk:last-child {
    margin-right: 0;
}
.fc-toolbar-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #333;
    margin: 0 10px;
    white-space: nowrap;
}
/* Loading Spinner */
#calendar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
}
.spinner-border {
    width: 3rem;
    height: 3rem;
}
.description-content.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.read-more-btn {
    color: #000;
    font-weight: 500;
}
.toggle-btn:focus,
.toggle-btn:hover,
.toggle-btn:active {
    background-color: transparent !important;
    color: inherit !important;
    border-color: inherit !important;
}
.read-more-btn:hover {
    color: #f0151f;
}
@media (max-width: 768px) {
    .fc-toolbar-title {
        font-size: 1.25rem !important;
    }
}

/* -------------------------------------------------------------------------
   Event detail page — tabs + hero cover (all breakpoints)
   ------------------------------------------------------------------------- */
.event-detail-page {
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
}

.event-detail-toolbar {
    z-index: 1030;
}

.event-detail-toolbar-inner {
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.event-detail-toolbar .event-detail-toolbar-icon,
.event-detail-toolbar .like-button.event-detail-toolbar-icon {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-bottom: 0 !important;
    text-decoration: none;
}

.event-detail-toolbar .event-detail-toolbar-icon i,
.event-detail-toolbar .like-button.event-detail-toolbar-icon i {
    font-size: 1.25rem;
}

.event-detail-toolbar-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.event-detail-toolbar-logo img {
    height: 32px;
    width: auto;
    display: block;
}

.event-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    scroll-margin-top: 6rem;
}

@media (min-width: 992px) {
    .event-detail-title {
        font-size: 2rem;
    }
}

.event-detail-meta {
    font-size: 1rem;
}

.event-detail-meta li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.event-detail-meta .meta-icon {
    color: #6c757d;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.event-detail-organizer-link {
    color: var(--primary);
    font-weight: 700;
}

.event-detail-organizer-link:hover {
    color: var(--primary);
    opacity: 0.85;
}

/* Hero image: 16×9 box + cover (Bootstrap .ratio); hero markup uses .event-detail-hero-stack — image row then title/meta */
.event-detail-cover {
    width: 100%;
}

.event-detail-cover-img {
    object-fit: cover;
    object-position: center;
}

@media (max-width: 991.98px) {
    .event-detail-hero-cover {
        margin-top: 0.5rem;
    }

    .payment-header-layout .event-detail-hero {
        padding-top: 0.05rem;
    }
}

@media (min-width: 992px) {
    .event-detail-hero-stack {
        align-items: flex-start;
    }

    .event-detail-hero-content {
        padding-top: 0.25rem;
        padding-left: 1rem;
    }

    .event-detail-hero-cover .event-detail-cover {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        --bs-aspect-ratio: 37.5%;
    }
}

@media (min-width: 992px) {
    .event-detail-tabs-shell {
        width: 100%;
    }

    #ticket-summary,
    .event-detail-order-card {
        width: 100%;
        height: auto !important;
        align-self: flex-start;
    }

    #ticket-section .event-detail-order-col {
        align-self: flex-start !important;
    }

    #summary-table,
    #ticket-summary .summary-total {
        width: 100%;
    }
}

#mobile-checkout-spacer {
    height: 0;
    pointer-events: none;
    transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/*
 * Bottom sheet (responsive) : carte blanche qui glisse du bas vers le haut.
 * Pas de voile assombri — évite l’effet « page figée ».
 */
.event-detail-mobile-checkout {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    display: block;
    pointer-events: none;
}

.event-detail-mobile-checkout.event-detail-mobile-checkout--open {
    pointer-events: auto;
}

.event-detail-mobile-checkout-inner {
    border-radius: 1.35rem 1.35rem 0 0;
    box-shadow:
        0 -16px 48px rgba(0, 0, 0, 0.18),
        0 -2px 0 rgba(0, 0, 0, 0.06);
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
    padding-top: 0.35rem !important;
    overflow-y: auto;
    max-height: min(88vh, 520px);
    -webkit-overflow-scrolling: touch;
    transform: translate3d(0, 105%, 0);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.event-detail-mobile-checkout.event-detail-mobile-checkout--open .event-detail-mobile-checkout-inner {
    transform: translate3d(0, 0, 0);
}


/* Description collapse toggle */
.event-detail-description-toggle {
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    color: inherit;
}

.event-detail-description-toggle:focus {
    outline: none;
    box-shadow: none;
}

.event-detail-description-chevron {
    font-size: 0.75rem;
    color: #6c757d;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.event-detail-description-toggle[aria-expanded="true"] .event-detail-description-chevron {
    transform: rotate(180deg);
}

.event-detail-order-coupon .coupon-label {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #212529;
}

.event-detail-order-coupon .coupon-label .arrow {
    font-size: 0.75rem;
    color: #6c757d;
    transition: transform 0.25s ease;
}

.event-detail-order-coupon .coupon-label[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

.event-detail-page .pi-order-summary-stack {
    width: 100%;
}

.event-detail-checkout-actions {
    width: 100%;
}

.contact-email-hint {
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--bs-danger, #dc3545) !important;
}

.event-detail-mobile-coupon-wrap {
    border: 1px solid #e9ecef;
    border-radius: 0.65rem;
    background: #fafafa;
    padding: 0.6rem 0.85rem;
}

.event-detail-mobile-coupon-toggle {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

.event-detail-mobile-coupon-toggle:focus {
    outline: none;
    box-shadow: none;
}

.event-detail-mobile-coupon-chevron {
    font-size: 0.75rem;
    color: #6c757d;
    transition: transform 0.25s ease;
}

.event-detail-mobile-coupon-toggle[aria-expanded="true"] .event-detail-mobile-coupon-chevron {
    transform: rotate(180deg);
}

.event-detail-mobile-coupon-input {
    border-radius: 0.5rem !important;
    border-color: #dee2e6;
    background: #fff;
    font-size: 0.875rem;
}

.event-detail-mobile-coupon-input:focus,
#mobile-coupon-collapse.show .event-detail-mobile-coupon-input {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(240, 21, 31, 0.18);
}

.event-detail-mobile-coupon-apply {
    color: var(--primary) !important;
    font-size: 0.875rem;
    text-decoration: none !important;
    flex-shrink: 0;
}

.event-detail-mobile-coupon-apply:hover,
.event-detail-mobile-coupon-apply:focus {
    color: var(--primary) !important;
    box-shadow: none;
    opacity: 0.8;
}

.event-detail-mobile-ticket-badge {
    background-color: rgba(240, 21, 31, 0.12);
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
}

#mobile-contact-card-slot .event-detail-email-card {
    margin-bottom: 0;
}

#mobile-contact-card-slot .event-detail-email-card .form-check {
    margin-bottom: 0 !important;
}

.event-detail-summary-empty-outside {
    min-height: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6c757d;
    font-size: 1rem;
    padding: 1.25rem 1rem;
}

@media (max-width: 991.98px) {
    .event-detail-summary-empty-outside {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .event-detail-summary-empty-outside {
        display: flex;
        min-height: 8rem;
    }

    .event-detail-summary-empty-outside.d-none {
        display: none !important;
    }
}

#tab-pane-tickets {
    height: auto;
}

#ticket-section > .col-lg-6 {
    align-self: flex-start !important;
}

.event-detail-email-card-switch {
    transition:
        transform 0.28s ease,
        opacity 0.28s ease;
}

.event-detail-email-card-switch.switch-enter {
    transform: translateX(24px);
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .event-detail-mobile-checkout-inner {
        transition-duration: 0.22s !important;
    }
}

.event-detail-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
    background: linear-gradient(145deg, #f1f3f5 0%, #e9ecef 100%);
}

.event-detail-verified-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.event-detail-tabs-wrap {
    clear: both;
}

@media (max-width: 991.98px) {
    .event-detail-tabs-wrap {
        position: sticky;
        top: 76px;
        z-index: 1019;
        background: transparent;
        padding-bottom: 0;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .event-detail-tabs-shell {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
    }
}

.event-detail-tabs-shell .event-detail-tabs.card-header-tabs {
    margin-right: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.event-detail-tabs-shell .event-detail-tabs .nav-item {
    flex: 1 1 0;
}

.event-detail-tabs-shell .event-detail-tabs .nav-link {
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-bottom-color: #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    margin-right: 0.35rem;
    margin-bottom: -1px;
    font-weight: 600;
    font-size: 1rem;
    background-color: #e9ecef;
    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.event-detail-tabs-shell .event-detail-tabs .nav-item:last-child .nav-link {
    margin-right: 0;
}

.event-detail-tabs-shell .event-detail-tabs .nav-link:hover {
    color: #495057;
    background-color: #f8f9fa;
    border-color: #ced4da #ced4da #dee2e6;
}

.event-detail-tabs-shell .event-detail-tabs .nav-link.active {
    color: var(--primary) !important;
    font-weight: 700;
    background-color: #fff !important;
    border-color: #dee2e6 #dee2e6 #fff !important;
}

.event-detail-tab-panels.card-body {
    border-top: 1px solid #dee2e6;
    padding: 1.25rem;
}

@media (max-width: 991.98px) {
    .event-detail-tab-panels.card-body {
        padding: 1rem 0.75rem 1.25rem;
    }
}

@media (min-width: 992px) {
    .event-detail-tab-panels.card-body {
        padding: 1.5rem;
    }
}

#eventDetailTabContent > .tab-pane:focus-visible {
    outline: none;
}

.item-description-html img {
    max-width: 100%;
    height: auto;
}

.event-detail-info-card .item-description-html {
    font-size: 1.0625rem;
    line-height: 1.65;
}

@media (min-width: 992px) {
    .event-detail-info-card .item-description-html {
        font-size: 1.125rem;
    }
}

.event-detail-info-card {
    border-radius: 1rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}

.event-detail-info-card .ratio-map {
    border-radius: 0.75rem;
    overflow: hidden;
    min-height: 220px;
}

.event-detail-accent {
    color: var(--primary) !important;
}

.event-ticket-card .ticket-price-block .fw-bold {
    font-size: 1.15rem;
}

@media (max-width: 991.98px) {
    /* Le récapitulatif desktop est inutile sur mobile : le modal du bas le remplace */
    #order_summary {
        display: none !important;
    }

    #ticket-container .event-ticket-card {
        margin-bottom: 0.5rem !important;
    }

    #ticket-container .event-ticket-card:last-child {
        margin-bottom: 0 !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07) !important;
        border-color: #e9ecef !important;
        opacity: 0.88;
    }

    .event-ticket-card-title {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .event-ticket-card .ticket-price-block .fw-bold {
        font-size: 1.05rem;
    }
}

.event-ticket-stepper {
    border: 1px solid #dee2e6 !important;
    border-radius: 999px !important;
    padding: 0.15rem 0.35rem !important;
    background: #fff;
}

.event-ticket-stepper .spinner-btn {
    border-radius: 50% !important;
    width: 2rem;
    height: 2rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1;
    border: none !important;
    background: #f1f3f5 !important;
    color: #212529 !important;
}

.event-ticket-stepper .ticket-quantity {
    border: none !important;
    background: transparent !important;
    font-weight: 600;
    width: 2rem !important;
}

.event-ticket-card .badge.rounded-pill {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.event-ticket-promo-badge {
    background: linear-gradient(135deg, #0f9d58 0%, #12d064 100%) !important;
    color: #fff !important;
    gap: 0.35rem;
}

.event-ticket-promo-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.55rem;
    line-height: 1;
}

.event-ticket-promo-layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.event-ticket-promo-main {
    flex: 1 1 auto;
    min-width: 0;
}

.event-ticket-promo-main .event-ticket-card-title {
    margin-bottom: 0.35rem;
}

.event-ticket-promo-aside {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: 46%;
}

.event-ticket-promo-aside .event-ticket-tag-badge {
    max-width: 100% !important;
    margin-left: 0 !important;
    white-space: nowrap;
}

.event-ticket-promo-footer {
    margin-top: 0.5rem;
    gap: 0.35rem;
}

.event-ticket-promo-footer .event-ticket-promo-expiry {
    margin-top: 0;
    margin-bottom: 0;
}

.event-ticket-promo-prices {
    gap: 0.15rem;
}

.event-ticket-original-price {
    font-size: 0.9rem;
    line-height: 1.3;
}

.event-ticket-promo-price {
    color: #b71c1c;
    font-size: 1.15rem;
    line-height: 1.25;
}

.event-ticket-promo-expiry {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 0.375rem;
    background: #fff3e0;
    color: #e65100;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.event-ticket-promo-expiry i {
    font-size: 0.8rem;
}

