/* Suppression du padding supérieur par défaut du thème The7 sur la fiche événement */
.single-evenement_kwf #main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.single-evenement_kwf #main > .wf-wrap {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

.kwf-single-evt {
    background: #f8fafc;
    padding: 24px 20px 70px;
    color: #1e293b;
}

.kwf-single-evt {
    background: #f8fafc;
    padding: 36px 20px 70px;
    color: #1e293b;
}
.kwf-single-container {
    max-width: 1140px;
    margin: 0 auto;
}
.kwf-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3498db;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 20px;
}
.kwf-back-link:hover {
    text-decoration: underline;
}

.kwf-single-grid {
    display: grid;
    grid-template-columns: 1fr 390px;
    gap: 28px;
    align-items: start;
}
.kwf-single-main,
.kwf-sidebar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
.kwf-single-banner {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
}
.kwf-poster-box {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    margin: 24px 0;
    text-align: center;
}
.kwf-poster-box.is-archived {
    margin-top: 32px;
}
.kwf-poster-box img {
    max-width: 100%;
    max-height: 760px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    cursor: zoom-in;
    display: inline-block;
}
.kwf-poster-box.is-archived img {
    max-height: 480px;
}
.kwf-poster-caption {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 10px;
}
.kwf-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.kwf-single-cat {
    background: #eff6ff;
    color: #217dbb;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
}
.kwf-single-status {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
}
.kwf-single-status.is-upcoming {
    background: #dcfce7;
    color: #15803d;
}
.kwf-single-status.is-ended {
    background: #f1f5f9;
    color: #475569;
}
.kwf-single-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 20px 0;
}
.kwf-single-content {
    font-size: 15.5px;
    line-height: 1.7;
    color: #334155;
}

/* ==========================================================================
   ENCADRÉ BILAN & REMERCIEMENTS (APRÈS L'ÉVÉNEMENT)
   ========================================================================== */
.kwf-bilan-box {
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
    border: 1px solid #bae6fd;
    border-left: 4px solid #3498db;
    border-radius: 14px;
    padding: 22px 24px;
    margin: 0 0 28px 0;
}
.kwf-bilan-heading {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.kwf-bilan-text {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
}
.kwf-bilan-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   GALERIE PHOTOS HOMOGÈNE (Mosaïque 4:3 + Lightbox)
   ========================================================================== */
.kwf-gallery-section {
    margin-top: 28px;
    margin-bottom: 28px;
    padding-top: 24px;
    border-top: 2px solid #f1f5f9;
}
.kwf-gallery-section.is-top {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    padding-bottom: 28px;
    border-bottom: 2px solid #f1f5f9;
}
.kwf-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.kwf-gallery-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}
.kwf-gallery-count {
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 999px;
}
.kwf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.kwf-gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    cursor: zoom-in;
    display: block;
}
.kwf-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    transition: transform 0.3s ease;
}
.kwf-gallery-item:hover img {
    transform: scale(1.06);
}
.kwf-gallery-zoom-hint {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 12px;
    padding: 4px 7px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.kwf-gallery-item:hover .kwf-gallery-zoom-hint {
    opacity: 1;
}

/* Lightbox plein écran */
.kwf-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.kwf-lightbox.is-open {
    display: flex;
}
.kwf-lightbox-img {
    max-width: 90vw;
    max-height: 86vh;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}
.kwf-lightbox-close,
.kwf-lightbox-prev,
.kwf-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    width: 44px;
    height: 44px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.kwf-lightbox-close:hover,
.kwf-lightbox-prev:hover,
.kwf-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.28);
}
.kwf-lightbox-close {
    top: 20px;
    right: 24px;
}
.kwf-lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}
.kwf-lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
.kwf-lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.65);
    padding: 5px 14px;
    border-radius: 999px;
}

/* ==========================================================================
   COLONNE LATÉRALE
   ========================================================================== */
.kwf-sidebar-stack {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.kwf-sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.kwf-card-heading {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1e293b;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}
.kwf-ended-notice {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-align: center;
}
.kwf-club-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.kwf-club-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 4px;
    flex-shrink: 0;
}
.kwf-club-sigle {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}
.kwf-info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.kwf-info-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}
.kwf-info-icon {
    font-size: 18px;
    line-height: 1.4;
}
.kwf-info-content {
    flex: 1;
}
.kwf-info-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.04em;
}
.kwf-info-val {
    font-size: 14.5px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 2px;
    word-break: break-word;
}
.kwf-info-val.is-date {
    text-transform: capitalize;
}
.kwf-info-val.is-flush {
    margin-top: 0;
}
.kwf-info-val a {
    color: #3498db;
    text-decoration: none;
}
.kwf-info-val a:hover {
    text-decoration: underline;
}
.kwf-info-sub {
    font-size: 13.5px;
    color: #64748b;
    margin-top: 3px;
    white-space: pre-line;
}
.kwf-grade-muted {
    font-weight: 500;
    color: #64748b;
}

/* Liste des créneaux par catégorie */
.kwf-slots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.kwf-slot-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #3498db;
    border-radius: 8px;
    padding: 8px 11px;
}
.kwf-slot-card.is-enfants { border-left-color: #ff6b35; }
.kwf-slot-card.is-ados { border-left-color: #8b5cf6; }
.kwf-slot-card.is-competiteurs { border-left-color: #dc2626; }
.kwf-slot-card.is-dan { border-left-color: #1e293b; }
.kwf-slot-cat {
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.kwf-slot-when {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-top: 2px;
    text-transform: capitalize;
}
.kwf-slot-time {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 1px;
}

.kwf-override-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    background: #fff7ed;
    color: #ea580c;
    padding: 2px 7px;
    border-radius: 5px;
    margin-top: 4px;
}
.kwf-map-links {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.kwf-map-btn {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}
.kwf-map-btn:hover {
    background: #e2e8f0;
}

.kwf-cta-btn {
    display: block;
    text-align: center;
    background: #ff6b35;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 15px;
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.kwf-cta-btn:hover {
    opacity: 0.92;
}

.kwf-secondary-btn {
    display: block;
    text-align: center;
    background: #f1f5f9;
    color: #1e293b !important;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 13.5px;
    padding: 11px 16px;
    border-radius: 10px;
    text-decoration: none;
}
.kwf-secondary-btn:hover {
    background: #e2e8f0;
}

@media (max-width: 900px) {
    .kwf-single-grid {
        grid-template-columns: 1fr;
    }
    .kwf-sidebar-stack {
        position: static;
    }
}
@media (max-width: 600px) {
    .kwf-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}