/* ==========================================================================
 * EVENT DETAIL PREMIUM - event page (event/event/show.html.twig).
 *
 * Same language as the events list, Search and DM: one violet accent, soft
 * radii, quiet secondary text. The visual leads (hero), the key facts follow in
 * a scannable grid with the actions, everything else is a calm section.
 * Shared pieces (date badge, chips) come from event-premium.css.
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * Breadcrumb (kept for SEO / navigation, now a light line above the hero)
 * -------------------------------------------------------------------------- */
.event-breadcrumb {
    padding: 0 .25rem;
}

.event-breadcrumb .breadcrumb-item,
.event-breadcrumb .breadcrumb-item a {
    color: var(--text-muted, #6b7280);
    text-decoration: none;
}

.event-breadcrumb .breadcrumb-item.active {
    overflow: hidden;
    max-width: 18rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
 * Hero
 * -------------------------------------------------------------------------- */
.event-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 300px;
    overflow: hidden;
    border-radius: 16px;
    background: #12071f;
    color: #fff;
}

.event-hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

/* A portrait flyer is shown whole in the foreground: its blurred copy is only the backdrop. */
.event-hero--poster .event-hero-bg {
    transform: scale(1.3);
    filter: blur(24px) saturate(1.15);
}

.event-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .38) 45%, rgba(0, 0, 0, .84) 100%);
}

.event-hero .event-cover-placeholder-icon {
    z-index: 0;
}

.event-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    width: 100%;
    padding: 56px 20px 20px;
}

.event-hero-poster {
    flex: none;
    width: 168px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
    line-height: 0;
}

.event-hero-poster img {
    display: block;
    width: 100%;
    height: auto;
}

.event-hero-text {
    min-width: 0;
    flex: 1 1 auto;
}

.event-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.event-chip--solid {
    background: var(--primary, #6D28D9);
}

.event-hero-title {
    margin: .45rem 0 .5rem;
    color: #fff;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.15;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
    overflow-wrap: anywhere;
}

.event-hero-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin: 0 0 .7rem;
    font-size: .95rem;
    font-weight: 500;
}

.event-hero-sep {
    opacity: .6;
}

.event-hero-organizer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: .82rem;
    text-decoration: none;
}

.event-hero-organizer:hover {
    color: #fff;
    text-decoration: underline;
}

.event-hero-organizer img {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    object-fit: cover;
}

.event-back-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: .25rem .6rem;
    border: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, .6);
    backdrop-filter: blur(4px);
    font-size: .78rem;
}

.event-hero-views {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
}

/* --------------------------------------------------------------------------
 * Key facts + actions
 * -------------------------------------------------------------------------- */
.event-facts {
    padding: 16px 18px;
    border-radius: 14px;
}

.event-facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.event-fact {
    display: flex;
    gap: 10px;
    min-width: 0;
}

.event-fact-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-soft-bg, #F5F3FF);
    color: var(--primary, #6D28D9);
    font-size: 1rem;
}

.event-fact-body {
    min-width: 0;
}

.event-fact-label {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted, #6b7280);
}

.event-fact-value {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.event-fact-value a {
    color: inherit;
}

.event-fact-sub {
    font-size: .8rem;
    color: var(--text-muted, #6b7280);
}

.event-tariffs span {
    display: inline-block;
    margin-right: .6rem;
}

.event-audience {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 3px;
}

.event-audience-chip {
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--bs-tertiary-bg, #f1f3f5);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.event-audience-chip--public {
    background: rgba(25, 135, 84, .1);
    color: #146c43;
}

.event-audience-chip--private {
    background: rgba(220, 53, 69, .1);
    color: #b02a37;
}

/* Actions: participation on the left, "Voir les participants" on the right. The buttons keep their ids and
 * data-status (participation.js rewrites their classes at runtime, so the look is driven by the container). */
.event-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color, #f0f0f0);
}

.event-cta-main,
.event-cta-people {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.event-cta .btn {
    min-height: 38px;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
}

.event-cta-avatars {
    display: inline-flex;
    padding-left: 8px;
}

.event-cta-avatars img {
    width: 32px;
    height: 32px;
    margin-left: -8px;
    border: 2px solid var(--bg-card, #fff);
    border-radius: 50%;
    object-fit: cover;
}

.event-cta-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: -8px;
    border: 2px solid var(--bg-card, #fff);
    border-radius: 50%;
    background: var(--primary-soft-bg, #F5F3FF);
    color: var(--primary, #6D28D9);
    font-size: .7rem;
    font-weight: 700;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
 * Sections
 * -------------------------------------------------------------------------- */
.event-section {
    border-radius: 14px;
}

.event-section-title {
    margin: 0 0 .6rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.event-section > .card-header .event-section-title {
    margin-bottom: .5rem;
}

.event-description {
    font-size: .95rem;
    line-height: 1.65;
}

.event-flyer-inline {
    width: 200px;
    max-width: 100%;
}

.event-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 1rem 0 0;
    padding: .75rem 0 0;
    border-top: 1px solid var(--border-color, #f0f0f0);
    font-size: .85rem;
    list-style: none;
}

.event-contact i {
    color: var(--primary, #6D28D9);
}

/* --------------------------------------------------------------------------
 * Similar events: mini cards (same family as the listing cards)
 * -------------------------------------------------------------------------- */
.event-mini {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-mini-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f3f5;
}

.event-mini-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.event-mini:hover .event-mini-media img {
    transform: scale(1.04);
}

.event-mini-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #581c87, #7e22ce);
    color: rgba(255, 255, 255, .85);
    font-size: 2rem;
}

.event-date-badge--sm {
    top: 8px;
    left: 8px;
    min-width: 36px;
    padding: 4px 6px 3px;
    border-radius: 8px;
}

.event-date-badge--sm .event-date-day {
    font-size: .95rem;
}

.event-date-badge--sm .event-date-month {
    margin-top: 2px;
    font-size: .54rem;
}

.event-mini-title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.event-mini-title a {
    color: var(--bs-body-color, #1f2937);
}

.event-mini-where {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: .78rem;
    color: var(--text-muted, #6b7280);
    white-space: nowrap;
}

.event-mini-where i {
    flex: none;
    color: var(--primary, #6D28D9);
}

.event-mini-where span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
 * Small screens
 * -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .event-hero {
        min-height: 260px;
    }

    .event-hero-inner {
        gap: 12px;
        padding: 52px 14px 14px;
    }

    .event-hero-poster {
        width: 104px;
    }

    .event-hero-title {
        font-size: 1.3rem;
    }

    .event-hero-line {
        font-size: .85rem;
    }

    .event-facts-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .event-cta-main .btn {
        flex: 1 1 auto;
    }
}

[data-bs-theme=dark] .event-audience-chip {
    background: rgba(255, 255, 255, .08);
}
