/**
 * SpotShare Desktop ? shell carte ? gauche, navigation + bento ? droite.
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html.ss-desktop:not(.desktop-login-page),
html.ss-desktop:not(.desktop-login-page) body {
    height: 100%;
    margin: 0;
}

html.ss-desktop:not(.desktop-login-page) body {
    font-family: var(--ui-font-sans);
    background: var(--ui-bg-subtle);
    color: var(--ui-fg-base);
    overflow: hidden;
}

.desktop-shell {
    display: grid;
    grid-template-columns: minmax(var(--desktop-map-min), 1fr) minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
}

/* ??? Carte (gauche) ??? */
.desktop-map-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--ui-bg-base);
    border-right: 1px solid var(--ui-border-base);
}

.desktop-map-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--ui-border-base);
    background: var(--ui-bg-base);
}

.desktop-map-search {
    flex: 0 1 50%;
    width: 50%;
    max-width: 50%;
    min-width: 10rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-field);
}

.desktop-map-search__icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--ui-fg-muted);
}

.desktop-map-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--ui-fg-base);
}

.desktop-map-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-field);
    color: var(--ui-fg-subtle);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.desktop-map-tool-btn:hover {
    background: var(--ui-bg-subtle-hover);
    color: var(--ui-fg-base);
}

.desktop-map-tool-btn.is-active,
.desktop-map-tool-btn[aria-pressed="true"] {
    background: color-mix(in srgb, var(--ui-bg-interactive) 14%, transparent);
    border-color: color-mix(in srgb, var(--ui-fg-interactive) 35%, var(--ui-border-base));
    color: var(--ui-fg-interactive);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ui-fg-interactive) 20%, transparent);
}

.places-list-search {
    display: flex;
    align-items: center;
    flex: 0 1 18rem;
    width: min(100%, 18rem);
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-field);
}

.places-list-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--ui-fg-base);
}

.places-list-search input::placeholder {
    color: var(--ui-fg-muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.desktop-map-section {
    flex: 1;
    min-height: 0;
    position: relative;
}

.desktop-map-locate {
    position: absolute;
    z-index: 5;
    right: 0.875rem;
    /* Au-dessus des contr?les zoom Google (+/?) + attribution */
    bottom: 7.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-base);
    color: var(--ui-fg-interactive);
    box-shadow: 0 1px 4px rgba(24, 24, 27, 0.18);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.desktop-map-locate:hover {
    background: #eff6ff;
    color: var(--ui-fg-interactive-hover);
}

.desktop-map-locate:active {
    transform: translateY(1px);
}

.desktop-map-locate.is-busy {
    opacity: 0.65;
    pointer-events: none;
}

.desktop-map-section #map,
.desktop-map-section #map-fallback {
    height: 100%;
}

.desktop-map-section #map-status,
.desktop-map-section #map-loading,
.desktop-map-section #map-error {
    position: absolute;
    z-index: 5;
    left: 1rem;
    right: 1rem;
}

/* ??? Panneau droit ??? */
.desktop-main-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.desktop-menu-tile {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    margin: 1rem 1.25rem 0;
    padding: 0.5rem;
    background: var(--ui-bg-component);
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-elevation-card);
    flex-shrink: 0;
}

.desktop-menu-tile__brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-width: 7.5rem;
    max-width: 10rem;
    padding: 0.15rem 0.5rem 0.15rem 0.35rem;
    border-right: 1px solid var(--ui-border-base);
}

.desktop-menu-tile__brand-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    width: 100%;
    padding: 0.2rem 0.25rem;
    border: none;
    border-radius: var(--ui-radius-sm);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.desktop-menu-tile__brand-btn:hover {
    background: var(--ui-bg-subtle-hover);
}

.desktop-menu-tile__brand-btn.is-active .desktop-brand__title {
    color: var(--ui-fg-interactive);
}

.desktop-brand__title {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.desktop-brand__user {
    font-size: 0.6875rem;
    color: var(--ui-fg-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.desktop-menu-tile__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-left: 0.25rem;
}

.desktop-menu-tile__link {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--ui-fg-muted);
    text-decoration: none;
}

.desktop-menu-tile__link:hover {
    color: var(--ui-fg-interactive);
    text-decoration: underline;
}

.desktop-nav {
    display: flex;
    flex: 1;
    align-items: stretch;
    gap: 0.25rem;
    min-width: 0;
    padding: 0;
    overflow: visible;
}

.desktop-nav__item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.55rem 0.45rem 0.5rem;
    margin: 0;
    border: none;
    border-radius: var(--ui-radius-md);
    background: transparent;
    color: var(--ui-fg-subtle);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.desktop-nav__item span {
    line-height: 1.1;
    white-space: nowrap;
}

.desktop-nav__item:hover {
    background: var(--ui-bg-subtle-hover);
    color: var(--ui-fg-base);
}

.desktop-nav__item.is-active {
    background: color-mix(in srgb, var(--ui-bg-interactive) 12%, transparent);
    color: var(--ui-fg-interactive);
}

.desktop-nav__item--logout {
    flex: 0.85;
    color: var(--ui-fg-muted);
}

.desktop-nav__item--logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.desktop-nav__icon {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 1px 1px rgba(24, 24, 27, 0.12));
}

.desktop-nav__item:hover .desktop-nav__icon,
.desktop-nav__item.is-active .desktop-nav__icon {
    transform: translateY(-1px);
    transition: transform 0.12s ease;
}

@media (max-width: 1280px) {
    .desktop-menu-tile {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .desktop-menu-tile__brand {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        max-width: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--ui-border-base);
        padding-bottom: 0.45rem;
    }

    .desktop-nav__item {
        font-size: 0.6875rem;
        padding: 0.45rem 0.25rem;
    }
}

.desktop-content {
    min-width: 0;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ui-bg-subtle);
}

.desktop-view {
    padding: 1.25rem 1.5rem 2rem;
    min-height: 100%;
}

.desktop-view.hidden {
    display: none;
}

.desktop-view-header {
    margin-bottom: 1.25rem;
}

.desktop-view-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.desktop-view-header p {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: var(--ui-fg-muted);
}

/* Composants Medusa-like */
.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.4375rem 0.75rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.ui-btn--primary {
    background: var(--ui-bg-interactive);
    color: var(--ui-fg-on-color);
}

.ui-btn--primary:hover {
    background: var(--ui-bg-interactive-hover);
}

.ui-btn--secondary {
    background: var(--ui-bg-component);
    border-color: var(--ui-border-base);
    color: var(--ui-fg-base);
}

.ui-btn--secondary:hover {
    background: var(--ui-bg-component-hover);
}

.ui-btn--ghost {
    background: transparent;
    color: var(--ui-fg-subtle);
}

.ui-btn--ghost:hover {
    background: var(--ui-bg-subtle-hover);
    color: var(--ui-fg-base);
}

.ui-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: var(--ui-bg-subtle);
    color: var(--ui-fg-subtle);
    border: 1px solid var(--ui-border-base);
}

.ui-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--ui-fg-muted);
    font-size: 0.8125rem;
}

/* Listes dans bento */
.bento-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 100%;
    overflow-y: auto;
}

.bento-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid var(--ui-border-base);
    background: var(--ui-bg-subtle);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.12s, border-color 0.12s;
}

.bento-list-item:hover {
    background: var(--ui-bg-subtle-hover);
    border-color: var(--ui-border-strong);
}

.bento-list-item__thumb {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--ui-radius-md);
    object-fit: cover;
    background: var(--ui-bg-subtle);
    flex-shrink: 0;
}

.bento-list-item__meta {
    min-width: 0;
    flex: 1;
}

.bento-list-item__name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ui-fg-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-list-item__sub {
    font-size: 0.75rem;
    color: var(--ui-fg-muted);
    margin-top: 0.125rem;
}

/* Tuiles lieu ? liste bureau pleine largeur */
.bento-list--places {
    gap: 0.625rem;
}

.bento-place-tile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid var(--ui-border-base);
    background: var(--ui-bg-subtle);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.12s, border-color 0.12s;
}

.bento-place-tile:hover {
    background: var(--ui-bg-subtle-hover);
    border-color: var(--ui-border-strong);
}

.bento-place-tile.is-active {
    border-color: var(--ui-border-interactive);
    background: color-mix(in srgb, var(--ui-bg-interactive) 8%, transparent);
}

.bento-place-tile__thumb,
.bento-place-tile__icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--ui-radius-md);
    flex-shrink: 0;
}

.bento-place-tile__thumb {
    object-fit: cover;
    background: var(--ui-bg-subtle);
}

.bento-place-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    background: var(--ui-bg-component);
    border: 1px solid var(--ui-border-base);
}

.bento-place-tile__body {
    min-width: 0;
}

.bento-place-tile__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.bento-place-tile__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ui-fg-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.bento-place-tile__distance {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ui-fg-interactive, #2563eb);
    white-space: nowrap;
    flex-shrink: 0;
}

.bento-place-tile__address {
    display: block;
    font-size: 0.75rem;
    color: var(--ui-fg-muted);
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-place-tile__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.375rem;
}

.bento-place-tile__chip {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--ui-bg-component);
    border: 1px solid var(--ui-border-base);
    color: var(--ui-fg-subtle);
}

.bento-place-tile__chip--muted {
    color: var(--ui-fg-muted);
}

.bento-place-tile__chip--public {
    color: #047857;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.bento-place-tile__chip--fav {
    color: #b45309;
    border-color: #fde68a;
    background: #fffbeb;
}

.bento-place-tile__chip--owner {
    color: var(--ui-fg-interactive, #2563eb);
    border-color: color-mix(in srgb, var(--ui-border-interactive, #2563eb) 35%, var(--ui-border-base));
    background: color-mix(in srgb, var(--ui-bg-interactive, #2563eb) 8%, var(--ui-bg-component));
}

.bento-place-tile__chip--google {
    color: #b45309;
    border-color: #fde68a;
    background: #fffbeb;
}

.bento-place-tile__chip--interest {
    color: #4338ca;
    border-color: #c7d2fe;
    background: #eef2ff;
}

.bento-place-tile__chip--tag {
    color: #0f766e;
    border-color: #99f6e4;
    background: #f0fdfa;
}

.places-filters-toolbar--nearby {
    padding: 0 1.25rem 0.75rem;
}

.places-filter-section--nearby {
    padding: 0 1.25rem 1rem;
}

.places-filter-section--nearby.hidden,
.places-filters-toolbar--nearby.hidden {
    display: none;
}

.bento-place-tile__rating {
    flex-shrink: 0;
    align-self: flex-start;
    font-size: 0.75rem;
    line-height: 1;
}

#desktop-toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 100;
    max-width: 22rem;
    padding: 0.75rem 1rem;
    border-radius: var(--ui-radius-lg);
    background: var(--ui-fg-base);
    color: var(--ui-bg-base);
    font-size: 0.8125rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.places-filter.is-active,
.ui-btn.places-filter.is-active {
    border-color: var(--ui-border-interactive);
    color: var(--ui-fg-interactive);
    background: color-mix(in srgb, var(--ui-bg-interactive) 10%, transparent);
}

/* Filtres Lieux ? badges multi-s?lection */
.places-filters-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.places-clear-filters.hidden {
    display: none;
}

.places-filter-section + .places-filter-section {
    margin-top: 0.875rem;
}

.places-filter-section__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ui-fg-muted);
    margin-bottom: 0.5rem;
}

.places-filter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.places-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem 0.625rem;
    border-radius: 999px;
    border: 1px solid var(--ui-border-base);
    background: var(--ui-bg-subtle);
    color: var(--ui-fg-subtle);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.places-filter-badge:hover {
    background: var(--ui-bg-subtle-hover);
    border-color: var(--ui-border-strong);
}

.places-filter-badge.is-active {
    border-color: var(--ui-border-interactive);
    color: var(--ui-fg-interactive);
    background: color-mix(in srgb, var(--ui-bg-interactive) 12%, transparent);
}

.places-filter-badge__count {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ui-fg-muted);
    background: var(--ui-bg-component);
    border: 1px solid var(--ui-border-base);
    border-radius: 999px;
    padding: 0 0.375rem;
    min-width: 1.25rem;
    text-align: center;
}

.places-filter-badge.is-active .places-filter-badge__count {
    color: var(--ui-fg-interactive);
    border-color: color-mix(in srgb, var(--ui-border-interactive) 40%, var(--ui-border-base));
}

.places-filter-empty {
    font-size: 0.75rem;
    color: var(--ui-fg-muted);
}

#desktop-toast.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ??? Modal lieu ??? */
.desktop-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.desktop-modal.hidden {
    display: none;
}

.desktop-trip-form-card.hidden,
.desktop-place-form-card.hidden,
.bento-card.hidden {
    display: none !important;
}

.desktop-trip-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.desktop-trip-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 1100px) {
    .desktop-trip-form__row {
        grid-template-columns: 1fr;
    }
}

.desktop-trip-form__hint {
    font-size: 0.75rem;
    color: #7c3aed;
}

.desktop-trip-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.desktop-trip-color {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s, border-color 0.12s;
}

.desktop-trip-color.is-active {
    border-color: var(--ui-fg-base);
    transform: scale(1.1);
}

.desktop-trip-tile {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid var(--ui-border-base);
    border-left-width: 4px;
    background: var(--ui-bg-subtle);
}

.desktop-trip-tile__main {
    min-width: 0;
    flex: 1;
}

.desktop-trip-tile__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desktop-trip-tile__dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.desktop-trip-tile__name {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ui-fg-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desktop-trip-tile__meta {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--ui-fg-muted);
}

.desktop-trip-tile__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.desktop-trip-tile__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.desktop-trip-group-card.hidden {
    display: none !important;
}

.desktop-trip-group__tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem 0.75rem;
    border-bottom: 1px solid var(--ui-border-base);
}

.desktop-trip-group__tab.is-active {
    background: var(--ui-fg-base);
    color: var(--ui-bg-base);
    border-color: var(--ui-fg-base);
}

.desktop-trip-group__gmaps {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    margin-left: 0.15rem;
    border-radius: var(--ui-radius-md);
}

.desktop-trip-group__gmaps:hover {
    background: #eef6ff;
    border-color: #93c5fd;
}

.desktop-trip-group__gmaps-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
}

.desktop-trip-group__body {
    max-height: none;
    overflow: visible;
}

.desktop-trip-group-card {
    align-self: start;
}

.desktop-trip-group__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.desktop-trip-group__member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid var(--ui-border-base);
    background: var(--ui-bg-subtle);
}

.desktop-trip-group__suggest {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    max-height: 12rem;
    overflow: auto;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-base);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.desktop-trip-group__suggest-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--ui-border-base);
    cursor: pointer;
}

.desktop-trip-group__suggest-item:hover {
    background: var(--ui-bg-subtle);
}

.desktop-trip-group__suggest-item:last-child {
    border-bottom: 0;
}

.desktop-trip-group__route-label {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ui-fg-muted);
}

.desktop-trip-group__route-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid var(--ui-border-base);
    background: var(--ui-bg-subtle);
}

.desktop-trip-group__route-card.is-focusable {
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.desktop-trip-group__route-card.is-focusable:hover {
    border-color: rgba(37, 99, 235, 0.35);
    background: #eff6ff;
}

.desktop-trip-group__route-card.is-focusable:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.desktop-trip-group__comment-toggle.is-active {
    background: #eff6ff;
    color: #2563eb;
}

.desktop-trip-group__comments {
    margin: -0.25rem 0 0.75rem;
}

.desktop-trip-group__comments.is-open {
    margin-top: 0;
    margin-bottom: 0.85rem;
    padding: 0.75rem;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-base);
}

.desktop-trip-group__comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.desktop-trip-group__comment {
    padding: 0.5rem 0.65rem;
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-subtle);
    border: 1px solid var(--ui-border-base);
}

.desktop-trip-group__comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.desktop-trip-group__comment-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ui-fg-muted);
}

.desktop-trip-group__comment-actions {
    display: inline-flex;
    gap: 0.15rem;
}

.desktop-trip-group__comment-body {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--ui-fg-base);
    white-space: pre-wrap;
    word-break: break-word;
}

.desktop-trip-group__comments-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.desktop-trip-group__comments-form textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-field);
    color: var(--ui-fg-base);
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 3.25rem;
}

.desktop-trip-group__comments-form textarea:focus {
    outline: 2px solid color-mix(in srgb, var(--ui-border-interactive) 40%, transparent);
    border-color: var(--ui-border-interactive);
}

.desktop-trip-group__comments-form .ui-btn {
    align-self: flex-start;
}

.desktop-trip-group__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: #64748b;
    flex-shrink: 0;
}

.desktop-trip-group__badge--departure {
    background: #2563eb;
}

.desktop-trip-group__badge--destination {
    background: #059669;
}

.desktop-trip-group__badge--stop {
    background: #d97706;
}

.desktop-trip-group__empty-slot {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px dashed var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: transparent;
    color: var(--ui-fg-muted);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.desktop-trip-group__empty-slot:hover {
    border-color: var(--ui-fg-base);
    color: var(--ui-fg-base);
}

.desktop-trip-group__picker {
    margin-top: 1rem;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-lg);
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.04), transparent 4.5rem),
        var(--ui-bg-base);
    box-shadow: var(--ui-shadow-elevation-card);
    padding: 0;
    overflow: hidden;
}

.desktop-trip-group__picker.hidden {
    display: none !important;
}

.desktop-trip-group__picker-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.875rem 0.875rem 0.75rem;
}

.desktop-trip-group__picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.desktop-trip-group__picker-eyebrow {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ui-fg-interactive);
}

.desktop-trip-group__picker-title {
    margin: 0.15rem 0 0;
    font-size: 0.9375rem;
    font-weight: 650;
    color: var(--ui-fg-base);
}

.desktop-trip-group__picker-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: var(--ui-bg-subtle);
    color: var(--ui-fg-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.desktop-trip-group__picker-close:hover {
    background: var(--ui-bg-subtle-hover);
    color: var(--ui-fg-base);
}

.desktop-trip-group__picker-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--ui-border-base);
    border-radius: 999px;
    background: var(--ui-bg-field);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.desktop-trip-group__picker-search:focus-within {
    border-color: var(--ui-border-interactive);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.desktop-trip-group__picker-search-icon {
    display: inline-flex;
    color: var(--ui-fg-muted);
    flex-shrink: 0;
}

.desktop-trip-group__picker-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--ui-fg-base);
}

.desktop-trip-group__picker-search input::placeholder {
    color: var(--ui-fg-muted);
}

.desktop-trip-group__picker-list {
    max-height: 16rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0 -0.25rem;
    padding: 0.15rem 0.25rem 0.25rem;
    overscroll-behavior: contain;
}

.desktop-trip-group__picker-section {
    margin: 0.55rem 0.35rem 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ui-fg-muted);
}

.desktop-trip-group__picker-section:first-child {
    margin-top: 0.15rem;
}

.desktop-trip-group__picker-empty {
    padding: 1.25rem 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--ui-fg-muted);
}

.desktop-trip-group__picker-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.625rem 0.7rem;
    border: 1px solid transparent;
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-subtle);
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.desktop-trip-group__picker-item:hover {
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.22);
}

.desktop-trip-group__picker-item:active {
    transform: translateY(1px);
}

.desktop-trip-group__picker-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.65rem;
    background: var(--ui-bg-base);
    border: 1px solid var(--ui-border-base);
    font-size: 1rem;
    flex-shrink: 0;
}

.desktop-trip-group__picker-item-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.desktop-trip-group__picker-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ui-fg-base);
}

.desktop-trip-group__picker-item-meta {
    font-size: 0.75rem;
    color: var(--ui-fg-muted);
}

.desktop-trip-group__picker-item-type {
    flex-shrink: 0;
    max-width: 7.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--ui-bg-base);
    border: 1px solid var(--ui-border-base);
    font-size: 0.6875rem;
    color: var(--ui-fg-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desktop-place-form-card {
    max-height: min(78vh, 44rem);
    overflow: hidden;
}

.desktop-place-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.desktop-place-form__hint {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border-radius: var(--ui-radius-md);
    background: color-mix(in srgb, #10b981 10%, var(--ui-bg-subtle));
    border: 1px solid color-mix(in srgb, #10b981 25%, var(--ui-border-base));
}

.desktop-place-form__hint-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #065f46;
}

.desktop-place-form__hint-sub {
    font-size: 0.75rem;
    color: #047857;
    margin-top: 0.125rem;
}

.desktop-place-form__geo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 1100px) {
    .desktop-place-form__geo {
        grid-template-columns: 1fr;
    }
}

.desktop-place-form__enrich {
    font-size: 0.75rem;
    color: var(--ui-fg-interactive, #2563eb);
}

.desktop-place-form__visibility {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.desktop-place-form__vis-option {
    position: relative;
    cursor: pointer;
    display: block;
}

.desktop-place-form__vis-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.desktop-place-form__vis-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid var(--ui-border-base);
    font-size: 0.8125rem;
    background: var(--ui-bg-subtle);
    pointer-events: none;
}

.desktop-place-form__vis-option input:checked + span {
    border-color: var(--ui-border-interactive);
    color: var(--ui-fg-interactive);
    background: color-mix(in srgb, var(--ui-bg-interactive) 10%, transparent);
}

.desktop-place-form__vis-option input:focus-visible + span {
    outline: 2px solid var(--ui-border-interactive);
    outline-offset: 2px;
}

.desktop-place-form__favorite {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    cursor: pointer;
}

.desktop-place-form__tags {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.desktop-place-form__tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.desktop-place-form__tag-create {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.desktop-place-form__tag-create input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    padding: 0.5rem 0.75rem;
    font: inherit;
    background: var(--ui-bg-component);
    color: var(--ui-fg-base);
}

.desktop-place-form__tag-create input:focus {
    outline: none;
    border-color: var(--ui-border-interactive);
}

.desktop-place-form__photos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.desktop-place-form__photos-head label {
    margin-bottom: 0;
}

.desktop-place-form__reload-photos {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.desktop-place-form__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.desktop-place-form__photo {
    position: relative;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--ui-radius-md);
    overflow: hidden;
    border: 1px solid var(--ui-border-base);
}

.desktop-place-form__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.desktop-place-form__photo-remove {
    position: absolute;
    top: 0.15rem;
    right: 0.15rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
}

.desktop-place-form__upload {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border: 2px dashed var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    font-size: 0.8125rem;
    color: var(--ui-fg-muted);
    cursor: pointer;
}

.desktop-place-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--ui-border-base);
    margin-top: 0.25rem;
}

.desktop-place-textarea {
    width: 100%;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    padding: 0.625rem 0.75rem;
    font: inherit;
    background: var(--ui-bg-component);
    color: var(--ui-fg-base);
    resize: vertical;
}
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.desktop-modal.hidden {
    display: none;
}

.desktop-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.desktop-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 28rem);
    max-height: min(90vh, 40rem);
    overflow: auto;
    border-radius: var(--ui-radius-lg);
    border: 1px solid var(--ui-border-base);
    background: var(--ui-bg-base);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.desktop-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ui-border-base);
}

.desktop-modal__header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.desktop-modal__close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ui-fg-muted);
    padding: 0.25rem;
}

.desktop-modal__body {
    padding: 1rem 1.25rem 1.25rem;
}

.desktop-modal__footer {
    padding-top: 0.5rem;
}

.desktop-login-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.desktop-login-field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ui-fg-muted);
}

.desktop-login-field input,
.desktop-login-field select,
.desktop-login-field textarea,
.desktop-place-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ui-border-base);
    border-radius: var(--ui-radius-md);
    background: var(--ui-bg-field);
    color: var(--ui-fg-base);
    font-size: 0.875rem;
    font-family: inherit;
}

.desktop-login-field input:focus,
.desktop-login-field select:focus,
.desktop-login-field textarea:focus,
.desktop-place-textarea:focus {
    outline: 2px solid color-mix(in srgb, var(--ui-border-interactive) 40%, transparent);
    border-color: var(--ui-border-interactive);
}

.desktop-login-field textarea,
.desktop-place-textarea {
    resize: vertical;
    min-height: 4.5rem;
}

/* ??? Visionneuse photo ??? */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lightbox.hidden {
    display: none;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.photo-lightbox-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: min(96vw, 1200px);
    max-height: 90vh;
    padding: 3rem 3.5rem;
}

.photo-lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 2rem);
    object-fit: contain;
    border-radius: var(--ui-radius-md);
    user-select: none;
    -webkit-user-drag: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.photo-lightbox-counter {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
}

.photo-lightbox-attribution {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.6875rem;
    text-align: center;
}

.photo-lightbox-attribution.hidden {
    display: none;
}

.photo-lightbox-close {
    position: absolute;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
}

.photo-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.photo-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: -1.375rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
}

.photo-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.photo-lightbox-prev {
    left: max(0.5rem, env(safe-area-inset-left));
}

.photo-lightbox-next {
    right: max(0.5rem, env(safe-area-inset-right));
}

.photo-lightbox-trigger {
    cursor: zoom-in;
    border: none;
    padding: 0;
    background: transparent;
    font: inherit;
}

.photo-lightbox-trigger:focus-visible {
    outline: 2px solid var(--ui-border-interactive);
    outline-offset: 2px;
}

body.photo-lightbox-open {
    overflow: hidden;
}

/* Popup lieu sur la carte (vue Voyages / G?rer) */
.ss-map-popup {
    min-width: 12rem;
    max-width: 17rem;
    padding: 0.15rem 0.1rem 0.25rem;
    font-family: var(--ui-font-sans, system-ui, sans-serif);
    color: #18181b;
}
.ss-map-popup--rich {
    min-width: 18rem;
    max-width: 24rem;
    padding: 0.1rem 0.05rem 0.2rem;
}
.ss-map-popup__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
}
.ss-map-popup__head-main {
    min-width: 0;
    flex: 1;
}
.ss-map-popup__eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #71717a;
}
.ss-map-popup__title {
    margin: 0 0 0.4rem;
    font-size: 0.875rem;
    font-weight: 650;
    line-height: 1.3;
}
.ss-map-popup--rich .ss-map-popup__title {
    margin: 0;
    font-size: 0.95rem;
}
.ss-map-popup__nav .desktop-place-nav {
    flex-shrink: 0;
}
.ss-map-popup__body {
    max-height: min(52vh, 28rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 0.15rem;
}
.ss-map-popup__body .desktop-place-detail {
    gap: 0.65rem;
}
.ss-map-popup__body .desktop-place-detail__gallery-strip {
    max-width: 100%;
}
.ss-map-popup__body .desktop-place-detail__gallery-strip .photo-lightbox-trigger {
    width: 3.5rem;
    height: 3.5rem;
}
.ss-map-popup__body .desktop-place-detail__gallery-strip img,
.ss-map-popup__body .desktop-place-detail__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ss-map-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e4e4e7;
}
.ss-map-popup__actions .ui-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
}
.ss-map-popup__row {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.3rem;
}
.ss-map-popup__row--coords {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.6875rem;
    color: #71717a;
}
.ss-map-popup__text {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    word-break: break-word;
}
.ss-map-popup__muted {
    font-size: 0.75rem;
    color: #a1a1aa;
}
.ss-map-popup__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.4rem;
    height: 1.4rem;
    margin: 0;
    padding: 0;
    border: 1px solid #e4e4e7;
    border-radius: 6px;
    background: #fafafa;
    color: #52525b;
    cursor: pointer;
}
.ss-map-popup__copy:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

/* InfoWindow Google : laisser d?filer le contenu riche */
.gm-style-iw-c:has(.ss-map-popup--rich) {
    padding: 12px !important;
    border-radius: 14px !important;
}
.gm-style-iw-d:has(.ss-map-popup--rich) {
    overflow: auto !important;
    max-height: min(70vh, 34rem) !important;
}
