/* Variables */
:root {
    --or-pale: #C8B280;
    --corail: #e76f51;
    --blanc-casse: #eae9e4;
    --bleu-pale: #3588d3;
    --noir: #232323;
    --header-height: 70px;
    --primary-text: #333;
    --background: #f5f5f5;
    --card-background: white;
    --border-color: #ddd;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --control-shadow: 0 10px 30px rgba(0,0,0,0.28);
    --sidebar-width: 400px;
    --radius: 8px;
    --spacing: 20px;
}

@font-face {
    font-family: "Winky Rough";
    src: url("/assets/font/Winky_Rough/WinkyRough-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Reset CSS */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--noir);
    background-color: var(--blanc-casse);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

html,
body {
    overscroll-behavior-y: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--card-background);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content img {
    height: 50px;
    width: auto;
}

.profile-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-button {
    border: 1px solid #D48D5C;
    background: linear-gradient(145deg, #f7e5d7, #f2d7c2);
    color: #6f462c;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.84rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.feedback-button[hidden] {
    display: none !important;
}

.feedback-button img {
    width: 16px;
    height: 16px;
}

.feedback-button.has-unread::after {
    content: attr(data-unread-count);
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #b1452f;
    color: #fff;
    font-size: 0.72rem;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
}

.focus-mode-button {
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--noir);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.86rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.add-poi-button-desktop {
    border: 1px solid var(--or-pale);
    background: var(--or-pale);
    color: var(--bleu-pale);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.86rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: none;
    align-items: center;
    gap: 8px;
}

.focus-mode-button.active {
    background: #3388ff;
    color: #fff;
    border-color: #3388ff;
}

.header-username {
    max-width: 180px;
    font-size: 0.92rem;
    color: var(--primary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#profileButton {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    padding: 8px;
    cursor: pointer;
    color: var(--noir);
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: background-color 0.2s, transform 0.2s;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#profileButton:hover {
    background-color: var(--background);
    transform: translateY(-1px);
}

.profile-button-avatar {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    display: block;
    flex: 0 0 100%;
}

.profile-button-avatar[hidden] {
    display: none;
}

.auth-palette {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 20px;
    z-index: 1100;
    width: min(92vw, 360px);
    display: none;
    --auth-arrow-left: calc(100% - 26px);
}

.auth-palette.open {
    display: block;
}

.auth-panel {
    position: relative;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    padding: 14px;
}

.auth-panel::before {
    content: "";
    position: absolute;
    top: -8px;
    left: var(--auth-arrow-left);
    width: 14px;
    height: 14px;
    background: var(--card-background);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: translateX(-50%) rotate(45deg);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.auth-tab {
    border: 1px solid var(--border-color);
    background: var(--background);
    color: var(--noir);
    border-radius: 8px;
    padding: 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.auth-tab.active {
    background: var(--or-pale);
    color: var(--noir);
    border-color: var(--or-pale);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: grid;
    gap: 8px;
}

.auth-form input,
.auth-form button,
#profilePageLink,
#logoutButton {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    font-size: 0.95rem;
}

.auth-form button,
#profilePageLink,
#logoutButton {
    background: var(--bleu-pale);
    color: #fff;
    border-color: var(--bleu-pale);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
}

.auth-form .auth-secondary-btn {
    background: var(--background);
    color: var(--bleu-pale);
}

.auth-link-btn {
    background: transparent !important;
    color: var(--bleu-pale) !important;
    border-color: transparent !important;
    text-decoration: underline;
    padding: 4px 2px !important;
    justify-self: start;
}

.auth-message {
    margin-top: 10px;
    min-height: 18px;
    font-size: 0.85rem;
    color: #444;
}

.auth-message.error {
    color: var(--corail);
}

.auth-user-name {
    font-weight: 700;
}

.auth-user-role {
    color: #666;
    margin: 5px 0 12px;
}

.auth-user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

#logoutButton {
    background: var(--corail);
    border-color: var(--corail);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    left: 20px;
    z-index: 1002;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: var(--control-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    z-index: 1001;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

/* Map */
#map {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    z-index: 1;
}

/* Leaflet controls spacing aligned with UI gutters */
.leaflet-right .leaflet-control {
    margin-right: 20px;
}

.leaflet-top .leaflet-control {
    margin-top: 20px;
}

.poi-snap-cluster {
    background: transparent;
    border: 0;
}

.poi-snap-cluster-count {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    padding-bottom: 12px;
    font-family: "Winky Rough", cursive !important;
    font-weight: 600 !important;
    font-style: normal;
    font-synthesis: none;
    font-size: 26px;
    letter-spacing: 0;
    font-variant-numeric: lining-nums tabular-nums;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    color: var(--blanc-casse);
    background: center / 100% 100% no-repeat url('/assets/img/pin_snap.svg');
    line-height: 1;
}

@keyframes eeggBreathPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.42)) drop-shadow(0 22px 24px rgba(0, 0, 0, 0.44));
    }
    50% {
        transform: scale(1.09);
        filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.52)) drop-shadow(0 26px 30px rgba(0, 0, 0, 0.56));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.42)) drop-shadow(0 22px 24px rgba(0, 0, 0, 0.44));
    }
}

.aq-eegg-marker-wrap {
    background: transparent;
    border: 0;
}

.aq-eegg-pin-img {
    display: block;
    width: 58px;
    height: 58px;
    transform-origin: 50% 84%;
    animation: eeggBreathPulse 2.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    will-change: transform, filter;
}

.aq-visited-marker-wrap {
    background: transparent;
    border: 0;
    position: relative;
}

.aq-visited-pin-img {
    display: block;
    width: 58px;
    height: 58px;
}

.aq-visited-pin-badge {
    position: absolute;
    right: 2px;
    top: -2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #216646;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
}

.aq-visited-pin-badge img {
    width: 9px;
    height: 9px;
    object-fit: contain;
    display: block;
}

.add-poi-button-mobile {
    display: inline-flex;
    position: fixed;
    right: 20px;
    top: calc(var(--header-height) + 106px);
    z-index: 1002;
    border: none;
    border-radius: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    padding: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 0;
}

.map-action-drawer {
    display: block;
    position: fixed;
    right: 0;
    z-index: 1001;
    width: 60px;
    background: rgba(200, 178, 128, 0.60);
    border-radius: 12px 0 0 12px;
    box-shadow: var(--control-shadow);
    pointer-events: none;
}

.secondary-map-button {
    box-shadow: none;
}

.add-poi-button-mobile .add-poi-icon {
    filter: drop-shadow(0 8px 14px rgba(0,0,0,0.35)) drop-shadow(0 16px 28px rgba(0,0,0,0.28));
}

.add-poi-icon {
    width: 30px;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 14px rgba(0,0,0,0.35)) drop-shadow(0 16px 28px rgba(0,0,0,0.28));
}

@media (hover: hover) and (pointer: fine) {
    .add-poi-button-mobile[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        right: calc(100% + 12px);
        top: 50%;
        transform: translateY(-50%);
        background: rgba(35, 35, 35, 0.92);
        color: #fff;
        border-radius: 999px;
        padding: 7px 12px;
        font-size: 0.82rem;
        line-height: 1;
        white-space: nowrap;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.15s ease, visibility 0.15s ease;
        pointer-events: none;
    }

    .add-poi-button-mobile[data-tooltip]::before {
        content: "";
        position: absolute;
        right: calc(100% + 6px);
        top: 50%;
        transform: translateY(-50%);
        border-width: 6px 0 6px 6px;
        border-style: solid;
        border-color: transparent transparent transparent rgba(35, 35, 35, 0.92);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.15s ease, visibility 0.15s ease;
        pointer-events: none;
    }

    .add-poi-button-mobile[data-tooltip]:hover::after,
    .add-poi-button-mobile[data-tooltip]:hover::before {
        opacity: 1;
        visibility: visible;
    }
}

.orientation-prompt {
    position: fixed;
    left: 50%;
    top: calc(var(--header-height) + 78px);
    transform: translateX(-50%);
    z-index: 1003;
    width: min(92vw, 520px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--control-shadow);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.orientation-prompt[hidden] {
    display: none !important;
}

.orientation-prompt-text {
    margin: 0;
    color: var(--noir);
    font-size: 0.92rem;
    line-height: 1.35;
    flex: 1 1 auto;
}

.orientation-prompt-button {
    border: 1px solid var(--bleu-pale);
    background: var(--bleu-pale);
    color: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.86rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.orientation-prompt.hidden {
    display: none;
}

.landscape-mobile-alert {
    display: none;
}

.landscape-mobile-alert-card {
    width: min(92vw, 460px);
    background: var(--bleu-pale);
    color: var(--blanc-casse);
    border-radius: 16px;
    box-shadow: var(--control-shadow);
    padding: 22px 18px;
    text-align: center;
}

.landscape-mobile-alert-icon {
    width: 84px;
    height: 84px;
    display: block;
    margin: 0 auto 14px;
}

.landscape-mobile-alert-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
}

.aq-user-marker-wrap {
    background: transparent;
    border: 0;
}

.aq-user-marker-img {
    width: 44px;
    height: 44px;
    display: block;
    transform-origin: 50% 50%;
}

@media (min-width: 769px) {
    .orientation-prompt {
        display: none !important;
    }
}

/* Search */
.search-container {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    z-index: 1004;
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.display-mode-toggle {
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-background);
    box-shadow: var(--control-shadow);
    padding: 0 10px;
}

.search-input {
    width: 100%;
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--control-shadow);
    background-color: var(--card-background);
}

.search-list-mode-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-background);
    box-shadow: var(--control-shadow);
    color: #5e5e5e;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.search-clear-button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-background);
    box-shadow: var(--control-shadow);
    color: #5e5e5e;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.search-clear-button:hover {
    background: #f7f7f7;
}

.search-list-mode-toggle.is-on {
    background: #1f6fff;
    border-color: #1f6fff;
    color: #fff;
}

.search-results-panel {
    margin-top: 8px;
    max-height: min(48dvh, 420px);
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--control-shadow);
}

.search-result-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #efefef;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.search-result-item:last-child {
    border-bottom: 0;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-text);
}

.search-result-subtitle {
    font-size: 0.82rem;
    color: #666;
}

.search-results-empty {
    padding: 12px;
    color: #666;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-text);
}

/* Radius Control */
.radius-control {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 300px;
    transition: left 0.3s ease;
}

.radius-control.sidebar-open {
    left: calc(var(--sidebar-width) + 20px);
}

.radius-control[hidden] {
    display: none;
}

.radius-control p {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.radius-control input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 2px;
    outline: none;
}

.radius-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #3388ff;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.radius-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #3388ff;
}

/* POI List */
.poi-list {
    position: relative;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: white;
}

/* POI Card */
.poi-card {
    display: block;
    width: 100%;
    min-height: 120px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.poi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.poi-card-header {
    display: flex;
    height: 120px;
}

.poi-image {
    width: 120px;
    height: 120px;
    min-width: 120px;
    object-fit: cover;
    border-radius: var(--radius) 0 0 var(--radius);
}

.poi-card-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.poi-card-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--primary-text);
}

.poi-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    color: #666;
}

/* Info indicators */
.walking-time, .distance, .duration {
    display: flex;
    align-items: center;
    gap: 5px;
}

.walking-time::before {
    content: "";
    width: 14px;
    height: 14px;
    display: inline-block;
    background: url('/assets/img/body.svg') center/contain no-repeat;
}

.distance::before {
    content: "";
    width: 14px;
    height: 14px;
    display: inline-block;
    background: url('/assets/img/dist.svg') center/contain no-repeat;
}

.duration::before {
    content: "";
    width: 14px;
    height: 14px;
    display: inline-block;
    background: url('/assets/img/temp.svg') center/contain no-repeat;
}

.duration {
    display: none;
}

.duration.has-duration {
    display: flex;
}

/* Tags */
.poi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.category-tag, .tag {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.category-tag {
    background-color: #e3f2fd;
    color: #1976d2;
}

.tag {
    background-color: #f5f5f5;
    color: #666;
}

.tag-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
    padding-bottom: 2px;
}

.tag-list-label {
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 600;
    color: #666;
}

.tag-list .tag {
    flex: 0 0 auto;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    padding: var(--spacing);
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background: var(--card-background);
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    border-radius: var(--radius);
    overflow: hidden;
}

.poi-detail-sheet {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 70px);
    position: relative;
}

.poi-detail-sheet-handle {
    display: none;
    border: none;
    background: transparent;
    width: 100%;
    padding: 0;
    cursor: ns-resize;
    position: absolute;
    top: 8px;
    left: 0;
    z-index: 4;
    height: 34px;
}

.poi-detail-sheet-handle-bar {
    display: block;
    width: 56px;
    height: 5px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(35, 35, 35, 0.25);
}

.poi-detail-sheet-handle-arrow {
    display: block;
    font-size: 0.9rem;
    line-height: 1;
    text-align: center;
    color: rgba(35, 35, 35, 0.65);
    margin-top: 2px;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header {
    position: relative;
    height: auto;
    aspect-ratio: 3 / 2;
    max-height: 340px;
}

.guide-segment-header {
    background: #dfe3e8;
}

.guide-segment-map-hero {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.guide-segment-header > *:not(.guide-segment-map-hero):not(.modal-hero-overlay) {
    z-index: 3;
}

.guide-segment-header .modal-hero-overlay {
    z-index: 2;
    background: linear-gradient(to top, rgba(12, 16, 24, 0.86), rgba(12, 16, 24, 0.46) 48%, rgba(12, 16, 24, 0.08));
}

.poi-detail-sheet.guide-flow-fullscreen {
    width: min(96vw, 1200px);
    max-width: 1200px;
    height: 92vh;
    max-height: 92vh;
    margin: 2vh auto;
    border-radius: 18px;
}

.poi-detail-sheet.guide-flow-fullscreen .poi-detail-sheet-handle {
    display: none;
}

.poi-detail-sheet.guide-flow-fullscreen .modal-header {
    height: 340px;
    max-height: 340px;
    aspect-ratio: auto;
}

.poi-detail-sheet.guide-flow-fullscreen.guide-segment-only .modal-header {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
}

.guide-segment-header #modalImage,
.guide-segment-header #modalImageFullscreen {
    display: none !important;
}

.poi-detail-sheet.guide-segment-only .modal-header {
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
}

.poi-detail-sheet.guide-segment-only .modal-body {
    display: none !important;
}

.poi-detail-sheet.guide-intro-only .modal-body {
    display: none !important;
}

.poi-detail-sheet.guide-intro-only .modal-header {
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
}

.poi-detail-sheet.guide-intro-only .modal-hero-overlay {
    z-index: 5;
    padding-bottom: 110px;
}

.poi-detail-sheet.guide-intro-only .guide-flow-nav-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    background: linear-gradient(to top, rgba(12, 16, 24, 0.92), rgba(12, 16, 24, 0.78));
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.poi-detail-sheet.guide-intro-only #guideIntroStartBtn {
    top: 44% !important;
}

.poi-detail-sheet.guide-intro-only .guide-flow-nav-btn {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.38);
    color: #fff;
}

.poi-detail-sheet.guide-intro-only .guide-flow-count {
    color: rgba(255, 255, 255, 0.86);
}

.poi-detail-sheet.guide-intro-only .guide-flow-stop-pin {
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.poi-detail-sheet.guide-intro-only .guide-flow-node-segment span {
    background: rgba(255, 255, 255, 0.58);
}

.poi-detail-sheet.guide-intro-only .guide-flow-node-segment.active span {
    background: #fff;
}

.modal.guide-flow-open .modal-media-prev,
.modal.guide-flow-open .modal-media-next {
    display: none !important;
}

.modal.guide-flow-open .modal-media-prev {
    left: 18px;
}

.modal.guide-flow-open .modal-media-next {
    right: 18px;
}

.guide-flow-nav-bar {
    border-top: 1px solid #e3e6ea;
    background: linear-gradient(to top, rgba(10, 18, 34, 0.95), rgba(15, 24, 43, 0.9));
    padding: 6px 8px 8px;
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    align-items: center;
    gap: 6px;
}

.guide-flow-nav-bar[hidden] {
    display: none !important;
}

.guide-flow-nav-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    font-size: 0;
    color: #fff;
    position: relative;
}

.guide-flow-nav-btn:disabled {
    opacity: 0.38;
}

.guide-flow-timeline {
    min-width: 0;
}

.guide-flow-nav-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.guide-flow-nav-btn#guideFlowPrevBtn::before {
    transform: translate(-35%, -50%) rotate(-135deg);
}

.guide-flow-nav-btn#guideFlowNextBtn::before {
    transform: translate(-65%, -50%) rotate(45deg);
}

.guide-flow-nodes-wrap {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 0 4px;
}

.guide-flow-nodes-wrap::-webkit-scrollbar {
    display: none;
}

.guide-flow-nodes-wrap.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.guide-flow-nodes-wrap::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%);
    pointer-events: none;
}

.guide-flow-nodes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: max-content;
    margin: 0 auto;
    padding: 0 34vw;
    position: relative;
    z-index: 1;
}

.guide-flow-node {
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.guide-flow-node-intro img {
    width: 18px;
    height: 18px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.guide-flow-stop-pin {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding-bottom: 7px;
    background: center / 100% 100% no-repeat url('/assets/img/pin.svg');
    color: #fff;
    font-family: "Winky Rough", cursive;
    font-size: 14px;
    font-weight: 700;
}

.guide-flow-node-segment span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #c7ccd5;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.guide-flow-node.d0 {
    transform: scale(1.32);
}

.guide-flow-node.d1 {
    transform: scale(1.1);
}

.guide-flow-node.d2 {
    transform: scale(0.92);
    opacity: 0.92;
}

.guide-flow-node.d3 {
    transform: scale(0.8);
    opacity: 0.72;
}

.guide-flow-node.active .guide-flow-stop-pin {
    filter: drop-shadow(0 0 10px rgba(77, 156, 255, 0.6)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.guide-flow-node-segment.active span {
    background: #e5e7eb;
}

.guide-flow-node-intro.active img {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.55));
}

.modal-header img.poi-detail-fallback-image {
    background-color: var(--blanc-casse);
    object-fit: contain;
    padding: 24px;
}

.modal-media-nav,
.modal-media-fullscreen {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}

.modal-media-prev {
    left: 10px;
}

.modal-media-next {
    right: 10px;
}

.modal-media-fullscreen {
    top: 14px;
    right: 14px;
    transform: none;
}

.modal-like-button {
    position: absolute;
    top: 14px;
    left: 14px;
    right: auto;
    transform: none;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
}

.modal-like-button img {
    width: 18px;
    height: 18px;
    display: block;
}

.modal-like-menu {
    position: absolute;
    top: 54px;
    left: 14px;
    z-index: 4;
    min-width: 220px;
    max-width: 300px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    color: #fff;
    display: grid;
    gap: 6px;
}

.modal-like-menu[hidden] {
    display: none !important;
}

.modal-like-menu-title {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.82);
}

.modal-like-menu-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 8px;
    padding: 6px 8px;
    text-align: left;
    cursor: pointer;
}

.modal-like-menu-btn.current {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.22);
}

.modal-media-counter {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.85rem;
    z-index: 2;
}

.poi-hover-label {
    background: rgba(21, 21, 21, 0.92);
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    font-weight: 600;
}

.poi-hover-label:before {
    border-top-color: rgba(21, 21, 21, 0.92);
}

.popup-title-btn {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #111;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.modal-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 18px 14px;
    z-index: 2;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.36) 48%, rgba(0, 0, 0, 0));
}

.modal-hero-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.modal-hero-categories .category-tag {
    font-size: 0.76rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 94, 188, 0.92);
    padding: 2px 9px;
}

.modal-hero-title {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    line-height: 1.1;
    text-wrap: balance;
}

.modal-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.92rem;
    font-weight: 500;
}

.modal-hero-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.96;
}

.modal-hero-metric img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
}

.modal-body {
    padding: var(--spacing);
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-body h2 {
    margin-bottom: var(--spacing);
}

.modal-body p {
    margin-bottom: var(--spacing);
    white-space: pre-line;
}

.modal-visit-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 10px;
}

.modal-visited-button {
    border: 1px solid #c8ced8;
    background: #fff;
    color: #3b455a;
    border-radius: 999px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    cursor: pointer;
}

.modal-visited-button.is-visited {
    border-color: #216646;
    color: #216646;
    background: #f3fcf7;
}

.modal-visited-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.visit-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 3400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(19, 24, 31, 0.58);
    padding: 16px;
}

.visit-confirm-modal[hidden] {
    display: none !important;
}

.visit-confirm-card {
    width: min(92vw, 460px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.32);
    border: 1px solid #dfe5ee;
    padding: 18px 18px 14px;
}

.visit-confirm-card h3 {
    margin: 0 0 8px;
    font-size: 1.02rem;
    color: #1e2a3b;
}

.visit-confirm-card p {
    margin: 0;
    color: #334155;
    line-height: 1.45;
}

.visit-confirm-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.visit-confirm-actions button {
    border-radius: 999px;
    padding: 8px 13px;
    border: 1px solid #1f6fff;
    background: #1f6fff;
    color: #fff;
    cursor: pointer;
}

.modal-detail-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 14px;
    overflow-x: auto;
    flex: 0 0 auto;
    min-height: 43px;
}

.modal-detail-tab {
    border: none;
    background: transparent;
    color: #6d6d6d;
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 0.92rem;
    white-space: nowrap;
    line-height: 1;
    position: relative;
}

.modal-detail-tab::after {
    content: attr(data-tab-label);
    display: block;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    font-weight: 700;
}

.modal-detail-tab.active {
    color: #1b3f8d;
    border-bottom-color: #2f67c7;
    font-weight: 700;
}

.modal-detail-panel[hidden] {
    display: none;
}

.modal-detail-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.modal-gallery-item {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.modal-gallery-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.modal-info-content {
    display: grid;
    gap: 8px;
}

.modal-info-row {
    display: grid;
    gap: 3px;
}

.modal-info-label {
    font-size: 0.78rem;
    color: #6d6d6d;
    padding-left: 6px;
}

.modal-info-value {
    color: #202020;
    white-space: pre-line;
}

.modal-empty-state {
    min-height: 170px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #6d6d6d;
}

.poi-admin-form {
    display: grid;
    gap: 14px;
}

.poi-admin-form label {
    display: grid;
    gap: 6px;
    color: #333;
    font-size: 0.88rem;
    font-weight: 600;
}

.poi-admin-form input,
.poi-admin-form select,
.poi-admin-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 400;
    color: #202020;
    background: #fff;
}

.poi-admin-form textarea {
    resize: vertical;
}

.poi-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.poi-admin-media-section {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.poi-admin-media-section h3 {
    margin: 0;
    font-size: 1rem;
    color: #202020;
}

.poi-admin-media-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.poi-admin-media-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.poi-admin-media-preview {
    aspect-ratio: 4 / 3;
    background: #f4f4f4;
}

.poi-admin-media-item.audio .poi-admin-media-preview {
    aspect-ratio: auto;
    padding: 8px;
}

.poi-admin-media-preview img,
.poi-admin-media-preview audio {
    width: 100%;
    display: block;
}

.poi-admin-media-preview img {
    height: 100%;
    object-fit: cover;
}

.poi-admin-media-preview audio {
    height: 36px;
}

.poi-admin-media-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    font-size: 0.84rem;
}

.poi-admin-media-remove {
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 5px !important;
    white-space: nowrap;
    font-weight: 500 !important;
}

.poi-admin-media-remove input {
    width: auto;
}

.poi-admin-audio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.poi-admin-audio-actions button,
.poi-admin-file-action,
.poi-admin-audio-input {
    width: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: #202020;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
}

.poi-admin-file-action {
    display: inline-flex !important;
}

.poi-admin-audio-input {
    display: inline-flex !important;
    align-items: center;
    gap: 8px !important;
}

.poi-admin-audio-input select {
    width: auto;
    min-width: 150px;
    padding: 4px 8px;
}

.poi-admin-file-action input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.poi-admin-audio-actions button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.poi-admin-record-status {
    margin: 0;
    min-height: 18px;
    color: #6d6d6d;
    font-size: 0.9rem;
}

.poi-admin-recorded-list {
    display: grid;
    gap: 8px;
}

.poi-admin-recorded-audio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.poi-admin-recorded-audio audio {
    display: block;
    width: 100%;
}

.poi-admin-recorded-audio button {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    cursor: pointer;
}

.poi-admin-muted,
.poi-admin-feedback {
    margin: 0;
    min-height: 18px;
    color: #6d6d6d;
    font-size: 0.9rem;
}

.poi-admin-feedback {
    color: var(--corail);
}

.poi-admin-actions {
    display: flex;
    justify-content: flex-end;
}

.poi-admin-actions button {
    border: 1px solid var(--bleu-pale);
    border-radius: 8px;
    background: var(--bleu-pale);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
}

audio {
    display: none;
}

.modal-audio-section[hidden] {
    display: none;
}

.modal-audio-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px 0;
}

.modal-audio-nav button {
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
}

.modal-audio-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-audio-section {
    flex: 0 0 auto;
    background: linear-gradient(to top, #fff 80%, rgba(255,255,255,0.92));
    padding-top: 10px;
}

.modal-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eaf0ff;
    border-radius: 14px;
    padding: 8px 10px;
}

.modal-audio-play {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #2f67c7;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.modal-audio-player-main {
    min-width: 0;
    flex: 1 1 auto;
}

.modal-audio-player-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.modal-audio-title {
    color: #2f67c7;
    font-weight: 500;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-audio-duration {
    color: #6a6a6a;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.modal-audio-seek {
    width: 100%;
    margin: 0;
    height: 10px;
    appearance: none;
    background: repeating-linear-gradient(
        to right,
        #2f67c7 0 2px,
        transparent 2px 4px
    );
    border-radius: 999px;
    cursor: pointer;
    outline: none;
}

.modal-audio-seek::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2f67c7;
    border: none;
}

.modal-audio-seek::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2f67c7;
    border: none;
}

.poi-image-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.poi-image-fullscreen[hidden] {
    display: none !important;
}

.poi-image-fullscreen img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
}

.poi-image-fullscreen-close,
.poi-image-fullscreen-nav {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
}

.poi-image-fullscreen-close {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.poi-image-fullscreen-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.6rem;
}

.poi-image-fullscreen-prev {
    left: 16px;
}

.poi-image-fullscreen-next {
    right: 16px;
}

.poi-image-fullscreen-counter {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.95rem;
}


.add-poi-modal-content {
    width: min(92vw, 560px);
    max-width: 560px;
    max-height: calc(100dvh - 32px);
    margin: 16px auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.add-poi-form {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.add-poi-form input,
.add-poi-form textarea,
.add-poi-form button {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.coords-method {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
}

.coords-method label {
    display: block;
}

.coords-method label + label {
    margin-top: 8px;
}

.coords-fields {
    display: grid;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.coords-status {
    min-height: 18px;
    font-size: 0.85rem;
    color: #555;
}

.add-poi-error {
    min-height: 18px;
    color: var(--corail);
    font-size: 0.9rem;
}

.add-poi-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.add-poi-actions button {
    cursor: pointer;
}

.add-poi-actions button[type="submit"] {
    background: var(--bleu-pale);
    color: #fff;
    border-color: var(--bleu-pale);
}

.secondary-button {
    background: #fff;
    color: var(--noir);
}

.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 3600;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(23, 19, 14, 0.56);
    padding: 14px;
}

.feedback-modal[hidden] {
    display: none !important;
}

.feedback-modal-card {
    width: min(1560px, 99vw);
    max-height: calc(100dvh - 12px);
    overflow: auto;
    background: #fffaf5;
    border-radius: 16px;
    border: 1px solid #e5c8b3;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.3);
    padding: 16px;
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.feedback-modal-header h2 {
    color: #8e5632;
    margin: 0;
}

.feedback-close-button {
    border: 1px solid #d1b198;
    background: #fff;
    color: #6f462c;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.feedback-intro {
    margin: 10px 0 14px;
    color: #513725;
    font-size: 0.95rem;
}

.feedback-mobile-tabs {
    display: none;
    gap: 8px;
    margin: 8px 0 12px;
}

.feedback-mobile-tab {
    border: 1px solid #d7b9a1;
    background: #fff;
    color: #7b4f31;
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 700;
}

.feedback-mobile-tab.active {
    background: #D48D5C;
    border-color: #D48D5C;
    color: #fff;
}

.feedback-layout {
    display: grid;
    grid-template-columns: minmax(330px, 0.9fr) minmax(290px, 0.8fr) minmax(560px, 1.55fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
}

.feedback-form {
    background: #fff;
    border: 1px solid #e5d2c4;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.feedback-form label {
    font-size: 0.88rem;
    color: #6f462c;
    font-weight: 600;
}

.feedback-form input,
.feedback-form textarea,
.feedback-form select {
    border: 1px solid #d5bca9;
    border-radius: 8px;
    padding: 10px;
    background: #fffdfb;
    color: #232323;
}

#feedbackMedia::file-selector-button,
#feedbackReplyMedia::file-selector-button {
    border: 1px solid #d2b39b;
    background: #f6e5d8;
    color: #6f462c;
    border-radius: 999px;
    padding: 6px 12px;
    margin-right: 10px;
    cursor: pointer;
}

.feedback-hint {
    margin: -2px 0 0;
    font-size: 0.8rem;
    color: #845d43;
}

.feedback-form-error {
    min-height: 18px;
    color: #b1452f;
    font-size: 0.9rem;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

#feedbackCancelButton,
#feedbackSubmitButton,
.feedback-actions button {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(91, 51, 24, 0.15);
}

#feedbackCancelButton {
    border-color: #d2b39b;
    background: #fff;
    color: #7b4f31;
}

#feedbackSubmitButton {
    background: #D48D5C;
    border-color: #D48D5C;
    color: #fff;
}

.feedback-reply-form .feedback-actions button {
    background: #B1764D;
    border-color: #B1764D;
    color: #fff;
}

.feedback-history {
    background: #fff;
    border: 1px solid #e5d2c4;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 10px;
    min-width: 0;
}

.feedback-thread .feedback-ticket-detail {
    border-top: none;
    padding-top: 0;
}

.feedback-thread-back {
    display: none;
    border: 1px solid #d2b39b;
    background: #fff;
    color: #7b4f31;
    border-radius: 999px;
    padding: 6px 10px;
    justify-self: start;
}

.feedback-history h3 {
    margin: 0;
    color: #8e5632;
}

.feedback-tickets-list {
    display: grid;
    gap: 8px;
    max-height: 220px;
    overflow: auto;
    padding-right: 2px;
}

.feedback-ticket-item {
    border: 1px solid #e6c8b1;
    border-radius: 10px;
    background: #fff8f2;
    padding: 9px;
    cursor: pointer;
}

.feedback-ticket-item.active {
    border-color: #B1764D;
    box-shadow: 0 0 0 1px rgba(177, 118, 77, 0.35);
}

.feedback-ticket-item.has-unread {
    border-color: #b1764d;
    box-shadow: 0 0 0 1px rgba(177, 118, 77, 0.22);
}

.feedback-ticket-item.has-unread .feedback-ticket-subject::after {
    content: "•";
    color: #d48d5c;
    margin-left: 6px;
    font-size: 1.1rem;
}

.feedback-ticket-item-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.feedback-ticket-subject {
    font-weight: 700;
    color: #5c3923;
    font-size: 0.91rem;
}

.feedback-ticket-status {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.76rem;
    border: 1px solid transparent;
    white-space: nowrap;
}

.feedback-status-signale { background: #fff1e6; border-color: #f0c4a8; color: #8d4c29; }
.feedback-status-etudions { background: #fff6de; border-color: #ecd7a0; color: #785b10; }
.feedback-status-resolu { background: #eaf8ef; border-color: #b9dfc4; color: #215f35; }
.feedback-status-plustard { background: #f3edf9; border-color: #d7c4ea; color: #64428f; }

.feedback-ticket-detail {
    border-top: 1px solid #efdfd2;
    padding-top: 10px;
    display: grid;
    gap: 10px;
}

.feedback-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.feedback-attachments a,
.feedback-attachments span {
    border: 1px solid #e6c8b1;
    background: #fff8f2;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.8rem;
    color: #6f462c;
    text-decoration: none;
}

.feedback-attachment-preview {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.feedback-attachment-media {
    width: min(100%, 320px);
    border: 1px solid #e6c8b1;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.feedback-attachment-media img,
.feedback-attachment-media video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    background: #f6efe8;
}

.feedback-empty-detail {
    color: #795a45;
    font-size: 0.9rem;
}

.feedback-conversation {
    display: grid;
    gap: 8px;
    max-height: min(64vh, 760px);
    overflow: auto;
    padding-right: 2px;
}

.feedback-message {
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid #ead4c4;
    background: #fff;
    width: fit-content;
    max-width: min(100%, 92%);
}

.feedback-message-meta {
    display: block;
    margin-bottom: 3px;
    color: #8f6447;
    font-size: 0.76rem;
}

.feedback-message.system {
    background: #fff4eb;
    border-color: #ecc6a8;
}

.feedback-message.from-user {
    background: #f8f3ee;
    border-color: #dfc4b1;
    justify-self: start;
}

.feedback-message.from-team {
    background: #f1f7ff;
    border-color: #c8daef;
    justify-self: end;
}

.feedback-reply-form {
    display: grid;
    gap: 8px;
}

.feedback-reply-form textarea {
    border: 1px solid #d5bca9;
    border-radius: 8px;
    padding: 10px;
    background: #fffdfb;
}

/* Message styles */
.no-pois-message {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

/* Media queries */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .poi-admin-grid,
    .poi-admin-media-list {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 0;
        align-items: flex-end;
        overflow: hidden;
    }

    .poi-detail-sheet {
        width: 100%;
        max-width: 100%;
        margin: auto 0 0 0;
        border-radius: 18px 18px 0 0;
        height: 92dvh;
        max-height: 92dvh;
        transform: translateY(var(--sheet-collapsed-offset, 56dvh));
        transition: transform 0.26s ease;
        will-change: transform;
    }

    .poi-detail-sheet.sheet-collapsed {
        transform: translateY(var(--sheet-collapsed-offset, 56dvh));
    }

    .poi-detail-sheet.sheet-full {
        transform: translateY(0);
    }

    .poi-detail-sheet-handle {
        display: block;
    }

    .poi-detail-sheet-handle-arrow {
        display: none;
    }

    .modal-body {
        max-height: calc(92dvh - 300px);
    }

    .modal-header {
        max-height: 300px;
    }

    .poi-detail-sheet.guide-flow-fullscreen {
        height: 92dvh;
        max-height: 92dvh;
        border-radius: 18px 18px 0 0;
        width: 100%;
        max-width: 100%;
        margin: auto 0 0 0;
        transform: translateY(0);
    }

    .poi-detail-sheet.guide-flow-fullscreen .poi-detail-sheet-handle {
        display: none;
    }

    .poi-detail-sheet.guide-flow-fullscreen .modal-header {
        height: auto;
        max-height: 300px;
        aspect-ratio: 3 / 2;
    }

    .poi-detail-sheet.guide-flow-fullscreen .modal-body {
        max-height: calc(92dvh - 300px);
    }

    .poi-detail-sheet.guide-segment-only .modal-header {
        height: 100% !important;
    }

    .poi-detail-sheet.guide-segment-only .modal-body {
        display: none !important;
    }

    .poi-detail-sheet.guide-flow-fullscreen .modal-hero-title {
        font-size: clamp(2rem, 8vw, 3.2rem);
    }

    .poi-detail-sheet.guide-flow-fullscreen .modal-hero-meta {
        font-size: 1.05rem;
    }

    .modal.guide-flow-open .modal-media-prev {
        left: 10px;
    }

    .modal.guide-flow-open .modal-media-next {
        right: 10px;
    }

    .guide-flow-nav-bar {
        grid-template-columns: 52px 1fr 52px;
        padding: 6px 8px 8px;
    }

    .add-poi-button-desktop {
        display: none;
    }

    .feedback-button span {
        display: none;
    }

    .feedback-button {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        justify-content: center;
        padding: 0;
    }

    .header-content img {
        height: 40px;
    }

    .focus-mode-button {
        padding: 7px 10px;
        font-size: 0.78rem;
    }

    #profileButton {
        width: 40px;
        height: 40px;
    }

    .sidebar {
        width: 100%;
        left: -100%;
        top: auto;
        height: 240px;
        bottom: 0;
    }

    .sidebar.open {
        left: 0;
    }

    .poi-list {
        top: 0;
        height: 100%;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 15px;
        gap: 15px;
    }

    .poi-card {
        display: inline-block;
        width: 300px;
        min-width: 300px;
    }

    .radius-control {
        bottom: 20px;
        left: 20px;
        transform: none;
        width: min(calc(100vw - 110px), 280px);
    }

    .radius-control.sidebar-open {
        left: 20px;
        bottom: 260px;
    }

    .sidebar-toggle {
        bottom: 20px;
        top: auto;
        left: auto;
        right: 20px;
    }

    .leaflet-top .leaflet-control {
        margin-top: calc(var(--header-height) + 24px);
    }

    .add-poi-button-mobile {
        display: inline-flex;
        top: calc(var(--header-height) + 128px);
    }

    .search-input,
    .auth-form input,
    .auth-form button,
    #profilePageLink,
    #logoutButton,
    .auth-tab {
        font-size: 16px;
    }

    .add-poi-modal {
        padding: 10px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .add-poi-modal-content {
        width: 100%;
        max-height: calc(100dvh - 20px);
        margin: 10px auto;
    }

    .add-poi-modal .modal-body {
        padding: 14px;
        overflow-x: hidden;
    }

    .feedback-modal-card {
        width: 100%;
        max-height: calc(100dvh - 12px);
        border-radius: 12px;
        padding: 12px;
    }

    .feedback-layout {
        grid-template-columns: 1fr;
    }

    .feedback-mobile-tabs {
        display: flex;
    }

    .feedback-layout [data-feedback-panel] {
        display: none;
    }

    .feedback-layout.mobile-tab-create [data-feedback-panel="create"],
    .feedback-layout.mobile-tab-history [data-feedback-panel="history"] {
        display: grid;
    }

    .feedback-layout.mobile-thread-open [data-feedback-panel="thread"] {
        display: grid;
        position: absolute;
        inset: 84px 12px 12px 12px;
        background: #fff;
        border: 1px solid #e5d2c4;
        border-radius: 12px;
        padding: 12px;
        z-index: 2;
    }

    .feedback-layout.mobile-thread-open .feedback-thread-back {
        display: inline-flex;
        align-items: center;
    }

    .feedback-tickets-list {
        max-height: 180px;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .landscape-mobile-alert {
        position: fixed;
        inset: 0;
        z-index: 3000;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(35, 35, 35, 0.62);
        padding: 16px;
    }
}

.leaflet-control-zoom {
    box-shadow: none;
    border-radius: 6px;
    overflow: hidden;
}

.leaflet-control-zoom a {
    box-shadow: 0 8px 14px rgba(0,0,0,0.28), 0 16px 28px rgba(0,0,0,0.2) !important;
    position: relative;
    z-index: 1;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
