:root {
    --primary-color: #27ae60;
    --primary-glow: rgba(39, 174, 96, 0.5);
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0a1128 !important;
    background: #0a1128 !important;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-white);
    -webkit-overflow-scrolling: touch;
}

/* Conteneur principal de la Carte 3D (Autonome et intégrable en haut d'une page web) */
.carte-3d-app {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: radial-gradient(circle at center, var(--bg-dark) 0%, #0a1128 100%);
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header */
header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.header-content {
    text-align: left;
    pointer-events: auto;
}

.header-content h1 {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.header-content p {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 2px;
}

.stats-container {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    background: var(--glass-bg);
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
    pointer-events: auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    white-space: nowrap;
    text-align: center;
}

.stat-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-color);
    white-space: nowrap;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.2rem;
    line-height: 1.2;
}

.stat-unit {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.95;
}

.stat-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-gray);
    white-space: nowrap;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
    flex-shrink: 0;
}

/* Map Container */
#map-container {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* UI Controls */
.ui-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 100;
    width: auto;
    max-width: 95vw;
}

.search-box {
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
}

.search-box i {
    color: var(--text-gray);
    margin-right: 0.8rem;
}

.search-box input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.45rem 0.65rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.25);
}

.filter-btn {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.filter-btn i {
    font-size: 0.8rem;
    opacity: 0.9;
}

.filter-btn:hover {
    background: rgba(51, 65, 85, 0.95);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.filter-btn.active {
    background: #27ae60;
    border-color: #2ecc71;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 18px rgba(39, 174, 96, 0.7), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.filter-btn.lab-filter-btn {
    background: rgba(14, 116, 144, 0.25);
    border-color: rgba(56, 189, 248, 0.4);
    color: #bae6fd;
}

.filter-btn.lab-filter-btn i {
    color: #38bdf8;
}

.filter-btn.lab-filter-btn:hover {
    background: rgba(14, 116, 144, 0.45);
    border-color: #38bdf8;
    color: #ffffff;
}

.filter-btn.lab-filter-btn.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 18px rgba(14, 165, 233, 0.7);
}

.filter-btn.list-btn {
    background: rgba(39, 174, 96, 0.18);
    border-color: rgba(39, 174, 96, 0.5);
    color: #a7f3d0;
}

.filter-btn.list-btn i {
    color: #34d399;
}

.filter-btn.list-btn:hover {
    background: #27ae60;
    border-color: #2ecc71;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(39, 174, 96, 0.6);
}

.filter-btn.list-btn:hover i {
    color: #ffffff;
}

.filter-btn.scroll-hint-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #e2e8f0;
}

.filter-btn.scroll-hint-btn:hover {
    background: var(--primary-color);
    border-color: #2ecc71;
    color: #ffffff;
    box-shadow: 0 0 16px var(--primary-glow);
}

.scroll-page-btn i {
    color: #6ee7b7;
    transition: transform 0.25s ease;
}

.scroll-page-btn:hover i {
    transform: translateY(2px);
    color: #ffffff;
}

/* UI Glow & Glassmorphism Updates */
.glass-effect {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(39, 174, 96, 0.1);
}

#tooltip {
    position: absolute;
    padding: 1.2rem;
    pointer-events: none;
    display: none;
    z-index: 200;
    min-width: 250px;
    transition: transform 0.1s ease-out;
}

#tooltip h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    text-shadow: 0 0 10px var(--primary-glow);
}

#sidebar {
    position: absolute;
    top: 2rem;
    right: 2rem;
    bottom: 2rem;
    width: 420px;
    padding: 1.2rem 2rem 2rem;
    z-index: 150;
    transform: translateX(130%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
}

#sidebar.open {
    transform: translateX(0);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(39, 174, 96, 0.25);
}

/* Poignée tactile pour glisser et descendre la fenêtre */
.sidebar-drag-handle {
    width: 100%;
    padding: 0.3rem 0 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.sidebar-drag-handle:active {
    cursor: grabbing;
}

.drag-pill {
    width: 50px;
    height: 5px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    transition: background 0.3s, transform 0.2s;
}

.sidebar-drag-handle:hover .drag-pill {
    background: var(--primary-color);
    transform: scaleX(1.2);
}

/* Actions en haut de la fenêtre (Bouton Descendre et Fermer) */
.sidebar-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.sidebar-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    border-radius: 20px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s ease;
    font-family: inherit;
}

.sidebar-action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 12px var(--primary-glow);
}

.sidebar-action-btn.close-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

.sidebar-action-btn.close-btn .btn-text {
    display: none;
}

.descend-btn i {
    transition: transform 0.25s ease;
}

.descend-btn:hover i {
    transform: translateY(2px);
}

/* Fond sombre pour fermer/descendre la fenêtre au clic extérieur */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 130;
    opacity: 0;
    pointer-events: none !important;
    transition: opacity 0.35s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: none !important; /* Bloque les faux clics fantômes tactiles pendant l'ouverture */
}

.sidebar-backdrop.active.interactive {
    pointer-events: auto !important; /* Rendu interactif uniquement après stabilisation complète */
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.filter-btn {
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.filter-btn.list-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(39, 174, 96, 0.15);
    border-color: var(--primary-color);
    color: #6ee7b7;
}

.filter-btn.list-btn:hover {
    background: var(--primary-color);
    color: white;
}

.filter-btn.catalog-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.filter-btn.catalog-btn:hover {
    background: #f59e0b;
    color: #0f172a;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

#close-sidebar {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 1.1rem;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.unit-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.sidebar-header p {
    color: var(--text-gray);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.capacity-badge-container {
    margin-top: 0.6rem;
}

.capacity-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(39, 174, 96, 0.2);
    border: 1px solid rgba(39, 174, 96, 0.45);
    color: #a7f3d0;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(39, 174, 96, 0.2);
}

.capacity-pill strong {
    color: #ffffff;
}

.sidebar-body {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.4rem;
    margin-bottom: 1rem;
}

/* Barre de défilement stylisée pour descendre dans le contenu */
.sidebar-body::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-body::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.sidebar-body::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
    background: rgba(39, 174, 96, 0.4);
    border-radius: 10px;
}

.sidebar-body::-webkit-scrollbar-thumb:hover,
.drawer-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.info-group {
    margin-bottom: 1.2rem;
}

.info-group label {
    display: block;
    color: var(--text-gray);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.info-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.info-group p {
    font-size: 0.95rem;
    line-height: 1.4;
}

.contact-email {
    color: #6ee7b7;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.contact-email:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Grille de Téléphones Directs Cliquables */
.phones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.phone-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.35);
    color: #6ee7b7;
    text-decoration: none;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.phone-call-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 12px var(--primary-glow);
    transform: translateY(-1px);
}

/* Bannière disponibilité intégrale de la gamme */
.full-catalog-banner {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.35);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.8rem;
}

.full-catalog-banner i {
    font-size: 1.3rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.full-catalog-banner .banner-text strong {
    font-size: 0.8rem;
    color: #a7f3d0;
    display: block;
}

.full-catalog-banner .banner-text p {
    font-size: 0.72rem;
    color: var(--text-gray);
    margin: 0.1rem 0 0 0;
    line-height: 1.25;
}

/* Affichage épuré des deux gammes ASFERTRADE & FERTIAL */
.range-display-container {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 0.4rem;
}

.range-item-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    transition: all 0.25s ease;
}

.range-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.asfertrade-brand-card {
    border-left: 3px solid #27ae60;
}

.fertial-brand-card {
    border-left: 3px solid #3b82f6;
}

.range-brand-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.range-brand-header strong {
    font-size: 0.85rem;
    color: #ffffff;
}

.range-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.asfertrade-pill {
    background: rgba(39, 174, 96, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(39, 174, 96, 0.4);
}

.fertial-pill {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.range-brand-sub {
    font-size: 0.72rem;
    color: var(--text-gray);
    line-height: 1.3;
    margin: 0;
}

.azar-exclusive-badge {
    margin-top: 0.45rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #a7f3d0;
}

.azar-exclusive-badge i {
    color: #34d399;
}

/* Nuage d'étiquettes de produits et équipements */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.product-tag {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.equipment-tag {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Fiche Laboratoire */
.lab-card {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 10px;
    padding: 0.75rem;
    margin-top: 0.3rem;
}

.lab-desc {
    font-size: 0.8rem;
    color: #bae6fd;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.lab-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #e0f2fe;
}

.lab-features span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.lab-features i {
    color: #38bdf8;
    font-size: 0.7rem;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

.secondary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-gray);
    text-decoration: none;
    padding: 0.7rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.secondary-return-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.45);
    color: #a7f3d0;
    text-decoration: none;
    padding: 0.7rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    margin-top: 0.2rem;
}

.secondary-return-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Barre de navigation 3D flottante (Recentrer, Incliner vers le bas, 3D/2D, Zoom) */
.map-nav-controls {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.5rem;
    border-radius: 30px;
    z-index: 110;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    outline: none;
}

.nav-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: scale(1.08);
}

.nav-btn:active {
    transform: scale(0.92);
}

.nav-btn .tilt-badge {
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.nav-divider {
    width: 20px;
    height: 1px;
    background: var(--glass-border);
    margin: 0.2rem auto;
}

/* Tiroir / Drawer de la liste des unités (basculable vers le bas) */
.units-drawer {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 110%);
    width: 92%;
    max-width: 680px;
    height: 65vh;
    max-height: 480px;
    border-radius: 24px 24px 0 0;
    padding: 0.6rem 1.5rem 1.2rem;
    z-index: 145;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
}

.units-drawer.open {
    transform: translate(-50%, 0);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8), 0 0 30px rgba(39, 174, 96, 0.25);
}

.drawer-header {
    margin-bottom: 0.8rem;
}

.drawer-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title-row h3 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drawer-subtitle {
    font-size: 0.78rem;
    color: var(--text-gray);
    margin-top: 0.2rem;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.8rem;
    padding-right: 0.3rem;
}

.unit-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.unit-card:hover {
    background: rgba(39, 174, 96, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.unit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.4rem;
}

.unit-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-white);
}

.unit-card-city {
    font-size: 0.78rem;
    color: var(--primary-color);
    font-weight: 500;
}

.unit-card-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: var(--text-gray);
    white-space: nowrap;
}

.unit-card-badge.lab {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.4);
}

.unit-card-address {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.unit-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-top: 0.2rem;
}

.card-cap-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6ee7b7;
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
}

.card-cap-tag strong {
    color: #fff;
}

.card-phone-tag {
    font-size: 0.68rem;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.card-products-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.2rem;
}

.mini-tag {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-tag.more {
    color: #6ee7b7;
    font-weight: 600;
}

.mini-tag.full-catalog-badge {
    background: rgba(39, 174, 96, 0.25);
    border-color: rgba(39, 174, 96, 0.5);
    color: #a7f3d0;
    font-weight: 600;
}

.mini-tag.asfertrade-pill-mini {
    background: rgba(39, 174, 96, 0.2);
    border-color: rgba(39, 174, 96, 0.45);
    color: #6ee7b7;
    font-weight: 600;
}

.mini-tag.azar-pill-mini {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.5);
    color: #a7f3d0;
    font-weight: 700;
}

.mini-tag.fertial-pill-mini {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.45);
    color: #93c5fd;
    font-weight: 600;
}

/* Footer */
footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem;
    text-align: center;
    font-size: 0.6rem;
    color: var(--text-gray);
    z-index: 50;
    pointer-events: none;
}

/* City Labels */
.city-label {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.75rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.8);
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
    background: rgba(15, 23, 42, 0.78);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(4px);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(34, 197, 94, 0.3);
    transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.city-label::after {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -10px;
    right: -10px;
}

.city-label:hover,
.city-label.active-hover {
    background: var(--primary-color) !important;
    border-color: #fff !important;
    box-shadow: 0 0 15px var(--primary-glow) !important;
}

.labels-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

/* Modal À Propos d'ASFERTRADE */
.about-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    border-radius: 20px;
    padding: 1.5rem;
    z-index: 250;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.about-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(39, 174, 96, 0.3);
}

.about-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--glass-border);
}

.about-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-modal-body {
    overflow-y: auto;
    padding-right: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.about-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.about-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.35);
    color: #a7f3d0;
}

.about-intro {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.8rem;
}

.about-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem;
}

.about-card h4 {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #ffffff;
}

.about-card p {
    font-size: 0.75rem;
    color: var(--text-gray);
    line-height: 1.35;
}

.about-contact-box {
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem;
    font-size: 0.78rem;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.about-contact-box strong {
    color: #ffffff;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Modal Catalogue Complet des Produits ASFERTRADE */
.catalog-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 92%;
    max-width: 860px;
    max-height: 88vh;
    border-radius: 20px;
    padding: 1.5rem;
    z-index: 250;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.catalog-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(39, 174, 96, 0.3);
}

.catalog-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--glass-border);
}

.catalog-header-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.catalog-modal-subtitle {
    font-size: 0.78rem;
    color: #6ee7b7;
    margin-top: 0.2rem;
}

.catalog-modal-body {
    overflow-y: auto;
    padding-right: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.catalog-intro-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.35);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.catalog-intro-alert i {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.catalog-intro-alert strong {
    color: #a7f3d0;
}

.two-ranges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.range-presentation-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.range-presentation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.asfertrade-presentation {
    border-top: 4px solid #27ae60;
}

.fertial-presentation {
    border-top: 4px solid #3b82f6;
}

.presentation-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.presentation-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.brand-badge {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.brand-badge.asfertrade-brand {
    background: rgba(39, 174, 96, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(39, 174, 96, 0.4);
}

.brand-badge.fertial-brand {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.presentation-sub {
    font-size: 0.8rem;
    color: var(--text-gray);
    line-height: 1.4;
    margin: 0;
}

.azar-highlight-box,
.fertial-highlight-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.9rem;
    margin-top: auto;
}

.azar-highlight-box {
    border-left: 3px solid #10b981;
}

.fertial-highlight-box {
    border-left: 3px solid #3b82f6;
}

.azar-badge-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.exclusive-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.fertial-pill-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.stock-pill {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.azar-title,
.fertial-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.azar-desc {
    font-size: 0.75rem;
    color: var(--text-gray);
    line-height: 1.35;
    margin: 0;
}

@media (max-width: 1150px) and (min-width: 769px) {
    header {
        padding: 1rem 1.2rem;
        gap: 0.8rem;
    }

    .header-content p {
        display: none;
    }

    .stats-container {
        gap: 0.9rem;
        padding: 0.45rem 1rem;
    }
}

/* Toast d'indication tactile mobile */
.mobile-touch-toast {
    position: absolute;
    top: 4.8rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(39, 174, 96, 0.6);
    color: #f8fafc;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 0.45rem;
    z-index: 95;
    pointer-events: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    transition: opacity 0.3s, transform 0.3s;
}

.mobile-touch-toast i {
    color: #34d399;
    font-size: 0.75rem;
}

.touch-mode-btn.mode-3d {
    background: var(--primary-color) !important;
    border-color: #2ecc71 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Responsive pour Mobile et Petits Écrans */
@media (max-width: 768px) {
    .carte-3d-app {
        height: 100%;
        max-height: 100%;
    }

    .mobile-touch-toast {
        display: flex;
    }

    header {
        flex-direction: column;
        gap: 0.3rem;
        padding: 0.5rem 0.8rem;
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0) 100%);
    }

    .header-content h1 {
        font-size: 0.82rem;
        text-align: center;
        max-width: 90vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-content p {
        display: none;
    }
    
    .stats-container {
        display: none;
    }
    
    #sidebar {
        width: 100%;
        height: auto;
        max-height: 38vh;
        max-height: 38dvh;
        min-height: 160px;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 18px 18px 0 0;
        transform: translateY(115%);
        padding: 0.4rem 0.8rem 0.75rem;
        z-index: 150;
        display: flex;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(39, 174, 96, 0.4);
        border-bottom: none;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(39, 174, 96, 0.2);
    }
    
    #sidebar.open {
        transform: translateY(0);
    }

    .sidebar-drag-handle {
        padding: 0.2rem 0 0.35rem;
    }

    .drag-pill {
        width: 36px;
        height: 4px;
    }

    .sidebar-top-actions {
        margin-bottom: 0.35rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-action-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }

    .sidebar-action-btn.close-btn {
        width: auto !important;
        min-width: 36px;
        height: 32px;
        padding: 0 0.8rem !important;
        border-radius: 16px !important;
        background: rgba(239, 68, 68, 0.25) !important;
        border: 1px solid rgba(239, 68, 68, 0.6) !important;
        color: #fecaca !important;
        font-weight: 600 !important;
        font-size: 0.75rem !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
    }

    .sidebar-action-btn.close-btn .btn-text {
        display: inline !important;
    }

    .sidebar-action-btn.close-btn:hover,
    .sidebar-action-btn.close-btn:active {
        background: #ef4444 !important;
        color: #ffffff !important;
    }

    .sidebar-header {
        text-align: left;
        margin-bottom: 0.35rem;
        padding: 0 0.1rem;
    }

    .unit-icon {
        display: none;
    }

    .sidebar-header h2 {
        font-size: 1.05rem;
        margin-bottom: 0.1rem;
        line-height: 1.25;
    }

    .sidebar-header p {
        font-size: 0.72rem;
        margin-bottom: 0.25rem;
    }

    .capacity-badge-container {
        margin-top: 0.25rem;
    }

    .capacity-pill {
        font-size: 0.68rem;
        padding: 2px 7px;
    }

    .sidebar-body {
        padding-right: 0.25rem;
        margin-bottom: 0.35rem;
    }

    .info-group {
        margin-bottom: 0.5rem;
    }

    .info-group label {
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
    }

    .info-group p {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .phones-grid {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .phone-call-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.76rem;
    }

    .full-catalog-banner {
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.4rem;
        gap: 0.5rem;
    }

    .full-catalog-banner i {
        font-size: 1.1rem;
    }

    .full-catalog-banner .banner-text strong {
        font-size: 0.74rem;
    }

    .full-catalog-banner .banner-text p {
        font-size: 0.68rem;
    }

    .range-item-card {
        padding: 0.5rem 0.65rem;
    }

    .azar-exclusive-badge {
        padding: 0.3rem 0.5rem;
        font-size: 0.72rem;
    }

    .sidebar-footer .primary-btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.78rem;
        border-radius: 10px;
    }

    .sidebar-footer .secondary-return-btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.78rem;
        border-radius: 10px;
        margin-top: 0.15rem;
    }

    /* Le fond sombre sur mobile est léger et permet de fermer la fenêtre en tapant sur la carte */
    .sidebar-backdrop {
        background: rgba(2, 6, 23, 0.25);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .ui-controls {
        bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        padding: 0 0.5rem;
        z-index: 140 !important;
        pointer-events: auto !important;
    }

    .filters {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        padding: 0.35rem 0.6rem;
        gap: 0.35rem;
        border-radius: 30px;
        background: rgba(15, 23, 42, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
        justify-content: flex-start;
        touch-action: pan-x;
        pointer-events: auto !important;
    }

    .filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
        padding: 0.42rem 0.75rem;
        font-size: 0.74rem;
        gap: 0.3rem;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        cursor: pointer !important;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Boutons de commandes 3D placés en haut à droite sur mobile pour ne JAMAIS être masqués */
    .map-nav-controls {
        right: 0.5rem;
        top: 3.8rem;
        bottom: auto;
        transform: none;
        padding: 0.25rem;
        gap: 0.25rem;
        background: rgba(15, 23, 42, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.55);
        z-index: 160 !important;
        pointer-events: auto !important;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        cursor: pointer !important;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-divider {
        width: 16px;
        height: 1px;
        margin: 2px auto;
    }

    .city-label {
        font-size: 0.68rem;
        padding: 3px 8px;
        gap: 0.3rem;
        border-radius: 6px;
        background: rgba(15, 23, 42, 0.88);
        border: 1px solid rgba(255, 255, 255, 0.22);
        touch-action: manipulation;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    }

    .city-label i {
        font-size: 0.65rem;
    }

    footer {
        display: none;
    }

    .units-drawer {
        width: 100%;
        height: auto;
        max-height: 55vh;
        max-height: 55dvh;
        border-radius: 20px 20px 0 0;
        padding: 0.5rem 0.85rem 0.85rem;
        z-index: 150;
    }

    .drawer-body {
        grid-template-columns: 1fr;
    }

    .about-modal {
        width: 95%;
        max-height: 90vh;
        padding: 1rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .catalog-modal {
        width: 95%;
        max-height: 90vh;
        padding: 1rem;
    }

    .two-ranges-grid {
        grid-template-columns: 1fr;
    }
}

