/* ============================================
   🌴 Voyage 2026 — Styles
   ============================================ */

/* --- Variables --- */
:root {
    --bg-start: #FFF8F0;
    --bg-end: #F5EDE3;
    --accent: #E07A5F;
    --accent-hover: #c9604a;
    --accent-light: rgba(224, 122, 95, .12);
    --blue: #3D5A80;
    --blue-light: rgba(61, 90, 128, .10);
    --text: #2B2D42;
    --text-light: #6c6e82;
    --text-muted: #686868; /* contraste ≥ 4,5:1 sur les fonds clairs */
    --success: #81B29A;
    --success-light: rgba(129, 178, 154, .12);
    --danger: #e74c3c;
    --danger-light: rgba(231, 76, 60, .10);
    --warning: #f0a500;
    --warning-light: rgba(240, 165, 0, .10);
    --warning-text: #9a5b00; /* ambre lisible sur fond clair (≥ 4,5:1) */
    --card-bg: #ffffff;
    --card-shadow: 0 4px 24px rgba(43, 45, 66, .06);
    --card-shadow-hover: 0 8px 40px rgba(43, 45, 66, .10);
    --border: #E8E4DF;
    --border-light: #F0ECE6;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Inter', sans-serif;
    --transition: .2s ease;

    /* Dark mode overrides */
    --bg-overlay: transparent;
}

[data-theme="dark"] {
    --bg-start: #1a1a2e;
    --bg-end: #16213e;
    --text: #e0e0e0;
    --text-light: #a0a0b0;
    --text-muted: #9a9aae; /* contraste ≥ 4,5:1 sur les fonds sombres */
    --warning-text: #f0a500;
    --card-bg: #222240;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, .25);
    --card-shadow-hover: 0 8px 40px rgba(0, 0, 0, .35);
    --border: #333355;
    --border-light: #2a2a48;
    --bg-overlay: rgba(0,0,0,.15);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}

/* --- Layout --- */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
    padding-bottom: 6rem;
}

/* --- Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 248, 240, .85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

[data-theme="dark"] .navbar {
    background: rgba(26, 26, 46, .88);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    text-decoration: none;
}

.navbar-brand span {
    font-size: 1.4rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: .88rem;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    box-shadow: 0 2px 12px rgba(224, 122, 95, .25);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(224, 122, 95, .35); }

.btn-secondary {
    background: var(--blue);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
    background: transparent;
    color: var(--text-light);
    padding: .5rem .7rem;
}
.btn-ghost:hover { background: var(--accent-light); color: var(--accent); }

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: .4rem .8rem;
    font-size: .8rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.1rem;
}

.btn-lg {
    padding: .85rem 1.6rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: .82rem;
    margin-bottom: .35rem;
    color: var(--text-light);
}

.form-control {
    width: 100%;
    padding: .7rem .9rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .92rem;
    color: var(--text);
    background: var(--card-bg);
    transition: border-color var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .8rem center;
    padding-right: 2.2rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.form-hint {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

/* --- Auth screen --- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    animation: fadeUp .5s ease;
}

.auth-card h1 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    text-align: center;
    margin-bottom: .3rem;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: .92rem;
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .88rem;
    color: var(--text-light);
}

.auth-toggle a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.auth-toggle a:hover { text-decoration: underline; }

.auth-message {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    font-size: .88rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
}
.auth-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.auth-message.error {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #f8bbd0;
}

/* --- Trip header --- */
.trip-header {
    text-align: center;
    padding: 2rem 0 1rem;
}

.trip-header .trip-emoji {
    font-size: 3rem;
    margin-bottom: .5rem;
}

.trip-header h1 {
    font-size: 1.8rem;
    margin-bottom: .25rem;
}

.trip-header .trip-dates {
    color: var(--text-light);
    font-size: .92rem;
}

.trip-header .trip-destination {
    color: var(--accent);
    font-weight: 500;
    font-size: .95rem;
    margin-top: .2rem;
}

.trip-header .trip-timezone {
    color: var(--text-muted);
    font-size: .85rem;
    margin-top: .3rem;
}

/* --- Timezone --- */
.tz-convert {
    display: inline-block;
    font-size: .72rem;
    font-weight: 400;
    color: var(--text-muted);
    background: var(--blue-light);
    padding: .1rem .45rem;
    border-radius: var(--radius-xs);
    margin-left: .3rem;
    vertical-align: middle;
    white-space: nowrap;
}

.tz-banner {
    background: var(--blue-light);
    color: var(--blue);
    padding: .5rem .75rem;
    border-radius: var(--radius-xs);
    margin-bottom: .7rem;
    font-size: .82rem;
    line-height: 1.4;
}

/* --- Votes --- */
.vote-bar {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .35rem;
}
.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .73rem;
    padding: .2rem .5rem;
    border-radius: var(--radius-xs);
    border: 1.5px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all .15s;
    color: var(--text-muted);
    line-height: 1;
}
.vote-btn:hover {
    border-color: var(--text-light);
    color: var(--text);
}
.vote-btn.vote-up.active {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
    font-weight: 600;
}
.vote-btn.vote-down.active {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
    font-weight: 600;
}
.vote-avatars {
    font-size: .72rem;
    margin-left: .15rem;
    letter-spacing: .05rem;
}
.vote-counter {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* Section vote dans la modale */
.vote-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: .8rem 1rem;
    margin-bottom: 1rem;
}
.vote-details {
    font-size: .8rem;
    color: var(--text-light);
    margin-top: .4rem;
    line-height: 1.5;
}

/* --- Tab bar --- */
.tab-bar {
    display: flex;
    gap: .25rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: .3rem;
    box-shadow: var(--card-shadow);
    margin: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -webkit-overflow-scrolling: touch;
}

.tab-bar::-webkit-scrollbar { display: none; }

.tab-item {
    flex: 0 0 auto;
    padding: .6rem .6rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .75rem;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    white-space: nowrap;
}

.tab-item:hover { background: var(--accent-light); color: var(--accent); }

.tab-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(224, 122, 95, .25);
}

.tab-item .tab-emoji {
    display: block;
    font-size: 1.2rem;
    margin-bottom: .15rem;
}

/* --- View toggle --- */
.view-toggle {
    display: flex;
    align-items: center;
    gap: .35rem;
    justify-content: center;
    margin: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 .25rem;
}
.view-toggle::-webkit-scrollbar { display: none; }
/* Ordinateur : les onglets passent à la ligne (centrés, rien n'est coupé) ; sur mobile, barre du bas */
@media (min-width: 769px) {
    .view-toggle { flex-wrap: wrap; overflow-x: visible; gap: .3rem; }
    #view-mode-toggle button { padding: .5rem .5rem; }
}

.view-toggle button {
    padding: .5rem .7rem;
    border: 2px solid var(--border);
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--transition);
}

.view-toggle button.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* --- Timeline --- */
.timeline { margin-top: .5rem; }

.timeline-day {
    margin-bottom: 1.5rem;
}

.timeline-day-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 0;
    cursor: pointer;
    user-select: none;
}

.timeline-day-header .day-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.timeline-day-header .day-label {
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.timeline-day-header .day-date {
    color: var(--text-muted);
    font-size: .82rem;
    margin-left: auto;
}

.timeline-day-header .day-chevron {
    font-size: .8rem;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.timeline-day.collapsed .day-chevron {
    transform: rotate(-90deg);
}

.timeline-day.collapsed .timeline-items {
    display: none;
}

.timeline-day-join {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .8rem;
    margin-bottom: .5rem;
    background: var(--success-light);
    border-radius: var(--radius-xs);
    font-size: .82rem;
    color: var(--success);
    font-weight: 500;
}

.timeline-items {
    padding-left: 1.3rem;
    border-left: 2px solid var(--border-light);
    margin-left: 4px;
}

.timeline-item {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: .9rem 1rem;
    margin-bottom: .6rem;
    box-shadow: 0 2px 8px rgba(43, 45, 66, .04);
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    cursor: pointer;
    transition: box-shadow var(--transition), transform var(--transition);
    position: relative;
}

.timeline-item:hover {
    box-shadow: 0 4px 16px rgba(43, 45, 66, .08);
    transform: translateX(4px);
}

.timeline-item .item-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
}

.timeline-item .item-content {
    flex: 1;
    min-width: 0;
}

.timeline-item .item-time {
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
}

.timeline-item .item-title {
    font-weight: 600;
    font-size: .92rem;
    margin-top: .1rem;
}

.timeline-item .item-detail {
    font-size: .8rem;
    color: var(--text-light);
    margin-top: .15rem;
}

.timeline-item .item-meta {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .4rem;
    font-size: .75rem;
    color: var(--text-muted);
}

.timeline-item .item-meta span {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

/* Zone droite : statut + vote */
.item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .3rem;
    flex-shrink: 0;
}
.item-right .item-status { position: static; }
.item-right .vote-bar { margin-top: 0; }

.timeline-item .item-status {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .15rem .5rem;
    border-radius: var(--radius-xs);
    white-space: nowrap;
}

.item-status.confirmed { background: var(--success-light); color: var(--success); }
.item-status.planned { background: var(--blue-light); color: var(--blue); }
.item-status.proposition { background: var(--accent-light); color: var(--accent); }
.item-status.cancelled { background: var(--danger-light); color: var(--danger); text-decoration: line-through; }

/* --- Proposals section --- */
.proposals-section { border-left: 3px solid var(--accent); }
.proposals-section .timeline-day-header .day-label { font-weight: 700; }

/* --- Category view cards --- */
.category-section {
    margin-bottom: 2rem;
}

.category-section h2 {
    font-size: 1.2rem;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.category-section h2 .count {
    background: var(--accent-light);
    color: var(--accent);
    font-family: var(--font-body);
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 20px;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(43, 45, 66, .5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

@media (min-width: 600px) {
    .modal-overlay {
        align-items: center;
    }
    .modal {
        border-radius: var(--radius);
        max-height: 85vh;
    }
    .modal-overlay.open .modal {
        animation: modalPop .3s cubic-bezier(.32, .72, 0, 1);
    }
}

@keyframes modalPop {
    from { transform: scale(.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--border-light);
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: background var(--transition);
}

.modal-close:hover { background: var(--border); }

.modal-footer {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* --- Type selector (in modals) --- */
.type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .8rem .5rem;
    border: 2px solid var(--border);
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .75rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
}

.type-btn .type-emoji {
    font-size: 1.5rem;
}

.type-btn:hover { border-color: var(--accent); color: var(--accent); }

.type-btn.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* --- Travelers --- */
.travelers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
    margin: 1rem 0;
}

.traveler-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(43, 45, 66, .04);
    position: relative;
}

.traveler-card .traveler-emoji {
    font-size: 2rem;
    margin-bottom: .3rem;
}

.traveler-card .traveler-name {
    font-weight: 600;
    font-size: .88rem;
}

.traveler-card .traveler-role {
    font-size: .72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: .15rem;
}

.traveler-card .traveler-dates {
    font-size: .72rem;
    color: var(--text-light);
    margin-top: .3rem;
}

.traveler-card .traveler-actions {
    position: absolute;
    top: .4rem;
    right: .4rem;
}

/* --- Shares --- */
.share-link-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: .75rem;
    box-shadow: 0 2px 8px rgba(43, 45, 66, .04);
    display: flex;
    align-items: center;
    gap: .75rem;
}

.share-link-card .share-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.share-link-card .share-info {
    flex: 1;
    min-width: 0;
}

.share-link-card .share-label {
    font-weight: 600;
    font-size: .9rem;
}

.share-link-card .share-meta {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .15rem;
}

.share-link-card .share-actions {
    display: flex;
    gap: .3rem;
    flex-shrink: 0;
}

/* --- Toast --- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: .75rem 1.2rem;
    box-shadow: 0 8px 30px rgba(43, 45, 66, .15);
    font-size: .88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .5rem;
    animation: toastIn .3s ease;
    max-width: 340px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--blue); }

.toast.removing {
    animation: toastOut .3s ease forwards;
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* --- Traveler check labels (in item form) --- */
.traveler-check:has(input:checked) {
    border-color: var(--accent) !important;
    background: var(--accent-light);
    color: var(--accent);
}

/* --- FAB (Floating Action Button) --- */
.fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(224, 122, 95, .35);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

.fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(224, 122, 95, .45);
}

.fab:active { transform: scale(.96); }

/* --- Empty state --- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state .empty-emoji {
    font-size: 3rem;
    margin-bottom: .75rem;
}

.empty-state p {
    font-size: .92rem;
    margin-bottom: 1rem;
}

/* --- Badge --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .15rem .5rem;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }

/* --- Divider --- */
.divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 1rem 0;
}

/* --- Loader --- */
.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loader::after {
    content: '';
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Animations --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in { animation: fadeIn .3s ease; }
.slide-in { animation: slideIn .3s ease; }

/* --- Trip selector / dashboard --- */
.trip-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.trip-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trip-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.trip-card .trip-card-emoji {
    font-size: 2.5rem;
}

.trip-card .trip-card-info h3 {
    font-size: 1.1rem;
}

.trip-card .trip-card-info .trip-card-dates {
    color: var(--text-light);
    font-size: .82rem;
}

.trip-card .trip-card-info .trip-card-dest {
    color: var(--accent);
    font-size: .82rem;
    font-weight: 500;
}

/* --- Settings panel --- */
.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    font-size: 1rem;
    margin-bottom: .75rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 0;
    border-bottom: 1px solid var(--border-light);
}

.setting-row:last-child { border-bottom: none; }

.setting-label {
    font-size: .88rem;
}

/* --- Toggle switch --- */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: background var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* --- Dropdown menu --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(43, 45, 66, .15);
    padding: .4rem;
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all .15s ease;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
    font-size: .85rem;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: background var(--transition);
}

.dropdown-item:hover { background: var(--accent-light); }

.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-light); }

/* --- QR Modal --- */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.qr-container canvas {
    border-radius: var(--radius-sm);
}

.qr-url {
    font-size: .75rem;
    color: var(--text-muted);
    word-break: break-all;
    text-align: center;
}

/* --- Notification bell & badge --- */
.notif-bell {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
    background: var(--danger);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    border-radius: 10px;
    text-align: center;
    pointer-events: none;
    transform: translate(25%, -25%);
}

/* --- Notification panel --- */
.notif-panel-menu {
    width: 340px;
    max-height: 420px;
    overflow-y: auto;
    padding: 0 !important;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
}

.notif-list {
    padding: .25rem 0;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .6rem .75rem;
    cursor: pointer;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border-light);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--accent-light);
}

.notif-item.notif-unread {
    background: var(--blue-light);
}

.notif-item.notif-unread:hover {
    background: var(--accent-light);
}

.notif-emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: .1rem;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-message {
    font-size: .82rem;
    line-height: 1.35;
    color: var(--text);
}

.notif-trip {
    font-size: .72rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: .1rem;
}

.notif-time {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .15rem;
}

/* --- View modal (presentation) --- */
.view-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: .5rem;
}

.view-detail-row {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: .88rem;
}

.view-detail-row:last-child {
    border-bottom: none;
}

.view-detail-label {
    flex-shrink: 0;
    width: 120px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.view-detail-value {
    flex: 1;
    min-width: 0;
    color: var(--text);
    word-break: break-word;
}

@media (max-width: 480px) {
    .view-detail-row {
        flex-direction: column;
        gap: .15rem;
    }
    .view-detail-label {
        width: auto;
    }
}

/* --- Comments (in item modal) --- */
.comment-section {
    background: var(--bg-secondary, var(--border-light));
    border-radius: var(--radius-sm);
    padding: .8rem 1rem;
    margin-bottom: 1rem;
}

.comments-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: .6rem;
}

.comment-item {
    padding: .5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .2rem;
}

.comment-author {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
}

.comment-time {
    font-size: .7rem;
    color: var(--text-muted);
    margin-left: auto;
}

.comment-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .7rem;
    padding: .1rem .3rem;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    margin-left: .25rem;
}

.comment-delete:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.comment-content {
    font-size: .85rem;
    color: var(--text);
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-top: .5rem;
    padding-top: .5rem;
    border-top: 1px solid var(--border-light);
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .type-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .travelers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal {
        padding: 1.25rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .view-toggle {
        gap: .25rem;
    }
    .view-toggle button {
        padding: .45rem .55rem;
        font-size: .72rem;
    }

    .tab-item {
        padding: .5rem .45rem;
        font-size: .7rem;
    }
    .tab-item .tab-emoji {
        font-size: 1rem;
    }
    .notif-panel-menu {
        width: 280px;
        max-height: 360px;
    }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .82rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: .5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none !important; }

/* --- Budget --- */
.budget-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
    padding: .8rem 1rem 0;
}
.budget-stat {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}
.budget-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}
.budget-stat-label {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .2rem;
}
.budget-bar-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem 0;
    border-bottom: 1px solid var(--border-light);
}
.budget-bar-row:last-child { border-bottom: none; }
.budget-bar-label {
    width: 120px;
    font-size: .85rem;
    font-weight: 500;
    white-space: nowrap;
}
.budget-bar-track {
    flex: 1;
    height: 20px;
    background: var(--border-light);
    border-radius: 10px;
    overflow: hidden;
}
.budget-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
    transition: width .3s ease;
}
.budget-bar-value {
    width: 110px;
    text-align: right;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}
.budget-traveler {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.budget-traveler:last-child { border-bottom: none; }
.budget-traveler-name {
    font-weight: 600;
    font-size: .9rem;
    min-width: 100px;
}
.budget-traveler-detail {
    flex: 1;
    display: flex;
    gap: 1rem;
    font-size: .82rem;
    color: var(--text-light);
    flex-wrap: wrap;
}
.budget-balance-positive { color: var(--success); font-weight: 600; }
.budget-balance-negative { color: var(--danger); font-weight: 600; }

/* Reste à payer / affecter + infobulle (survol, focus clavier ou toucher sur mobile) */
.budget-unpaid {
    position: relative;
    color: var(--warning-text);
    cursor: help;
    border-bottom: 1px dotted currentColor;
    outline: none;
}
.budget-unpaid strong { color: inherit; }
.budget-unpaid-count { font-size: .75rem; opacity: .8; }
.budget-tooltip {
    display: none;
    position: absolute;
    z-index: 50;
    top: calc(100% + .4rem);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: min(320px, 85vw);
    padding: .6rem .75rem;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--card-shadow-hover);
    font-size: .8rem;
    cursor: default;
}
.budget-unpaid:hover .budget-tooltip,
.budget-unpaid:focus .budget-tooltip,
.budget-unpaid:focus-within .budget-tooltip { display: block; }
.budget-unpaid:focus-visible { box-shadow: 0 0 0 2px var(--accent-light); border-radius: 4px; }
.budget-tooltip-title { display: block; font-weight: 600; color: var(--text-light); margin-bottom: .35rem; }
.budget-tooltip ul { list-style: none; margin: 0; padding: 0; }
.budget-tooltip li { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; border-top: 1px solid var(--border-light); }
.budget-tooltip li:first-child { border-top: none; }
.budget-unpaid-date { color: var(--text-muted); font-size: .72rem; margin-left: .25rem; }

/* Remboursements */
.budget-settle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
    padding: .7rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: .9rem;
}
.budget-settle-row:last-of-type { border-bottom: none; }
.budget-settle-empty { margin: .6rem 0; color: var(--text-light); font-size: .9rem; }
.budget-settle-hint { margin: .4rem 0 0; color: var(--text-muted); font-size: .78rem; }
.budget-settle-history { margin-top: .8rem; font-size: .82rem; color: var(--text-light); }
.budget-settle-history summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
.budget-settle-history ul { list-style: none; margin: .3rem 0 0; padding: 0; }
.budget-settle-history li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .35rem 0; border-top: 1px solid var(--border-light); }
.budget-settle-history em { color: var(--text-muted); }

/* --- Map View --- */
.map-no-geo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem 1rem;
    margin-bottom: .75rem;
    background: var(--warning-light);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    color: var(--warning);
    font-weight: 500;
}
.map-no-geo-banner .text-sm { font-size: .75rem; font-weight: 400; }

/* Custom Leaflet marker icon */
.map-marker-icon {
    background: transparent !important;
    border: none !important;
}
.map-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.map-marker-emoji {
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.map-marker-badge {
    position: absolute;
    top: -10px;
    right: -24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: .05rem .3rem;
    font-size: .6rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    pointer-events: none;
}
.map-marker-number {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: .55rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    pointer-events: none;
}

/* Map popup */
.map-popup { font-family: var(--font-body); font-size: .85rem; min-width: 150px; }
.map-popup strong { display: block; margin-bottom: .25rem; }
.map-popup-date { font-size: .75rem; color: var(--text-muted); }
.map-popup-location { font-size: .78rem; color: var(--text-light); margin-top: .15rem; }

/* Map timeline legend */
.map-legend { margin-top: 1rem; padding: .5rem 0; }
.map-legend-title { font-family: var(--font-heading); font-size: 1rem; margin-bottom: .5rem; }
.map-legend-items { display: flex; flex-direction: column; gap: .4rem; }
.map-legend-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .75rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .15s ease;
}
.map-legend-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}
.map-legend-number {
    background: var(--accent);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.map-legend-emoji { font-size: 1.1rem; }
.map-legend-info { display: flex; flex-direction: column; min-width: 0; }
.map-legend-name { font-size: .85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-legend-date { font-size: .72rem; color: var(--text-muted); }

/* Route info between legend items */
.map-route-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: .2rem .75rem;
    margin-left: 10px;
    font-size: .72rem;
    color: var(--text-muted);
    border-left: 2px dashed var(--border);
    position: relative;
}
.map-route-info::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
}

/* Location autocomplete suggestions */
.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    max-height: 200px;
    overflow-y: auto;
}
.location-suggestion {
    padding: .6rem .75rem;
    cursor: pointer;
    font-size: .82rem;
    border-bottom: 1px solid var(--border-light);
    transition: background .12s ease;
}
.location-suggestion:hover { background: var(--accent-light); }
.location-suggestion:last-child { border-bottom: none; }
.location-suggestion-empty {
    padding: .6rem .75rem;
    color: var(--text-muted);
    font-size: .82rem;
    text-align: center;
}

/* Mini map in form */
.mini-map-container { margin-top: .25rem; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }

/* Dark mode Leaflet overrides */
[data-theme="dark"] .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9);
}
[data-theme="dark"] .leaflet-control-zoom a {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border);
}
[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
    background: var(--card-bg);
    color: var(--text);
}

/* Responsive map heights */
@media (min-width: 768px) {
    .map-leaflet-container { height: 600px !important; }
}
@media (max-width: 480px) {
    .map-leaflet-container { height: 350px !important; }
    .map-marker-badge { display: none; }
}

/* --- Traveler Photos --- */
.traveler-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.traveler-avatar { margin-bottom: .3rem; }
.traveler-photo-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.photo-upload-area {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.traveler-photo-inline {
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

/* --- Documents --- */
.documents-section {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary, #f8f6f3);
    border-radius: var(--radius-sm);
}
.documents-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: .75rem;
}
.document-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .6rem;
    background: var(--card-bg);
    border-radius: var(--radius-xs);
    font-size: .85rem;
}
.document-link {
    color: var(--accent);
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-link:hover { text-decoration: underline; }
.document-size {
    color: var(--text-muted);
    font-size: .75rem;
    white-space: nowrap;
}
.document-delete {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: .2rem .4rem;
    font-size: .85rem;
    border-radius: var(--radius-xs);
}
.document-delete:hover { background: var(--danger-light, #fce4ec); }
.document-upload { margin-top: .5rem; }

/* Sous-onglet des propositions rejetées de la wishlist */
.wishlist-archived {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border, #e0e0e0);
    padding-top: .75rem;
}
.wishlist-archived > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-muted);
    padding: .5rem 0;
    list-style: none;
    user-select: none;
}
.wishlist-archived > summary::-webkit-details-marker { display: none; }
.wishlist-archived > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: .4rem;
    transition: transform .15s ease;
}
.wishlist-archived[open] > summary::before { transform: rotate(90deg); }
.wishlist-archived-list { margin-top: .5rem; }
.wishlist-archived-list .timeline-item { opacity: .65; }

/* Sous-onglet des propositions approuvées (unanimité) de la wishlist */
.wishlist-approved {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border, #e0e0e0);
    padding-top: .75rem;
}
.wishlist-approved > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    color: var(--success);
    padding: .5rem 0;
    list-style: none;
    user-select: none;
}
.wishlist-approved > summary::-webkit-details-marker { display: none; }
.wishlist-approved > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: .4rem;
    transition: transform .15s ease;
}
.wishlist-approved[open] > summary::before { transform: rotate(90deg); }
.wishlist-approved-list { margin-top: .5rem; }
.wishlist-schedule-btn { margin-top: .4rem; white-space: nowrap; }

/* ============================================
   Vue Calendrier continu (du début à la fin du voyage)
   ============================================ */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: 8px;
    box-shadow: var(--card-shadow);
}
.cal-weekday {
    text-align: center;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: .3rem 0;
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 2;
}
.cal-cell {
    position: relative;
    min-height: 104px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs, 6px);
    padding: 3px;
    padding-top: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}
/* Teinte de fond alternée par mois pour distinguer les mois sans bloc séparé */
.cal-m0 { background: var(--card-bg); }
.cal-m1 { background: rgba(127, 127, 127, .05); }
/* Jours hors du voyage (report début/fin de mois sur les cases adjacentes) */
.cal-out { opacity: .4; }
.cal-out .cal-events { display: none; }
/* Première case d'un mois : trait d'accent + étiquette */
.cal-month-start { border-left: 3px solid var(--accent); }
.cal-month-label {
    position: absolute;
    top: 2px;
    left: 5px;
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--accent);
}
.cal-today {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}
.cal-daynum {
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-muted);
}
.cal-today .cal-daynum {
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
    width: 1.35rem;
    height: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 1px;
    right: 3px;
}
.cal-events { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }

/* Événements mis en avant : pastille colorée pleine par type */
.cal-event {
    font-size: .72rem;
    line-height: 1.3;
    padding: 3px 6px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
    transition: transform .1s ease, filter .1s ease;
}
.cal-event:hover { transform: translateY(-1px); filter: brightness(1.07); }
.cal-ev-time { font-weight: 800; opacity: .85; }

/* Couleur de fond par type d'élément */
.cal-ev-flight { background: #4a90d9; }
.cal-ev-transport { background: #8e6fc9; }
.cal-ev-accommodation { background: #d98e4a; }
.cal-ev-activity { background: #4caf50; }
.cal-ev-meal { background: #e07a5f; }
.cal-ev-note { background: #8a8a8a; }

/* Présence des voyageurs (initiales) en bas de chaque jour */
.cal-people {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: auto;
    padding-top: 3px;
}
.cal-person {
    font-size: .58rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 1px rgba(0,0,0,.15);
}
.cal-person-photo {
    object-fit: cover;
    background: var(--border-light);
}

/* Marqueur début/fin des éléments sur plusieurs jours */
.cal-ev-tag {
    font-size: .6rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .25);
    padding: 0 3px;
    border-radius: 3px;
}
.cal-ev-span { opacity: .9; }

/* Bandeau des propositions à placer (drag & drop) */
.cal-tray {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    padding: .7rem .8rem;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
}
.cal-tray-title {
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .55rem;
}
.cal-tray-hint {
    font-weight: 400;
    font-size: .75rem;
    color: var(--text-muted);
    margin-left: .4rem;
}
.cal-tray-items { display: flex; flex-wrap: wrap; gap: .4rem; }
.cal-wish {
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    padding: 4px 9px;
    border-radius: 999px;
    cursor: grab;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
    user-select: none;
}
.cal-wish {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.cal-wish:active { cursor: grabbing; }
.cal-wish-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-wish-people { display: inline-flex; gap: 2px; flex-shrink: 0; }
.cal-wish-people .cal-person {
    width: 1.05rem;
    height: 1.05rem;
    box-shadow: 0 0 0 1px rgba(255,255,255,.6);
}

/* Mise en évidence des cases déposables pendant un glisser */
body.cal-dragging .cal-cell[data-date] { outline: 1px dashed var(--border); outline-offset: -2px; }
.cal-cell.cal-drop-hover {
    border-color: var(--accent);
    background: var(--accent-light) !important;
    box-shadow: inset 0 0 0 2px var(--accent);
}

/* Calendrier : sortir de la largeur 800px du conteneur pour s'étaler en grand */
#sub-calendar:not(.hidden) {
    width: min(96vw, 1240px);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Mobile : grille compacte */
@media (max-width: 640px) {
    .cal-cell { min-height: 72px; padding-top: 1.2rem; }
    .cal-event { font-size: .62rem; padding: 2px 4px; }
    .cal-ev-time { display: none; }
    .cal-month-label { font-size: .6rem; }
}

/* Zoom autorisé (accessibilité) : champs en 16 px sur mobile pour éviter le zoom automatique d'iOS à la saisie */
@media (max-width: 768px) {
    .form-control, select.form-control, textarea.form-control { font-size: 16px; }
}

/* ===== Navigation mobile ===== */
.mobile-nav, .mobile-more { display: none; }
.trip-actions { display: inline-flex; align-items: center; gap: .2rem; }
.trip-actions .dropdown-menu { right: auto; left: 50%; transform: translate(-50%, 4px); }
.trip-actions .dropdown.open .dropdown-menu { transform: translate(-50%, 0); }

@media (max-width: 768px) {
    body.in-trip { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    body.in-trip .view-toggle { display: none; }
    body.in-trip .mobile-nav {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 120;
        background: var(--card-bg);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 20px rgba(43, 45, 66, .08);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mobile-nav button {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .1rem;
        padding: .45rem 0 .5rem;
        background: none;
        border: none;
        font-family: var(--font-body);
        font-size: .68rem;
        font-weight: 500;
        color: var(--text-light);
        cursor: pointer;
    }
    .mobile-nav button span { font-size: 1.25rem; line-height: 1.2; }
    .mobile-nav button.active { color: var(--accent); }
    .mobile-nav button.active span { transform: scale(1.08); }
    body.in-trip .mobile-more {
        position: fixed;
        right: .6rem;
        bottom: calc(70px + env(safe-area-inset-bottom));
        z-index: 121;
        flex-direction: column;
        min-width: 190px;
        padding: .4rem;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        box-shadow: 0 8px 30px rgba(43, 45, 66, .18);
    }
    body.in-trip .mobile-more.open { display: flex; }
    .mobile-more button {
        text-align: left;
        padding: .7rem .8rem;
        border: none;
        background: none;
        border-radius: var(--radius-xs);
        font-family: var(--font-body);
        font-size: .9rem;
        color: var(--text);
        cursor: pointer;
    }
    .mobile-more button.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
    body.in-trip .fab { bottom: calc(76px + env(safe-area-inset-bottom)); }

}

/* Valeur copiable (référence de réservation) */
.copy-value { letter-spacing: .03em; }
.copy-btn {
    margin-left: .35rem;
    padding: .1rem .35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--card-bg);
    cursor: pointer;
    font-size: .8rem;
    vertical-align: middle;
}
.copy-btn:hover { border-color: var(--accent); }

/* Bandeau hors ligne */
.offline-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    padding: .35rem .8rem;
    background: var(--blue);
    color: #fff;
    font-size: .8rem;
    text-align: center;
}

/* Budget prévisionnel et objectif */
.budget-summary-3 { grid-template-columns: repeat(3, 1fr); }
.budget-stat-planned .budget-stat-value { color: var(--blue); }
.budget-stat-estimate .budget-stat-value { color: var(--text); }
@media (max-width: 480px) {
    /* Barres par catégorie : libellé et montant sur une ligne, barre pleine largeur dessous */
    .budget-bar-row { flex-wrap: wrap; row-gap: .35rem; }
    .budget-bar-label { width: auto; flex: 1; }
    .budget-bar-track { order: 3; flex: 1 1 100%; height: 12px; }
    .budget-bar-value { width: auto; }
    /* Par voyageur : nom au-dessus, montants qui s'enchaînent */
    .budget-traveler { flex-direction: column; align-items: flex-start; gap: .3rem; }
    .budget-traveler-detail { gap: .25rem .9rem; }
    .budget-summary-3 { gap: .4rem; padding: .6rem .6rem 0; }
    .budget-summary-3 .budget-stat { padding: .6rem .3rem; }
    .budget-summary-3 .budget-stat-value { font-size: 1.05rem; }
    .budget-summary-3 .budget-stat-label { font-size: .68rem; }
}
.budget-proposals { margin: 0 1rem .6rem; padding: .5rem .7rem; border-radius: var(--radius-xs); background: var(--warning-light); color: var(--warning-text); font-size: .82rem; }
.budget-target { margin: .2rem 1rem .6rem; font-size: .85rem; }
.budget-target-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.budget-target-track { position: relative; height: 12px; border-radius: 6px; background: var(--border-light); overflow: visible; }
.budget-target-estimate, .budget-target-confirmed { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.budget-target-estimate { background: var(--blue-light); border: 1px dashed var(--blue); }
.budget-target-confirmed { background: var(--accent); }
.budget-target-line { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.budget-target-legend { display: flex; gap: 1rem; margin-top: .35rem; font-size: .75rem; color: var(--text-light); }
.budget-target-legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.lg-confirmed { background: var(--accent); }
.lg-estimate { background: var(--blue-light); border: 1px dashed var(--blue); }

/* ===== Check-list ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.checklist-progress-card { padding: .8rem 1rem; }
.checklist-progress-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .4rem; }
.checklist-progress { height: 8px; border-radius: 4px; background: var(--border-light); overflow: hidden; }
.checklist-progress > div { height: 100%; background: var(--success); transition: width .3s; }
.checklist-add { display: flex; gap: .5rem; flex-wrap: wrap; padding: .8rem; }
.checklist-add input { flex: 1 1 220px; }
.checklist-add select { flex: 0 1 160px; }
.checklist-count { font-size: .8rem; color: var(--text-muted); }
.checklist-list { list-style: none; margin: 0; padding: 0 1rem .6rem; }
.checklist-item { display: flex; align-items: center; gap: .5rem; padding: .5rem 0; border-top: 1px solid var(--border-light); }
.checklist-item:first-child { border-top: none; }
.checklist-item label { flex: 1; display: flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .9rem; }
.checklist-item input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--success); flex-shrink: 0; }
.checklist-item.done .checklist-label { text-decoration: line-through; color: var(--text-muted); }
.checklist-cat { font-size: .9rem; opacity: .8; }

/* Barre de filtres de la timeline */
.timeline-filters { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-bottom: .5rem; }
.timeline-filters input[type="search"] { flex: 1 1 220px; }
.timeline-filters select { flex: 0 1 170px; font-size: .82rem; }
.timeline-filter-count { font-size: .78rem; color: var(--text-muted); margin-bottom: .8rem; }

/* Impression / PDF du programme */
@media print {
    @page { margin: 1.2cm; }
    body { background: #fff !important; color: #000; padding: 0 !important; }
    .navbar, .view-toggle, .mobile-nav, .mobile-more, .fab, .timeline-filters, .timeline-filter-count,
    .trip-actions, .toast-container, .offline-banner, .vote-bar, .item-votes, .day-chevron, #modal-overlay { display: none !important; }
    .app-container { max-width: none !important; padding: 0 !important; }
    .trip-header { padding: 0 0 .5rem !important; }
    .timeline-day { break-inside: auto; }
    .timeline-day-header { break-after: avoid; }
    .timeline-item, .timeline-end { break-inside: avoid; box-shadow: none !important; border: 1px solid #ddd !important; }
    .timeline-day.collapsed .timeline-items { display: block !important; }
    a { color: #000; text-decoration: none; }
}

/* Profil */
.profile-toggle { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--text-light); cursor: pointer; }
.profile-toggle input { margin-top: .2rem; accent-color: var(--accent); }

/* ===== Formulaire d'élément en sections ===== */
.form-label { display: block; font-weight: 500; font-size: .82rem; margin-bottom: .35rem; color: var(--text-light); }
.form-type-compact { margin-bottom: 1rem; }
.form-type-compact select { font-weight: 600; }
.form-section { border: none; border-top: 1px solid var(--border-light); margin: 1rem 0 0; padding: .9rem 0 0; min-width: 0; }
.form-section > legend, .form-section-fold > summary {
    padding: 0 .4rem 0 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text);
}
.form-section > legend { margin-bottom: .4rem; }
.form-section-fold > summary { cursor: pointer; list-style: none; padding: .2rem 0 .6rem; }
.form-section-fold > summary::-webkit-details-marker { display: none; }
.form-section-fold > summary::after { content: '▸'; margin-left: .4rem; color: var(--text-muted); }
.form-section-fold[open] > summary::after { content: '▾'; }
.form-row-cost { grid-template-columns: 1fr auto 1.2fr; }
.flight-lookup { background: var(--bg-start); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: .7rem; margin-bottom: .8rem; }

/* Statut : boutons côte à côte */
.segmented { display: flex; flex-wrap: wrap; gap: .3rem; }
.segmented-opt { position: relative; flex: 1 1 auto; margin: 0 !important; }
.segmented-opt input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-opt span {
    display: block; text-align: center; padding: .45rem .55rem;
    border: 2px solid var(--border); border-radius: var(--radius-xs);
    font-size: .8rem; color: var(--text-light); cursor: pointer; white-space: nowrap;
    transition: all var(--transition);
}
.segmented-opt input:checked + span { border-color: var(--accent); background: var(--accent-light); color: var(--accent); font-weight: 600; }
.segmented-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-light); }

/* Voyageurs concernés */
.traveler-checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.form-group label.traveler-check {
    display: inline-flex; align-items: center; gap: .3rem; margin: 0;
    padding: .35rem .65rem; border: 2px solid var(--border); border-radius: var(--radius-xs);
    cursor: pointer; font-size: .82rem; color: var(--text); transition: all .15s;
}
.traveler-check input { accent-color: var(--accent); }
.form-group label.traveler-check:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }

/* Pied de fenêtre collé en bas : Enregistrer toujours visible */
.modal-footer-sticky {
    position: sticky; bottom: -1.5rem; z-index: 5;
    margin: 1.2rem -1.5rem -1.5rem; padding: .8rem 1.5rem;
    background: var(--card-bg); border-top: 1px solid var(--border);
    align-items: center;
}
.modal-footer-spacer { flex: 1; }
.btn-link-danger { background: none; border: none; padding: .4rem 0; color: var(--danger); font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) {
    .form-row-cost { grid-template-columns: 1fr 1fr; }
    .form-row-cost .form-group:last-child { grid-column: 1 / -1; }
}

/* ===== Voyage ouvert : titre dans l'en-tête global, bandeau d'infos compact ===== */
.navbar-left { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 1; }
.navbar-brand { flex-shrink: 0; }
.navbar-trip { display: flex; align-items: center; gap: .4rem; min-width: 0; font-family: var(--font-heading); font-size: 1.15rem; color: var(--text); }
.navbar-trip.hidden { display: none; }
.navbar-sep { color: var(--text-muted); font-family: var(--font-body); }
.navbar-trip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.trip-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem;
    padding: .9rem 0 .2rem;
}
.trip-bar-info { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.trip-chip {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .25rem .6rem; border-radius: 999px;
    background: var(--card-bg); border: 1px solid var(--border-light);
    font-size: .8rem; color: var(--text-light); white-space: nowrap;
}
.trip-chip-strong { color: var(--text); font-weight: 600; }
.trip-chip-accent { color: var(--accent); font-weight: 500; }
.trip-chip-info { background: var(--info-light, var(--blue-light)); color: var(--info, var(--blue)); border-color: transparent; }
.trip-bar .trip-actions { margin-left: auto; }
.trip-bar-desc { flex-basis: 100%; font-size: .85rem; color: var(--text-light); white-space: pre-wrap; }
.trip-bar .trip-actions .dropdown-menu { left: auto; right: 0; transform: translateY(4px); }
.trip-bar .trip-actions .dropdown.open .dropdown-menu { transform: translateY(0); }

@media (max-width: 768px) {
    .navbar-brand { font-size: 1.1rem; }
    .navbar-trip { font-size: .95rem; }
    /* Mobile : seul l'emoji de la marque reste, le titre du voyage prend la place */
    body.in-trip .navbar-brand { font-size: 0; gap: 0; }
    body.in-trip .navbar-brand span { font-size: 1.3rem; }
    .trip-bar { padding-top: .6rem; }
    .trip-chip { font-size: .74rem; padding: .2rem .5rem; }
}

/* ===== Fiche d'un élément ===== */
.vw-head { margin: -.2rem 0 1rem; }
.vw-head-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.vw-actions { display: flex; align-items: center; gap: .15rem; }
.vw-icon-btn { width: 34px; height: 34px; border: none; background: none; border-radius: 50%; cursor: pointer; font-size: 1rem; color: var(--text-light); }
.vw-icon-btn:hover { background: var(--border-light); }
.vw-actions .dropdown-menu { right: 0; }
.vw-type { font-size: .8rem; color: var(--text-light); }
.vw-title { font-size: 1.35rem; margin: .5rem 0 .15rem; line-height: 1.25; }
.vw-summary { font-size: .85rem; color: var(--text-light); }
.vw-label { font-size: .72rem; color: var(--text-muted); text-transform: none; }
.vw-hero { margin-bottom: .8rem; }
.vw-hero-single { padding: .8rem 1rem; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.vw-hero-big { font-size: 1.25rem; font-weight: 600; color: var(--text); }
.vw-hero-time { font-size: .95rem; font-weight: 500; }
.vw-hero-sub, .vw-box-sub { font-size: .75rem; color: var(--text-light); }
.vw-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; padding: .9rem 1rem; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.vw-route .vw-right { text-align: right; }
.vw-code { font-size: 1.7rem; letter-spacing: .04em; }
.vw-route-mid { display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .75rem; color: var(--text-light); min-width: 70px; }
.vw-route-mid i { display: block; width: 72px; border-top: 2px dashed var(--border); }
.vw-plus { font-size: .7rem; color: var(--warning-text); font-weight: 600; }
.vw-two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.vw-box { padding: .6rem .8rem; border-radius: var(--radius-sm); background: var(--bg-start); border: 1px solid var(--border-light); min-width: 0; }
.vw-box-main { font-size: 1.05rem; font-weight: 600; }
.vw-box-main small { font-size: .72rem; font-weight: 400; color: var(--text-light); }
.vw-warn { color: var(--warning-text); }
.vw-ticket { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem .9rem; margin-bottom: .8rem; border: 2px dashed var(--border); border-radius: var(--radius-sm); }
.vw-ticket-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; letter-spacing: .14em; font-weight: 600; }
.vw-place { margin-bottom: .8rem; border: 1px solid var(--border-light); border-radius: var(--radius-sm); overflow: hidden; }
.vw-map { height: 140px; }
.vw-place-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem .8rem; font-size: .85rem; }
.vw-place-row .btn { white-space: nowrap; flex-shrink: 0; }
.vw-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.vw-avatars { display: flex; gap: .2rem; margin: .2rem 0; }
.vw-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; overflow: hidden; }
.vw-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vw-extra { display: grid; gap: .25rem; margin-bottom: .8rem; font-size: .85rem; }
.vw-extra span { color: var(--text-muted); margin-right: .5rem; }
.vw-shortcuts { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.vw-shortcuts:empty, .vw-shortcuts:not(:has(a)) { display: none; }
#vw-doc-links { display: contents; }
.vw-shortcuts .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-notes { white-space: pre-wrap; font-size: .9rem; color: var(--text); padding: .6rem 0; border-top: 1px solid var(--border-light); margin-bottom: .4rem; }
.vw-fold { border-top: 1px solid var(--border-light); padding-top: .6rem; }
.vw-fold > summary { cursor: pointer; list-style: none; font-size: .88rem; color: var(--text-light); padding: .2rem 0 .5rem; }
.vw-fold > summary::-webkit-details-marker { display: none; }
.vw-fold > summary::after { content: ' ▸'; color: var(--text-muted); }
.vw-fold[open] > summary::after { content: ' ▾'; }
.vw-fold .comment-section, .vw-fold .documents-section { margin-top: .5rem; }

