:root {
    --hektor-primary: #0f172a;
    --hektor-secondary: #3b82f6;
    --hektor-accent: #f59e0b;
    --hektor-text: #334155;
    --hektor-bg: #f8fafc;
    --hektor-border: #e2e8f0;
    --hektor-radius: 12px;
    --hektor-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --hektor-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --hektor-transition: all 0.3s ease;
}

/* Fiche Nego */
.hektor-fiche-nego {
    background: #fff;
    padding: 24px;
    border-radius: var(--hektor-radius);
    box-shadow: var(--hektor-shadow);
    text-align: center;
    border: 1px solid var(--hektor-border);
}

.hektor-nego-avatar {
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.hektor-nego-nom {
    font-size: 1.25rem;
    color: var(--hektor-primary);
    margin: 0 0 20px 0;
    font-weight: 600;
}

.hektor-nego-ctas {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hektor-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--hektor-transition);
    font-size: 14px;
}

.hektor-btn-tel {
    background: var(--hektor-primary);
    color: #fff !important;
}
.hektor-btn-tel:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

.hektor-btn-mail {
    background: var(--hektor-bg);
    color: var(--hektor-primary) !important;
    border: 1px solid var(--hektor-border);
}
.hektor-btn-mail:hover {
    background: #e2e8f0;
}

.hektor-fiche-nego-btn-wrapper {
    display: block;
    width: 100%;
}

button.hektor-btn-rappel,
.hektor-btn-rappel {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    background: var(--hektor-secondary);
    color: #fff;
    text-decoration: none;
    box-sizing: border-box !important;
    cursor: pointer;
    line-height: 1 !important;
    text-align: center !important;
    margin: 0;
    transition: var(--hektor-transition);
}

button.hektor-btn-rappel:hover,
.hektor-btn-rappel:hover {
    background: #2563eb;
    transform: none !important;
    box-shadow: none !important;
}

button.hektor-btn-rappel *,
.hektor-btn-rappel * {
    box-sizing: border-box !important;
}

.hektor-btn-inner {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    width: 100%;
    height: 100%;
}

.hektor-btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.hektor-btn-icon i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.hektor-btn-icon svg {
    display: block !important;
    vertical-align: middle !important;
}

.hektor-btn-text {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Form Popup */
.hektor-rappel-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow-y: auto;
}

.hektor-rappel-content {
    background: #fff;
    padding: 32px;
    border-radius: var(--hektor-radius);
    width: 100%;
    max-width: 460px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.15);
    animation: hektorSlideUp 0.3s ease-out;
    box-sizing: border-box;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

@keyframes hektorSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hektor-close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    background: transparent;
    border: none;
    line-height: 1;
    padding: 0;
    transition: var(--hektor-transition);
    box-sizing: border-box;
    z-index: 10;
}
.hektor-close-popup:hover { color: var(--hektor-primary); }
.hektor-close-popup i {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hektor-close-popup svg {
    display: block;
    vertical-align: middle;
}
.hektor-close-popup span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.hektor-modal-header {
    margin-bottom: 20px;
}

.hektor-modal-intro {
    display: block;
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 6px;
    line-height: 1.3;
}

.hektor-modal-nego-name {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--hektor-primary);
    margin: 0;
    line-height: 1.3;
}

.hektor-form-group {
    margin-bottom: 14px;
    text-align: left;
}

.hektor-form-group input,
.hektor-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--hektor-border);
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: var(--hektor-transition);
    background-color: #fff;
}
.hektor-form-group textarea {
    resize: vertical;
}
.hektor-form-group input:focus,
.hektor-form-group textarea:focus {
    border-color: var(--hektor-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.hektor-form-checkboxes {
    margin-bottom: 20px;
    text-align: left;
}

.hektor-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
    color: #475569;
    user-select: none;
}
.hektor-checkbox-label:not(:last-child) {
    margin-bottom: 12px;
}
.hektor-checkbox-label input[type="checkbox"] {
    cursor: pointer;
    margin-top: 2px;
    accent-color: var(--hektor-secondary);
    width: 16px;
    height: 16px;
    min-width: 16px;
}
.hektor-checkbox-text {
    flex: 1;
}

.hektor-form-submit-wrapper {
    width: 100%;
    text-align: center;
}

.hektor-btn-submit {
    width: 100%;
    background: var(--hektor-secondary);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    transition: var(--hektor-transition);
    box-sizing: border-box;
}
.hektor-btn-submit:hover {
    background: #2563eb;
    transform: translateY(-1px);
}
.hektor-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* DPE GES */
.hektor-dpe-ges-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hektor-dpe-badge, .hektor-ges-badge {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hektor-dpe-badge span { font-size: 0.8em; opacity: 0.9; }

/* Galerie */
.hektor-gallery-grid {
    display: grid;
}
.hektor-gallery-grid.cols-1 { grid-template-columns: 1fr; }
.hektor-gallery-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.hektor-gallery-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.hektor-gallery-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.hektor-gallery-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.hektor-gallery-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }

.hektor-gallery-item {
    display: block;
    overflow: hidden;
    position: relative;
}
.hektor-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.hektor-gallery-item:hover img {
    transform: scale(1.05);
}

.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-16-9 { aspect-ratio: 16 / 9; }

/* Galerie Container & Carousel (v1.9.27-beta) */
.hektor-gallery-container {
    width: 100%;
    box-sizing: border-box;
}

.hektor-gallery-container.mode-carousel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    box-sizing: border-box;
}

/* Modale Elementor dédiée : empêcher tout dépassement vertical */
.elementor-popup-modal .dialog-widget-content {
    max-height: 100dvh !important;
    overflow: hidden !important;
}

.elementor-popup-modal .dialog-message {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

.elementor-popup-modal .elementor-location-popup,
.elementor-popup-modal .elementor-location-popup > .elementor-section,
.elementor-popup-modal .elementor-location-popup > .elementor-element,
.elementor-popup-modal .elementor-section,
.elementor-popup-modal .elementor-container,
.elementor-popup-modal .elementor-column,
.elementor-popup-modal .elementor-widget-wrap,
.elementor-widget-hektor_galerie,
.elementor-widget-hektor_galerie > .elementor-widget-container {
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

/* Swiper Main : prend strictement tout l'espace vertical restant */
.hektor-gallery-container.mode-carousel .swiper-main {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 0 !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.hektor-gallery-container.mode-carousel .swiper-main .swiper-wrapper {
    height: 100% !important;
    box-sizing: border-box !important;
}

.hektor-gallery-container.mode-carousel .swiper-main .swiper-slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
    background-color: transparent;
}

.hektor-gallery-container.mode-carousel .swiper-main .swiper-slide img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: auto !important;
    box-sizing: border-box !important;
    transition: var(--hektor-transition);
}

/* Swiper Zoom Container & Interactions (v1.9.27-beta) */
.hektor-gallery-container.mode-carousel {
    transition: background-color 0.3s ease;
}

.hektor-gallery-container.mode-carousel.is-zoomed {
    background-color: #000000 !important;
}

.hektor-gallery-container.mode-carousel .swiper-main .swiper-zoom-container {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.hektor-gallery-container.mode-carousel .swiper-main.has-zoom .swiper-zoom-container {
    cursor: zoom-in;
    touch-action: manipulation;
}

.hektor-gallery-container.mode-carousel .swiper-main.has-zoom .swiper-slide-zoomed .swiper-zoom-container {
    cursor: grab;
    touch-action: none;
}

.hektor-gallery-container.mode-carousel .swiper-main.has-zoom .swiper-slide-zoomed .swiper-zoom-container:active {
    cursor: grabbing;
}

/* Fluidité du pinch-to-zoom : isoler transform pour laisser Swiper régir la transition */
.hektor-gallery-container.mode-carousel .swiper-main .swiper-zoom-container > img {
    transition-property: transform !important;
    user-select: none;
    -webkit-user-drag: none;
}

/* Mode Zoom Plein Écran au Premier Plan - Style iOS (v1.9.27-beta) */
.hektor-gallery-container.mode-carousel .hektor-galerie-navigation,
.hektor-gallery-container.mode-carousel .swiper-thumbs {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hektor-gallery-container.mode-carousel.is-zoomed .hektor-galerie-navigation,
.hektor-gallery-container.mode-carousel.is-zoomed .swiper-thumbs {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.hektor-gallery-container.mode-carousel.is-zoomed .swiper-main {
    z-index: 50 !important;
    overflow: visible !important;
}

.hektor-gallery-container.mode-carousel.is-zoomed .swiper-main .swiper-wrapper {
    overflow: visible !important;
}

.hektor-gallery-container.mode-carousel.is-zoomed .swiper-main .swiper-slide:not(.swiper-slide-active) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease;
}

.hektor-gallery-container.mode-carousel.is-zoomed .swiper-main .swiper-slide.swiper-slide-active {
    overflow: visible !important;
    z-index: 60 !important;
}

.hektor-gallery-container.mode-carousel.is-zoomed .swiper-main .swiper-slide.swiper-slide-active .swiper-zoom-container {
    overflow: visible !important;
}

/* Galerie Navigation (Flèches & Séparateur) */
.hektor-galerie-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-sizing: border-box;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    z-index: 2;
    margin-top: 12px;
    margin-bottom: 12px;
    gap: 16px;
}

.hektor-galerie-navigation .hektor-swiper-prev,
.hektor-galerie-navigation .hektor-swiper-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    color: #0f172a;
    transition: var(--hektor-transition);
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

.hektor-galerie-navigation .hektor-swiper-prev:hover,
.hektor-galerie-navigation .hektor-swiper-next:hover {
    color: var(--hektor-secondary);
}

.hektor-galerie-navigation .hektor-swiper-prev svg,
.hektor-galerie-navigation .hektor-swiper-next svg {
    display: block;
    fill: currentColor;
    color: inherit;
    width: 18px;
    height: 18px;
    transition: var(--hektor-transition);
}

.hektor-galerie-navigation .hektor-swiper-prev svg path,
.hektor-galerie-navigation .hektor-swiper-next svg path {
    fill: currentColor;
}

.hektor-galerie-navigation .hektor-swiper-prev i,
.hektor-galerie-navigation .hektor-swiper-next i {
    font-size: 18px;
    line-height: 1;
    color: inherit;
}

.hektor-galerie-navigation .hektor-swiper-prev.swiper-button-disabled,
.hektor-galerie-navigation .hektor-swiper-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.hektor-galerie-navigation .hektor-nav-separator {
    background-color: #cbd5e1;
    width: 1px;
    height: 20px;
    flex-shrink: 0;
}

/* Galerie Vignettes (Thumbs) */
.hektor-gallery-container.mode-carousel .swiper-thumbs {
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    box-sizing: border-box;
    padding-bottom: 2px;
}

.hektor-gallery-container.mode-carousel .swiper-thumbs .swiper-wrapper {
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.hektor-gallery-container.mode-carousel .swiper-thumbs .swiper-slide {
    width: auto !important;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: var(--hektor-transition);
}

.hektor-gallery-container.mode-carousel .swiper-thumbs .swiper-slide:hover,
.hektor-gallery-container.mode-carousel .swiper-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.hektor-gallery-container.mode-carousel .swiper-thumbs .swiper-slide img {
    height: 80px;
    width: auto;
    object-fit: cover;
    display: block;
    box-sizing: border-box;
    border-radius: var(--hektor-radius);
    border: 2px solid transparent;
    transition: var(--hektor-transition);
}

.hektor-gallery-container.mode-carousel .swiper-thumbs .swiper-slide-thumb-active img {
    border-color: var(--hektor-secondary);
}

/* Recherche */
.hektor-recherche-container {
    background: #fff;
    padding: 24px;
    border-radius: var(--hektor-radius);
    box-shadow: var(--hektor-shadow);
    border: 1px solid var(--hektor-border);
}

.hektor-recherche-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.hektor-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hektor-range-inputs input {
    flex: 1;
    min-width: 0;
}

.hektor-filter-actions {
    display: flex;
    gap: 12px;
}
.hektor-filter-actions button {
    flex: 1;
}
.hektor-btn-reset {
    background: var(--hektor-bg);
    color: var(--hektor-text);
    border: 1px solid var(--hektor-border);
}
.hektor-btn-reset:hover {
    background: #e2e8f0;
}

/* Grille de listing */
.hektor-listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.hektor-listing-header .hektor-sort-form {
    margin: 0;
}
.hektor-listing-header select {
    box-sizing: border-box;
}
.hektor-no-results {
    width: 100%;
    box-sizing: border-box;
}

/* Grille de listing - Responsive Mobile et Tablette */
@media (max-width: 1024px) {
    .hektor-listing-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .hektor-listing-header .hektor-counter {
        width: 100% !important;
        text-align: center;
    }
    .hektor-listing-header .hektor-sort-form {
        width: 100% !important;
    }
    .hektor-listing-header select {
        width: 100% !important;
        max-width: 100% !important;
        display: block;
    }
}

/* ==========================================================================
   Widget Caractéristiques Annonce
   ========================================================================== */
.hektor-caracteristiques-wrapper {
    width: 100%;
    background: transparent;
    border: none;
    box-sizing: border-box;
}

.hektor-caracteristiques-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    margin: 0;
    padding: 0;
}

/* Suppression absolue de tout fond de tableau / lignes zébrées de thème (même en CSS thématique agressif) */
.hektor-caracteristiques-table,
.hektor-caracteristiques-table tbody,
.hektor-caracteristiques-table tr,
.hektor-caracteristiques-table th,
.hektor-caracteristiques-table td,
.hektor-caracteristiques-table tr:nth-child(even),
.hektor-caracteristiques-table tr:nth-child(odd),
.hektor-caracteristiques-table tr:nth-child(2n),
.hektor-caracteristiques-table tr:nth-child(2n+1),
.hektor-caracteristiques-table tr:nth-child(even) td,
.hektor-caracteristiques-table tr:nth-child(odd) td,
.hektor-caracteristiques-table tr:nth-child(2n) td,
.hektor-caracteristiques-table tr:nth-child(2n+1) td,
.hektor-caracteristiques-table tr td {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.hektor-caracteristiques-table tr {
    border: none;
}

.hektor-caracteristiques-table td {
    border: none;
    box-sizing: border-box;
    vertical-align: middle;
}

.hektor-carac-label {
    text-align: left;
}

.hektor-carac-value {
    text-align: right;
}

.hektor-editor-dummy-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #475569;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    padding: 4px 10px;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Hektor - Texte Conditionnel (v1.9.22-beta) */
.hektor-texte-conditionnel {
    display: block;
    box-sizing: border-box;
}

.hektor-texte-conditionnel p:last-child {
    margin-bottom: 0;
}

