/* Réalisé par Dylan Borcard */
/* Version du 12.03.2026 — Responsive */
/* Feuille de styles — Dynasty8 Executive Realty */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url("../Images/hand.png") 16 16, auto;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    min-width: 320px;
    overflow: hidden;
}

/* ─── BANNIÈRE ─── */
.bannière {
    height: auto;
    min-height: 36px;
    background: #000000;
    color: rgba(170, 160, 160, 0.57);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(9px, 2vw, 14px);
    padding: 6px 10px;
    text-align: center;
    line-height: 1.3;
    flex-shrink: 0;
}

/* ─── BARRE DE NAVIGATION ─── */
.barre-nav {
    height: 50px;
    background: #c5c5c5;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: clamp(4px, 2vw, 12px);
    flex-shrink: 0;
}

.boutons-nav {
    display: flex;
    flex-shrink: 0;
    gap: 3px;
}

/* Masquer certains boutons sur très petits écrans */
@media (max-width: 400px) {

    .bouton-nav:first-child,
    .bouton-nav:nth-child(2) {
        display: none;
    }
}

.bouton-nav,
.btn-home-reload {
    width: clamp(28px, 5vw, 36px);
    height: clamp(28px, 5vw, 36px);
    background: #a0a0a0;
    border: 1px solid #787878;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(12px, 3vw, 16px);
    color: #555;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
}

.btn-home-reload {
    background: #efeeee;
}

.address-bar {
    flex: 1;
    min-width: 0;
    height: clamp(30px, 5vw, 40px);
    background: #ffffff;
    border: 3px solid #999;
    border-radius: 4px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    font-size: clamp(9px, 1.8vw, 14px);
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close-btn {
    width: clamp(28px, 5vw, 36px);
    height: clamp(28px, 5vw, 36px);
    flex-shrink: 0;
    background: #e8e8e8;
    border: 1px solid #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 3vw, 20px);
    font-weight: bold;
    color: #555;
    cursor: pointer;
}

/* ─── HEADER DYNASTY8 ─── */
header {
    width: 100%;
    flex-shrink: 0;
    line-height: 0;
}

header img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 480px) {
    header img {
        min-height: 56px;
    }
}

/* ─── LAYOUT PRINCIPAL ─── */
.page-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ─── FILTRES ─── */
#filters {
    position: absolute;
    top: 0;
    right: 8px;
    display: flex;
    gap: 3px;
    z-index: 100;
    padding-top: 8px;
}

.filter-btn {
    background: #333;
    border: 1px solid #555;
    color: #bbb;
    padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 14px);
    font-size: clamp(10px, 1.8vw, 12px);
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    letter-spacing: 0.5px;
    touch-action: manipulation;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2d6a2d;
    border-color: #4a9e4a;
    color: #fff;
}

/* ─── CONTENEUR MAP ─── */
#map-container {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

#map-container:active {
    cursor: grabbing;
}

/* ─── MAP DRAGGABLE ─── */
#map-wrapper {
    position: absolute;
    width: 2400px;
    height: 2900px;
    user-select: none;
    transform-origin: 0 0;
    will-change: transform;
}

#map-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    filter: brightness(0.75) saturate(0.9);
}

/* ─── ICÔNE DE PROPRIÉTÉ ─── */
.property-marker {
    position: absolute;
    width: clamp(36px, 5vw, 44px);
    height: clamp(36px, 5vw, 44px);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease;
    z-index: 10;
    touch-action: manipulation;
}

.property-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.marker-icon {
    width: 100%;
    height: 100%;
    background: #2d6a2d;
    border: 3px solid #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(18px, 3vw, 22px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.marker-icon:hover {
    background: #3a8a3a;
}

/* ─── PANNEAU PROPRIÉTÉ ─── */
#property-panel {
    position: fixed;
    background: #fff;
    border: 1px solid #ccc;
    z-index: 200;
    display: none;
    animation: slideIn 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: min(300px, calc(100vw - 24px));
    max-height: calc(100dvh - 180px);
    overflow-y: auto;
}

/* Mobile : panneau en bas, pleine largeur */
@media (max-width: 480px) {
    #property-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-height: 65dvh;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
        animation: slideUp 0.25s ease;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#property-panel img.prop-img {
    width: 100%;
    height: clamp(130px, 25vw, 160px);
    object-fit: cover;
    display: block;
}

#property-panel .prop-name {
    font-size: clamp(15px, 3vw, 18px);
    font-weight: bold;
    color: #222;
    padding: 10px 14px 4px;
    border-bottom: 1px solid #ddd;
}

#property-panel .prop-price {
    padding: 8px 14px 4px;
    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: bold;
    color: #2d6a2d;
}

#property-panel .prop-details {
    padding: 6px 14px 10px;
    font-size: clamp(11px, 2vw, 13px);
    color: #333;
    line-height: 2;
}

#property-panel .prop-details span {
    font-weight: bold;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#property-panel .btn-buy {
    display: block;
    margin: 4px 14px 14px;
    background: #2d6a2d;
    color: #fff;
    text-align: center;
    padding: clamp(8px, 2vw, 10px);
    font-size: clamp(11px, 2vw, 13px);
    font-weight: bold;
    letter-spacing: 1px;
    border: none;
    width: calc(100% - 28px);
    cursor: pointer;
}

#property-panel .btn-buy:hover {
    background: #3a8a3a;
}

#property-panel .btn-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    touch-action: manipulation;
}

#property-panel .btn-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ─── OVERLAY MOBILE ─── */
#panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
}

@media (max-width: 480px) {
    #panel-overlay.active {
        display: block;
    }
}