.events-container{padding-top:1rem}
.event-item{transition:transform .2s ease, box-shadow .2s ease}
.event-item:hover{box-shadow:0 8px 24px rgba(0,0,0,.12) !important;transform:translateY(-2px)}
.event-main-section{display:grid;grid-template-columns:350px 1fr}
.event-image-wrapper{position:relative;min-height:280px;max-height:280px;overflow:hidden;background:#e2e8f0}
.event-image{width:100%;height:100%;object-fit:cover;object-position:center;display:block}
.event-image-credit{position:absolute;bottom:0;left:0;right:0;padding:4px 8px;background:rgba(0, 0, 0, .55);color:#fff;font-size:.75rem;line-height:1.2;text-align:right;}
.event-description-toggle{ display:none;}
.event-description .toggle-label-less{ display:none;}
.event-description.is-expanded .toggle-label-more{ display:none;}
.event-description.is-expanded .toggle-label-less{ display:inline;}
@media (max-width:768px){
    .event-description-text{
        display:-webkit-box;
        -webkit-line-clamp:3;
        -webkit-box-orient:vertical;
        overflow:hidden;
   }
    .event-description.is-expanded .event-description-text{
        display:block;
        -webkit-line-clamp:unset;
        overflow:visible;
   }
    .event-description-toggle{ display:inline-block;}
}
.occurrence-date-tag.nores{
    display:inline-flex;align-items:center;gap:6px;
    padding:6px 10px;border-radius:7px;
    background:#f3f4f6;border:1px solid #d1d5db;
    color:#6b7280;font-size:.95rem;font-weight:500;
}
.occurrence-pending,
.occurrence-closed,
.occurrence-annule,
.occurrence-full{
    font-size:.95rem;
}
.events-container .event-button{
    padding:6px 10px;
    background:linear-gradient(135deg, var(--couleur-primaire) 0%, var(--couleur-secondaire) 100%);
    color:var(--couleur-texte) !important;
    text-decoration:none;
    border-radius:7px;font-weight:600;font-size:.95rem;
    display:inline-flex;align-items:center;gap:4px;
    border:none;white-space:nowrap;
    transition:opacity .2s ease;
}
.events-container .event-button:hover,
.events-container .event-button:focus{
    opacity:.9;color:var(--couleur-texte) !important;
}
.event-button.event-button-waitlist,
.event-button.event-button-waitlist:hover{
    background:linear-gradient(135deg, #b37103 0%, #814803 100%) !important;
    color:#fff !important;
}
.event-button.disabled{background:#6b7280;cursor:not-allowed;pointer-events:none;opacity:.9}
.event-button.event-button-info{ background:#2563eb;cursor:default;pointer-events:none}
.event-button.event-button-closed{ background:#7c3aed;cursor:default;pointer-events:none}
.event-button.event-button-full{ background:#dc2626;cursor:default;pointer-events:none}
.event-button.event-button-annule{ background:#dc2626;cursor:default;pointer-events:none}
.places-bubble{
    position:absolute;top:-6px;right:-6px;
    min-width:22px;height:22px;padding:0 6px;
    border-radius:999px;
    background:#14532d !important;color:#fff !important;
    font-size:.72rem;font-weight:800;line-height:22px;
    text-align:center;
    box-shadow:0 2px 8px rgba(0,0,0,.35), 0 0 0 2px #fff;
}
.events-container .show-more-btn{
    display:inline-flex;align-items:center;gap:8px;
    padding:8px 12px;background:#fff !important;
    color:var(--couleur-primaire) !important;
    border:1px solid var(--couleur-primaire);
    border-radius:8px;font-weight:600;font-size:.95rem;
    cursor:pointer;transition:opacity .2s ease;
}
.show-more-btn i{ transition:transform .3s ease;font-size:1.1rem}
.show-more-btn.expanded i{ transform:rotate(180deg)}
.count-badge{
    background:#dbeafe;color:#1e3a8a;
    padding:1px 6px;border-radius:12px;font-size:.9rem;
}
.occurrence-item.hidden{ display:none}
.occurrence-item.fade-in{ animation:fadeIn .4s ease-out}
@keyframes fadeIn{
    from{ opacity:0;transform:translateY(-10px)}
    to{ opacity:1;transform:translateY(0)}
}

/* ===== Agenda (vue mois) =====
   Palette bleu profond générique, définie dans base.html.twig :
   - --couleur-primaire  #1d4ed8 — blanc = 6.79:1 AA ✓
   - --couleur-secondaire #1e3a8a — blanc = 10.4:1 AAA ✓
   - --couleur-hover     #1e3a8a — texte sur blanc, AAA partout
   Toutes les combinaisons utilisées (texte blanc sur couleurs de fond,
   texte hover sur blanc) sont conformes WCAG 2.1 AA. */

/* Header de la modal de détail jour (ouverte en dehors de .site-header — hérite de :root) */
.agenda-modal-header{
    background:linear-gradient(135deg, var(--couleur-primaire, #1d4ed8) 0%, var(--couleur-secondaire, #1e3a8a) 100%);
    color:#fff;
    border:none;
}
.agenda-modal-header .modal-title{ color:#fff}

/* Ligne de grille ARIA :transparente visuellement pour préserver la grille CSS */
.calendar-row{ display:contents}

/* Toolbar navigation */
.agenda-toolbar{
    display:flex;align-items:center;justify-content:center;
    gap:.5rem;padding:.9rem 1.25rem;
    background:#fff;border:1px solid #e5e7eb;
    border-radius:16px 16px 0 0;border-bottom:none;
    box-shadow:0 1px 3px rgba(0,0,0,.05);
    position:relative;
}
.agenda-month-title{
    font-size:1.35rem;font-weight:800;margin:0;
    color:var(--couleur-hover, #1e3a8a);text-transform:capitalize;
    text-align:center;letter-spacing:-0.01em;
    min-width:180px;
}
.agenda-nav-btn{
    width:38px;height:38px;padding:0;
    display:inline-flex;align-items:center;justify-content:center;
    border-radius:50%;border:none;
    background:transparent;color:#334155;font-size:1.2rem;
    cursor:pointer;transition:all .15s ease;
    flex-shrink:0;
}
.agenda-nav-btn:hover{
    background:#f1f5f9;color:var(--couleur-hover, #1e3a8a);
}
.agenda-nav-btn:focus-visible{
    outline:none;
    box-shadow:0 0 0 3px rgba(29, 78, 216, .35);
}
.agenda-today-link{
    position:absolute;right:1.25rem;top:50%;
    transform:translateY(-50%);
    padding:.3rem .75rem;font-weight:600;font-size:.8rem;
    border-radius:999px;border:1px solid var(--couleur-hover, #1e3a8a);
    background:#fff;color:var(--couleur-hover, #1e3a8a);
    cursor:pointer;transition:all .15s ease;
    display:inline-flex;align-items:center;gap:.3rem;
}
.agenda-today-link:hover{
    background:var(--couleur-hover, #1e3a8a);color:#fff;
}
.agenda-today-link:focus-visible{
    outline:none;box-shadow:0 0 0 3px rgba(29, 78, 216, .35);
}
.agenda-today-link.is-hidden{ display:none}

/* Grille desktop */
.calendar-grid{
    display:grid;grid-template-columns:repeat(7,1fr);
    gap:2px;background:#e2e8f0;
    border:1px solid #e5e7eb;
    border-radius:0 0 16px 16px;overflow:hidden;
}
.calendar-day-header{
    background:linear-gradient(135deg, var(--couleur-primaire, #1d4ed8) 0%, var(--couleur-secondaire, #1e3a8a) 100%);
    color:#fff;
    padding:1rem .5rem;text-align:center;
    font-weight:700;font-size:.85rem;
    text-transform:uppercase;letter-spacing:.08em;
}
.calendar-day{
    background:#fff;min-height:160px;padding:.6rem;
    position:relative;display:flex;flex-direction:column;gap:.35rem;
    transition:background .15s ease;
}
.calendar-day.empty{ background:#f8fafc;opacity:.5}
.calendar-day.other-month{ background:#fafafa}
/* #6b7280 (gray-500) sur #fafafa ≈ 4.8:1 AA ✓ — reste visuellement "dimmed" tout en étant lisible */
.calendar-day.other-month .day-number{ color:#6b7280}
.calendar-day.is-weekend:not(.other-month){ background:#fafbff}
.calendar-day.has-events{ cursor:pointer}
.calendar-day.has-events:hover{ background:#f8faff}

.day-number{
    font-weight:700;font-size:1.15rem;color:#64748b;
    line-height:1;display:inline-flex;align-items:center;
    justify-content:center;min-width:32px;height:32px;
    border-radius:50%;align-self:flex-start;
    transition:all .15s ease;
}
.calendar-day.has-events .day-number{ color:var(--couleur-hover, #1e3a8a)}
.calendar-day.is-today .day-number{
    background:linear-gradient(135deg, var(--couleur-primaire, #1d4ed8) 0%, var(--couleur-secondaire, #1e3a8a) 100%);
    color:#fff;font-weight:800;
    box-shadow:0 3px 10px rgba(29, 78, 216, .4);
}
.day-events{
    display:flex;flex-direction:column;gap:4px;
    overflow:hidden;flex:1;
}

.calendar-event-item{
    background:#eef2ff;
    border-left:4px solid var(--couleur-primaire, #1d4ed8);
    padding:6px 8px;border-radius:6px;
    cursor:pointer;transition:all .2s ease;
    text-align:left;width:100%;
    border-top:none;border-right:none;border-bottom:none;
    color:#1e293b;text-decoration:none;
    display:flex;flex-direction:column;gap:1px;
    overflow:hidden;
}
.calendar-event-item:hover,
.calendar-event-item:focus-visible{
    background:#bfdbfe;
    transform:translateX(2px);
    outline:none;
    text-decoration:none;color:#1e293b;
    box-shadow:0 2px 8px rgba(29, 78, 216, .2);
}
.calendar-event-item:focus-visible{
    box-shadow:0 0 0 2px var(--couleur-hover, #1e3a8a), 0 2px 8px rgba(29, 78, 216, .2);
}
.calendar-event-item .event-time{
    font-weight:700;color:var(--couleur-hover, #1e3a8a);font-size:.8rem;line-height:1.1;
}
.calendar-event-item .event-name{
    color:#1e293b;font-weight:600;
    font-size:.82rem;line-height:1.25;
    overflow:hidden;text-overflow:ellipsis;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
/* Badge de statut inline dans la cellule calendrier */
.event-status-badge{
    display:inline-flex;align-items:center;gap:3px;
    padding:1px 6px;border-radius:999px;
    font-size:.68rem;font-weight:700;
    white-space:nowrap;width:fit-content;
    line-height:1.3;
}
.event-status-badge i{ font-size:.7rem}
.event-status-places{
    background:#dcfce7;color:#166534;
}

/* Statut complet :rouge marqué + titre barré */
.calendar-event-item.status-full,
.calendar-event-item.status-annule,
.calendar-event-item.status-closed{
    background:#fef2f2;border-left-color:#dc2626;border-left-width:5px;
}
.calendar-event-item.status-full:hover,
.calendar-event-item.status-annule:hover,
.calendar-event-item.status-closed:hover{
    background:#fee2e2;transform:none;
}
.calendar-event-item.status-full .event-time,
.calendar-event-item.status-annule .event-time,
.calendar-event-item.status-closed .event-time{
    /* #991b1b (red-800) sur #fef2f2 ≈ 8.8:1 AAA ✓ */
    color:#991b1b;text-decoration:line-through;
}
.calendar-event-item.status-full .event-name,
.calendar-event-item.status-annule .event-name,
.calendar-event-item.status-closed .event-name{
    color:#991b1b;text-decoration:line-through;opacity:.85;
}
.calendar-event-item.status-full .event-status-badge,
.calendar-event-item.status-annule .event-status-badge,
.calendar-event-item.status-closed .event-status-badge{
    background:#dc2626;color:#fff;box-shadow:0 1px 3px rgba(220, 38, 38, .4);
}

/* Liste d'attente */
.calendar-event-item.status-waitlist{
    background:#fffbeb;border-left-color:#b45309;border-left-width:5px;
}
.calendar-event-item.status-waitlist:hover{ background:#fef3c7}
.calendar-event-item.status-waitlist .event-time{ color:#92400e}
.calendar-event-item.status-waitlist .event-status-badge{
    background:#b45309;color:#fff;
}

/* À venir */
.calendar-event-item.status-not_yet_open{
    background:#eff6ff;border-left-color:#2563eb;border-left-width:5px;
}
.calendar-event-item.status-not_yet_open:hover{ background:#dbeafe}
/* #1e40af (blue-800) sur #eff6ff ≈ 8.1:1 AAA ✓ */
.calendar-event-item.status-not_yet_open .event-time{ color:#1e40af}
.calendar-event-item.status-not_yet_open .event-status-badge{
    background:#dbeafe;color:#1d4ed8;
}

/* Sans réservation */
.calendar-event-item.status-nores{
    background:#f8fafc;
    border-left-color:#94a3b8;
}
.calendar-event-item.status-nores .event-time{ color:#64748b}
.calendar-event-item.status-nores .event-status-badge{
    background:#e2e8f0;color:#475569;
}

.day-more-btn{
    font-size:.75rem;font-weight:700;padding:4px 8px;
    background:#fff;color:var(--couleur-hover, #1e3a8a);
    border:1px dashed var(--couleur-hover, #1e3a8a);
    border-radius:6px;cursor:pointer;
    text-align:center;transition:all .15s ease;
    margin-top:2px;
}
.day-more-btn:hover,
.day-more-btn:focus-visible{
    background:var(--couleur-hover, #1e3a8a);color:#fff;
    border-style:solid;outline:none;
}
.day-more-btn:focus-visible{
    box-shadow:0 0 0 3px rgba(29, 78, 216, .35);
}

/* ===== Agenda (vue liste mobile) ===== */
.agenda-list{ display:none;flex-direction:column;gap:1rem}
.agenda-list-empty{
    text-align:center;padding:3rem 1rem;
    color:#64748b;font-size:.95rem;
    background:#fff;
    border:2px dashed #e2e8f0;border-radius:16px;
}
.agenda-day-group{
    background:#fff;border:1px solid #e5e7eb;border-radius:16px;
    overflow:hidden;
    box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.agenda-day-header{
    display:flex;align-items:center;gap:1rem;
    padding:1rem 1.25rem;
    background:linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border-bottom:1px solid #e5e7eb;
}
.agenda-day-header .agenda-day-num{
    width:52px;height:52px;border-radius:14px;
    background:#fff;border:2px solid var(--couleur-primaire, #1d4ed8);
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    flex-shrink:0;
    box-shadow:0 2px 6px rgba(29, 78, 216, .15);
}
.agenda-day-header .agenda-day-num .num{
    font-size:1.35rem;font-weight:800;line-height:1;
    color:var(--couleur-hover, #1e3a8a);
}
.agenda-day-header .agenda-day-num .month{
    font-size:.6rem;text-transform:uppercase;color:#64748b;font-weight:700;letter-spacing:.08em;margin-top:2px;
}
.agenda-day-group.is-today .agenda-day-header{
    background:linear-gradient(135deg, var(--couleur-primaire, #1d4ed8) 0%, var(--couleur-secondaire, #1e3a8a) 100%);
}
.agenda-day-group.is-today .agenda-day-num{
    background:#fff;border-color:#fff;
}
.agenda-day-group.is-today .agenda-day-num .num{ color:var(--couleur-hover, #1e3a8a)}
.agenda-day-group.is-today .agenda-day-num .month{ color:#475569}
.agenda-day-group.is-today .agenda-day-label{ color:#fff}
.agenda-day-group.is-today .agenda-day-sub{ color:rgba(255,255,255,.9)}
.agenda-day-header .agenda-day-label{
    font-weight:700;color:#1e293b;font-size:1rem;
    text-transform:capitalize;
}
.agenda-day-header .agenda-day-sub{
    font-size:.8rem;color:#64748b;font-weight:500;
}
.agenda-day-events{
    display:flex;flex-direction:column;
}
.agenda-event-row{
    display:flex;align-items:center;gap:1rem;
    padding:.9rem 1.25rem;
    border-top:1px solid #f1f5f9;
    text-decoration:none;color:inherit;
    transition:all .15s ease;
    min-height:72px;
    position:relative;
}
.agenda-event-row::before{
    content:'';position:absolute;
    left:0;top:0;bottom:0;width:4px;
    background:var(--couleur-primaire, #1d4ed8);
    transform:scaleY(0);transition:transform .2s ease;
    transform-origin:center;
}
.agenda-event-row:first-child{ border-top:none}
.agenda-event-row:hover,
.agenda-event-row:focus-visible{
    background:#f8fafc;color:inherit;outline:none;
}
.agenda-event-row:hover::before,
.agenda-event-row:focus-visible::before{ transform:scaleY(1)}
.agenda-event-row:focus-visible{
    box-shadow:0 0 0 2px var(--couleur-primaire, #1d4ed8) inset;
}
.agenda-event-time{
    font-weight:800;color:var(--couleur-hover, #1e3a8a);
    font-size:1.05rem;min-width:58px;flex-shrink:0;
    border-right:2px solid #e5e7eb;padding-right:1rem;
    line-height:1;
}
.agenda-event-body{ flex:1 1 auto;min-width:0}
.agenda-event-title{
    font-weight:600;color:#1e293b;font-size:.95rem;
    line-height:1.3;margin:0 0 .15rem;
    overflow:hidden;display:-webkit-box;
    -webkit-line-clamp:2;-webkit-box-orient:vertical;
}
.agenda-event-meta{
    font-size:.75rem;color:#64748b;
    display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;
}
.agenda-event-arrow{
    color:#cbd5e0;font-size:1.1rem;flex-shrink:0;
}
.agenda-event-row.status-full .agenda-event-time,
.agenda-event-row.status-annule .agenda-event-time,
.agenda-event-row.status-closed .agenda-event-time{ color:#b91c1c}
.agenda-event-row.status-waitlist .agenda-event-time{ color:#92400e}
.agenda-event-row.status-not_yet_open .agenda-event-time{ color:#1d4ed8}
.agenda-status-chip{
    display:inline-flex;align-items:center;gap:3px;padding:1px 8px;border-radius:999px;font-size:.7rem;font-weight:600;
}
.agenda-status-chip.chip-full,
.agenda-status-chip.chip-annule,
.agenda-status-chip.chip-closed{
    background:#fee2e2;color:#991b1b;
}
.agenda-status-chip.chip-waitlist{
    background:#fef3c7;color:#92400e;
}
.agenda-status-chip.chip-not_yet_open{
    background:#dbeafe;color:#1e40af;
}
.agenda-status-chip.chip-nores{
    background:#e2e8f0;color:#334155;
}
.agenda-status-chip.chip-places{
    background:#dcfce7;color:#166534;
}

/* Responsive */
@media (max-width:1199.98px){
    .event-main-section{ grid-template-columns:300px 1fr}
    .event-image-wrapper{ min-height:250px;max-height:250px}
}
@media (max-width:991.98px){
    .event-main-section{ grid-template-columns:1fr}
    .occurrence-item{ flex-direction:column !important;align-items:flex-start !important}
    .calendar-day{ min-height:100px}
}
@media (max-width:767.98px){
    .event-image-wrapper{ min-height:200px;max-height:200px}
    .agenda-toolbar{
        padding:.75rem 1rem;
        border-radius:16px;
   }
    .agenda-month-title{ font-size:1.15rem;min-width:0}
    .agenda-today-link{
        position:static;transform:none;
        padding:.25rem .6rem;font-size:.75rem;
        margin-left:.5rem;
   }
    /* Bascule vers la vue liste sur mobile */
    .calendar-grid{ display:none}
    .agenda-list{ display:flex}
}

/* Badges d'état d'occurrence — palettes 100 % AA-safe (fond opaque, pas bg-opacity) */
.occ-badge{
    display:inline-flex;align-items:center;gap:3px;
    padding:3px 10px;border-radius:999px;
    font-size:.8rem;font-weight:600;line-height:1.4;
}
.occ-badge i{ font-size:.85rem}
.occ-badge--red  { background:#fee2e2;color:#991b1b;}
.occ-badge--blue { background:#dbeafe;color:#1e40af;}
.occ-badge--slate{ background:#e2e8f0;color:#334155;}
.occ-badge--gray { background:#e5e7eb;color:#374151;}

@media (prefers-reduced-motion:reduce){
    .event-item,
    .agenda-nav-btn,
    .agenda-today-link,
    .agenda-today-btn,
    .calendar-day,
    .calendar-event-item,
    .day-number,
    .day-more-btn,
    .agenda-event-row,
    .agenda-event-row::before,
    .show-more-btn i,
    .occurrence-item.fade-in{
        transition:none !important;
        animation:none !important;
        transform:none !important;
   }
    .calendar-event-item:hover,
    .calendar-event-item:focus-visible{ transform:none !important}
    .agenda-nav-btn:hover,
    .agenda-today-link:hover{ transform:none !important}
}

.filter-bar {
    background: #fff; border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    position: sticky; top: var(--front-header-height, 82px); z-index: 900;
}
.active-filters-clear{color:#6b7280;font-size:.8rem;white-space:nowrap}
.active-filters-clear:hover,.active-filters-clear:focus-visible{color:#b91c1c}
.active-filters-clear:not([hidden]) { display: inline-flex; align-items: center; gap: 4px; }
.filter-panel {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1055; display: none;
}
.filter-panel.active { display: block }
.filter-panel-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.5); animation: fadeIn .3s ease;
}
.filter-panel-content {
    position: absolute; top: 0; left: 0; width: 100%; max-width: 500px; height: 100%;
    background: #fff; box-shadow: 4px 0 20px rgba(0,0,0,.15);
    display: flex; flex-direction: column;
    animation: slideInLeft .3s ease;
}
.filter-checkbox:has(input:checked) {
    background: #dbeafe !important; border: 2px solid #60a5fa; padding: 3px 11px;
}
.filter-checkbox:has(input:checked) span { color: #1e3a8a; font-weight: 600 }
.view-switcher .btn.active { background: #fff; color: var(--couleur-primaire, #1d4ed8); box-shadow: 0 2px 4px rgba(0,0,0,.1) }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideInLeft { from { transform: translateX(-100%) } to { transform: translateX(0) } }
@media (max-width: 991.98px) {
    .filter-panel-content { max-width: 340px }
}
@media (max-width: 767.98px) {
    .filter-panel-content { max-width: 100% }
    .view-switcher .btn span { display: none }
    .view-switcher .btn { padding: .3rem .6rem }
}

.colorcat {color:#A95829}
