
/* Bloquer les interactions sur les étiquettes et marqueurs pendant la lecture cinématique */
body.is-timeline-running #labels-container,
body.is-timeline-running #svg-lines-container {
    pointer-events: none !important;
}
body.is-timeline-running .marker-label,
body.is-timeline-running .marker-wrapper {
    pointer-events: none !important;
    cursor: default !important;
}

:root {
    --topbar-bg: rgba(15, 23, 42, 0.85);
    --topbar-border: rgba(13, 229, 214, 0.25);
    --topbar-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(13, 229, 214, 0.08);
    --topbar-accent: #0DE5D6;
    --topbar-accent-hover-bg: rgba(13, 229, 214, 0.15);
    --topbar-accent-border: rgba(13, 229, 214, 0.4);
    --topbar-accent-shadow: rgba(13, 229, 214, 0.25);
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #0f172a;
    font-family: 'Outfit', sans-serif;
    color: white;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* UI overlay */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    box-sizing: border-box;
}

.back-btn {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.4rem;
    padding: 0;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 1000;
}

.back-btn:hover {
    background: #0DE5D6;
    color: #0f172a;
    border-color: #0DE5D6;
}

/* Instructions flottantes */
#instructions {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    transition: 0.3s opacity;
    z-index: 5;
}

/* Drawer Panel */
#drawer-panel {
    position: fixed;
    right: 0;
    top: 60px;
    width: 350px;
    height: calc(100% - 60px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border-left: 1px solid rgba(59, 130, 246, 0.3);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#drawer-panel.collapsed {
    transform: translateX(100%);
    box-shadow: none;
}

/* Bouton de toggle */
.toggle-sidebar-btn {
    position: absolute;
    left: -35px;
    top: calc(50% - 35px);
    width: 35px;
    height: 70px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: 0.3s;
    backdrop-filter: blur(15px);
}

.toggle-sidebar-btn:hover {
    color: white;
    background: rgba(59, 130, 246, 0.2);
}

.toggle-sidebar-btn i {
    transition: transform 0.4s;
    font-style: normal;
    font-weight: bold;
}

#drawer-panel.collapsed .toggle-sidebar-btn i {
    transform: rotate(180deg);
}

.tree-pill-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 20px;
    margin: 5px 25px 15px 25px;
    gap: 2px;
}
.tree-pill-option {
    flex: 1;
    text-align: center;
    padding: 5px 10px;
    border-radius: 18px;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    outline: none;
}
.tree-pill-option.active {
    background: rgba(255, 255, 255, 0.07);
    color: #60a5fa;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.tree-pill-option:not(.active):hover {
    color: rgba(255, 255, 255, 0.85);
}

#drawerExplorer,
/* Drawer Tabs */
.drawer-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0 10px;
    flex-shrink: 0;
}

.drawer-tab {
    flex: 1;
    padding: 12px 5px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-tab img {
    height: 22px;
    width: auto;
    opacity: 0.4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-tab:hover img {
    opacity: 0.8;
    transform: scale(1.1);
}

.drawer-tab.active img {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.6));
}

.drawer-tab .drawer-tab-icon-emoji {
    display: inline-block;
    opacity: 0.4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-tab:hover .drawer-tab-icon-emoji {
    opacity: 0.8;
    transform: scale(1.1);
}

.drawer-tab.active .drawer-tab-icon-emoji {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7));
}

.drawer-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.drawer-tab.active {
    color: #3b82f6;
}

.drawer-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

#drawerExplorer,
#drawerDetails,
#drawerRevisionNotes,
#drawerPoi,
#drawerCamera {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#drawer-panel.tab-explorer #drawerExplorer {
    display: flex;
}

#drawer-panel.tab-details #drawerDetails {
    display: flex;
}

#drawer-panel.tab-revision #drawerRevisionNotes {
    display: flex !important;
}

#drawerRevisionNotes {
    display: none;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#drawer-panel.tab-poi #drawerPoi {
    display: flex;
}

#drawer-panel.tab-camera #drawerCamera {
    display: flex;
}

.drawer-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#drawer-panel .mesh-folder:hover .folder-icon {
    color: #0DE5D6;
}

/* POI Styles */
.drawer-header h2 {
    margin: 0;
    color: #3b82f6;
    font-size: 1.4rem;
}

.drawer-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.4;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.drawer-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    color: #ef4444;
}

#components-sidebar h3 {
    font-size: 0.9rem;
    margin: 0;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
}

.action-link {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 0;
}

.action-link:hover {
    color: #3b82f6;
}

.mesh-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: auto;
    flex-grow: 1;
}

/* Scrollbar Style */
.mesh-list::-webkit-scrollbar,
.drawer-content::-webkit-scrollbar,
#drawer-panel ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.mesh-list::-webkit-scrollbar-track,
.drawer-content::-webkit-scrollbar-track,
#drawer-panel ::-webkit-scrollbar-track {
    background: transparent;
}

.mesh-list::-webkit-scrollbar-thumb,
.drawer-content::-webkit-scrollbar-thumb,
#drawer-panel ::-webkit-scrollbar-thumb {
    background: rgba(13, 229, 214, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.mesh-list::-webkit-scrollbar-thumb:hover,
.drawer-content::-webkit-scrollbar-thumb:hover,
#drawer-panel ::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 229, 214, 0.5);
    background-clip: padding-box;
}

/* Supprimer le carré blanc à l'intersection des scrollbars */
::-webkit-scrollbar-corner {
    background: transparent;
}

.mesh-list-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 15px 15px 15px;
}

.mesh-list-container::before,
.mesh-list-container::after {
    position: absolute;
    bottom: 15px;
    font-size: 9px;
    color: #0DE5D6;
    opacity: 0.4;
    pointer-events: none;
    z-index: 10;
    font-family: serif;
}

.mesh-list-container::before {
    content: "◀";
    left: 6px;
}

.mesh-list-container::after {
    content: "▶";
    right: 6px;
}

.mesh-item {
    padding: 8px 12px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mesh-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

.mesh-item.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #3b82f6;
    font-weight: 600;
}

.mesh-item.is-component {
    border-left: 3px solid #10b981;
}

.drawer-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}


/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.5s opacity;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #0DE5D6;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-bottom: 25px;
    box-shadow: 0 0 30px rgba(13, 229, 214, 0.2);
}

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



/* --- Accordion Styles --- */
ul.accordion {
    list-style: none;
    padding: 0 35px 0 0;
    margin: 0;
}

ul.accordion li.acc-item {
    margin-bottom: 5px;
}

.acc-header {
    display: flex;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
}

.acc-header:hover {
    border-color: #0DE5D6;
}

.acc-btn {
    flex-grow: 1;
    background: none;
    border: none;
    color: white;
    padding: 10px;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    white-space: nowrap;
}

.acc-btn:hover {
    color: #0DE5D6;
}

.acc-btn.active {
    font-weight: 600;
    background: rgba(13, 229, 214, 0.1);
    color: #0DE5D6;
}

.acc-toggle {
    padding: 10px 15px;
    cursor: pointer;
    color: white;
    opacity: 0.5;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.1);
    font-size: 0.7rem;
}

.acc-toggle:hover {
    opacity: 1;
    color: #0DE5D6;
    background: rgba(0, 0, 0, 0.3);
}

.acc-children {
    list-style: none;
    padding-left: 28px;
    margin: 5px 0 0 0;
    border-left: 1px dashed rgba(13, 229, 214, 0.3);
}

.child-btn {
    font-size: 0.8rem;
    padding: 8px 10px 8px 5px;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0.8;
}

.hierarchy-arrow {
    color: #0DE5D6;
    font-weight: bold;
    position: absolute;
    left: -28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
}

.child-btn:hover {
    opacity: 1;
}

/* --- Fin Accordion --- */

/* --- Items Stats Bar (compteurs docs/POI/redirects) --- */
.items-stats-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    align-items: center;
}
.stat-filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #a1a1aa;
    transition: all 0.2s;
}
.stat-filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.stat-filter-btn.active {
    background: rgba(13, 229, 214, 0.15);
    border: 1px solid rgba(13, 229, 214, 0.4);
    color: #0DE5D6;
}
.item-stat-badge {
    float: right;
    margin-left: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 4px;
    border-radius: 4px;
}
/* --- Fin Items Stats Bar --- */

/* Styles pour la hiérarchie 3D */
.mesh-folder {
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
    position: relative;
    padding-right: 35px;
    box-sizing: border-box;
}

.mesh-folder:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #0DE5D6;
}

.mesh-folder .folder-icon {
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.mesh-folder.open .folder-icon {
    transform: rotate(90deg);
}

.mesh-node-item {
    list-style: none;
    margin: 2px 0;
}

.mesh-children-list {
    margin-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 5px;
    display: none;
}

.mesh-folder.open+.mesh-children-list {
    display: block;
}

.mesh-leaf {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.2s;
    margin-left: 10px;
    white-space: nowrap;
    width: max-content;
    min-width: calc(100% - 10px);
    position: relative;
    padding-right: 35px;
    box-sizing: border-box;
}

/* --- Recherche Explorateur --- */
.search-container {
    padding: 5px 25px 15px 25px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    font-style: normal;
}

.explorer-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 12px 10px 35px;
    color: white;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.explorer-search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.explorer-search::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.mesh-leaf:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.mesh-leaf.active {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    font-weight: bold;
}

.mesh-leaf.hovered {
    background: rgba(13, 229, 214, 0.15) !important;
    color: #0DE5D6 !important;
}

.mesh-leaf.is-filtered-docs {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf.is-filtered-images {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf.is-filtered-videos {
    color: #2563eb !important;
    background: rgba(37, 99, 235, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf.is-filtered-audios {
    color: #ec4899 !important;
    background: rgba(236, 72, 153, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf.is-filtered-print3d {
    color: #e91e63 !important;
    background: rgba(233, 30, 99, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf.is-filtered-biblio {
    color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf.is-filtered-divers {
    color: #64748b !important;
    background: rgba(100, 116, 139, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf.is-filtered-threesixty {
    color: #e009f6 !important;
    background: rgba(224, 9, 246, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf.is-filtered-tech {
    color: #0DE5D6 !important;
    background: rgba(13, 229, 214, 0.1) !important;
    font-weight: 600;
}

.mesh-leaf:hover .isolate-btn,
.mesh-folder:hover .isolate-btn {
    opacity: 1;
}

.isolate-btn {
    position: sticky;
    right: 5px;
    margin-left: auto;
    width: 24px;
    height: 24px;
    background: #0f172a;
    border: 1px solid rgba(13, 229, 214, 0.2);
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0;
    border-radius: 6px;
    color: #0DE5D6;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    z-index: 5;
}

.visibility-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.3;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-right: 2px;
    color: #94a3b8;
    flex-shrink: 0;
}

.mesh-leaf:hover .visibility-btn,
.mesh-folder:hover .visibility-btn {
    opacity: 0.7;
}

.visibility-btn:hover {
    transform: scale(1.2);
    color: #0DE5D6;
    opacity: 1 !important;
}

.visibility-btn.hidden-node {
    opacity: 1 !important;
    color: #ef4444;
}

.isolate-btn:hover {
    background: #0DE5D6;
    color: #0f172a;
    transform: scale(1.1);
}

.action-link.danger {
    color: #f87171;
}

.is-isolated {
    background: rgba(16, 185, 129, 0.2) !important;
    border: 1px solid #10b981 !important;
    color: #10b981 !important;
    font-weight: 600;
}

.is-isolated .isolate-btn {
    background: #10b981 !important;
    color: #0f172a !important;
    border-color: #10b981 !important;
    opacity: 1 !important;
}

/* --- Nouveau design Premium Bleu --- */
#drawerDetails {
    color: #e2e8f0;
}

.details-tag {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.details-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.details-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
}

.premium-card {
    background: rgba(30, 41, 59, 0.5);
    border-left: 3px solid #3b82f6;
    border-radius: 4px 12px 12px 4px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
}

.card-header-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.core-data-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #3b82f6;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.inner-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inner-title::before {
    content: "//";
    color: #3b82f6;
}

.inner-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 25px;
    font-weight: 300;
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tech-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    padding: 10px 0;
}

.tech-label {
    width: 120px;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.tech-value {
    font-size: 0.82rem;
    color: #f8fafc;
    line-height: 1.4;
    font-weight: 500;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0 20px 0;
}

.section-divider span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.section-divider::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.doc-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px 0 15px 5px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.doc-category-header:hover {
    opacity: 0.8;
    transform: translateX(3px);
}

.doc-category-header .cat-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #3b82f6;
    margin-left: auto;
    margin-right: 15px;
    opacity: 0.8;
}

.doc-category-header.collapsed .cat-arrow {
    transform: rotate(-90deg);
}

.doc-category-content {
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
    max-height: 2000px;
    /* Large enough for content */
    opacity: 1;
}

.doc-category-header.collapsed+.doc-category-content {
    max-height: 0 !important;
    opacity: 0;
}

.doc-category-header span.cat-icon {
    font-size: 1rem;
    opacity: 0.9;
}

.doc-category-header span.cat-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.cat-count,
.filter-count {
    color: #7dd3fc;
    /* Bleu ciel */
    font-weight: 800;
    margin-left: 6px;
    font-size: 0.75rem;
    opacity: 1 !important;
    text-shadow: 0 0 10px rgba(125, 211, 252, 0.3);
}

.sidebar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-link {
    font-size: 0.65rem;
    color: #60a5fa;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    transition: 0.2s;
    white-space: nowrap;
}

.action-link:hover {
    opacity: 1;
}

.doc-category-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(148, 163, 184, 0.2), transparent);
}

.doc-item-premium {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.doc-item-premium:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.doc-icon-box {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.doc-text-box {
    flex-grow: 1;
    min-width: 0;
}

.doc-premium-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-premium-subtitle {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-view-icon {
    opacity: 0.3;
    transition: 0.2s;
    font-size: 0.9rem;
}

.doc-item-premium:hover .doc-view-icon {
    opacity: 1;
    color: #3b82f6;
}

/* Empty State 3D */
.no-3d-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #0f172a, #1a2336);
    z-index: 50;
    text-align: center;
    padding: 40px;
}

.no-3d-overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #f8fafc;
}

.no-3d-overlay p {
    max-width: 400px;
    opacity: 0.6;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* POI Styles */
.marker-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1000;
}

.marker-label {
    position: relative;
    background: #0f172a;
    border: 1px solid #334155;
    color: #0de5d6;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    user-select: none;
    transition: border-color 0.2s, background 0.2s, opacity 0.3s;
}

.marker-label:not(.is-selected):hover {
    background: #1e293b;
    border-color: #0de5d6;
}

.poi-rich-content {
    display: none;
    width: 100%;
    margin-top: 8px;
    border-top: 1px solid #334155;
    padding-top: 8px;
}

.marker-label.is-selected:not(.marker-camera),
.marker-label:not(.marker-camera):hover {
    background: #0f172a;
    border-color: #0de5d6;
    z-index: 2000;
    width: auto;
    min-width: 120px;
    max-width: 240px;
    white-space: normal;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.marker-label.marker-camera:hover {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    transform: scale(1.15);
    background: rgba(168, 85, 247, 0.9) !important;
    border-color: #c084fc !important;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.6) !important;
    z-index: 2000;
}

.marker-label.is-selected .poi-rich-content,
.marker-label:hover .poi-rich-content {
    display: block;
}

/* POI d'étape de parcours / caméra : toujours développé avec description lisible */

body:not(.is-timeline-running) .marker-label.marker-step-poi:hover .poi-rich-content,
.marker-label.marker-step-poi.is-hover-expanded .poi-rich-content {
    display: block !important;
}

.marker-label.marker-step-poi {
    white-space: normal !important;
    width: auto !important;
    min-width: 140px !important;
    max-width: 260px !important;
    padding: 9px 12px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    border-width: 1.5px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
}

.marker-label.marker-step-poi .poi-rich-content {
    display: none;
    margin-top: 6px !important;
    padding-top: 6px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.marker-label.marker-step-poi .poi-description-preview {
    font-size: 0.74rem !important;
    color: #cbd5e1 !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    margin-bottom: 0 !important;
    word-break: break-word !important;
}

/* Header styling inside label */
.poi-header {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.poi-icon-badge {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.poi-title-text {
    font-weight: 500;
    font-size: 0.85rem;
    color: inherit;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Description preview inside expanded POI */
.poi-description-preview {
    font-size: 0.72rem;
    color: #cbd5e1;
    white-space: normal;
    line-height: 1.45;
    margin-bottom: 8px;
}

.poi-rich-content > *:last-child {
    margin-bottom: 0;
}

/* Image preview styling */
.poi-image-container {
    width: 216px;
    max-width: 100%;
    height: 110px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #334155;
    background: #1e293b;
}

.poi-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badges layout & styling */
.poi-meta-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
}

.poi-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 400;
}

.poi-meta-icon {
    font-size: 0.75rem;
}

/* Masquer les autres labels quand un POI est sélectionné pour éviter les superpositions */
#labels-container.has-selection .marker-label:not(.is-selected) {
    opacity: 0.75;
    pointer-events: none;
    filter: blur(1px);
}

/* Couleurs dynamiques pour les labels selon le statut */
.marker-label.blue {
    border-color: rgba(59, 130, 246, 0.5);
    color: #3b82f6;
}
.marker-label.blue:not(.is-selected):hover {
    background: #1e293b;
    border-color: #3b82f6;
}
.marker-label.blue.is-selected {
    border-color: #3b82f6;
}

.marker-label.green {
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
}
.marker-label.green:not(.is-selected):hover {
    background: #1e293b;
    border-color: #22c55e;
}
.marker-label.green.is-selected {
    border-color: #22c55e;
}

.marker-label.orange {
    border-color: rgba(249, 115, 22, 0.5);
    color: #f97316;
}
.marker-label.orange:not(.is-selected):hover {
    background: #1e293b;
    border-color: #f97316;
}
.marker-label.orange.is-selected {
    border-color: #f97316;
}

.marker-label.red {
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}
.marker-label.red:not(.is-selected):hover {
    background: #1e293b;
    border-color: #ef4444;
}
.marker-label.red.is-selected {
    border-color: #ef4444;
}

.marker-label.purple {
    border-color: rgba(168, 85, 247, 0.5);
    color: #a855f7;
}
.marker-label.purple:not(.is-selected):hover {
    background: #1e293b;
    border-color: #a855f7;
}
.marker-label.purple.is-selected {
    border-color: #a855f7;
}

.marker-label.pink {
    border-color: rgba(236, 72, 153, 0.5);
    color: #ec4899;
}
.marker-label.pink:not(.is-selected):hover {
    background: #1e293b;
    border-color: #ec4899;
}
.marker-label.pink.is-selected {
    border-color: #ec4899;
}

.marker-label.yellow {
    border-color: rgba(234, 179, 8, 0.5);
    color: #eab308;
}
.marker-label.yellow:not(.is-selected):hover {
    background: #1e293b;
    border-color: #eab308;
}
.marker-label.yellow.is-selected {
    border-color: #eab308;
}

.marker-label.cyan {
    border-color: rgba(6, 182, 212, 0.5);
    color: #06b6d4;
}
.marker-label.cyan:not(.is-selected):hover {
    background: #1e293b;
    border-color: #06b6d4;
}
.marker-label.cyan.is-selected {
    border-color: #06b6d4;
}

.marker-label.gray {
    border-color: rgba(148, 163, 184, 0.5);
    color: #94a3b8;
}
.marker-label.gray:not(.is-selected):hover {
    background: #1e293b;
    border-color: #94a3b8;
}
.marker-label.gray.is-selected {
    border-color: #94a3b8;
}

.marker-label.white {
    border-color: rgba(248, 250, 252, 0.5);
    color: #f8fafc;
}
.marker-label.white:not(.is-selected):hover {
    background: #1e293b;
    border-color: #f8fafc;
}
.marker-label.white.is-selected {
    border-color: #f8fafc;
}

.marker-line.blue {
    stroke: rgba(59, 130, 246, 0.4);
}

.marker-line.green {
    stroke: rgba(34, 197, 94, 0.4);
}

.marker-line.orange {
    stroke: rgba(249, 115, 22, 0.4);
}

.marker-line.red {
    stroke: rgba(239, 68, 68, 0.4);
}

.marker-line.purple {
    stroke: rgba(168, 85, 247, 0.4);
}

.marker-line.pink {
    stroke: rgba(236, 72, 153, 0.4);
}

.marker-line.yellow {
    stroke: rgba(234, 179, 8, 0.4);
}

.marker-line.cyan {
    stroke: rgba(6, 182, 212, 0.4);
}

.marker-line.gray {
    stroke: rgba(148, 163, 184, 0.4);
}

.marker-line.white {
    stroke: rgba(248, 250, 252, 0.4);
}

.marker-line {
    stroke: rgba(13, 229, 214, 0.4);
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 4;
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -1000;
    }
}

/* Redirect POI label style */
.marker-label.redirect-poi {
    border-color: rgba(168, 85, 247, 0.5);
    color: #c084fc;
}
.marker-label.redirect-poi:not(.is-selected):hover {
    background: #1e293b;
    border-color: #c084fc;
}
.marker-label.redirect-poi.is-selected {
    border-color: #c084fc;
}
.marker-line.redirect-line {
    stroke: rgba(168, 85, 247, 0.5);
    stroke-dasharray: 6 3;
}

#ar-qr-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(15px);
    padding: 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

#ar-qr-container:hover {
    transform: translateY(-5px);
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
}

.qr-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qr-code-el {
    width: 100px;
    height: 100px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    /* Pour le logo au centre */
}

.qr-logo {
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    padding: 2px;
    border-radius: 6px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.qr-code-el canvas,
.qr-code-el img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.qr-label-small {
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ar-qr-container span.main-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.qr-box {
    cursor: pointer;
    transition: transform 0.2s;
}

#qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto !important;
}

#qr-modal.active {
    display: flex;
    opacity: 1;
}

.qr-modal-content {
    background: white;
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#qr-modal.active .qr-modal-content {
    transform: scale(1);
}

#qr-enlarged-container {
    width: 400px;
    height: 400px;
    position: relative;
}

#qr-enlarged-container canvas,
#qr-enlarged-container img:not(.qr-logo) {
    width: 100% !important;
    height: 100% !important;
}

.qr-modal-label {
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.qr-modal-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: 0.3s;
}

.qr-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.download-qr-btn {
    background: #0f172a;
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 12px 30px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.download-qr-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.download-qr-btn svg {
    transition: transform 0.3s ease;
}

.download-qr-btn:hover svg {
    transform: translateY(2px);
}

.qr-box:hover {
    transform: scale(1.05);
}

#filter-wrapper {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    pointer-events: none;
}

#filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 460px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(15px);
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    /* Fallback generic */
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* LCC Quality buttons styling */
.lcc-quality-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.lcc-quality-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.lcc-quality-btn.active {
    background: rgba(13, 229, 214, 0.2);
    border-color: #0DE5D6;
    color: white;
    box-shadow: 0 0 15px rgba(13, 229, 214, 0.25);
}

/* Specific active colors from backoffice */
.filter-btn.filter-docs.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.filter-btn.filter-images.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.filter-btn.filter-videos.active {
    background: rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
    color: #2563eb;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

.filter-btn.filter-audios.active {
    background: rgba(236, 72, 153, 0.2);
    border-color: #ec4899;
    color: #ec4899;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.3);
}

.filter-btn.filter-print3d.active {
    background: rgba(233, 30, 99, 0.2);
    border-color: #e91e63;
    color: #e91e63;
    box-shadow: 0 0 15px rgba(233, 30, 99, 0.3);
}

.filter-btn.filter-biblio.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: #8b5cf6;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.filter-btn.filter-divers.active {
    background: rgba(100, 116, 139, 0.2);
    border-color: #64748b;
    color: #64748b;
    box-shadow: 0 0 15px rgba(100, 116, 139, 0.3);
}

.filter-btn.filter-threesixty.active {
    background: rgba(224, 9, 246, 0.2);
    border-color: #e009f6;
    color: #e009f6;
    box-shadow: 0 0 15px rgba(224, 9, 246, 0.3);
}

.filter-btn.filter-tech.active {
    background: rgba(13, 229, 214, 0.2);
    border-color: #0DE5D6;
    color: #0DE5D6;
    box-shadow: 0 0 15px rgba(13, 229, 214, 0.3);
}

.filter-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.8);
    pointer-events: none;
}

.filter-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    margin-bottom: 5px;
}

.hidden {
    display: none !important;
}

.qr-btn-direct {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0DE5D6, #00a3ff);
    color: #0f172a;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.qr-btn-direct:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 229, 214, 0.4);
}

.qr-btn-direct.disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

#qr-mobile-warning {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 10px;
    display: none;
}

/* --- Nouvelles classes pour nettoyer l'HTML --- */
#top-ui-group {
    position: fixed !important;
    top: 75px;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    width: max-content !important;
}

.top-center-pill {
    border: 1px solid rgba(13, 229, 214, 0.3);
    color: #0DE5D6;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    padding: 10px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    margin: 0;
    /* On force la position relative pour rester dans le flux flex de #top-ui-group */
    position: relative;
    top: auto;
    left: auto;
    transform: none;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0DE5D6;
    box-shadow: 0 0 10px #0DE5D6;
}

/* --- Responsivité --- */
@media (max-width: 1024px) {
    #drawer-panel {
        width: 300px;
    }
}

/* Transition properties on key UI elements */
.back-btn, #view-helper-container {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Volet gauche (Left Drawer) */
.left-drawer {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 320px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(13, 229, 214, 0.2);
    z-index: 1000;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.left-drawer.collapsed {
    transform: translateX(-100%);
    box-shadow: none;
}

/* Bouton toggle pour le left drawer */
.left-drawer .toggle-sidebar-btn {
    position: absolute;
    right: -35px;
    left: auto !important;
    top: calc(50% - 30px);
    width: 35px;
    height: 60px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(13, 229, 214, 0.2);
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: #0DE5D6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1001;
    backdrop-filter: blur(20px);
    pointer-events: auto;
}

.left-drawer .toggle-sidebar-btn:hover {
    background: rgba(13, 229, 214, 0.15);
    color: white;
    box-shadow: 5px 0 15px rgba(13, 229, 214, 0.3);
    border-color: rgba(13, 229, 214, 0.5);
}

.left-drawer .toggle-sidebar-btn i {
    transition: transform 0.4s;
    font-style: normal;
    font-weight: bold;
    font-size: 1.2rem;
}

.left-drawer.collapsed .toggle-sidebar-btn i {
    transform: rotate(180deg);
}

/* Dynamic shift for the back button */
body:has(#leftDrawer:not(.collapsed)) .back-btn {
    left: 350px !important;
}

/* Overrides for filter elements inside the Left Drawer */
.left-drawer #filter-wrapper {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    pointer-events: auto !important;
    margin-top: 15px !important;
    display: flex !important;
    align-items: flex-start !important;
}

.left-drawer #filter-bar {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.left-drawer #filter-bar .filter-tech {
    grid-column: span 2 !important;
}

.left-drawer .filter-btn {
    width: 100% !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    font-size: 0.75rem !important;
}

.left-drawer .filter-label {
    display: none !important; /* Non requis car il y a un titre d'onglet */
}

/* Overrides for QR codes container inside the Left Drawer */
.left-drawer #ar-qr-container {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    pointer-events: auto !important;
    margin-top: 25px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}

.left-drawer #ar-qr-container .qr-wrapper {
    width: 100% !important;
    justify-content: center !important;
}

.ar-btn-mobile {
    display: none !important;
}

.left-drawer #ar-qr-container .ar-btn-mobile {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.views-grid {
    margin-top: 10px;
}

.recenter-btn {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
}

.recenter-btn:hover {
    background: rgba(13, 229, 214, 0.2);
    border-color: rgba(13, 229, 214, 0.5);
    color: #0DE5D6;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(13, 229, 214, 0.2);
}

.recenter-btn i {
    font-size: 0.8rem;
    transition: transform 0.5s;
}

.recenter-btn:hover i {
    transform: rotate(-180deg);
}

@media (max-width: 768px) {
    #ui-overlay {
        padding: 15px;
    }

    .back-btn {
        top: 20px !important;
        left: 20px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 1.4rem;
    }

    .left-drawer {
        width: 85% !important;
        max-width: 320px !important;
    }

    body:has(#leftDrawer:not(.collapsed)) .back-btn {
        left: calc(85% + 15px) !important;
    }

    #drawer-panel {
        width: 85%;
        max-width: 320px;
    }

    #top-ui-group {
        top: 75px;
    }

    #instructions {
        display: none;
    }
}

@media (max-width: 600px) {
    #ar-qr-container {
        position: fixed !important;
        left: 50% !important;
        bottom: 110px !important;
        transform: translateX(-50%) !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        display: flex !important;
        justify-content: center !important;
        pointer-events: none !important;
        width: max-content !important;
        padding: 0 !important;
    }

    #ar-qr-container .qr-wrapper,
    #ar-qr-container .main-label {
        display: none !important;
    }

    #ar-qr-container .ar-btn-mobile {
        display: flex !important;
        background: linear-gradient(135deg, #0DE5D6, #00a3ff);
        padding: 12px 35px;
        border-radius: 50px;
        pointer-events: auto !important;
        box-shadow: 0 10px 25px rgba(13, 229, 214, 0.4);
        align-items: center;
        gap: 8px;
        color: #0f172a;
        font-weight: 800;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    #filter-wrapper {
        bottom: 15px;
    }

    #filter-bar {
        width: 95%;
        max-width: 95%;
        padding: 10px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .filter-label {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        margin-bottom: 5px;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .top-center-pill span:last-child {
        display: none;
    }

    .top-center-pill {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
}

/* Overlay Orientation Mobile */
#orientation-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #0f172a !important;
    z-index: 2147483647 !important;
    display: none;
    /* Changé dynamiquement par media query */
    grid-template-columns: 1fr;
    place-items: center;
    text-align: center;
    color: white;
    padding: 40px;
    box-sizing: border-box;
    pointer-events: auto !important;
}

html.is-iframe #orientation-overlay {
    display: none !important;
}

@media screen and (orientation: landscape) and (max-height: 600px) {
    #orientation-overlay {
        display: grid !important;
    }
}

.rotate-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: rotateDevice 2s infinite ease-in-out;
}

@keyframes rotateDevice {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
    background-color: #0DE5D6;
    border-color: #0bc4b8;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* ==========================================================================
   ESPACE COMMENTAIRES / NOTES (PUBLIC VIEWER)
   ========================================================================== */
.comments-section {
    margin-top: 15px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-trigger-container {
    width: 100%;
}

.btn-open-add-comment {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px dashed rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-open-add-comment:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #93c5fd;
    transform: translateY(-1px);
}

.comment-form-container {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 14px 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.2s ease;
}

.comment-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-form-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.comment-form-close {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.comment-form-close:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

.comment-textarea-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.comment-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px 26px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.comment-textarea:focus {
    border-color: #3b82f6;
}

.comment-char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.72rem;
    color: #64748b;
    font-family: monospace;
    pointer-events: none;
}

.comment-char-counter.warning {
    color: #f59e0b;
}

.comment-char-counter.max {
    color: #ef4444;
    font-weight: bold;
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-comment-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 7px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-comment-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.btn-comment-submit {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-comment-submit:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}

.btn-comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* --- Cartes Commentaires --- */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-empty-state {
    text-align: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #64748b;
    font-size: 0.82rem;
    font-style: italic;
}

.comment-card {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.comment-card:hover {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(59, 130, 246, 0.25);
}

.comment-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-author-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0DE5D6, #3b82f6);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
}

.comment-author-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f1f5f9;
}

.comment-date {
    font-size: 0.7rem;
    color: #64748b;
}

.comment-updated-badge {
    font-size: 0.68rem;
    color: #64748b;
    font-style: italic;
}

.comment-actions-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.2s;
    line-height: 1;
}

.comment-card:hover .comment-action-btn {
    opacity: 1;
}

.comment-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.comment-action-btn.delete:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
}

.comment-body {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #cbd5e1;
    word-break: break-word;
    white-space: pre-wrap;
    padding-left: 2px;
}


/* ==========================================================================
   NOTES DE RÉVISION (SUGGESTIONS 3D STYLE GOOGLE DOCS)
   ========================================================================== */
.revision-notes-section {
    margin-top: 15px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.revision-note-trigger-container {
    width: 100%;
}

.btn-open-add-revision-note {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(234, 179, 8, 0.12);
    border: 1px dashed rgba(234, 179, 8, 0.45);
    color: #facc15;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-open-add-revision-note:hover {
    background: rgba(234, 179, 8, 0.22);
    border-color: #f59e0b;
    color: #fef08a;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.2);
}

.btn-open-add-revision-note:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px dashed rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.45) !important;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: auto !important;
}

.btn-open-add-revision-note:disabled:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.45) !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-open-add-revision-note:disabled .revision-note-btn-icon {
    opacity: 0.4;
    filter: grayscale(1);
}

.revision-note-form-container {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 12px;
    padding: 14px 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    animation: fadeIn 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.revision-note-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.revision-note-form-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #facc15;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.revision-note-form-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.revision-note-form-close:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

.revision-note-textarea {
    width: 100%;
    min-height: 85px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px 26px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.revision-note-textarea:focus {
    border-color: #facc15;
}

.revision-note-char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.72rem;
    color: #64748b;
    font-family: monospace;
    pointer-events: none;
}

.revision-note-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.btn-revision-note-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 7px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-revision-note-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.btn-revision-note-submit {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    border: none;
    color: #1e1b4b;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.35);
}

.btn-revision-note-submit:hover {
    background: linear-gradient(135deg, #facc15, #d97706);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.45);
}

.btn-revision-note-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.rev-target-badge {
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    margin-top: 2px;
}

.rev-target-badge strong {
    color: #93c5fd;
    font-weight: 600;
}

.rev-target-badge .rev-target-item strong {
    color: #fde68a;
}

.rev-target-badge .rev-target-sep {
    opacity: 0.45;
    font-weight: 700;
    margin: 0 1px;
    user-select: none;
}

.revision-filter-pills {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.rev-filter-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rev-filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.rev-filter-pill.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fde68a;
    font-weight: 600;
}

.rev-filter-pill .rev-count-badge {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.68rem;
}

.rev-filter-pill.active .rev-count-badge {
    background: #f59e0b;
    color: #0f172a;
    font-weight: 700;
}

.revision-notes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.revision-note-empty-state {
    text-align: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: #64748b;
    font-size: 0.82rem;
    font-style: italic;
}

.revision-note-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    user-select: none;
}

.revision-note-card:hover {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(234, 179, 8, 0.4);
}

.revision-note-card.is-expanded {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(234, 179, 8, 0.4);
    padding: 12px 14px;
    gap: 8px;
    user-select: text;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.revision-note-card.pending {
    border-left: 3px solid #f59e0b;
}

.revision-note-card.approved {
    border-left: 3px solid #22c55e;
}

.revision-note-card.rejected {
    border-left: 3px solid #ef4444;
}

.revision-note-card.is-active {
    border-color: #facc15 !important;
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.25);
}

.revision-note-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.revision-note-status.pending {
    background: rgba(234, 179, 8, 0.15);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.revision-note-status.approved {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.revision-note-status.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.revision-note-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #1e1b4b;
    font-weight: 700;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


/* --- RÉPONSE / JUSTIFICATION ADMIN SUR LES NOTES DE RÉVISION (VIEWER) --- */
.revision-admin-reply {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.revision-admin-reply.approved {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-left: 3px solid #22c55e;
}

.revision-admin-reply.rejected {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 3px solid #ef4444;
}

.revision-admin-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.revision-admin-reply-title {
    font-size: 0.75rem;
    font-weight: 600;
}

.revision-admin-reply.approved .revision-admin-reply-title {
    color: #86efac;
}

.revision-admin-reply.rejected .revision-admin-reply-title {
    color: #fca5a5;
}

.revision-admin-reply-date {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
}

.revision-admin-reply-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    word-break: break-word;
}

.revision-admin-reply-empty {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
}

/* --- BOUTON D'ACQUITTEMENT / FERMETURE DE NOTE (VIEWER) --- */
.revision-acknowledge-bar {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.btn-revision-acknowledge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    font-size: 0.76rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-revision-acknowledge:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.55);
    color: #93c5fd;
    transform: translateY(-1px);
}

.btn-revision-acknowledge:active {
    transform: translateY(0);
}

/* --- PIÈCES JOINTES DANS LES NOTES DE RÉVISION (VIEWER) --- */
.btn-revision-attach {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-revision-attach:hover {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.45);
    color: #facc15;
    transform: translateY(-1px);
}

.btn-revision-attach-plus {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    color: #facc15;
}

.revision-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 8px;
    font-size: 0.76rem;
    color: #f8fafc;
    max-width: 100%;
}

.revision-file-name {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: #fef08a;
}

.revision-file-size {
    font-size: 0.68rem;
    color: #94a3b8;
}

.btn-remove-attachment {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 1px 4px;
    margin-left: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-remove-attachment:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.revision-note-attachment-chip {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 0.75rem;
    max-width: 100%;
    transition: all 0.2s ease;
}

.revision-note-attachment-chip:hover {
    border-color: rgba(234, 179, 8, 0.4);
    background: rgba(15, 23, 42, 0.75);
}

.revision-note-attachment-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.revision-note-attachment-name {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.revision-note-attachment-name:hover {
    text-decoration: underline;
    color: #7dd3fc;
}

.revision-note-attachment-size {
    font-size: 0.68rem;
    color: #94a3b8;
}

/* --- CATÉGORIES DE NOTES DE RÉVISION (VIEWER) --- */
.rev-category-step {
    margin-bottom: 12px;
}

.rev-category-selector-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rev-category-choice-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    color: #e2e8f0;
}

.rev-category-choice-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.rev-cat-choice-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.rev-cat-choice-icon-wrap.cat-doc {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.rev-cat-choice-icon-wrap.cat-info_request {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.rev-cat-choice-icon-wrap.cat-info_add {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.rev-cat-choice-icon-wrap.cat-other {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.rev-cat-choice-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.rev-cat-choice-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.2;
}

.rev-cat-choice-sub {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.25;
}

.rev-category-choice-btn[data-category="doc"].active {
    background: rgba(16, 185, 129, 0.14);
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}
.rev-category-choice-btn[data-category="doc"].active .rev-cat-choice-title {
    color: #34d399;
}
.rev-category-choice-btn[data-category="doc"].active .rev-cat-choice-icon-wrap {
    background: #10b981;
    color: #022c22;
    border-color: #34d399;
}

.rev-category-choice-btn[data-category="info_request"].active {
    background: rgba(59, 130, 246, 0.14);
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}
.rev-category-choice-btn[data-category="info_request"].active .rev-cat-choice-title {
    color: #60a5fa;
}
.rev-category-choice-btn[data-category="info_request"].active .rev-cat-choice-icon-wrap {
    background: #3b82f6;
    color: #082f49;
    border-color: #60a5fa;
}

.rev-category-choice-btn[data-category="info_add"].active {
    background: rgba(168, 85, 247, 0.14);
    border-color: #a855f7;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}
.rev-category-choice-btn[data-category="info_add"].active .rev-cat-choice-title {
    color: #c084fc;
}
.rev-category-choice-btn[data-category="info_add"].active .rev-cat-choice-icon-wrap {
    background: #a855f7;
    color: #3b0764;
    border-color: #c084fc;
}

.rev-category-choice-btn[data-category="other"].active {
    background: rgba(245, 158, 11, 0.14);
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}
.rev-category-choice-btn[data-category="other"].active .rev-cat-choice-title {
    color: #fbbf24;
}
.rev-category-choice-btn[data-category="other"].active .rev-cat-choice-icon-wrap {
    background: #f59e0b;
    color: #451a03;
    border-color: #fbbf24;
}

/* Résumé compact de la catégorie sélectionnée (Formulaire replié) */
.rev-cat-selected-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.rev-cat-selected-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.rev-cat-selected-label-prefix {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.rev-cat-selected-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
}

.rev-cat-selected-icon.cat-doc {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.rev-cat-selected-icon.cat-info_request {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.rev-cat-selected-icon.cat-info_add {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.rev-cat-selected-icon.cat-other {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

.rev-cat-selected-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.25;
    word-break: break-word;
}

.btn-change-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #93c5fd;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-family: inherit;
}

.btn-change-category:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Encadré d'affichage de la cible dans le formulaire de création */
.revision-form-target-box {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.rev-form-target-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.rev-form-target-path {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    flex-wrap: wrap;
    line-height: 1.35;
    color: #e2e8f0;
}

.rev-form-target-path .rev-path-item {
    color: #fde68a;
    font-weight: 600;
}

.rev-form-target-path .rev-path-sep {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
}

.rev-form-target-path .rev-path-target {
    color: #93c5fd;
    font-weight: 600;
}

.rev-form-target-path .rev-path-type {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-left: 2px;
}

/* --- STRUCTURE PROPRE DES CARTES DE NOTES DE RÉVISION --- */
.rev-card-header-clean {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.rev-card-meta-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex-wrap: wrap;
}

.rev-card-date {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    white-space: nowrap;
}

.rev-card-item-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(245, 158, 11, 0.12);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.25);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bannière pour les notes situées sur un autre modèle 3D */
.rev-other-item-banner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 9px 11px;
    background: rgba(30, 58, 138, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    font-size: 0.75rem;
    box-sizing: border-box;
}

.rev-other-item-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #bfdbfe;
    line-height: 1.35;
}

.rev-other-item-icon {
    color: #60a5fa;
    flex-shrink: 0;
}

.rev-other-item-text strong {
    color: #f1f5f9;
    font-weight: 600;
}

.btn-switch-item-revision {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.45);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.btn-switch-item-revision:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.45);
    transform: translateY(-1px);
}

.btn-switch-item-revision:active {
    transform: translateY(0);
}

/* Barre d'actions dans le pied de la carte dépliée */
.rev-card-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}

.rev-card-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.rev-card-btn-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.rev-card-btn-action.edit:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
}

.rev-card-btn-action.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

/* Sélecteur de scope multi-modèles */
.rev-scope-btn {
    flex: 1;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.73rem;
    transition: all 0.2s;
    text-align: center;
}

.rev-scope-btn:hover {
    color: #ffffff;
}

.rev-scope-btn.active {
    background: #f59e0b;
    color: #0f172a;
}

.rev-card-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.rev-status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.rev-status-pill.pending {
    background: rgba(234, 179, 8, 0.15);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.rev-status-pill.approved {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.rev-status-pill.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.rev-actions-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

.rev-expand-chevron {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.revision-note-card:hover .rev-expand-chevron {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.08);
}

.revision-note-card.is-expanded .rev-expand-chevron {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.rev-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    cursor: default;
    animation: revFadeIn 0.2s ease-out;
}

@keyframes revFadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rev-action-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.65);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.rev-action-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: translateY(-1px);
}

.rev-action-icon-btn.edit:hover {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(59, 130, 246, 0.15);
}

.rev-action-icon-btn.delete:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.15);
}

/* Ligne dédiée pour la catégorie sur la carte */
.rev-category-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
}

.rev-category-row.cat-doc {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.rev-category-row.cat-info_request {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.rev-category-row.cat-info_add {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.rev-category-row.cat-other {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.rev-cat-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rev-cat-row-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ligne de localisation propre sur la carte */
.rev-card-target-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.73rem;
    color: rgba(255, 255, 255, 0.75);
    flex-wrap: wrap;
    line-height: 1.35;
}

.rev-target-pin {
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
}

.rev-target-breadcrumb-clean {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.rev-crumb-item {
    color: #fde68a;
    font-weight: 600;
}

.rev-crumb-sep {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
}

.rev-crumb-target {
    color: #93c5fd;
    font-weight: 600;
}

.rev-crumb-tag {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    margin-left: 2px;
}

.rev-card-comment {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #cbd5e1;
    word-break: break-word;
    white-space: pre-wrap;
    padding: 2px 0;
    font-style: normal;
}

/* --- Section Affichage (Checkboxes sobres) --- */
.explorer-display-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    box-sizing: border-box;
}

.display-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.display-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    width: 100%;
}

.display-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.display-checkbox-label:hover {
    color: #ffffff;
}

.display-checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #3b82f6;
    margin: 0;
    border-radius: 4px;
}


/* ==========================================================================
   CAMÉRAS & PARCOURS (TIMELINES) - VIEWER
   ========================================================================== */

.camera-subnav {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    width: 100%;
}

.camera-subtab-btn {
    flex: 1;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.camera-subtab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.camera-subtab-btn.active {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
}

.timeline-header-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
}

.timeline-step-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: 100%;
    cursor: pointer;
}

.timeline-step-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.03);
}

.timeline-step-card.active-step {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.06);
}

.timeline-step-card.active-preview {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.12) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
}

.timeline-step-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #10b981;
    font-weight: 700;
    flex-shrink: 0;
}

.timeline-step-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 3px 5px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-step-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.timeline-step-toggle-btn {
    font-weight: 700;
}

.timeline-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1px 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.timeline-connector-badge {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.7rem;
    color: #6ee7b7;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
}

.timeline-loop-back-badge {
    background: rgba(30, 41, 59, 0.9);
    border: 1px dashed rgba(245, 158, 11, 0.35);
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 0.7rem;
    color: #fbbf24;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 2px auto;
    box-sizing: border-box;
}

.timeline-btn-preview {
    padding: 8px 12px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.timeline-btn-preview:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.timeline-btn-preview.is-playing {
    border-color: rgba(239, 68, 68, 0.5) !important;
    background: rgba(239, 68, 68, 0.18) !important;
    color: #ef4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25) !important;
}

.step-poi-item {
    transition: all 0.15s ease;
}

.step-poi-item:hover {
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

@keyframes poi-pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    50% { transform: scale(1.04); box-shadow: 0 0 16px 4px rgba(16, 185, 129, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.marker-step-poi.pulse-highlight {
    animation: poi-pulse-glow 1.5s ease-in-out infinite;
}


.timeline-step-sound-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
    color: #60a5fa;
    line-height: 1;
}

.timeline-step-sound-btn:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.08);
}

.timeline-mute-btn {
    transition: all 0.2s ease;
}

.timeline-mute-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.timeline-mute-btn.is-muted {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}


/* =========================================================================
   WIDGET FRISE DE PARCOURS & CARTE D'ÉTAPE (BOTTOM FLOATING HUD)
   ========================================================================= */
.timeline-bottom-widget {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: min(520px, calc(100vw - 32px));
    width: 100%;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: timelineWidgetSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes timelineWidgetSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 25px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Carte d'information de l'étape */
.timeline-step-info-card {
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 12px 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-step-info-card.collapsed .timeline-card-body,
.timeline-step-info-card.collapsed .timeline-card-image-wrap {
    display: none !important;
}

.timeline-step-info-card.collapsed {
    padding: 10px 16px;
    border-radius: 25px;
    width: auto;
    max-width: 90vw;
}

/* Image d'illustration de l'étape au-dessus du titre et de la description */
.timeline-card-image-wrap {
    width: 100%;
    max-height: 180px;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.timeline-card-image {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.timeline-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.timeline-card-step-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    flex-shrink: 0;
}

.timeline-card-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fafc;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.timeline-card-duration-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
}

.timeline-card-audio-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #60a5fa;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
    flex-shrink: 0;
}

.timeline-card-audio-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.timeline-card-toggle-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: 0.2s;
    flex-shrink: 0;
}

.timeline-card-toggle-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-card-body {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.timeline-card-desc {
    margin: 0;
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.45;
    max-height: 72px;
    overflow-y: auto;
    word-break: break-word;
}

/* Frise horizontale (Stepper avec numéros) */
.timeline-stepper-bar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 35px;
    padding: 6px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    box-sizing: border-box;
}

.stepper-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.stepper-nav-btn:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
    color: #60a5fa;
}

.stepper-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.stepper-play-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.stepper-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
}

.stepper-play-btn.is-playing {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Track horizontal avec les cercles et lignes de liaison */
.timeline-stepper-track {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: calc(100vw - 160px);
    padding: 2px 4px;
}

.timeline-stepper-track::-webkit-scrollbar {
    display: none;
}

.stepper-node-wrapper {
    display: flex;
    align-items: center;
}

.stepper-circle {
    min-width: 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.stepper-circle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.08);
    color: #ffffff;
}

.stepper-circle.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.7);
    transform: scale(1.15);
    font-weight: 700;
}

.stepper-line {
    height: 2px;
    width: 26px;
    min-width: 14px;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.3s ease;
}

.stepper-line.completed {
    background: #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}

/* Déplacer le gizmo 3D ViewHelper s'il y a un widget de timeline actif */
body.has-active-timeline #view-helper-container {
    left: auto !important;
    right: 20px !important;
    bottom: 15px !important;
    transform: none !important;
}


/* Boutons d'action du Stepper (Pause / Reprendre / Arrêter) */
.stepper-action-btn {
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.stepper-action-btn:hover {
    transform: scale(1.08);
}

.stepper-action-btn.pause {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.stepper-action-btn.pause:hover {
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.6);
}

.stepper-action-btn.resume {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.stepper-action-btn.resume:hover {
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
}

.stepper-action-btn.stop {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.stepper-action-btn.stop:hover {
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
}

/* En mode lecture automatique : les pastilles et boutons restent cliquables pour naviguer directement */
.timeline-stepper-bar.is-auto-playing .stepper-circle,
.timeline-stepper-bar.is-auto-playing .stepper-nav-btn {
    pointer-events: auto;
    cursor: pointer;
    opacity: 0.9;
}

.timeline-stepper-bar.is-auto-playing .stepper-circle.active {
    opacity: 1;
}


/* Bouton "En savoir plus" rouge/bordeaux sur la carte d'étape */
.timeline-card-more-btn {
    background: #881337 !important;
    background: linear-gradient(135deg, #9f1239, #881337) !important;
    color: #ffffff !important;
    border: 1px solid rgba(244, 63, 94, 0.4) !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 12px rgba(159, 18, 57, 0.45) !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    letter-spacing: 0.01em !important;
    outline: none !important;
}

.timeline-card-more-btn:hover {
    background: linear-gradient(135deg, #be123c, #9f1239) !important;
    border-color: #fb7185 !important;
    box-shadow: 0 6px 16px rgba(190, 18, 60, 0.6) !important;
    transform: translateY(-1px) !important;
}

.timeline-card-more-btn:active {
    transform: translateY(0) !important;
}
