:root {
    --bg-deep: #0B0E14;
    --surface: #141925;
    --surface-2: #1A2030;
    --surface-3: #20283B;
    --border: #232B3D;
    --accent: #F4A340;
    --accent-dim: #F4A34022;
    --accent-soft: #F4A34044;
    --safe: #4FD1A5;
    --safe-dim: #4FD1A522;
    --danger: #E8607A;
    --today: #E8607A;
    --today-dim: #E8607A1f;
    --tomorrow: #F4A340;
    --tomorrow-dim: #F4A34022;
    --text: #F1EEE8;
    --text-dim: #8B92A8;
    --text-faint: #5A6075;
    --shadow-deep: 0 20px 60px rgba(0,0,0,0.45);
    --shadow-soft: 0 8px 24px rgba(0,0,0,0.25);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

body, html {
    margin: 0; padding: 0; height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg-deep);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, .display {
    font-family: 'Fraunces', serif;
    font-optical-sizing: auto;
    letter-spacing: -0.01em;
}

::selection { background: var(--accent-soft); color: var(--text); }
button, input, textarea { font-family: 'Inter', sans-serif; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

#container { display: flex; height: 100%; width: 100%; position: relative; background: var(--bg-deep); }
#map { flex-grow: 1; height: 100%; z-index: 1; filter: saturate(0.85) brightness(0.98); }

/* --- LOADER INITIAL --- */
#boot-veil {
    position: fixed; inset: 0; background: var(--bg-deep); z-index: 9999;
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#boot-veil.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-mark { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-soft); animation: boot-pulse 1.4s ease-out infinite; }
@keyframes boot-pulse {
    0% { box-shadow: 0 0 0 0 var(--accent-soft); }
    70% { box-shadow: 0 0 0 22px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.boot-label { color: var(--text-dim); font-size: 0.85rem; letter-spacing: 0.04em; }

/* --- SIDEBAR DESKTOP --- */
#sidebar {
    width: 410px; min-width: 410px; background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 1000; display: flex; flex-direction: column;
    position: relative;
}
.sidebar-header {
    padding: 24px 24px 16px 24px; border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}
.header-eyebrow {
    color: var(--accent); font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.14em;
}
.header-title { color: var(--text); margin: 0; font-size: 1.4rem; font-weight: 600; }
.header-sub { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; }

.search-wrapper { padding: 14px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }

/* --- TABS (Sorties / Discussion) --- */
.tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.tab-btn {
    flex: 1; background: none; border: none; padding: 13px 10px; cursor: pointer;
    color: var(--text-faint); font-weight: 600; font-size: 0.85rem; font-family: 'Inter', sans-serif;
    border-bottom: 2px solid transparent; transition: all 0.15s ease; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: var(--text-dim); }
.tab-badge {
    background: var(--accent); color: #1A1407; font-size: 0.68rem; font-weight: 700;
    border-radius: 10px; padding: 1px 6px; min-width: 16px; text-align: center;
}

.tab-panel { display: none; flex-direction: column; flex-grow: 1; min-height: 0; }
.tab-panel.active { display: flex; }

/* --- Actions sur une sortie (partager / supprimer) --- */
.event-top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.event-top-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-trigger {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-faint);
    width: 34px; height: 34px; border-radius: var(--radius-sm); cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
    transition: all 0.15s ease;
}
.icon-trigger:hover { color: var(--text); border-color: var(--text-faint); }
.icon-trigger:active { transform: scale(0.93); }
.icon-trigger[title="Supprimer cette sortie"]:hover { color: var(--danger); border-color: var(--danger); background: rgba(232,96,122,0.08); }
.icon-trigger[title="Partager cette sortie"]:hover { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-dim); }

.share-feedback {
    display: none; background: var(--safe-dim); color: var(--safe); border: 1px solid rgba(79,209,165,0.3);
    border-radius: var(--radius-sm); padding: 9px 13px; font-size: 0.82rem; font-weight: 600;
    margin-bottom: 12px; text-align: center;
}
.share-feedback.visible { display: block; animation: share-pop 0.2s ease; }
@keyframes share-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.delete-sortie-box {
    display: none; background: rgba(232,96,122,0.08); border: 1px solid rgba(232,96,122,0.3);
    border-radius: var(--radius-sm); padding: 13px 14px; margin-bottom: 14px;
}
.delete-sortie-box.visible { display: block; }
.delete-sortie-warning { margin: 0 0 10px 0; font-size: 0.82rem; color: var(--text-dim); line-height: 1.4; }
.delete-sortie-warning strong { color: var(--danger); }
.delete-sortie-row { display: flex; gap: 8px; }
.delete-sortie-row .form-control { flex-grow: 1; }
.btn-delete-confirm {
    background: var(--danger); color: #2B0A12; border: none; padding: 0 16px; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 0.85rem; cursor: pointer; flex-shrink: 0; transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}
.btn-delete-confirm:disabled { background: var(--surface-3); color: var(--text-faint); cursor: not-allowed; }
.btn-delete-confirm:not(:disabled):hover { filter: brightness(1.1); }

/* --- NOUVELLE SORTIE (bouton + recherche d'adresse) --- */
.new-event-zone { padding: 14px 16px 0 16px; flex-shrink: 0; }
.btn-new-event {
    width: 100%; background: var(--accent); color: #1A1407; border: none; padding: 12px;
    border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 18px var(--accent-dim); transition: transform 0.12s ease, filter 0.15s ease;
    font-family: 'Inter', sans-serif;
}
.btn-new-event:hover { filter: brightness(1.07); }
.btn-new-event:active { transform: scale(0.98); }
.btn-new-event.is-active { background: var(--surface-2); color: var(--text-dim); box-shadow: none; border: 1px solid var(--border); }
.plus-mark { font-size: 1.1rem; line-height: 1; font-weight: 700; }

.new-event-search { display: none; margin-top: 10px; position: relative; }
.new-event-search.visible { display: block; }

.address-suggestions {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-deep);
    z-index: 10; max-height: 240px; overflow-y: auto; display: none;
}
.address-suggestions.visible { display: block; }
.address-suggestion-item {
    padding: 11px 14px; cursor: pointer; font-size: 0.88rem; color: var(--text);
    border-bottom: 1px solid var(--border); transition: background 0.12s ease;
}
.address-suggestion-item:last-child { border-bottom: none; }
.address-suggestion-item:hover, .address-suggestion-item.is-highlighted { background: var(--surface-3); }
.address-suggestion-main { color: var(--text); }
.address-suggestion-sub { color: var(--text-faint); font-size: 0.76rem; margin-top: 2px; }
.address-suggestion-empty { padding: 14px; color: var(--text-faint); font-size: 0.85rem; text-align: center; }

/* Marqueur déplaçable de prévisualisation (création via recherche) */
.hypno-pin-draft .core { background: var(--safe) !important; }
.hypno-pin-draft .ring { background: var(--safe-dim) !important; }
.drag-hint {
    background: var(--surface-3); color: var(--text-dim); font-size: 0.78rem; padding: 8px 12px;
    border-radius: var(--radius-sm); margin-bottom: 12px; border: 1px solid var(--border);
    display: flex; align-items: center; gap: 7px;
}

/* --- FILTRES TEMPORELS --- */
.filter-row { display: flex; gap: 7px; padding: 14px 16px 4px 16px; flex-wrap: wrap; flex-shrink: 0; }
.filter-chip {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
    padding: 6px 13px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: all 0.15s ease; font-family: 'Inter', sans-serif;
}
.filter-chip:hover { border-color: var(--text-faint); color: var(--text); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #1A1407; }

/* Mobile: Sidebar devient Drawer invisible (sauf si ouvert) */
@media (max-width: 768px) {
    #sidebar {
        position: absolute; bottom: 0; left: 0; width: 100%; min-width: 0; height: auto; max-height: 85vh;
        border-radius: 24px 24px 0 0; box-shadow: var(--shadow-deep);
        border-right: none; border-top: 1px solid var(--border);
        transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.3, 1);
        z-index: 3000;
    }
    #sidebar.open { transform: translateY(0); }
    .search-wrapper { display: none; }
    .sidebar-header { cursor: pointer; padding: 12px 20px 14px 20px; border-radius: 24px 24px 0 0; }
    .drawer-handle { width: 38px; height: 4px; background: var(--border); border-radius: 5px; margin: 0 auto 12px auto; display: block; }
}
@media (min-width: 769px) { .drawer-handle { display: none; } }

/* --- SEARCH MOBILE (Flottante) --- */
#mobile-search {
    position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 92%; z-index: 1001;
    display: none; box-shadow: var(--shadow-soft); border-radius: 50px; background: var(--surface);
    border: 1px solid var(--border);
}
@media (max-width: 768px) { #mobile-search { display: flex; } }

.search-box { display: flex; width: 100%; align-items: center; }
.search-box input {
    flex-grow: 1; border: none; background: transparent; padding: 13px 18px;
    border-radius: 50px 0 0 50px; outline: none; font-size: 0.95rem; color: var(--text);
}
.search-box input::placeholder { color: var(--text-faint); }
#mobile-search input { border-radius: 50px; padding-right: 50px; }
.search-box button {
    background: var(--accent); color: #1A1407; border: none; width: 38px; height: 38px;
    border-radius: 50%; cursor: pointer; font-weight: 700; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.search-box button:hover { filter: brightness(1.08); }
.search-box button:active { transform: scale(0.92); }
#mobile-search button { position: absolute; right: 4px; top: 4px; }
.search-wrapper .search-box { background: var(--surface-2); border-radius: 50px; border: 1px solid var(--border); padding-right: 4px; }
.search-wrapper .search-box button { margin: 0; }

/* --- LISTE --- */
.event-list { flex-grow: 1; overflow-y: auto; padding: 12px 16px 16px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.event-card {
    background: var(--surface-2); padding: 15px 17px; border-radius: var(--radius-md);
    border: 1px solid var(--border); cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.event-card:hover { border-color: var(--accent-soft); background: var(--surface-3); transform: translateY(-1px); }
.event-card:active { transform: translateY(0) scale(0.99); }
.event-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.event-city { font-weight: 600; font-size: 1.02rem; color: var(--text); font-family: 'Fraunces', serif; }
.event-date {
    color: var(--text-dim); background: var(--surface-3); padding: 4px 10px; border-radius: 7px;
    font-size: 0.74rem; font-weight: 600; letter-spacing: 0.03em; white-space: nowrap;
}
.event-date.is-today { color: var(--today); background: var(--today-dim); }
.event-date.is-tomorrow { color: var(--tomorrow); background: var(--tomorrow-dim); }
.event-meta { font-size: 0.82rem; color: var(--text-dim); margin-top: 7px; display: flex; align-items: center; gap: 6px; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--safe); display: inline-block; flex-shrink: 0; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty-state .display { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 6px; }
.empty-state small { font-size: 0.82rem; }

/* --- MODAL MOBILE (Le Menu qui monte) --- */
#mobile-modal {
    position: absolute; bottom: 0; left: 0; width: 100%; background: var(--surface); z-index: 4000;
    border-radius: 24px 24px 0 0; box-shadow: var(--shadow-deep);
    border-top: 1px solid var(--border);
    transform: translateY(110%); transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.3, 1);
    max-height: 88vh; display: flex; flex-direction: column;
}
#mobile-modal.visible { transform: translateY(0); }
.modal-header {
    padding: 18px 20px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.modal-title { margin: 0; font-size: 1.2rem; color: var(--text); font-weight: 600; }
.close-btn {
    background: var(--surface-2); border: 1px solid var(--border); width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; color: var(--text-dim); font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; flex-shrink: 0;
}
.close-btn:hover { color: var(--text); border-color: var(--text-faint); }
.modal-content { padding: 20px; overflow-y: auto; }

/* --- POPUP LEAFLET (Desktop) --- */
.leaflet-popup-content { min-width: 360px !important; font-family: 'Inter', sans-serif; font-size: 0.92rem; margin: 0; max-height: 78vh; overflow-y: auto; padding: 18px 20px; box-sizing: border-box; border-radius: var(--radius-md); }
.leaflet-popup-content-wrapper { border-radius: var(--radius-md); background: var(--surface); color: var(--text); box-shadow: var(--shadow-deep); border: 1px solid var(--border); padding: 0; }
.leaflet-popup-tip { background: var(--surface); border: 1px solid var(--border); }
.leaflet-popup-close-button { color: var(--text-dim) !important; font-size: 20px !important; padding: 10px !important; }
.leaflet-popup-close-button:hover { color: var(--text) !important; }
.leaflet-container a.leaflet-popup-close-button { top: 4px; right: 4px; }

/* --- UI Elements partagés (Form) --- */
.form-group { margin-bottom: 13px; }
.form-label {
    display: block; font-size: 0.74rem; font-weight: 600; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.form-control {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-sizing: border-box; font-size: 0.95rem; background: var(--surface-2); color: var(--text);
    outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control::placeholder { color: var(--text-faint); }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
textarea.form-control { resize: vertical; font-family: 'Inter', sans-serif; }
input[type="date"].form-control, input[type="time"].form-control { color-scheme: dark; }

.btn-action {
    width: 100%; padding: 13px; border: none; border-radius: var(--radius-sm); font-weight: 600;
    cursor: pointer; font-size: 0.95rem; margin-top: 12px;
    transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
    font-family: 'Inter', sans-serif;
}
.btn-action:hover { filter: brightness(1.07); }
.btn-action:active { transform: scale(0.98); }
.btn-create { background: var(--accent); color: #1A1407; box-shadow: 0 4px 18px var(--accent-dim); }
.btn-join { background: var(--safe); color: #08261B; box-shadow: 0 4px 18px rgba(79,209,165,0.18); }

.pin-line { color: var(--text-dim); margin: 0 0 14px 0; line-height: 1.5; font-size: 0.92rem; }
.pin-line strong { color: var(--text); font-family: 'Fraunces', serif; font-weight: 600; }

.participants-box {
    background: var(--surface-2); padding: 4px 14px; border-radius: var(--radius-sm);
    margin: 14px 0; max-height: 150px; overflow-y: auto; border: 1px solid var(--border);
}
.participants-box small { color: var(--text-faint); display: block; padding: 10px 0; }
.part-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.part-row:last-child { border-bottom: none; }
.part-time { font-weight: 600; color: var(--accent); margin-right: 10px; font-variant-numeric: tabular-nums; }
.part-name { color: var(--text); }
.part-remove {
    color: var(--text-faint); cursor: pointer; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; flex-shrink: 0;
}
.part-remove:hover { color: var(--danger); background: rgba(232,96,122,0.1); }

.divider { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.section-label { margin: 0 0 12px 0; color: var(--safe); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; display: flex; align-items: center; gap: 7px; }

.sidebar-footer { padding: 16px 20px 18px 20px; text-align: center; border-top: 1px solid var(--border); flex-shrink: 0; }
.footer-link { color: var(--text-faint); text-decoration: none; font-size: 0.78rem; transition: color 0.15s ease; }
.footer-link:hover { color: var(--text-dim); }
.btn-coffee {
    display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); color: var(--text-dim);
    border: 1px solid var(--border); padding: 8px 16px; border-radius: 20px; text-decoration: none;
    font-weight: 600; font-size: 0.8rem; margin-top: 10px; transition: all 0.15s ease;
}
.btn-coffee:hover { border-color: var(--accent-soft); color: var(--text); }

/* Bouton Flottant "Liste" sur Mobile */
#mobile-list-btn {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
    background: var(--surface); color: var(--text); padding: 12px 26px; border-radius: 50px;
    font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-deep); z-index: 1002;
    display: none; cursor: pointer; border: 1px solid var(--border);
    align-items: center; gap: 8px; transition: transform 0.15s ease;
}
#mobile-list-btn:active { transform: translateX(-50%) scale(0.96); }
@media (max-width: 768px) { #mobile-list-btn { display: flex; } }

/* Bouton flottant "Ajuster la position" — création via recherche, mode mobile */
#adjust-position-btn {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #1A1407; padding: 13px 28px; border-radius: 50px;
    font-weight: 700; font-size: 0.92rem; box-shadow: 0 8px 26px var(--accent-soft); z-index: 3500;
    display: none; cursor: pointer; border: none;
    align-items: center; gap: 8px; transition: transform 0.15s ease;
}
#adjust-position-btn:active { transform: translateX(-50%) scale(0.96); }
#adjust-position-btn.visible { display: flex; }
#adjust-position-btn.is-confirming { background: var(--safe); color: #08261B; box-shadow: 0 8px 26px rgba(79,209,165,0.25); }

/* --- Marqueur custom (point lumineux) --- */
.hypno-pin { position: relative; width: 22px; height: 22px; }
.hypno-pin .core {
    position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-radius: 50%;
    background: var(--accent); transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px rgba(11,14,20,0.85), 0 2px 8px rgba(0,0,0,0.4);
}
.hypno-pin .ring {
    position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-radius: 50%;
    background: var(--accent-soft); transform: translate(-50%, -50%);
    animation: pin-pulse 2.2s ease-out infinite;
}
.hypno-pin.is-today .core { background: var(--today); }
.hypno-pin.is-today .ring { background: var(--today-dim); }
@keyframes pin-pulse {
    0% { width: 14px; height: 14px; opacity: 0.7; }
    100% { width: 42px; height: 42px; opacity: 0; }
}

/* --- CHAT GLOBAL (sidebar tab) --- */
#chat-global-messages { flex-grow: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
#chat-global-composer { border-top: 1px solid var(--border); padding: 12px 16px; flex-shrink: 0; display: flex; gap: 8px; }

.chat-msg { max-width: 88%; display: flex; flex-direction: column; gap: 2px; }
.chat-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.chat-msg-meta { font-size: 0.72rem; color: var(--text-faint); padding: 0 4px; display: flex; gap: 6px; align-items: baseline; }
.chat-msg-pseudo { color: var(--accent); font-weight: 600; }
.chat-msg-bubble {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    padding: 9px 13px; border-radius: 14px 14px 14px 4px; font-size: 0.88rem; line-height: 1.4;
    word-break: break-word; white-space: pre-wrap;
}
.chat-msg.is-mine .chat-msg-bubble { background: var(--accent-dim); border-color: var(--accent-soft); border-radius: 14px 14px 4px 14px; }

.chat-empty { text-align: center; padding: 40px 20px; color: var(--text-faint); font-size: 0.85rem; }

.chat-input {
    flex-grow: 1; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
    border-radius: 22px; padding: 10px 16px; outline: none; font-size: 0.9rem; transition: border-color 0.15s ease;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-faint); }
.chat-send {
    background: var(--accent); color: #1A1407; border: none; width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-weight: 700; transition: transform 0.12s ease, filter 0.15s ease;
}
.chat-send:hover { filter: brightness(1.08); }
.chat-send:active { transform: scale(0.92); }

/* Chat embarqué dans la popup/modal d'une sortie */
.event-chat-box { margin-top: 10px; }
.event-chat-messages {
    max-height: 180px; overflow-y: auto; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px;
}
.event-chat-composer { display: flex; gap: 7px; }

/* --- Modale pseudo (premier message) --- */
#pseudo-overlay {
    position: fixed; inset: 0; background: rgba(6,8,12,0.65); backdrop-filter: blur(3px);
    z-index: 6000; display: none; align-items: center; justify-content: center; padding: 20px;
}
#pseudo-overlay.visible { display: flex; }
.pseudo-box {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 26px 24px; width: 100%; max-width: 340px; box-shadow: var(--shadow-deep);
}
.pseudo-box h3 { margin: 0 0 6px 0; color: var(--text); font-size: 1.15rem; }
.pseudo-box p { margin: 0 0 16px 0; color: var(--text-dim); font-size: 0.85rem; line-height: 1.4; }

/* Focus visible clavier (accessibilité) */
button:focus-visible, input:focus-visible, textarea:focus-visible, .event-card:focus-visible, .tab-btn:focus-visible, .filter-chip:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 360px) {
    .leaflet-popup-content { min-width: 270px !important; }
}
