/* =====================================================
   Axe Immo — Frontend CSS
   Intégration parfaite design Elementor Axe Immobilier
   Couleurs: #035CAA (primaire), #0D307D (secondaire)
   Police: Mulish | Radius: 14px | Shadow: standard
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;500;600;700;800&display=swap');

/* ---- Variables ---- */
:root {
    --axe-primary: #0D307D;
    --axe-secondary: #0D307D;
    --axe-accent: #0D307D;
    --axe-white: #ffffff;
    --axe-bg: #f8fafc;
    --axe-border: #e8edf3;
    --axe-shadow: 0px 3px 7px 0px rgba(0, 0, 0, 0.10);
    --axe-radius: 14px;
    --axe-font: 'Mulish', sans-serif;
    --axe-success: #27ae60;
    --axe-warning: #e67e22;
    --axe-gray: #95a5a6;
    --axe-text: #2c3e50;
    --axe-text-light: #64748b;
}

/* ---- Layout Archive ---- */
.axeimmo-archive-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--axe-font);
}

.axeimmo-archive-header {
    margin-bottom: 32px;
    text-align: center;
}

.axeimmo-archive-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--axe-secondary);
    margin-bottom: 8px;
}

.axeimmo-archive-header p {
    color: var(--axe-text-light);
    font-size: 16px;
}

/* ---- Filtres / Search Form ---- */
.axeimmo-search-form {
    background: var(--axe-white);
    border-radius: var(--axe-radius);
    box-shadow: var(--axe-shadow);
    padding: 28px;
    margin-bottom: 32px;
    border: 1px solid var(--axe-border);
}

.axeimmo-search-form h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--axe-primary);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.axeimmo-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.axeimmo-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.axeimmo-filter-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--axe-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.axeimmo-filter-group select,
.axeimmo-filter-group input {
    padding: 10px 12px;
    border: 1.5px solid var(--axe-border);
    border-radius: 9px;
    font-family: var(--axe-font);
    font-size: 14px;
    color: var(--axe-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23035CAA' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.axeimmo-filter-group input {
    background-image: none;
    padding-right: 12px;
}

.axeimmo-filter-group select:focus,
.axeimmo-filter-group input:focus {
    outline: none;
    border-color: var(--axe-primary);
    box-shadow: 0 0 0 3px rgba(3, 92, 170, 0.12);
}

/* Prestations multi-select */
.axeimmo-prestations-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.axeimmo-presta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1.5px solid var(--axe-border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--axe-text-light);
    background: #fff;
    user-select: none;
}

.axeimmo-presta-chip:hover {
    border-color: var(--axe-primary);
    color: var(--axe-primary);
}

.axeimmo-presta-chip.active {
    background: var(--axe-primary);
    border-color: var(--axe-primary);
    color: #fff;
}

/* Boutons actions */
.axeimmo-search-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--axe-border);
}

.axeimmo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9px;
    font-family: var(--axe-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.axeimmo-btn svg {
    display: block;
    margin-top: -3px;
}

.axeimmo-btn-primary,
a.axeimmo-btn-primary,
button.axeimmo-btn-primary {
    background: #0D307D !important;
    color: #fff !important;
    border: 2px solid #0D307D !important;
    fill: #fff;
}

.axeimmo-btn-primary:hover,
a.axeimmo-btn-primary:hover,
button.axeimmo-btn-primary:hover {
    background: #fff !important;
    color: #0D307D !important;
    border-color: #0D307D !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 48, 125, 0.25);
    text-decoration: none;
}

.axeimmo-btn-secondary,
a.axeimmo-btn-secondary,
button.axeimmo-btn-secondary {
    background: #ffffff !important;
    color: #0D307D !important;
    border: 2px solid #0D307D !important;
}

.axeimmo-btn-secondary:hover,
a.axeimmo-btn-secondary:hover,
button.axeimmo-btn-secondary:hover {
    background: #0D307D !important;
    color: #fff !important;
    border-color: #0D307D !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 48, 125, 0.25);
    text-decoration: none;
}

/* Tri */
.axeimmo-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.axeimmo-results-info {
    font-size: 14px;
    color: var(--axe-text-light);
    margin-bottom: 16px;
}

.axeimmo-results-info strong {
    color: var(--axe-primary);
    font-weight: 700;
}

.axeimmo-sort-select {
    padding: 8px 32px 8px 12px;
    border-radius: 9px;
    border: 1.5px solid var(--axe-border);
    font-family: var(--axe-font);
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23035CAA' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* ---- Grille de biens ---- */
.axeimmo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 1024px) {
    .axeimmo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .axeimmo-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Carte bien ---- */
.axeimmo-card {
    background: #fff;
    border-radius: var(--axe-radius);
    box-shadow: var(--axe-shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid var(--axe-border);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: var(--axe-text);
}

.axeimmo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    text-decoration: none;
    color: var(--axe-text);
}

.axeimmo-card-thumb {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.axeimmo-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.axeimmo-card:hover .axeimmo-card-thumb img {
    transform: scale(1.04);
}

.axeimmo-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f0f8, #d0e4f5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--axe-primary);
    font-size: 48px;
}

/* Badge statut */
.axeimmo-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.axeimmo-badge-disponible {
    background: var(--axe-success);
}

.axeimmo-badge-sous-offre {
    background: var(--axe-warning);
}

.axeimmo-badge-vendu {
    background: var(--axe-gray);
}

/* Badge mise en avant */
.axeimmo-badge-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f39c12;
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Corps carte */
.axeimmo-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.axeimmo-card-type {
    font-size: 11px;
    font-weight: 700;
    color: var(--axe-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.axeimmo-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--axe-text);
    line-height: 1.3;
    margin: 0;
}

.axeimmo-card-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--axe-secondary);
}

.axeimmo-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--axe-text-light);
    margin-top: 4px;
}

.axeimmo-card-spec {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.axeimmo-card-spec svg {
    width: 16px;
    height: 16px;
    fill: var(--axe-primary);
    flex-shrink: 0;
}

.axeimmo-card-location {
    font-size: 13px;
    color: var(--axe-text-light);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--axe-border);
}

/* ---- Pagination ---- */
.axeimmo-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 32px 0;
}

.axeimmo-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    border: 1.5px solid var(--axe-border);
    background: #fff;
    font-family: var(--axe-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--axe-text);
}

.axeimmo-page-btn:hover,
.axeimmo-page-btn.active {
    background: var(--axe-primary);
    border-color: var(--axe-primary);
    color: #fff;
}

/* ---- No results ---- */
.axeimmo-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--axe-text-light);
    grid-column: 1 / -1;
}

.axeimmo-no-results p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Loading spinner */
.axeimmo-loading {
    text-align: center;
    padding: 40px;
    color: var(--axe-primary);
    font-size: 16px;
    grid-column: 1 / -1;
}

/* =====================================================
   Single Property
===================================================== */
.axeimmo-single-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: var(--axe-font);
}

/* Galerie */
.axeimmo-gallery-slider {
    position: relative;
    border-radius: var(--axe-radius);
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--axe-shadow);
}

.axeimmo-gallery-main {
    height: 528px;
    object-fit: cover;
    object-position: center center;
    width: 100%;
    cursor: zoom-in;
    display: block;
}

/* Ancre wrapper de l'image principale */
.axeimmo-gallery-slider>a {
    display: block;
    overflow: hidden;
}

.axeimmo-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.axeimmo-gallery-thumbs img {
    height: 80px;
    width: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    opacity: 0.7;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
}

.axeimmo-gallery-thumbs img:hover,
.axeimmo-gallery-thumbs img.active {
    opacity: 1;
    border-color: var(--axe-primary);
}

/* ---- Lightbox ---- */
.axeimmo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    animation: axe-lb-in 0.2s ease;
}

.axeimmo-lightbox.open {
    display: flex;
}

@keyframes axe-lb-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.axeimmo-lightbox-img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
    display: block;
}

.axeimmo-lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.axeimmo-lightbox-close:hover {
    opacity: 1;
}

.axeimmo-lightbox-bg {
    position: absolute;
    inset: 0;
    cursor: zoom-out;
}

/* Navigation flèches */
.axeimmo-lightbox-prev,
.axeimmo-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0.85;
    transition: background 0.2s, opacity 0.2s;
    padding: 0;
}

.axeimmo-lightbox-prev {
    left: 20px;
}

.axeimmo-lightbox-next {
    right: 20px;
}

.axeimmo-lightbox-prev:hover,
.axeimmo-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.28);
    opacity: 1;
}

.axeimmo-lightbox-prev svg,
.axeimmo-lightbox-next svg {
    width: 20px;
    height: 20px;
}

/* Compteur d'images */
.axeimmo-lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: var(--axe-font, sans-serif);
    letter-spacing: 1px;
}

/* Single layout */
.axeimmo-single-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 900px) {
    .axeimmo-single-layout {
        grid-template-columns: 1fr;
    }
}

/* En-tête bien */
.axeimmo-single-header {
    margin-bottom: 24px;
}

.axeimmo-single-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--axe-secondary);
    margin-bottom: 8px;
}

.axeimmo-single-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--axe-text);
    margin-bottom: 4px;
}

.axeimmo-single-location {
    font-size: 15px;
    color: var(--axe-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Specs principales (icônes) */
.axeimmo-key-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: var(--axe-bg);
    border-radius: var(--axe-radius);
    margin-bottom: 24px;
    border: 1px solid var(--axe-border);
}

.axeimmo-key-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    text-align: center;
}

.axeimmo-key-spec-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--axe-secondary);
}

.axeimmo-key-spec-label {
    font-size: 11px;
    color: var(--axe-text-light);
    font-weight: 600;
    text-transform: uppercase;
}

/* Description */
.axeimmo-single-desc {
    background: #fff;
    border-radius: var(--axe-radius);
    padding: 24px;
    border: 1px solid var(--axe-border);
    margin-bottom: 24px;
    box-shadow: var(--axe-shadow);
}

.axeimmo-single-desc h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--axe-primary);
    margin: 0 0 16px;
}

/* Tableau caractéristiques */
.axeimmo-details-table {
    background: #fff;
    border-radius: var(--axe-radius);
    padding: 24px;
    border: 1px solid var(--axe-border);
    margin-bottom: 24px;
    box-shadow: var(--axe-shadow);
}

.axeimmo-details-table h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--axe-primary);
    margin: 0 0 16px;
}

.axeimmo-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 20px;
}

@media (max-width: 640px) {
    .axeimmo-details-grid {
        grid-template-columns: 1fr;
    }
}

.axeimmo-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--axe-border);
    font-size: 14px;
}

.axeimmo-detail-row:last-child {
    border-bottom: none;
}

.axeimmo-detail-key {
    color: var(--axe-text-light);
    font-weight: 600;
}

.axeimmo-detail-value {
    color: var(--axe-text);
    font-weight: 700;
    text-align: right;
}

/* Prestations tags */
.axeimmo-prestations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
    border-radius: var(--axe-radius);
    padding: 20px;
    border: 1px solid var(--axe-border);
    margin-bottom: 24px;
    box-shadow: var(--axe-shadow);
}

.axeimmo-presta-tag {
    background: rgba(3, 92, 170, 0.08);
    color: var(--axe-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(3, 92, 170, 0.2);
}

/* DPE Badge */
.axeimmo-dpe-wrap {
    background: #fff;
    border-radius: var(--axe-radius);
    padding: 20px;
    border: 1px solid var(--axe-border);
    margin-bottom: 24px;
    box-shadow: var(--axe-shadow);
}

.axeimmo-dpe-wrap h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--axe-primary);
    margin: 0 0 14px;
}

.axeimmo-dpe-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--axe-text);
}

.axeimmo-dpe-letter {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

/* Sidebar contact */
.axeimmo-single-sidebar {
    position: sticky;
    top: 100px;
}

.axeimmo-contact-box {
    background: #fff;
    border-radius: var(--axe-radius);
    padding: 28px;
    border: 1px solid var(--axe-border);
    box-shadow: var(--axe-shadow);
    text-align: center;
}

.axeimmo-contact-box h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--axe-primary);
    margin: 0 0 8px;
}

.axeimmo-contact-box p {
    font-size: 14px;
    color: var(--axe-text-light);
    margin-bottom: 20px;
}

.axeimmo-contact-box .axeimmo-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.axeimmo-ref-box {
    background: var(--axe-bg);
    border-radius: 9px;
    padding: 12px;
    font-size: 12px;
    color: var(--axe-text-light);
    margin-top: 16px;
}

/* Loading AJAX */
.axeimmo-ajax-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* =====================================================
   Bloc Visite virtuelle / Vidéo
===================================================== */
.axeimmo-video-block {
    background: #fff;
    border-radius: var(--axe-radius);
    padding: 24px;
    border: 1px solid var(--axe-border);
    margin-bottom: 24px;
    box-shadow: var(--axe-shadow);
}

.axeimmo-video-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--axe-primary);
    margin: 0 0 16px;
}

.axeimmo-video-thumb {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    background: #111;
    text-decoration: none;
}

.axeimmo-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.axeimmo-video-thumb:hover img {
    transform: scale(1.04);
}

.axeimmo-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.axeimmo-video-play svg {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 2px 8px rgba(13, 48, 125, 0.5));
    animation: axe-play-pulse 2.2s ease-in-out infinite;
    transition: transform 0.25s ease, filter 0.25s ease;
}

@keyframes axe-play-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 2px 8px rgba(13, 48, 125, 0.45));
    }

    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 4px 16px rgba(13, 48, 125, 0.7));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 2px 8px rgba(13, 48, 125, 0.45));
    }
}

.axeimmo-video-thumb:hover .axeimmo-video-play svg {
    animation: none;
    transform: scale(1.15);
    filter: drop-shadow(0 4px 20px rgba(13, 48, 125, 0.8));
}

/* Modal lightbox */
.axeimmo-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.axeimmo-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

.axeimmo-modal-inner {
    position: relative;
    width: 90vw;
    max-width: 960px;
    z-index: 1;
}

.axeimmo-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.axeimmo-modal-close:hover {
    opacity: 1;
}

.axeimmo-modal-video {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.axeimmo-modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}