/* =====================================================
   CEPR Events — Styles v2.2.0
   BUG CORRIGÉ #5 : les styles du template single-event.php
   ont été déplacés ici pour alléger le HTML et permettre
   la mise en cache navigateur du CSS.
   ===================================================== */

:root {
    --cepr-orange: #F78520;
    --cepr-green:  #A7CB5D;
    --cepr-gray:   #6b7280;
}

/* ── GRILLE ÉVÉNEMENTS ──────────────────────────────── */
.cepr-events-wrapper { margin: 40px 0; }
.cepr-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
@media (max-width: 1200px) { .cepr-events-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .cepr-events-grid { grid-template-columns: 1fr; } }

/* ── CARTE ──────────────────────────────────────────── */
.cepr-event-card {
    background: #fff;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    transition: all .3s;
    overflow: hidden;
}
.cepr-event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
    border-color: var(--cepr-orange);
}
.cepr-event-link  { text-decoration: none; color: inherit; display: block; }
.cepr-event-image { height: 220px; background: #f9fafb; overflow: hidden; position: relative; }
.cepr-event-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cepr-event-card:hover .cepr-event-image img { transform: scale(1.05); }
.cepr-event-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--cepr-orange), var(--cepr-green));
    color: #fff; font-size: 56px; font-weight: 700;
}

/* Badges */
.cepr-event-badges  { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; z-index: 2; }
.cepr-badge         { padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; backdrop-filter: blur(10px); }
.cepr-badge-past    { background: rgba(107,114,128,.9); color: #fff; }
.cepr-badge-full    { background: rgba(239,68,68,.9); color: #fff; }
.cepr-badge-warning { background: rgba(247,133,32,.9); color: #fff; }
.cepr-badge-price   { background: rgba(255,255,255,.95); color: var(--cepr-orange); border: 1px solid var(--cepr-orange); }
.cepr-badge-free    { background: rgba(167,203,93,.9); color: #fff; }

/* Contenu carte */
.cepr-event-content    { padding: 24px; }
.cepr-event-categories { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cepr-event-category   { padding: 4px 12px; background: #fff7ed; color: var(--cepr-orange); border-radius: 12px; font-size: 12px; font-weight: 600; }
.cepr-event-title      { font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cepr-event-meta       { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cepr-event-meta-item  { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cepr-gray); }
.cepr-event-meta-item svg { color: var(--cepr-orange); flex-shrink: 0; }
.cepr-event-excerpt    { font-size: 14px; line-height: 1.6; color: var(--cepr-gray); margin-bottom: 16px; }
.cepr-event-footer     { margin-top: auto; }
.cepr-event-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--cepr-orange), var(--cepr-green));
    color: #fff; border-radius: 10px; font-size: 14px; font-weight: 600; transition: transform .3s;
}
.cepr-event-card:hover .cepr-event-btn { transform: translateX(4px); }
.cepr-event-card.is-past { opacity: .7; }

/* Message "aucun événement" */
.cepr-no-events        { text-align: center; padding: 80px 20px; background: #f9fafb; border-radius: 16px; }
.cepr-no-events-icon   { font-size: 64px; margin-bottom: 20px; }
.cepr-no-events h3     { font-size: 24px; font-weight: 700; color: #111827; margin: 0 0 12px; }
.cepr-no-events p      { font-size: 16px; color: var(--cepr-gray); margin: 0; }

/* ── PAGE ÉVÉNEMENT UNIQUE ──────────────────────────── */
/* BUG CORRIGÉ #5 : déplacé depuis le bloc <style> inline de single-event.php */
.cepr-event-single {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.cepr-event-header {
    background: linear-gradient(135deg, #F78520, #A7CB5D);
    padding: 60px 40px;
    border-radius: 20px;
    color: #fff;
    margin-bottom: 40px;
}
.cepr-event-header h1 { font-size: 42px; font-weight: 800; margin: 0 0 24px; color: #fff; }
.cepr-event-header .cepr-event-meta { display: flex; gap: 32px; flex-wrap: wrap; font-size: 16px; }

.cepr-event-body {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.cepr-event-section {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    margin-bottom: 24px;
}
.cepr-event-section h2 {
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #F78520, #A7CB5D) 1;
}

.cepr-event-sidebar { position: sticky; top: 20px; align-self: start; }

.cepr-sidebar-box {
    background: #e8f5e0;
    border-radius: 16px;
    border: 2px solid #A7CB5D;
    overflow: hidden;
}
.cepr-sidebar-header {
    background: linear-gradient(135deg, #F78520, #A7CB5D);
    color: #fff;
    padding: 24px;
}
.cepr-sidebar-header h3 { margin: 0; font-size: 20px; color: #111827; }
.cepr-sidebar-body { padding: 20px; }

.cepr-progress-bar-wrap { width: 100%; height: 12px; background: #e5e7eb; border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.cepr-progress-bar      { height: 100%; border-radius: 6px; }

.cepr-status-box { padding: 16px; border-radius: 10px; text-align: center; font-weight: 600; }
.cepr-status-past       { background: #e0e7ff; color: #3730a3; }
.cepr-status-full       { background: #fee2e2; color: #991b1b; }
.cepr-status-login      { background: #fef3c7; color: #92400e; margin-bottom: 15px; }
.cepr-status-registered { background: #d1fae5; color: #065f46; margin-bottom: 15px; }

.cepr-location-block {
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    border-left: 4px solid #F78520;
}
.cepr-location-block h3 { margin: 0 0 8px; font-size: 18px; }
.cepr-location-block p  { margin: 0 0 12px; color: #6b7280; }
.cepr-location-link     { color: #F78520; text-decoration: none; font-weight: 600; }

.cepr-registrants-list { display: flex; flex-wrap: wrap; gap: 12px; }
.cepr-registrant-chip  { padding: 8px 16px; background: #f0f9ff; border-radius: 20px; font-size: 14px; }

.cepr-btn-primary {
    display: block; padding: 16px;
    background: linear-gradient(135deg, #F78520, #A7CB5D);
    color: #fff; border: none; border-radius: 12px;
    cursor: pointer; font-weight: 600; font-size: 16px;
    text-align: center; text-decoration: none; width: 100%;
}
.cepr-btn-cancel {
    width: 100%; padding: 16px;
    background: #fff; color: #F78520;
    border: 2px solid #F78520; border-radius: 12px;
    cursor: pointer; font-weight: 600; font-size: 16px;
}

.cepr-form-label  { display: block; margin-bottom: 8px; font-weight: 600; color: #111827; }
.cepr-form-select, .cepr-form-textarea {
    width: 100%; padding: 12px;
    border: 2px solid #e5e7eb; border-radius: 8px; font-size: 16px;
}
.cepr-form-textarea { font-size: 14px; resize: vertical; }
.cepr-form-group    { margin-bottom: 15px; }

.cepr-price-row {
    margin-top: 20px; padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px; color: #6b7280;
}

/* ── RESPONSIVE SINGLE ──────────────────────────────── */
@media (max-width: 768px) {
    .cepr-event-single  { padding: 0 15px; margin: 20px auto; }
    .cepr-event-header  { padding: 30px 20px; border-radius: 12px; margin-bottom: 24px; }
    .cepr-event-header h1 { font-size: 28px; margin: 0 0 16px; }
    .cepr-event-header .cepr-event-meta { gap: 16px; font-size: 14px; }
    .cepr-event-body    { grid-template-columns: 1fr; gap: 24px; }
    .cepr-event-section { padding: 24px 20px; border-radius: 12px; margin-bottom: 16px; }
    .cepr-event-section h2 { font-size: 20px; margin: 0 0 16px; padding-bottom: 12px; }
    .cepr-event-sidebar { position: static; order: -1; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cepr-event-header  { padding: 40px 30px; }
    .cepr-event-header h1 { font-size: 32px; }
    .cepr-event-body    { grid-template-columns: 1fr 320px; gap: 30px; }
    .cepr-event-section { padding: 30px 24px; }
}
