/* SpotShare — Custom styles */

.tab-btn.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn:not(.active) {
    color: #6b7280;
}

.star-btn {
    cursor: pointer;
    transition: transform 0.15s;
}

.star-btn:active {
    transform: scale(1.2);
}

.star-btn svg {
    transition: fill 0.15s, color 0.15s;
}

.location-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.location-card:active {
    transform: scale(0.98);
}

.photo-preview {
    aspect-ratio: 1;
    object-fit: cover;
}

/* Liseret 3px — photos en attente de modération (lieux publics) */
.photo-pending-moderation {
    border: 3px solid #ef4444;
    box-sizing: border-box;
    overflow: hidden;
}

.gps-pulse {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.modal-backdrop {
    backdrop-filter: blur(4px);
}

.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Scrollbar hide for photo strip */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Filtres horizontaux + badges voyage — zones tactiles mobile */
.filter-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

/* Panneau filtres repliable (Mes lieux) */
.places-filters-panel {
    padding: 0.625rem 0.75rem;
    border-radius: 0.875rem;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.places-filters-toggle--open {
    border-color: #3b82f6;
    color: #2563eb;
    background: #eff6ff;
}

.places-filters-toggle--active:not(.places-filters-toggle--open) {
    border-color: #818cf8;
    color: #4f46e5;
}

.places-filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    background: #6366f1;
    color: #fff;
}

html.dark .places-filters-panel {
    background: #1e293b;
    border-color: #475569;
}

html.dark .places-filters-toggle {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

html.dark .places-filters-toggle--open {
    background-color: #1e3a5f !important;
    border-color: #3b82f6 !important;
    color: #93c5fd !important;
}

html.dark .places-filters-toggle--active:not(.places-filters-toggle--open) {
    border-color: #818cf8 !important;
    color: #a5b4fc !important;
}

.places-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

html.dark .places-filter-chip {
    background: #312e81;
    border-color: #4338ca;
    color: #c7d2fe;
}

.places-sort-select {
    min-width: 7.5rem;
}

.btn-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem;
    border: none;
    background: transparent;
    color: #cbd5e1;
    border-radius: 0.375rem;
    transition: color 0.15s, transform 0.1s;
}

.btn-favorite--on {
    color: #f59e0b;
}

#detail-content .btn-favorite {
    padding: 0.25rem;
}

#detail-content .btn-favorite svg {
    width: 1.375rem;
    height: 1.375rem;
}

.btn-favorite:active {
    transform: scale(0.92);
}

html.dark .btn-favorite:not(.btn-favorite--on) {
    color: #64748b;
}

/* Stats Gestion */
.manage-stat-row + .manage-stat-row {
    margin-top: 0.5rem;
}

.manage-stat-bar {
    height: 0.25rem;
    border-radius: 9999px;
    background: #e2e8f0;
    overflow: hidden;
}

.manage-stat-bar span {
    display: block;
    height: 100%;
    border-radius: 9999px;
    background: #6366f1;
}

html.dark .manage-stat-bar {
    background: #334155;
}

html.dark .manage-stat-bar span {
    background: #818cf8;
}

#places-bulk-bar {
    pointer-events: none;
}

#places-bulk-bar > div {
    pointer-events: auto;
}

.bulk-select-wrap input {
    accent-color: #2563eb;
}

.nearby-public-card:active {
    transform: scale(0.98);
}

.tag-filter-chip,
.location-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--tag-color, #6366f1) 14%, white);
    color: color-mix(in srgb, var(--tag-color, #6366f1) 85%, black);
    border: 1px solid color-mix(in srgb, var(--tag-color, #6366f1) 25%, transparent);
}

.location-tag--compact {
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
}

.tag-picker-add {
    background: #fff;
    border-color: color-mix(in srgb, var(--tag-color, #6366f1) 35%, #e5e7eb);
    color: color-mix(in srgb, var(--tag-color, #6366f1) 80%, #374151);
}

.tag-picker-add:active,
.tag-picker-remove:active {
    transform: scale(0.96);
}

html.dark .tag-picker-add {
    background: #1e293b;
    color: color-mix(in srgb, var(--tag-color, #6366f1) 75%, white);
}

.tag-picker-chip {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid color-mix(in srgb, var(--tag-color, #6366f1) 30%, #e5e7eb);
    background: #fff;
    color: #374151;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tag-picker-chip--selected {
    background: var(--tag-color, #6366f1);
    border-color: var(--tag-color, #6366f1);
    color: #fff;
}

html.dark .tag-picker-chip {
    background: #1e293b;
    color: #e2e8f0;
    border-color: color-mix(in srgb, var(--tag-color, #6366f1) 40%, #334155);
}

html.dark .tag-picker-chip--selected {
    color: #fff;
}

html.dark .location-tag {
    background: color-mix(in srgb, var(--tag-color, #6366f1) 22%, #1e293b);
    color: color-mix(in srgb, var(--tag-color, #6366f1) 70%, white);
}

.location-tag--clickable {
    cursor: pointer;
    border: none;
    font: inherit;
    line-height: inherit;
}

.location-tag--clickable:active {
    transform: scale(0.96);
}

html.dark .location-tag--clickable {
    background: color-mix(in srgb, var(--tag-color, #6366f1) 22%, #1e293b);
}

.trip-filter-chip,
.trip-badge-btn,
.trip-header-btn,
.btn-filter-trip,
.btn-open-trip {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(37, 99, 235, 0.15);
}

.trip-filter-chip {
    min-height: 2.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.trip-badge-btn {
    min-height: 2.25rem;
    font: inherit;
    line-height: 1.2;
    -webkit-appearance: none;
    appearance: none;
}

.trip-header-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn-has-alert,
.header-btn-has-alert {
    color: #2563eb !important;
}

.dark .nav-btn-has-alert,
.dark .header-btn-has-alert {
    color: #60a5fa !important;
}

.trips-inbox-badge {
    box-shadow: 0 0 0 2px #fff;
}

.dark .trips-inbox-badge {
    box-shadow: 0 0 0 2px rgb(15 23 42);
}

.trip-inbox-btn-accept {
    background-color: #059669;
    color: #fff;
}

.trip-inbox-btn-accept:active {
    background-color: #047857;
}

.trip-inbox-btn-decline {
    background-color: #fef2f2;
    color: #dc2626;
}

.dark .trip-inbox-btn-decline {
    background-color: rgba(127, 29, 29, 0.25);
    color: #fca5a5;
}

.trip-inbox-btn-decline:active {
    background-color: #fee2e2;
}

/* Sélecteur voyage compact */
.trip-filter-trigger {
    background: #fff;
    border-color: #e5e7eb;
    transition: transform 0.15s, box-shadow 0.15s;
}

.trip-filter-trigger:active {
    transform: scale(0.98);
}

.trip-filter-trigger--active {
    background: linear-gradient(135deg, #ffffff 0%, color-mix(in srgb, var(--trip-accent, #2563eb) 8%, white) 100%);
    border-color: color-mix(in srgb, var(--trip-accent, #2563eb) 35%, #e5e7eb);
    box-shadow: 0 2px 12px color-mix(in srgb, var(--trip-accent, #2563eb) 15%, transparent);
}

.trip-filter-trigger--active .trip-filter-icon {
    background: color-mix(in srgb, var(--trip-accent) 18%, white);
}

.trip-picker-item {
    border: 1px solid transparent;
    background: transparent;
    transition: background 0.15s;
}

.trip-picker-item:active {
    background: #f3f4f6;
}

.trip-picker-item--selected {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.trip-picker-dot-wrap {
    background: #f3f4f6;
}

.trip-picker-item--selected .trip-picker-dot-wrap {
    background: color-mix(in srgb, var(--trip-accent, #2563eb) 15%, white);
}

html.dark .trip-filter-trigger {
    background: #1e293b;
    border-color: #334155;
}

html.dark .trip-filter-trigger--active {
    background: linear-gradient(135deg, #1e293b 0%, color-mix(in srgb, var(--trip-accent, #3b82f6) 12%, #1e293b) 100%);
    border-color: color-mix(in srgb, var(--trip-accent, #3b82f6) 40%, #334155);
}

html.dark .trip-picker-item:active {
    background: #334155;
}

html.dark .trip-picker-item--selected {
    background: #1e3a5f;
    border-color: #1d4ed8;
}

html.dark .trip-picker-dot-wrap {
    background: #334155;
}

@media (display-mode: standalone) {
    button,
    .trip-badge-btn,
    .trip-filter-chip {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Toast animation */
.toast-enter {
    animation: toast-in 0.3s ease-out;
}

@keyframes toast-in {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.type-badge-restaurant { background: #fef3c7; color: #92400e; }
.type-badge-hotel { background: #dbeafe; color: #1e40af; }
.type-badge-monument { background: #fce7f3; color: #9d174d; }
.type-badge-nature { background: #d1fae5; color: #065f46; }
.type-badge-shopping { background: #ede9fe; color: #5b21b6; }
.type-badge-autre { background: #f3f4f6; color: #374151; }
.type-badge-custom { background: #e0e7ff; color: #3730a3; }

#map-section { min-height: 16rem; }

.map-controls-stack .map-control-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

html:fullscreen,
html:-webkit-full-screen {
    background: #f9fafb;
}

html:fullscreen body,
html:-webkit-full-screen body {
    min-height: 100%;
}

html.dark:fullscreen,
html.dark:-webkit-full-screen {
    background: #0f172a;
}

/* Mode immersif mobile (iPhone / Safari) — tout le site */
html.app-immersive {
    height: 100%;
    height: 100dvh;
    height: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior: none;
}

html.app-immersive body.app-immersive-active {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    height: -webkit-fill-available;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

#view-map.map-expanded {
    position: relative;
    overflow: hidden;
}

body.map-expanded-active {
    overflow: hidden;
}

#view-map.map-expanded .map-view-collapsible {
    display: none;
}

#view-map.map-expanded #map-section {
    position: fixed;
    top: var(--map-expand-top, 3.5rem);
    left: 0;
    right: 0;
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    z-index: 25;
    min-height: 0;
}

#view-map.map-expanded #map,
#view-map.map-expanded #map-fallback {
    height: 100% !important;
    min-height: 0;
}

#map-section,
#map,
#map-fallback {
    transition: height 0.25s ease;
}

/* Panneau détail lieu — overlay fixe au-dessus de la nav (visible au clic marqueur) */
#map-place-panel:not(.hidden) {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    max-height: min(42vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

html.dark #map-place-panel:not(.hidden) {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.admin-nav-btn {
    display: none !important;
}

.admin-nav-btn.admin-nav-visible {
    display: inline-flex !important;
}

/* En-tête app : titre au-dessus, icônes en dessous (mobile) */
.app-header-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
}

.app-header-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.app-header-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.375rem 0.5rem;
}

.app-header-title-sep {
    color: #d1d5db;
    font-size: 1.125rem;
    line-height: 1;
}

html.dark .app-header-title-sep {
    color: #475569;
}

#username-display {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.app-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem;
    margin: 0 -0.125rem;
}

@media (min-width: 1024px) {
    .app-header-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .app-header-actions {
        flex-wrap: nowrap;
        flex-shrink: 0;
        justify-content: flex-end;
    }
}

/* Masquer la barre d’icônes du haut (navigation basse toujours visible) */
body.menu-bar-hidden #app-header-actions {
    display: none;
}

#app-header-actions {
    transition: opacity 0.2s ease;
}

#map-error { font-size: 0.875rem; color: #6b7280; }

.address-result:active { background: #f3f4f6; }

.visibility-filter.active,
.filter-btn.active { }

#google-section {
    min-height: 48px;
}

#google-btn-container {
    width: 100%;
    min-height: 44px;
}

#google-btn-container > div {
    width: 100% !important;
    max-width: 400px;
    margin: 0 auto;
    display: flex !important;
    justify-content: center !important;
}

#google-btn-container iframe {
    display: block !important;
    margin: 0 auto !important;
    min-height: 44px !important;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    background: #fff;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    touch-action: manipulation;
}

html.dark .google-signin-btn {
    background: #fff;
    color: #1f2937;
    border-color: #cbd5e1;
}

body.is-offline #page-title::after {
    content: ' (hors ligne)';
    font-size: 0.65em;
    font-weight: 500;
    color: #f59e0b;
    margin-left: 0.35rem;
}

@media (display-mode: standalone) {
    body {
        -webkit-user-select: none;
        user-select: none;
    }
    input, textarea, [contenteditable] {
        -webkit-user-select: text;
        user-select: text;
    }
}

.photo-attributions a {
    color: #6b7280;
    text-decoration: underline;
}

.photo-attributions .photo-attribution-item + .photo-attribution-item::before {
    content: ' · ';
}

/* ——— Partage réseaux sociaux ——— */
.social-share-host {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

html.dark .social-share-host {
    background: #0f172a;
    border-color: #334155;
}

.social-share-block {
    text-align: center;
}

.social-share-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.625rem;
}

.social-share-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.social-share-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.social-share-btn:active {
    transform: scale(0.94);
}

.social-share-native { background: #64748b; }
.social-share-whatsapp { background: #25d366; }
.social-share-facebook { background: #1877f2; }
.social-share-x { background: #0f1419; }
.social-share-linkedin { background: #0a66c2; }
.social-share-telegram { background: #229ed9; }
.social-share-email { background: #6b7280; }

html.dark .social-share-label {
    color: #cbd5e1;
}

/* ——— QR code partage ——— */
.share-qr-block {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

html.dark .share-qr-block {
    border-top-color: #334155;
}

.share-qr-toggle {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

html.dark .share-qr-toggle {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.share-qr-panel {
    margin-top: 0.75rem;
    text-align: center;
}

.share-qr-img {
    display: block;
    margin: 0 auto;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.5rem;
}

.share-qr-hint {
    margin-top: 0.5rem;
    font-size: 0.6875rem;
    color: #94a3b8;
}

.lieu-save-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.lieu-save-banner-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.lieu-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.lieu-save-btn-secondary {
    background: #fff;
    color: #2563eb;
    border: 1px solid #93c5fd;
}

/* ——— Bêta ——— */
.beta-banner {
    background: #f5f3ff;
    border-bottom: 1px solid #ddd6fe;
    color: #5b21b6;
}

html.dark .beta-banner {
    background: #2e1065;
    border-bottom-color: #5b21b6;
    color: #e9d5ff;
}

.native-app-announce {
    background: linear-gradient(135deg, #059669 0%, #2563eb 55%, #1d4ed8 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.native-app-announce-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem;
}

.native-app-announce-icon img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.native-app-announce-body {
    flex: 1 1 12rem;
    min-width: 0;
}

.native-app-announce-kicker {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(209, 250, 229, 0.95);
}

.native-app-announce-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0.125rem;
}

.native-app-announce-lead {
    font-size: 0.6875rem;
    line-height: 1.45;
    margin-top: 0.25rem;
    color: rgba(236, 253, 245, 0.92);
}

.native-app-announce-package {
    font-size: 0.625rem;
    font-family: ui-monospace, monospace;
    margin-top: 0.25rem;
    color: rgba(209, 250, 229, 0.85);
}

.native-app-announce-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.native-app-announce-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.875rem;
    border-radius: 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    background: #fff;
    color: #047857;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    touch-action: manipulation;
}

.native-app-announce-cta:hover {
    background: #ecfdf5;
}

.native-app-announce-dismiss {
    padding: 0.5rem 0.75rem;
    border-radius: 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    touch-action: manipulation;
}

.native-app-announce-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
}

.beta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #ede9fe;
    color: #6d28d9;
}

html.dark .beta-badge {
    background: #4c1d95;
    color: #e9d5ff;
}

/* ——— Questionnaire beta (téléphone uniquement) ——— */
.beta-q-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.beta-q-modal.is-open {
    display: flex;
}

.beta-q-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, 0.6);
    -webkit-tap-highlight-color: transparent;
}

.beta-q-sheet {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%;
    max-width: 100%;
    height: min(90dvh, 90vh);
    max-height: min(90dvh, 90vh);
    margin: 0;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    touch-action: manipulation;
}

html.dark .beta-q-sheet {
    background: #1e293b;
}

.beta-q-sheet-header {
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

html.dark .beta-q-sheet-header {
    border-bottom-color: #334155;
}

.beta-q-close-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #64748b;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}

html.dark .beta-q-close-btn {
    border-color: #475569;
    background: #334155;
    color: #cbd5e1;
}

.beta-q-sheet-body {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.25rem;
    min-height: 0;
}

.beta-q-sheet-footer {
    padding: 0.75rem 1.25rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0));
    border-top: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
}

html.dark .beta-q-sheet-footer {
    border-top-color: #334155;
    background: #1e293b;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
}

.beta-q-submit-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0.75rem;
    background: #7c3aed;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.beta-q-submit-btn:active {
    background: #6d28d9;
}

.beta-q-submit-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.beta-q-footer-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.beta-q-text-btn {
    flex: 1;
    padding: 0.625rem 0.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

html.dark .beta-q-text-btn {
    color: #94a3b8;
}

body.beta-q-open {
    overflow: hidden;
}

body.beta-q-open #fab-add,
body.beta-q-open #btn-add-here,
body.beta-q-open #app-bottom-nav,
body.beta-q-open #places-bulk-bar,
body.beta-q-open #map-search-bar {
    visibility: hidden !important;
    pointer-events: none !important;
}

html:not([data-device="phone"]) #btn-beta-questionnaire {
    display: none !important;
}

.beta-q-banner-btn {
    background: #7c3aed;
    color: #fff;
    border: 1px solid #6d28d9;
}

.beta-q-banner-btn:hover {
    background: #6d28d9;
}

html.dark .beta-q-banner-btn {
    background: #5b21b6;
    border-color: #7c3aed;
    color: #f5f3ff;
}

.beta-q-scale-btn,
.beta-q-nps-btn {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.35rem;
    border-radius: 0.625rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

html.dark .beta-q-scale-btn,
html.dark .beta-q-nps-btn {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.beta-q-scale-btn.beta-q-scale-active,
.beta-q-nps-btn.beta-q-nps-active {
    background: #7c3aed;
    border-color: #6d28d9;
    color: #fff;
}

.beta-q-nps-btn {
    min-width: 1.85rem;
    height: 2rem;
    font-size: 0.75rem;
}

.beta-q-comfort-label.beta-q-comfort-active {
    border-color: #7c3aed;
    background: #f5f3ff;
    color: #5b21b6;
}

html.dark .beta-q-comfort-label.beta-q-comfort-active {
    border-color: #a78bfa;
    background: #2e1065;
    color: #e9d5ff;
}

.apple-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: #000;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.apple-signin-btn:disabled {
    cursor: not-allowed;
}

/* ——— Mode nuit (html.dark) ——— */
html.dark {
    color-scheme: dark;
}

html.dark .bg-white,
html.dark .location-card,
html.dark #pwa-install-banner {
    background-color: #1e293b !important;
}

html.dark .bg-gray-50,
html.dark .bg-gray-100 {
    background-color: #0f172a !important;
}

html.dark .bg-gray-50.rounded-xl,
html.dark form.bg-gray-50,
html.dark #profile-account-info {
    background-color: #334155 !important;
}

html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-gray-50 {
    border-color: #334155 !important;
}

html.dark .text-gray-800,
html.dark .text-gray-700 {
    color: #f1f5f9 !important;
}

html.dark .text-gray-600,
html.dark .text-gray-500 {
    color: #94a3b8 !important;
}

html.dark .text-gray-400 {
    color: #64748b !important;
}

html.dark input,
html.dark textarea,
html.dark select {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

html.dark .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.65) !important;
}

html.dark #map-section,
html.dark #map-loading,
html.dark #map-error {
    background-color: #1e293b !important;
}

html.dark .filter-btn:not(.active),
html.dark .trip-filter-chip:not([style*="border-color"]) {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

html.dark .tab-btn:not(.active) {
    color: #94a3b8 !important;
}

html.dark .tab-btn.active {
    background-color: #334155 !important;
    color: #93c5fd !important;
}

html.dark #toast {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155;
}

/* Attributs lieu / paramètres / camping-car — mode nuit */
html.dark .place-attrs-panel,
html.dark .place-attrs-detail .bg-slate-50,
html.dark .location-params-panel .bg-slate-50,
html.dark .motorhome-detail .bg-indigo-50,
html.dark .motorhome-detail [class*="bg-indigo-50"],
html.dark [class*="bg-slate-50"] {
    background-color: #334155 !important;
}

html.dark .place-attrs-panel {
    background-color: #1e293b !important;
    border-color: #475569 !important;
}

html.dark .place-attrs-panel h3,
html.dark .text-slate-800,
html.dark .text-slate-700 {
    color: #f1f5f9 !important;
}

html.dark .text-slate-600,
html.dark .text-slate-500 {
    color: #94a3b8 !important;
}

html.dark .text-slate-400 {
    color: #64748b !important;
}

html.dark .border-slate-100,
html.dark .border-slate-200 {
    border-color: #475569 !important;
}

html.dark .pa-section.bg-white {
    background-color: #334155 !important;
    border-color: #475569 !important;
}

html.dark .pa-section summary {
    color: #e2e8f0 !important;
}

/* Cartes connecteur VE — zone tactile pleine + état sélectionné (classes peer-checked absentes du build Tailwind) */
.pa-connector-card {
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.pa-connector-card .pa-connector-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.pa-connector-card .pa-connector-face {
    pointer-events: none;
    min-height: 7.5rem;
}

label.pa-connector-card:has(.pa-connector-input:checked) .pa-connector-face {
    border-color: #f59e0b !important;
    background-color: #fffbeb !important;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.25);
}

html.dark .pa-connector-card > div,
html.dark .pa-connector-card .pa-connector-face {
    background-color: #334155 !important;
    border-color: #475569 !important;
}

html.dark .pa-connector-card > div:hover,
html.dark .pa-connector-card .pa-connector-face:hover {
    border-color: #f59e0b !important;
}

html.dark .pa-connector-card .peer:checked + div,
html.dark label.pa-connector-card:has(input:checked) > div,
html.dark label.pa-connector-card:has(.pa-connector-input:checked) .pa-connector-face {
    background-color: rgba(245, 158, 11, 0.15) !important;
    border-color: #f59e0b !important;
}

html.dark .pa-connector-card .text-slate-800 {
    color: #f1f5f9 !important;
}

html.dark .motorhome-panel {
    background-color: #1e1b4b !important;
    border-color: #4338ca !important;
}

html.dark .motorhome-panel h3,
html.dark .text-indigo-900 {
    color: #e0e7ff !important;
}

html.dark .text-indigo-800,
html.dark .text-indigo-700 {
    color: #c7d2fe !important;
}

html.dark .border-indigo-100 {
    border-color: #4338ca !important;
}

html.dark .motorhome-section summary {
    color: #c7d2fe !important;
}

html.dark .btn-params:hover {
    background-color: #312e81 !important;
    color: #c7d2fe !important;
}

html.dark #detail-modal > div.absolute.inset-x-0 {
    background-color: #1e293b !important;
}

html.dark .place-attrs-detail,
html.dark .location-params-panel,
html.dark .motorhome-detail {
    color: #e2e8f0;
}

html.dark .detail-nav-block {
    background-color: #334155 !important;
}

html.dark .place-attrs-detail .text-gray-700,
html.dark .location-params-panel .text-gray-700,
html.dark .motorhome-detail .text-gray-700 {
    color: #e2e8f0 !important;
}

html.dark .nav-apps a {
    color: #fff !important;
}

html.dark .nav-apps .nav-apple {
    background-color: #475569 !important;
}

/* Photo lightbox */
.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: 0.5rem;
    user-select: none;
    -webkit-user-drag: none;
}

.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-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    touch-action: manipulation;
}

.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-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    touch-action: manipulation;
}

.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 #3b82f6;
    outline-offset: 2px;
}

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

/* ——— Profil : entêtes de section distinctes du contenu ——— */
#profile-form .profile-collapsible,
#profile-form .profile-static-section {
    margin-top: 1.25rem;
}

#profile-form .profile-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #1d4ed8;
}

html.dark #profile-form .profile-section-title {
    color: #93c5fd;
}

#profile-form .profile-section-badge {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: #64748b;
    background: rgba(255, 255, 255, 0.75);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

html.dark #profile-form .profile-section-badge {
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.55);
}

#profile-form .profile-section-header {
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border: 1px solid #bfdbfe;
    border-left: 3px solid #2563eb;
    border-radius: 0.75rem;
    padding: 0.625rem 0.875rem;
}

html.dark #profile-form .profile-section-header {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: #334155;
    border-left-color: #3b82f6;
}

#profile-form .profile-collapsible:has(.profile-section-body:not(.hidden)) .profile-section-header {
    border-radius: 0.75rem 0.75rem 0 0;
    border-bottom: none;
}

#profile-form .profile-section-title--static {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border: 1px solid #bfdbfe;
    border-left: 3px solid #2563eb;
    border-bottom: none;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0;
}

html.dark #profile-form .profile-section-title--static {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-color: #334155;
    border-left-color: #3b82f6;
}

#profile-form fieldset.profile-static-section {
    border: none;
    padding: 0;
    margin: 1.25rem 0 0;
    min-width: 0;
}

#profile-form .profile-section-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 0.875rem 1rem;
}

html.dark #profile-form .profile-section-content {
    background: rgba(15, 23, 42, 0.65);
    border-color: #334155;
}

#profile-form .profile-section-header .profile-section-chevron {
    color: #3b82f6;
    opacity: 0.85;
}

html.dark #profile-form .profile-section-header .profile-section-chevron {
    color: #60a5fa;
}
