/* ---- Legend ---- */
.agenda-legend { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }

/* ---- Chips ---- */
.agenda-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; font-family: "Archivo", sans-serif; letter-spacing: .04em; white-space: nowrap; }
.agenda-chip--vert    { background: #e6f4ec; color: #2f8f4e; }
.agenda-chip--orange  { background: #fef3e2; color: #c07000; }
.agenda-chip--violet  { background: #ede9f8; color: #6b3fa0; }
.agenda-chip--members { background: #fdecea; color: #c0392b; }
.agenda-chip--days    { background: #f0f4f8; color: var(--muted); font-weight: 500; }

/* ---- Month headings ---- */
.agenda-month { font-size: 1rem; font-family: "Archivo", sans-serif; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.agenda-month:first-of-type { margin-top: 0; }

/* ---- List ---- */
.agenda-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 12px; }

/* ---- Item ---- */
.agenda-item { display: flex; gap: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; position: relative; overflow: hidden; transition: box-shadow .18s; }
.agenda-item:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.agenda-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 12px 0 0 12px; }
.agenda-item--vert::before   { background: #2f8f4e; }
.agenda-item--orange::before { background: #c07000; }
.agenda-item--violet::before { background: #6b3fa0; }

/* ---- Date block ---- */
.agenda-date { flex: none; width: 52px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.agenda-day  { font-family: "Archivo", sans-serif; font-weight: 900; font-size: 1.6rem; line-height: 1; color: var(--ink); }
.agenda-mois { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 2px; }

/* ---- Body ---- */
.agenda-body { flex: 1; min-width: 0; }
.agenda-header-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.agenda-titre { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.agenda-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 8px; }
.agenda-meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.agenda-desc { font-size: 14px; color: var(--muted); margin: 6px 0 10px; line-height: 1.5; }
.agenda-lien { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--brique); text-decoration: none; transition: opacity .18s; }
.agenda-lien:hover { opacity: .75; }

/* ---- Past events ---- */
.agenda-item--past { opacity: .65; }
.agenda-item--past:hover { opacity: .85; }
.agenda-passes { margin-top: 48px; }
.agenda-passes summary { cursor: pointer; font-weight: 700; font-family: "Archivo", sans-serif; font-size: .95rem; color: var(--muted); padding: 10px 0; list-style: none; }
.agenda-passes summary::before { content: '+ '; }
.agenda-passes[open] summary::before { content: '− '; }
.agenda-list--past { margin-top: 16px; }

/* ---- Empty state ---- */
.agenda-empty { color: var(--muted); font-size: 1.05rem; padding: 40px 0; text-align: center; }

/* ---- Clickable item ---- */
.js-modal-trigger { cursor: pointer; }
.js-modal-trigger:hover { box-shadow: 0 6px 24px rgba(0,0,0,.10); transform: translateY(-1px); }
.agenda-arrow { flex: none; align-self: center; font-size: 1.3rem; color: var(--muted); opacity: .4; transition: opacity .18s, transform .18s; }
.js-modal-trigger:hover .agenda-arrow { opacity: .8; transform: translateX(3px); }

/* ---- Modal overlay ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, .55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}
.modal-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}
.modal-box {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 36px 36px 32px;
    position: relative;
    transform: translateY(18px);
    transition: transform .22s ease;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
}
.modal-overlay.is-open .modal-box {
    transform: translateY(0);
}

/* ---- Modal close button ---- */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
}
.modal-close:hover { background: var(--line); }

/* ---- Modal inner content ---- */
.modal-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.modal-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 14px; padding-right: 32px; line-height: 1.25; }
.modal-meta-block { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.modal-meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.modal-desc-body { font-size: 15px; line-height: 1.65; color: var(--ink); margin-bottom: 24px; }
.modal-desc-body p { margin: 0 0 12px; }
.modal-desc-body p:last-child { margin-bottom: 0; }
.modal-desc-body h2, .modal-desc-body h3 { font-family: "Archivo", sans-serif; margin: 16px 0 8px; }
.modal-desc-body ul, .modal-desc-body ol { padding-left: 20px; margin: 10px 0; }
.modal-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; }

/* ---- Body scroll lock ---- */
body.modal-open { overflow: hidden; }

/* ---- Responsive ---- */
@media(max-width:600px) {
    .agenda-item { gap: 14px; padding: 14px 16px; }
    .agenda-date { width: 40px; }
    .agenda-day { font-size: 1.3rem; }
    .agenda-titre { font-size: .95rem; }
    .modal-box { padding: 24px 20px 20px; }
    .modal-title { font-size: 1.1rem; }
}
