/* Calendrier : grille, agenda, fiche d'événement, formulaire */

/* —— Grille mensuelle —— */
.cal-grid { grid-auto-rows: minmax(104px, auto); }
.cal-cell { display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 8px; min-width: 0; }
.cal-num { font-size: 12.5px; font-weight: 600; padding: 2px 6px; align-self: flex-start; }
.cal-cell.today .today-num { align-self: flex-start; }
.cal-cell.selected { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-chips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 3px 7px; font: 500 11.5px/1.3 var(--font-body, Inter, sans-serif); color: #fff; background: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: filter .15s, transform .15s; }
.cal-chip b { font-weight: 700; margin-right: 3px; }
.cal-chip.live { background: linear-gradient(90deg, #493781, #80348A); }
.cal-chip.past { background: var(--border); color: var(--text-muted); }
.cal-chip:hover { filter: brightness(1.12); transform: translateY(-1px); }
.cal-more { font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 0 7px; }
.cal-cell .cal-event-dot { display: none; }
@media (max-width: 760px) {
  .cal-grid { grid-auto-rows: minmax(52px, auto); }
  .cal-chips { display: none; }
  .cal-cell { align-items: center; padding: 6px 2px; }
  .cal-cell .cal-event-dot { display: block; position: static; margin-top: 2px; }
}

/* —— Agenda —— */
.ev-day-head { margin: 22px 0 8px; font: 700 13px var(--font-body, Inter, sans-serif); letter-spacing: .04em; color: var(--text-muted); }
.ev-day-head::first-letter { text-transform: uppercase; }
.ev-day-head.past { margin-top: 34px; text-transform: uppercase; }
.ev-card { display: flex; align-items: center; gap: 18px; padding: 16px 18px; margin-bottom: 10px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.ev-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(32, 58, 124, .12); border-color: var(--light-accent); }
.ev-card.done { opacity: .72; }
.ev-date { flex: none; width: 62px; height: 70px; border-radius: 14px; background: var(--background-soft, #f3f4f8); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.ev-wk, .ev-mon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.ev-day { font: 800 24px var(--font-display, Poppins, sans-serif); color: var(--primary); }
.ev-card.live .ev-date { background: linear-gradient(135deg, #493781, #80348A); }
.ev-card.live .ev-date * { color: #fff; }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ev-time { font-size: 13px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-title { font-size: 16.5px; line-height: 1.3; }
.ev-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); }
.ev-people { display: inline-flex; align-items: center; gap: 8px; }
.ev-badge { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.ev-badge.live { background: rgba(220, 38, 38, .12); color: #dc2626; }
.ev-badge.going { background: rgba(22, 163, 74, .13); color: #15803d; }
.ev-badge.done { background: var(--background-soft); color: var(--text-muted); }
.ev-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.ev-btn { border: 1.5px solid var(--border); background: var(--background, #fff); color: var(--text-body); border-radius: 999px; padding: 9px 16px; font: 700 13px var(--font-body, Inter, sans-serif); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .15s, border-color .15s; display: inline-flex; align-items: center; justify-content: center; }
.ev-btn:hover { border-color: var(--primary); }
.ev-btn.active { background: rgba(22, 163, 74, .12); border-color: #16a34a; color: #15803d; }
.ev-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ev-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(32, 58, 124, .28); }
.ev-btn.lg { padding: 13px 26px; font-size: 14.5px; }
.ev-btn.disabled { background: var(--background-soft); border-color: transparent; color: var(--text-muted); cursor: default; }
@media (max-width: 640px) {
  .ev-card { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .ev-date { width: 54px; height: 62px; }
  .ev-actions { width: 100%; }
  .ev-actions .ev-btn { flex: 1; }
}

/* —— Fiche d'événement —— */
.evd { max-width: 560px !important; width: calc(100vw - 24px); padding: 0; overflow: hidden auto; max-height: calc(100vh - 40px); }
.evd .modal-close { z-index: 3; background: rgba(0, 0, 0, .3); color: #fff; }
.evd-hero { position: relative; height: 140px; display: flex; align-items: flex-end; padding: 18px 24px; background: linear-gradient(135deg, #203A7C, #493781 60%, #80348A); }
.evd-hero.in_person { background: linear-gradient(135deg, #0f766e, #0ea5e9); }
.evd-hero.zoom, .evd-hero.meet, .evd-hero.other { background: linear-gradient(135deg, #1d4ed8, #0ea5e9); }
.evd-hero.done { filter: grayscale(.7); }
.evd-ico { position: absolute; right: 22px; top: 18px; font-size: 54px; opacity: .22; }
.evd-status { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--primary); font: 700 13px var(--font-body, Inter, sans-serif); }
.evd-status.live { background: #dc2626; color: #fff; animation: evPulse 1.6s ease-in-out infinite; }
.evd-status.soon { background: #f59e0b; color: #fff; }
@keyframes evPulse { 50% { box-shadow: 0 0 0 7px rgba(220, 38, 38, .22); } }
.evd-body { padding: 22px 26px 24px; }
.evd-title { margin: 0 0 16px; font: 700 24px/1.25 var(--font-display, Poppins, sans-serif); letter-spacing: -.01em; }
.evd-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.evd-row > span:first-child { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 18px; border-radius: 10px; background: var(--background-soft); }
.evd-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.evd-row small { color: var(--text-muted); font-size: 12.5px; }
.evd-row a { color: var(--primary); font-weight: 600; font-size: 13px; }
.evd-desc { white-space: pre-wrap; word-break: break-word; margin: 18px 0; line-height: 1.65; color: var(--text-body); }
.evd-desc a { color: var(--primary); }
.evd-people { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px 0; font: 600 13.5px var(--font-body, Inter, sans-serif); color: var(--text-body); cursor: pointer; }
.evd-people.none { color: var(--text-muted); cursor: default; font-weight: 500; }
.evd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 6px; padding-top: 18px; border-top: 1px solid var(--border); }
.evd-actions .ev-btn { flex: 1; min-width: 160px; }
.evd-actions .rsvp-group { flex: 1; min-width: 200px; }
.evd-secondary { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.evd-link { border: 0; background: transparent; color: var(--primary); font: 600 13px var(--font-body, Inter, sans-serif); cursor: pointer; padding: 6px 0; }
.evd-link:hover { text-decoration: underline; }
.evd-link.danger { color: #c0392b; }
.evd-cal { position: relative; }
.evd-cal-menu { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 4; min-width: 220px; padding: 6px; background: var(--background, #fff); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 36px rgba(0, 0, 0, .18); }
.evd-cal-menu a, .evd-cal-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent; border-radius: 8px; color: inherit; font: 500 13.5px var(--font-body, Inter, sans-serif); text-decoration: none; cursor: pointer; }
.evd-cal-menu a:hover, .evd-cal-menu button:hover { background: var(--background-soft); }
.evd-cal-menu[hidden] { display: none; }

/* —— Formulaire —— */
.evf { display: flex; flex-direction: column; gap: 4px; }
.evf-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.evf-tz { margin: -4px 0 10px; }
@media (max-width: 560px) { .evf-row { grid-template-columns: 1fr 1fr; } .evf-row > :first-child { grid-column: 1 / -1; } }
