* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-card: #2a2a2a;
    --bg-hover: #333;
    --accent: #a0a0a0;
    --accent-light: #c0c0c0;
    --text: #e8e8e8;
    --text-muted: #888;
    --border: #3a3a3a;
    --going: #6ab070;
    --maybe: #c9a227;
    --not-going: #b56b6b;
    --unknown: #666;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-primary); color: var(--text); min-height: 100vh; line-height: 1.5; padding-top: 60px; }

/* Header fixe */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--bg-secondary); padding: 12px 20px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; border-bottom: 1px solid var(--border); }
.header-logo { display: flex; align-items: center; opacity: 0.95; transition: opacity 0.2s; flex-shrink: 0; }
.header-logo:hover { opacity: 1; }
.header-logo img { display: block; height: 32px; width: auto; }
@media (max-width: 540px) { .header-logo img { height: 26px; } }
.logo { text-decoration: none; color: var(--text); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.5px; white-space: nowrap; }
.user-menu { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; justify-content: center; }
.user-menu .pseudo { color: var(--text); font-weight: 500; font-size: 0.9rem; }
.user-menu a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.user-menu a:hover { color: var(--text); }
.user-menu a.active-link { color: var(--text); font-weight: 500; }

main { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Buttons */
.btn { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); padding: 10px 20px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:hover { background: var(--bg-hover); border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: transparent; }
.btn-small { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon-mini { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; font-size: 0.78rem; line-height: 1; background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; text-decoration: none; transition: background 0.15s, color 0.15s; }
.btn-icon-mini:hover { background: var(--bg-hover); color: var(--text); }
.btn-icon-mini-danger:hover { background: var(--not-going); color: #fff; border-color: var(--not-going); }
/* Photos de l'onglet Guests : grandes sur desktop, compactes sur mobile */
.guest-tab-photo-big { width: 56px; height: 56px; font-size: 1rem; }
.guest-tab-photo-mini { width: 36px; height: 36px; font-size: 0.78rem; }
@media (max-width: 640px) {
    .guest-tab-photo-big { width: 40px; height: 40px; font-size: 0.85rem; }
    .guest-tab-photo-mini { width: 26px; height: 26px; font-size: 0.68rem; }
}

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg-secondary); padding: 4px; border-radius: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab { padding: 8px 14px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; border-radius: 6px; transition: all 0.2s; white-space: nowrap; font-size: 0.85rem; flex-shrink: 0; }
.tab:hover { color: var(--text); background: var(--bg-hover); }
.tab.active { background: var(--bg-card); color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Login */
.login-container { max-width: 400px; margin: 50px auto; padding: 30px; background: var(--bg-card); border-radius: 10px; border: 1px solid var(--border); }
.login-container h2 { text-align: center; margin-bottom: 25px; color: var(--text); font-weight: 500; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-secondary); color: var(--text); font-size: 1rem; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.social-login { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.social-btn { padding: 12px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; gap: 10px; }
.social-btn.google { background: #fff; color: #333; }
.social-btn.facebook { background: #1877f2; color: white; }
.divider { text-align: center; margin: 20px 0; color: var(--text-muted); position: relative; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.divider::before { left: 0; }
.divider::after { right: 0; }

/* Event cards */
.events-grid { display: flex; flex-direction: column; gap: 12px; }
.event-card { background: var(--bg-card); border-radius: 10px; padding: 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; border: 1px solid var(--border); transition: border-color 0.2s; }
.event-card:hover { border-color: var(--accent); }
.event-date { text-align: center; padding: 10px 15px; background: var(--bg-secondary); border-radius: 6px; min-width: 65px; }
.event-date .month { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.event-date .day { font-size: 1.6rem; font-weight: 600; }
.event-date .year { font-size: 0.7rem; color: var(--text-muted); }
.event-date.transport-early { border: 2px solid var(--going); }
.event-date.transport-warning { border: 2px solid var(--maybe); }
.event-date.transport-urgent { border: 2px solid #e74c3c; }
.event-info { flex: 1; }
.event-info h3 { font-size: 1rem; margin-bottom: 4px; cursor: pointer; transition: color 0.2s; font-weight: 500; }
.event-info h3:hover { color: var(--accent-light); }
.event-info .location { font-size: 0.85rem; color: var(--text-muted); }
.event-info .location a { color: var(--text-muted); text-decoration: none; }
.event-info .location a:hover { color: var(--text); }
.event-actions { display: flex; align-items: center; gap: 10px; }

/* Status select */
.status-select { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text); cursor: pointer; font-size: 0.85rem; }
.status-select:focus { outline: none; border-color: var(--accent); }
.status-select.status-going { border-color: var(--going); color: var(--going); }
.status-select.status-maybe { border-color: var(--maybe); color: var(--maybe); }
.status-select.status-not_going { border-color: var(--not-going); color: var(--not-going); }

/* Costume selector */
.costume-selector { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.day-costume { display: flex; align-items: center; gap: 5px; }
.day-label { font-size: 0.75rem; color: var(--text-muted); min-width: 22px; }
.costume-select { padding: 4px 8px; font-size: 0.8rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px; color: var(--text); max-width: 140px; }
.costume-select:focus { outline: none; border-color: var(--accent); }

/* Multi-costume */
.day-costumes-list { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.costume-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-secondary); padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; color: var(--going); }
.costume-tag .remove-costume { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0 2px; font-size: 1rem; line-height: 1; }
.costume-tag .remove-costume:hover { color: var(--not-going); }
.no-costume { color: var(--text-muted); font-size: 0.85rem; }
.add-costume-btn { background: var(--bg-secondary); border: 1px dashed var(--border); color: var(--accent); width: 22px; height: 22px; border-radius: 4px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; padding: 0; }
.add-costume-btn:hover { background: var(--bg-hover); border-color: var(--accent); }

/* Costume menu popup (legacy) */
.costume-menu { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 1000; max-height: 200px; overflow-y: auto; min-width: 150px; }
.costume-menu .menu-item { padding: 8px 12px; cursor: pointer; font-size: 0.85rem; }
.costume-menu .menu-item:hover { background: var(--bg-hover); color: var(--accent); }
.costume-menu .menu-empty { padding: 10px 12px; color: var(--text-muted); font-size: 0.8rem; font-style: italic; }

/* Costume picker modal - compact */
.costume-picker-grid {
    max-height: 60vh;
    overflow-y: auto;
}
.costume-picker-separator {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}
.costume-picker-char {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 4px 0 2px 0;
}
.costume-picker-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text);
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 4px;
}
.costume-picker-item:hover {
    background: var(--bg-hover);
    color: var(--accent);
}
.costume-picker-item.costume-picker-sub {
    padding-left: 16px;
    font-size: 0.8rem;
}
.costume-picker-empty {
    padding: 20px;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* Event checklist */
.event-checklist { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.checklist-item { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--text-muted); cursor: pointer; }
.checklist-item input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: var(--going); }
.checklist-item input[type="checkbox"]:checked + span { color: var(--going); }

/* Participations table V2 */
.members-filter { margin-bottom: 15px; position: relative; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.filter-info { font-size: 0.85rem; color: var(--text-muted); }
.members-filter-dropdown { display: none; position: absolute; top: 100%; left: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 15px; z-index: 50; min-width: 200px; max-height: 300px; overflow-y: auto; margin-top: 5px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); }
.members-filter-dropdown.show { display: block; }
.filter-actions { display: flex; gap: 8px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.member-checkbox { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: 0.9rem; }
.member-checkbox input { cursor: pointer; }
.you-badge { font-size: 0.75rem; color: var(--going); }
.participations-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.participations-table-v2 { width: max-content; min-width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: 8px; overflow: hidden; }
.participations-table-v2 th { padding: 12px 15px; text-align: center; background: var(--bg-secondary); color: var(--text-muted); font-weight: 500; font-size: 0.85rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.participations-table-v2 th a { color: var(--text); text-decoration: none; }
.participations-table-v2 th a:hover { text-decoration: underline; }
.participations-table-v2 td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.participations-table-v2 .event-cell { background: var(--bg-secondary); width: 1px; max-width: 220px; min-width: 140px; border-right: 1px solid var(--border); white-space: normal; padding: 10px 12px; }
.participations-table-v2 thead th.sticky-col { width: 1px; max-width: 220px; min-width: 140px; }
.participations-table-v2 .sticky-col { position: sticky; left: 0; z-index: 10; }
.participations-table-v2 .event-title { font-weight: 500; cursor: pointer; display: block; margin-bottom: 2px; font-size: 0.88rem; line-height: 1.25; }
.participations-table-v2 .event-title:hover { color: var(--accent-light); }
.participations-table-v2 .event-dates { font-size: 0.72rem; color: var(--text-muted); }
.participations-table-v2 .costume-cell { text-align: center; font-size: 0.85rem; min-width: 100px; white-space: nowrap; }
.participations-table-v2 .costume-cell.status-go { color: var(--going); }
.participations-table-v2 .costume-cell.status-maybe { color: var(--maybe); }
.participations-table-v2 .costume-cell.status-no { color: var(--not-going); }
.participations-table-v2 .costume-cell.status-unknown { color: var(--text-muted); }
.participations-table-v2 .day-num { font-size: 0.7rem; color: var(--text-muted); margin-right: 3px; }
.participations-table-v2 .absent { font-style: italic; }
.participations-table-v2 .no-costume { opacity: 0.5; }
.participations-table-v2 .unknown-status { opacity: 0.3; }
.participations-table-v2 .event-row td { border-top: 2px solid var(--bg-primary); }
.participations-table-v2 .day-row td { border-bottom: 1px solid rgba(255,255,255,0.03); }

/* Calendar */
.calendar-container { margin-bottom: 30px; }
.calendar-header { display: flex; justify-content: center; align-items: center; margin-bottom: 20px; gap: 20px; }
.calendar-nav { display: flex; align-items: center; gap: 15px; }
.calendar-nav h2 { min-width: 150px; text-align: center; font-weight: 500; font-size: 1.2rem; }
.btn-today { background: transparent; border: 1px solid var(--border); padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--text-muted); font-size: 0.8rem; }
.btn-today:hover { border-color: var(--accent); color: var(--text); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; background: var(--bg-secondary); padding: 10px; border-radius: 8px; overflow: hidden; }
.calendar-day-header { text-align: center; padding: 8px 4px; font-weight: 500; color: var(--text-muted); font-size: 0.75rem; }
.calendar-day { min-height: 80px; background: var(--bg-card); border-radius: 4px; padding: 6px; overflow: hidden; }
.calendar-day.other-month { opacity: 0.3; }
.calendar-day.today { border: 1px solid var(--accent); }
.calendar-day-number { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.calendar-day-number.clickable { cursor: pointer; padding: 1px 5px; border-radius: 4px; transition: background 0.15s, color 0.15s; }
.calendar-day-number.clickable:hover { background: var(--accent); color: var(--bg); font-weight: 600; }
.calendar-day.has-events .calendar-day-number { font-weight: 500; color: var(--text); }
.calendar-day-more { font-size: 0.65rem; color: var(--text-muted); cursor: pointer; padding: 2px 4px; border-radius: 3px; transition: background 0.15s, color 0.15s; text-align: center; }
.calendar-day-more:hover { background: var(--bg-card); color: var(--text); }
.day-event-row:hover { border-color: rgba(255,255,255,0.18) !important; }
.calendar-event { font-size: 0.65rem; padding: 2px 4px; border-radius: 3px; margin-bottom: 2px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.status-going { background: var(--going); color: #fff; }
.calendar-event.status-maybe { background: var(--maybe); color: #000; }
.calendar-event.status-not_going { background: var(--not-going); color: #fff; }
.calendar-event.status-unknown { background: var(--bg-secondary); color: var(--text-muted); }
.calendar-event.status-past { background: var(--bg-hover); color: var(--text-muted); }

/* Map */
.map-container { margin-top: 30px; }
.map-container h3 { margin-bottom: 15px; font-weight: 500; color: var(--text-muted); font-size: 1rem; }
#eventsMap { width: 100%; height: 400px; border-radius: 8px; border: 1px solid var(--border); }
.map-popup h4 { margin: 0 0 8px 0; color: var(--text); }
.map-popup p { margin: 4px 0; font-size: 0.85rem; color: var(--text-muted); }

/* Modal */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
#dayDetailsModal { z-index: 950; }
.modal { background: var(--bg-card); border-radius: 10px; padding: 25px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; border: 1px solid var(--border); }
.modal h2 { margin-bottom: 20px; color: var(--text); font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Participants details table in modal */
.participants-details-table { width: 100%; margin-top: 10px; border-collapse: collapse; }
.participants-details-table th { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; padding: 5px 8px; text-align: center; }
.participants-details-table th:first-child { text-align: left; }
.participants-details-table td { padding: 6px 8px; font-size: 0.9rem; }
.participants-details-table td:first-child { text-align: left; }
.participants-details-table tr:not(:last-child) td { border-bottom: 1px solid var(--border); }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-content { display: none; position: absolute; right: 0; background: var(--bg-secondary); min-width: 160px; border-radius: 6px; box-shadow: 0 5px 20px rgba(0,0,0,0.4); z-index: 100; border: 1px solid var(--border); }
.dropdown-content.show { display: block; }
.dropdown-item { display: block; padding: 10px 15px; color: var(--text); cursor: pointer; white-space: nowrap; font-size: 0.9rem; }
.dropdown-item:hover { background: var(--bg-hover); }

/* Toast */
.toast { position: fixed; bottom: 20px; right: 20px; padding: 15px 25px; background: var(--bg-card); border-left: 3px solid var(--going); border-radius: 6px; z-index: 2000; animation: slideIn 0.3s ease; }
.toast.error { border-color: var(--not-going); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Admin */
.admin-tabs { display: flex; gap: 5px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-tab { padding: 10px 20px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; border-radius: 6px; font-size: 0.9rem; }
.admin-tab:hover { border-color: var(--accent); }
.admin-tab.active { background: var(--bg-hover); color: var(--text); border-color: var(--accent); }
.admin-content { display: none; }
.admin-content.active { display: block; }
.admin-section { margin-bottom: 30px; }
.admin-section h3 { margin-bottom: 15px; color: var(--text); font-weight: 500; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: 8px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg-secondary); color: var(--text-muted); font-weight: 500; }
.user-card { background: var(--bg-card); padding: 15px; border-radius: 8px; border: 1px solid var(--border); }
.user-card strong { display: block; margin-bottom: 5px; }
.user-card .email { font-size: 0.85rem; color: var(--text-muted); }
.user-card .role { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; margin-top: 8px; }
.user-card .role.admin { background: rgba(106,176,112,0.2); color: var(--going); }
.user-card .role.member { background: var(--bg-secondary); color: var(--text-muted); }
.pending-event { background: var(--bg-card); padding: 15px; border-radius: 8px; border: 1px solid var(--border); }

/* Profile */
.profile-section { background: var(--bg-card); border-radius: 10px; padding: 25px; margin-bottom: 20px; border: 1px solid var(--border); }
.profile-section h3 { margin-bottom: 20px; font-weight: 500; }

/* Costume cards - Vignettes carrées */
.costume-card { background: var(--bg-card); padding: 15px; border-radius: 8px; border: 1px solid var(--border); display: flex; flex-direction: column; }
.costume-card strong { display: block; margin-bottom: 3px; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.costume-card .costume-name { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.costume-card .costume-source { font-size: 0.75rem; color: var(--text-muted); font-style: italic; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.costume-status { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; }
.costume-status.status-planned { background: rgba(102,102,102,0.3); color: var(--text-muted); }
.costume-status.status-progress { background: rgba(201,162,39,0.2); color: var(--maybe); }
.costume-status.status-ready { background: rgba(106,176,112,0.2); color: var(--going); }

/* Sort buttons */
.sort-buttons { display: flex; align-items: center; gap: 8px; }
.sort-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
    body { padding-top: 55px; }
    header { padding: 10px 15px; }
    .logo { font-size: 1rem; }
    .user-menu { gap: 10px; }
    .user-menu .pseudo { display: none; }
    .user-menu a { font-size: 0.8rem; }
    main { padding: 15px 10px; }
    .tabs { margin-bottom: 15px; padding: 3px; gap: 2px; }
    .tab { padding: 8px 10px; font-size: 0.8rem; }
    .event-card { grid-template-columns: 1fr; gap: 12px; padding: 15px; }
    .event-date { display: flex; gap: 8px; align-items: center; justify-content: flex-start; padding: 8px 12px; }
    .event-date .month, .event-date .day, .event-date .year { display: inline; }
    .event-date .month { font-size: 0.8rem; }
    .event-date .day { font-size: 1.2rem; margin: 0 5px; }
    .event-date .year { font-size: 0.8rem; }
    .event-actions { flex-direction: row; justify-content: flex-start; }
    .participations-table-v2 { font-size: 0.75rem; }
    .participations-table-v2 th, .participations-table-v2 td { padding: 6px 6px; }
    .participations-table-v2 .event-cell { min-width: 120px; }
    .calendar-container { margin-bottom: 20px; }
    .calendar-header { flex-direction: column; gap: 10px; }
    .calendar-nav h2 { font-size: 1rem; min-width: 120px; }
    .calendar-grid { gap: 2px; padding: 5px; }
    .calendar-day-header { padding: 5px 2px; font-size: 0.65rem; }
    .calendar-day { min-height: 50px; padding: 4px; }
    .calendar-day-number { font-size: 0.7rem; margin-bottom: 2px; }
    .calendar-event { font-size: 0.55rem; padding: 1px 2px; margin-bottom: 1px; }
    #eventsMap { height: 250px; }
    .costume-selector { flex-direction: column; gap: 5px; }
    .costume-select { max-width: 100%; }
    .admin-grid { grid-template-columns: 1fr; }
    .profile-section { padding: 15px; }
    .modal { padding: 20px; margin: 10px; }
}

/* Map popup styles pour groupes d'evenements */
.map-popup { min-width: 180px; }
.map-popup h4 { margin: 0 0 8px 0; font-size: 0.95rem; color: var(--text); }
.map-popup p { margin: 4px 0; font-size: 0.85rem; color: var(--text-muted); }
.map-popup-group { max-width: 280px; }
.popup-events-list { list-style: none; padding: 0; margin: 8px 0 0 0; max-height: 200px; overflow-y: auto; }
.popup-event-item { padding: 8px 10px; margin: 4px 0; background: var(--bg-secondary); border-radius: 6px; cursor: pointer; transition: background 0.2s; }
.popup-event-item:hover { background: var(--bg-hover); }
.popup-event-item strong { display: block; font-size: 0.85rem; color: var(--text); margin-bottom: 2px; }
.popup-event-item .popup-event-date { font-size: 0.75rem; color: var(--text-muted); }
.popup-event-item.past { opacity: 0.6; }
.popup-event-item.upcoming strong { color: var(--going); }

/* Marker cluster count badge */
.cluster-marker .marker-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.leaflet-popup-tip {
    background: var(--bg-card);
}
.leaflet-popup-content {
    margin: 12px 14px;
}
.leaflet-popup-close-button {
    color: var(--text-muted) !important;
}
.leaflet-popup-close-button:hover {
    color: var(--text) !important;
}

/* Custom marker base style */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* Photos de costumes - Vignettes carrées */
.costume-photo {
    width: calc(100% + 30px);
    margin: -15px -15px 10px -15px;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
    border-radius: 8px 8px 0 0;
}
.costume-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 33%;
    transition: transform 0.2s;
}
.costume-photo:hover img {
    transform: scale(1.05);
}

/* Zone d'upload photo - version compacte */
.photo-edit-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.photo-preview-small {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    overflow: hidden;
    flex-shrink: 0;
}
.photo-preview-small.has-photo {
    border-style: solid;
    border-color: var(--accent);
}
.photo-preview-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-preview-small span {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 5px;
}
.photo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Ancienne zone d'upload (pour compatibilite) */
.photo-upload-zone {
    width: 100%;
    height: 150px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
    overflow: hidden;
    position: relative;
}
.photo-upload-zone:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}
.photo-upload-zone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-upload-zone span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modal photo - version compacte */
.photo-modal {
    max-width: 90vw;
    max-height: 90vh;
}
.photo-modal img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

/* Popup photo costume (compact) */
.costume-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    width: 424px;
    max-width: calc(100vw - 20px);
}
.costume-popup.show {
    display: block;
    animation: popupFadeIn 0.15s ease-out;
}
@keyframes popupFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.costume-popup img {
    width: 400px;
    height: 400px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.costume-popup #costumePopupTitle {
    text-align: center;
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tooltip photo au survol dans le tableau */
.costume-photo-icon {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.costume-photo-icon:hover .costume-tooltip {
    display: block;
}
.photo-indicator {
    font-size: 0.85rem;
    opacity: 0.7;
}
.costume-photo-icon:hover .photo-indicator {
    opacity: 1;
}

/* Ancien style pour compatibilite */
.costume-with-photo {
    position: relative;
    cursor: pointer;
}
.costume-with-photo:hover .costume-tooltip {
    display: block;
}

.costume-tooltip {
    display: none;
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    pointer-events: none;
}
.costume-tooltip img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    object-position: center 33%;
    border-radius: 6px;
    display: block;
}

/* Sur mobile: pas de hover, clic uniquement */
@media (max-width: 768px) {
    .costume-tooltip {
        display: none !important;
    }
}

/* Barre de filtre */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.filter-checkbox:hover {
    color: var(--text);
}

/* Elements de costume (checklist) */
.costume-items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}
.costume-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 6px;
    margin-bottom: 6px;
}
.costume-item:hover {
    background: var(--bg-hover);
}
.costume-item .item-name {
    flex: 1;
    cursor: pointer;
}
.costume-item .item-name:hover {
    color: var(--accent);
}
.item-edit-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text);
    font-size: inherit;
}
.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}
.btn-icon:hover {
    color: var(--not-going);
}
.add-item-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.add-item-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 0.9rem;
}
.add-item-form input:focus {
    outline: none;
    border-color: var(--accent);
}
.add-item-form input::placeholder {
    color: var(--text-muted);
}
.no-items {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Modal Valise */
.valise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.valise-section {
    margin-bottom: 0;
}
.valise-section h4 {
    margin: 0 0 10px 0;
    color: var(--accent);
    font-size: 0.95rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.valise-section h4 .day-badge {
    background: var(--accent);
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}
.valise-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
.valise-item:hover {
    background: var(--bg-hover);
}
.valise-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}
.valise-item.checked .item-label {
    text-decoration: line-through;
    color: var(--text-muted);
}
.valise-item .item-label {
    flex: 1;
}
.valise-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--bg);
    border-radius: 8px;
}
.valise-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.valise-progress-fill {
    height: 100%;
    background: var(--going);
    transition: width 0.3s ease;
}
.valise-progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 60px;
    text-align: right;
}
.valise-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 30px;
    font-style: italic;
}
.btn-valise {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.btn-valise:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

/* Admin - Costumes des utilisateurs */
.admin-costumes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.admin-costume-card {
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.admin-costume-card.has-items .admin-costume-info {
    cursor: pointer;
}
.admin-costume-card.has-items .admin-costume-info:hover {
    background: var(--bg-hover);
}
.admin-costume-photo {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
}
.admin-costume-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 33%;
    transition: transform 0.2s;
}
.admin-costume-photo:hover img {
    transform: scale(1.05);
}
.admin-costume-info {
    padding: 8px;
}
.admin-costume-info strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-costume-info .costume-subname {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-costume-info .costume-source {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-costume-info .costume-status {
    font-size: 0.7rem;
}
.admin-costume-info .items-indicator {
    font-size: 0.7rem;
    color: var(--accent);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}
.admin-costume-items {
    display: none;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}
.admin-costume-items.show {
    display: block;
}
.admin-costume-items ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.admin-costume-items li {
    font-size: 0.7rem;
    color: var(--text);
    padding: 1px 0;
    padding-left: 10px;
    position: relative;
}
.admin-costume-items li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Modal Modifier Costume - Layout condensé */
.edit-costume-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.edit-costume-photo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.edit-costume-photo-col .photo-preview-small {
    width: 90px;
    height: 90px;
}
.photo-actions-small {
    display: flex;
    gap: 5px;
}
.photo-actions-small .btn {
    padding: 4px 10px;
    min-width: 32px;
}
.edit-costume-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.edit-costume-fields input,
.edit-costume-fields select {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text);
}
.edit-costume-fields input:focus,
.edit-costume-fields select:focus {
    outline: none;
    border-color: var(--accent);
}
.edit-costume-fields input::placeholder {
    color: var(--text-muted);
}
.edit-costume-row {
    display: flex;
    gap: 8px;
}
.edit-costume-row input {
    flex: 1;
}
.edit-costume-row select {
    width: 110px;
}
.edit-costume-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.edit-costume-separator::before,
.edit-costume-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Responsive */
@media (max-width: 480px) {
    .edit-costume-grid {
        flex-direction: column;
        align-items: center;
    }
    .edit-costume-fields {
        width: 100%;
    }
    .edit-costume-row {
        flex-direction: column;
    }
    .edit-costume-row select {
        width: 100%;
    }
}

/* Profile - Elements de costume dans les cartes */
.costume-card .costume-card-content {
    flex: 1;
}
.costume-card .costume-card-content.clickable {
    cursor: pointer;
}
.costume-card .costume-card-content.clickable:hover {
    opacity: 0.9;
}
.costume-card .items-indicator {
    font-size: 0.7rem;
    color: var(--accent);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}
.costume-card .profile-costume-items {
    display: none;
    margin-top: 6px;
}
.costume-card .profile-costume-items.show {
    display: block;
}
.costume-card .profile-costume-items ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.costume-card .profile-costume-items li {
    font-size: 0.7rem;
    color: var(--text);
    padding: 1px 0;
    padding-left: 10px;
    position: relative;
}
.costume-card .profile-costume-items li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}
.costume-card .costume-actions {
    margin-top: 8px;
}
.costume-card .costume-actions .btn {
    font-size: 0.75rem;
    padding: 4px 10px;
}

/* Admin - Photos miniatures dans cartes utilisateurs */
.user-photos-strip {
    display: flex;
    gap: 4px;
    margin: -15px -15px 12px -15px;
    padding: 0;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: var(--bg-secondary);
}
.user-photo-thumb {
    flex: 1;
    height: 60px;
    overflow: hidden;
    cursor: pointer;
}
.user-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 33%;
    transition: transform 0.2s, opacity 0.2s;
}
.user-photo-thumb:hover img {
    transform: scale(1.1);
    opacity: 0.9;
}
.user-photo-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 60px;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

/* En-têtes membres cliquables */
.member-header-clickable {
    cursor: pointer;
    transition: color 0.2s;
}
.member-header-clickable:hover {
    color: var(--accent);
}

/* Modal Membre */
.member-details-header {
    margin-bottom: 20px;
}
.member-details-header h2 {
    margin: 0;
}
.member-instagram-link {
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.member-instagram-link:hover {
    color: var(--accent);
}
.member-instagram-link .instagram-icon {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: normal;
}
.member-section {
    margin-bottom: 20px;
}
.member-section h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

/* Grille de costumes membre */
.member-costumes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}
.member-costume-card {
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.member-costume-photo {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
}
.member-costume-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 33%;
    transition: transform 0.2s;
}
.member-costume-photo:hover img {
    transform: scale(1.1);
}
.member-costume-photo.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}
.member-costume-info {
    padding: 6px 8px;
}
.member-costume-info strong {
    display: block;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-costume-info .costume-version {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-costume-info .costume-source {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-costume-info .costume-status {
    font-size: 0.6rem;
    margin-top: 4px;
}

/* Liste events membre */
.member-events-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.member-event {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 6px;
}
.member-event .event-status-icon {
    font-size: 0.85rem;
    width: 20px;
    text-align: center;
}
.member-event.status-going .event-status-icon {
    color: var(--going);
}
.member-event.status-maybe .event-status-icon {
    color: var(--maybe);
}
.member-event .event-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 50px;
}
.member-event .event-title {
    font-size: 0.85rem;
    flex: 1;
}

/* Filtres Participations */
.participations-filters {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.participations-filters .filter-checkbox {
    margin: 0;
}
.participations-filters .members-filter {
    margin-bottom: 0;
}

/* Description événement avec collapse */
.event-description-container {
    margin-top: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}
.event-description {
    padding: 12px 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.event-description-container.collapsed .event-description {
    max-height: 80px;
    overflow: hidden;
    position: relative;
}
.event-description-container.collapsed .event-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--bg-secondary));
}
.event-description-toggle {
    padding: 8px 15px;
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    text-align: center;
    border-top: 1px solid var(--border);
}
.event-description-toggle:hover {
    background: var(--bg-hover);
}

/* Profil compact */
.profile-compact {
    padding: 20px !important;
}
.profile-compact h3 {
    margin-bottom: 15px !important;
}
.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.profile-form-grid .form-group {
    margin-bottom: 0;
}
.profile-form-grid label {
    font-size: 0.8rem;
    margin-bottom: 4px;
}
.profile-form-grid input {
    padding: 8px 10px;
}
.profile-submit {
    margin-top: 5px;
}

@media (min-width: 768px) {
    .profile-form-grid {
        grid-template-columns: repeat(4, 1fr);
        align-items: end;
        gap: 15px;
    }
    .profile-submit {
        margin-top: 0;
    }
    .profile-submit .btn {
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .profile-form-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Admin - Tableau événements */
.event-date-cell {
    white-space: nowrap;
    font-size: 0.85rem;
}
.event-title-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}
.event-title-link:hover {
    color: var(--accent);
}
.location-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.location-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
.actions-cell {
    text-align: right;
    white-space: nowrap;
}
.actions-cell .btn {
    margin-left: 5px;
}

/* Séparateur d'année dans tableau événements */
.year-separator td {
    background: var(--bg-secondary);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px !important;
    border-bottom: 2px solid var(--accent);
}
