/**
 * Halo sur le lac — Plans des unites
 * =============================================================================
 * Design aligné sur la home page halosurlelac.com :
 *   - Sections pleine largeur avec fonds alternes blanc / #EFF0F0
 *   - Typographie : Poppins (titres) + Urbanist (corps)
 *   - Regle graphique : H1=100px, H2=80px, H3=60px, P=14px
 *   - Palette : marine #1E314F, sauge #84A09B, olive #899B43, gris #EFF0F0
 *   - Boutons : Urbanist 600, uppercase, letter-spacing 1.2px, radius 0
 *   - Zero media queries "patchwork" : tout en clamp() responsive
 * =============================================================================
 */

/* ===========================================================================
 * 0. Variables & reset de scope
 * ========================================================================= */
:root {
    /* Palette */
    --halo-white:     #FFFFFF;
    --halo-primary:   #EFF0F0;
    --halo-secondary: #84A09B;   /* sauge */
    --halo-accent:    #1E314F;   /* marine */
    --halo-olive:     #899B43;
    --halo-bleu-gris: #556879;
    --halo-text:      #7A7A7A;
    --halo-border:    #E2E2E2;
    --halo-border-form: #878787;

    /* Typographie */
    --halo-poppins:  "Poppins",   "Helvetica Neue", Arial, sans-serif;
    --halo-urbanist: "Urbanist",  "Helvetica Neue", Arial, sans-serif;

    /* Echelle typographique (Regle Graph.png) */
    --halo-h1: clamp(48px, 6.5vw, 100px);
    --halo-h2: clamp(36px, 5.5vw, 80px);
    --halo-h3: clamp(30px, 4.5vw, 60px);
    --halo-h4: clamp(20px, 2.5vw, 40px);
    --halo-h5: clamp(16px, 1.8vw, 24px);
    --halo-p:  14px;

    /* Espacements section */
    --halo-section-pad-v: clamp(60px, 8vw, 120px);
    --halo-section-pad-h: clamp(24px, 5vw, 80px);
    --halo-inner-max:     1440px;

    /* Boutons */
    --halo-btn-radius: 0;
    --halo-btn-pad-v:  16px;
    --halo-btn-pad-h:  30px;
}

/* Scope reset */
.halo-plans-page *,
.halo-section *,
.halo-unite * {
    box-sizing: border-box;
}

.halo-plans-page {
    font-family: var(--halo-urbanist);
    color: var(--halo-text);
}

/* ===========================================================================
 * 1. WRAPPER PAGE + CONTENU EDITEUR
 * ========================================================================= */
.halo-plans-page__editor-content {
    max-width: var(--halo-inner-max);
    margin: 0 auto;
    padding: var(--halo-section-pad-v) var(--halo-section-pad-h);
}

/* ===========================================================================
 * 2. SYSTEME DE SECTIONS PLEINE LARGEUR
 *    Identique aux sections Elementor de la home page
 * ========================================================================= */

/* Toutes les sections occupent 100% de la largeur viewport */
.halo-section {
    width: 100%;
    position: relative;
}

/* Alternance des fonds */
/*
 * Le header Elementor (template 254) est en position:absolute avec une hauteur
 * de 187px sur desktop (confirmé dans post-254.css : #header-inner { height: 187px }).
 * On compense via une variable --halo-header-h qui est surchargée par breakpoint,
 * exactement comme Elementor surcharge son margin-bottom.
 *
 * Desktop (≥ 1201px) : 187px
 * Tablette (768-1200) : 260px  ← margin-bottom du spacer Elementor à ce breakpoint
 * Mobile  (< 768px)  : 260px  ← idem mobile
 */
:root {
    --halo-header-h: 187px;
}
@media (max-width: 1200px) {
    :root { --halo-header-h: 260px; }
}
@media (max-width: 767px) {
    :root { --halo-header-h: 260px; }
}

.halo-section--batiment {
    background: var(--halo-white);
    /* padding-top = hauteur du header + petit espace visuel sous le header */
    padding-top: calc(var(--halo-header-h) + clamp(16px, 2vw, 32px));
    padding-bottom: 0; /* l'image bat jusque en bas sans padding */
}

.halo-section--plan {
    background: var(--halo-primary);
    padding: var(--halo-section-pad-v) 0;
    display: none; /* JS applique .is-open */
}

/* JS applique is-open via HALO.$floor.addClass('is-open') */
.halo-section--plan.is-open,
#halo-plans-floor.is-open {
    display: block;
}

.halo-section--unite {
    background: var(--halo-white);
    padding: 0;
    display: none; /* JS applique .is-open ou .is-loading */
}

/* JS applique is-open / is-loading via HALO.$unite.addClass(...) */
.halo-section--unite.is-open,
.halo-section--unite.is-loading,
#halo-plans-unite.is-open,
#halo-plans-unite.is-loading {
    display: block;
}

/* ===========================================================================
 * 3. SECTION A — INTRO + BATIMENT
 * ========================================================================= */

/* --- 3.1 Intro : titre H2 + texte centré --- */
.halo-plans__intro {
    text-align: center;
    max-width: 1100px;
    margin: 0 auto clamp(40px, 5vw, 72px);
    padding: 0 var(--halo-section-pad-h);
}

/* H2 — Poppins Light 80px (Regle Graph) */
.halo-plans__title {
    font-family: var(--halo-poppins);
    font-weight: 300;
    font-size: var(--halo-h2);
    line-height: 1.1;
    letter-spacing: 1.5px;
    color: var(--halo-accent);
    margin: 0 0 clamp(16px, 2vw, 28px);
}

.halo-plans__intro-text {
    font-family: var(--halo-urbanist);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    color: var(--halo-text);
    max-width: 900px;
    margin: 0 auto;
}

.halo-plans__intro-text p {
    margin: 0 0 1em;
}

.halo-plans__intro-text p:last-child {
    margin-bottom: 0;
}

/* --- 3.2 Bloc batiment pleine largeur --- */
.halo-plans__building {
    position: relative;
    width: 100%;
    max-width: var(--halo-inner-max);
    margin: 0 auto;
}

/* Ratio aspect image 1920×1115 = 58.07% */
.halo-plans__building-inner {
    position: relative;
    width: 100%;
    padding-top: 58.07%;
    overflow: hidden;
}

.halo-plans__building-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Label "CHOISIR UN ÉTAGE" — fond olive, coin haut-gauche */
.halo-plans__building-label {
    position: absolute;
    top: clamp(16px, 2.5vw, 28px);
    left: clamp(16px, 2.5vw, 28px);
    z-index: 4;
    background: var(--halo-olive);
    color: #fff;
    font-family: var(--halo-poppins);
    font-weight: 600;
    font-size: clamp(10px, 1vw, 13px);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: clamp(10px, 1.2vw, 16px) clamp(14px, 1.8vw, 24px);
    line-height: 1.5;
}

.halo-plans__building-label-phase {
    display: block;
    font-size: 0.85em;
    font-weight: 400;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

/* Overlay SVG — couvre toute l'image */
.halo-plans__floors-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

/* Polygones d'etage */
.halo-plans__floors-svg .halo-floor {
    fill: var(--halo-secondary);
    fill-opacity: 0;
    cursor: pointer;
    pointer-events: auto;
    transition: fill-opacity 0.22s ease;
    outline: none;
}

.halo-plans__floors-svg .halo-floor:hover,
.halo-plans__floors-svg .halo-floor:focus-visible,
.halo-plans__floors-svg .halo-floor.is-active {
    fill-opacity: 0.72;
}

/* Synchro hover label <-> polygone via data-hover sur le parent */
.halo-plans__building[data-hover="3"] .halo-floor[data-floor="3"],
.halo-plans__building[data-hover="2"] .halo-floor[data-floor="2"],
.halo-plans__building[data-hover="1"] .halo-floor[data-floor="1"],
.halo-plans__building[data-hover="0"] .halo-floor[data-floor="0"] {
    fill-opacity: 0.72;
}

/* Focus visible clavier */
.halo-plans__floors-svg .halo-floor:focus-visible {
    stroke: var(--halo-olive);
    stroke-width: 3;
}

/* Etat actif persistant : etage selectionne reste marque en olive */
.halo-plans__floors-svg .halo-floor.is-active {
    fill: var(--halo-olive);
    fill-opacity: 0.45;
}

/* ---------------------------------------------------------------------------
 * Legende des statuts d'unite sous les filtres (section B)
 * ------------------------------------------------------------------------- */
.halo-plans__legende {
    list-style: none;
    padding: 0;
    margin: clamp(12px, 1.5vw, 18px) auto 0;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    font-family: var(--halo-urbanist);
    font-size: 13px;
    color: var(--halo-text);
    letter-spacing: 0.4px;
}
.halo-plans__legende-item {
    position: relative;
    padding-left: 22px;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}
.halo-plans__legende-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 2px;
}
.halo-plans__legende-item--dispo::before   { background: var(--halo-secondary); }
.halo-plans__legende-item--reserve::before { background: #E2B84B; }
.halo-plans__legende-item--loue::before    { background: #4E4E4E; }
.halo-plans__legende-item--soon::before {
    background: #FFFFFF;
    border: 2px solid #7A7A7A;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    box-sizing: border-box;
}
.halo-plans__legende-item--soon::after {
    content: "?";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #7A7A7A;
    line-height: 1;
    pointer-events: none;
}

/* Bouton Retour : fleche a gauche au lieu de droite */
.halo-btn__arrow--left {
    transition: transform 0.2s ease;
}
.halo-btn:hover .halo-btn__arrow--left,
.halo-btn:focus-visible .halo-btn__arrow--left {
    transform: translateX(-4px);
}

/* Labels d'etage flottants — cotes gauche batiment */
.halo-plans__floor-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.halo-plans__floor-label-item {
    position: absolute;
    top: var(--lbl-top);
    left: 16%; /* juste a gauche du batiment, pour ne pas ecraser la photo */
    transform: translateY(-50%);
    pointer-events: auto;
    cursor: pointer;
    display: inline-flex;
    outline: none;
    z-index: 5;
}

/* Badge numerote de l'etage — gros chiffre, exposant petit en haut-droite */
.halo-plans__floor-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--halo-secondary);
    color: #fff;
    font-family: var(--halo-urbanist);
    font-weight: 700;
    font-size: clamp(22px, 2.6vw, 36px);
    min-width: clamp(40px, 3.8vw, 56px);
    min-height: clamp(40px, 3.8vw, 56px);
    padding: 4px 6px;
    transition: transform 0.22s ease, background 0.22s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    line-height: 1;
}

.halo-plans__floor-label-item:hover .halo-plans__floor-num,
.halo-plans__floor-label-item:focus-visible .halo-plans__floor-num,
.halo-plans__floor-label-item.is-active .halo-plans__floor-num {
    transform: scale(1.08);
    background: var(--halo-olive);
}

.halo-plans__floor-num sup {
    font-size: 0.42em;
    line-height: 1;
    margin-left: 2px;
    align-self: flex-start;     /* exposant ancre au sommet */
    margin-top: 0.3em;          /* leger decalage du tout en haut */
    font-weight: 600;
}

/* Badge "Jardin" : taille intermediaire (mot complet, pas un chiffre) */
.halo-plans__floor-label-item[data-floor="0"] .halo-plans__floor-num {
    font-size: clamp(14px, 1.4vw, 19px);
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 9px 14px;
    min-width: auto;
    min-height: clamp(38px, 3.3vw, 50px);
}

/* ===========================================================================
 * 4. SECTION B — PLAN D'ETAGE
 * ========================================================================= */

.halo-plans__floor-inner {
    max-width: var(--halo-inner-max);
    margin: 0 auto;
    padding: 0 var(--halo-section-pad-h);
}

/* --- 4.1 En-tete : titre + filtres + hint --- */
.halo-plans__floor-header {
    text-align: center;
    margin-bottom: clamp(24px, 3vw, 48px);
}

/* H3 — Urbanist Regular 60px */
.halo-plans__floor-title {
    font-family: var(--halo-urbanist);
    font-weight: 400;
    font-size: var(--halo-h3);
    line-height: 1.15;
    letter-spacing: 0.8px;
    color: var(--halo-accent);
    margin: 0 0 clamp(20px, 2.5vw, 36px);
}

.halo-plans__floor-title sup {
    font-size: 0.5em;
    vertical-align: super;
    margin-left: 1px;
}

/* Groupe de filtres checkbox — bande grise comme la home */
.halo-plans__filters {
    display: inline-flex;
    gap: 0;
    background: #D6DADA; /* gris doux, cohérent avec les chips home page */
    padding: 14px 24px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 auto clamp(12px, 1.5vw, 18px);
}

.halo-plans__filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 22px;
    cursor: pointer;
    font-family: var(--halo-urbanist);
    font-weight: 500;
    font-size: clamp(15px, 1.5vw, 18px);
    letter-spacing: 0.2px;
    color: var(--halo-accent);
    user-select: none;
    transition: color 0.18s ease;
}

.halo-plans__filter:hover {
    color: var(--halo-olive);
}

/* Input natif masqué */
.halo-plans__filter-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Checkbox stylisée */
.halo-plans__filter-box {
    display: inline-block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 1.5px solid var(--halo-accent);
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.halo-plans__filter-input:checked + .halo-plans__filter-box {
    background: var(--halo-accent);
    border-color: var(--halo-accent);
}

/* Checkmark SVG via CSS */
.halo-plans__filter-input:checked + .halo-plans__filter-box::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.halo-plans__filter-input:focus-visible + .halo-plans__filter-box {
    outline: 2px solid var(--halo-olive);
    outline-offset: 2px;
}

/* Texte indicatif sous les filtres */
.halo-plans__floor-hint {
    font-family: var(--halo-urbanist);
    font-size: 15px;
    font-weight: 400;
    color: var(--halo-text);
    margin: 0;
    letter-spacing: 0.1px;
}

/* --- 4.2 Carte SVG de l'etage --- */
.halo-plans__floor-map {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(20px, 3vw, 48px) 0 clamp(24px, 3.5vw, 56px);
}

.halo-plans__floor-map svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Groupes d'unite dans le SVG */
.halo-plans__floor-map .halo-unit {
    cursor: pointer;
    opacity: 0.38;
    transition: opacity 0.2s ease;
    outline: none;
}

.halo-plans__floor-map .halo-unit:hover,
.halo-plans__floor-map .halo-unit:focus-visible {
    opacity: 0.88;
}

.halo-plans__floor-map .halo-unit:focus-visible polygon,
.halo-plans__floor-map .halo-unit:focus-visible rect:not([fill="none"]) {
    stroke: var(--halo-accent);
    stroke-width: 2;
}

/* Unite filtree (type non selectionne) */
.halo-plans__floor-map .halo-unit.is-disabled {
    opacity: 0.08;
    pointer-events: none;
    cursor: default;
}

/* Unite louee — gris fonce non cliquable */
.halo-plans__floor-map .halo-unit--statut-loue {
    opacity: 0.50;
    pointer-events: none;
    cursor: not-allowed;
}

.halo-plans__floor-map .halo-unit--statut-loue polygon,
.halo-plans__floor-map .halo-unit--statut-loue rect:not([fill="none"]) {
    fill: #4E4E4E !important;
}

/* Unite reservee — ambre */
.halo-plans__floor-map .halo-unit--statut-reserve {
    opacity: 0.60;
    pointer-events: none;
}

.halo-plans__floor-map .halo-unit--statut-reserve polygon,
.halo-plans__floor-map .halo-unit--statut-reserve rect:not([fill="none"]) {
    fill: #E2B84B !important;
}

/* Unite sans donnees en base — indicateur visuel discret + interactif (tooltip+toast) */
.halo-plans__floor-map .halo-unit--unavailable {
    opacity: 0.32;
    cursor: help;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}
.halo-plans__floor-map .halo-unit--unavailable polygon,
.halo-plans__floor-map .halo-unit--unavailable rect:not([fill="none"]) {
    fill: #B8B8B8 !important; /* gris doux, pour bien distinguer des disponibles */
}
.halo-plans__floor-map .halo-unit--unavailable:hover {
    opacity: 0.55;
}

/* ===========================================================================
 * TOAST NOTIFICATION — feedback UX optimal lors d'un clic non-actionnable
 * (unite indisponible, louee, reservee, etc.)
 * ========================================================================= */
.halo-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--halo-accent);
    color: #fff;
    padding: 16px 28px;
    font-family: var(--halo-urbanist);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
    box-shadow: 0 8px 28px rgba(30, 49, 79, 0.32);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none;
    max-width: calc(100vw - 40px);
    border-left: 4px solid var(--halo-secondary);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.halo-toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.halo-toast--info     { border-left-color: var(--halo-secondary); }
.halo-toast--warning  { border-left-color: #E2B84B; }
.halo-toast--rented   { border-left-color: #6B7280; }

.halo-toast__icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}
.halo-toast__close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    padding: 0 0 0 8px;
    line-height: 1;
    transition: color 0.15s ease;
}
.halo-toast__close:hover { color: #fff; }

.halo-toast__cta {
    background: var(--halo-secondary);
    color: #fff;
    text-decoration: none;
    padding: 7px 14px;
    font-family: var(--halo-urbanist);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: background 0.18s ease;
    margin-left: 6px;
    white-space: nowrap;
}
.halo-toast__cta:hover {
    background: var(--halo-olive);
    color: #fff;
}

@media (max-width: 600px) {
    .halo-toast {
        flex-wrap: wrap;
        bottom: 16px;
        max-width: calc(100vw - 24px);
        padding: 14px 18px;
        font-size: 13px;
    }
    .halo-toast__cta {
        margin-left: 0;
        margin-top: 8px;
        flex-basis: 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .halo-toast { transition: opacity 0.15s ease; transform: translateX(-50%); }
    .halo-toast.is-show { transform: translateX(-50%); }
}

/* --- 4.3 Bouton Retour centré --- */
.halo-plans__floor-actions {
    text-align: center;
    padding-bottom: clamp(8px, 2vw, 20px);
}

/* ===========================================================================
 * 5. SECTION C — FICHE UNITE
 * ========================================================================= */

/* Conteneur AJAX */
.halo-plans__unite-inner {
    width: 100%;
}

/* Article principal */
.halo-unite {
    background: var(--halo-white);
    max-width: var(--halo-inner-max);
    margin: 0 auto;
    position: relative;
}

/* --- 5.1 Grille 2 colonnes --- */
.halo-unite__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 80px);
    padding: clamp(40px, 5vw, 80px) clamp(24px, 5vw, 80px) clamp(32px, 4vw, 60px);
}

/* --- 5.2 Colonne gauche --- */
.halo-unite__col--left {
    position: relative;
}

/* Titre "4½ / 950 pi²" — grand, impact visuel fort */
.halo-unite__type {
    font-family: var(--halo-urbanist);
    font-weight: 400;
    font-size: var(--halo-h3);
    line-height: 1;
    color: var(--halo-accent);
    margin: 0 0 clamp(8px, 1.2vw, 16px);
    letter-spacing: 0.5px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 10px;
}

.halo-unite__type-label {
    font-weight: 700;
}

.halo-unite__type-sep {
    font-weight: 200;
    color: var(--halo-accent);
    opacity: 0.6;
}

.halo-unite__type-area {
    font-weight: 400;
}

.halo-unite__type sup {
    font-size: 0.52em;
    vertical-align: super;
    margin-left: 1px;
}

/* Disponibilite */
.halo-unite__dispo {
    font-family: var(--halo-urbanist);
    font-size: 16px;
    font-weight: 400;
    color: var(--halo-text);
    margin: 0 0 clamp(20px, 2.5vw, 32px);
    letter-spacing: 0.15px;
}

/* CTA Contactez-nous */
.halo-unite__cta {
    margin-bottom: clamp(24px, 3vw, 40px);
    width: fit-content;
}

/* Image plan d'unite */
.halo-unite__plan-image {
    margin-top: clamp(16px, 2vw, 24px);
    background: #fff;
    padding: 12px;
    border: 1px solid var(--halo-border);
}

.halo-unite__plan-image img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* --- 5.3 Colonne droite --- */
.halo-unite__col--right {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 2.2vw, 30px);
}

/* Mini-carte etage — pleine largeur de la colonne droite */
.halo-unite__minimap {
    background: var(--halo-white);
    padding: 16px 20px;
    max-width: 100%;
    border: 1px solid var(--halo-border);
    flex-shrink: 0;
}

.halo-unite__minimap svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Unites dans la mini-carte */
.halo-unite__minimap .halo-minimap-unit {
    opacity: 0.22;
    pointer-events: none;
}

.halo-unite__minimap .halo-minimap-unit.is-selected {
    opacity: 1;
}

.halo-unite__minimap .halo-minimap-unit.is-selected polygon,
.halo-unite__minimap .halo-minimap-unit.is-selected rect:not([fill="none"]) {
    fill: var(--halo-accent) !important;
}

/* En-tete unite — "Unite 307 | 149 DENISON EST | 3e etage" */
.halo-unite__header {
    font-family: var(--halo-urbanist);
    font-weight: 700;
    font-size: var(--halo-h4);
    color: var(--halo-accent);
    margin: 0;
    line-height: 1.25;
    letter-spacing: 0.2px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.halo-unite__header-num,
.halo-unite__header-adresse,
.halo-unite__header-etage {
    display: inline;
}

.halo-unite__header-pipe {
    color: var(--halo-accent);
    font-weight: 200;
    margin: 0 clamp(6px, 0.8vw, 12px);
    opacity: 0.5;
}

.halo-unite__header sup {
    font-size: 0.55em;
    vertical-align: super;
}

/* Sections de contenu (Caracteristiques, Inclusions, Option) */
.halo-unite__section {
    margin: 0;
}

/* H5 — titres sauge/olive selon maquette */
.halo-unite__section-title {
    font-family: var(--halo-urbanist);
    font-weight: 700;
    font-size: var(--halo-h5);
    color: var(--halo-olive);
    margin: 0 0 clamp(8px, 1vw, 14px);
    letter-spacing: 0.15px;
    line-height: 1.2;
}

/* Listes */
.halo-unite__list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--halo-urbanist);
    font-size: 15px;
    line-height: 1.7;
    color: var(--halo-text);
}

/* Liste caracteristiques : nom | dimension sur 2 colonnes */
.halo-unite__list--pieces .halo-unite__list-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    gap: 16px;
    border-bottom: 1px dotted rgba(122, 122, 122, 0.2);
}

.halo-unite__list--pieces .halo-unite__list-item:last-child {
    border-bottom: 0;
}

.halo-unite__list-label {
    flex: 1;
    min-width: 0;
}

.halo-unite__list-value {
    white-space: nowrap;
    color: var(--halo-accent);
    font-weight: 500;
}

/* Liste inclusions/options : puces olive */
.halo-unite__list--bullets li {
    position: relative;
    padding-left: 18px;
    line-height: 1.6;
    margin-bottom: 2px;
}

.halo-unite__list--bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--halo-olive);
    border-radius: 50%;
}

/* --- 5.4 Barre d'actions FULL-WIDTH --- */
.halo-unite__actions {
    width: 100%;
    background: var(--halo-accent);
    padding: clamp(18px, 2.5vw, 30px) clamp(24px, 5vw, 80px);
    display: flex;
    gap: clamp(20px, 4vw, 60px);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

/* Placeholder invisible — on le masque completement quand pas de PDF
   pour que les 3 boutons (ou 2) restent equilibres au centre */
.halo-unite__actions-placeholder {
    display: none;
}

/* Le bouton "Cette unite m'interesse" est plus prominent : rempli sauge */
.halo-btn--ghost-filled {
    background: var(--halo-secondary);
    border-color: var(--halo-secondary);
    color: #fff;
}

.halo-btn--ghost-filled:hover,
.halo-btn--ghost-filled:focus-visible {
    background: var(--halo-olive);
    border-color: var(--halo-olive);
    color: #fff;
}

/* ===========================================================================
 * 6. SECTION D — FORMULAIRE DEMANDE D'INFORMATION
 * ========================================================================= */
.halo-demande {
    background: var(--halo-primary);
    padding: var(--halo-section-pad-v) var(--halo-section-pad-h);
    /*
     * Le logo natif du footer Elementor (template 287) remonte de 108px
     * au-dessus du bord superieur du footer (top:-108px dans post-287.css).
     * On doit laisser au minimum 108px libres en bas de cette section pour
     * que le logo atterrisse dans la zone grise et non sur le contenu du formulaire.
     * calc(section-pad + 108px) = confort visuel + espace logo footer.
     */
    padding-bottom: calc(var(--halo-section-pad-v) + 108px);
    position: relative;
}

.halo-demande__inner {
    max-width: 1040px;
    margin: 0 auto;
}

/* H3 — Urbanist Regular 60px (echelle reglegraphique pour titre de formulaire) */
.halo-demande__title {
    font-family: var(--halo-urbanist);
    font-weight: 400;
    font-size: var(--halo-h3);
    line-height: 1.15;
    letter-spacing: 0.9px;
    color: var(--halo-accent);
    text-align: center;
    margin: 0 0 clamp(24px, 3.5vw, 48px);
}

/* Conteneur formulaire — passthrough.
   Le cadre visuel (fond blanc, bordure, padding) et toutes les surcharges
   Gravity Forms sont désormais portées par #gform_wrapper_1 dans
   assets/css/halo-form.css (chargé globalement). Cela permet au formulaire
   d'avoir un rendu identique sur la home et sur la page Plans des unités. */
.halo-demande__form-wrap {
    /* aucune décoration ici — voir halo-form.css */
}

/* Message d'absence de Gravity Forms (fallback du template) */
.halo-demande__no-form {
    font-family: var(--halo-urbanist);
    font-size: 14px;
    color: var(--halo-text);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* --- 6.3 Logo flottant — supprime ---
 *
 * Le logo entre la section formulaire et le footer est desormais rendu
 * exclusivement par le footer Elementor natif (template 287, element-48529ca3,
 * position:absolute; top:-108px). Le doublon PHP/CSS a ete retire.
 * Ce bloc CSS est conserve en commentaire pour memoire.
 *
 * .halo-floating-logo { position:absolute; bottom:0; left:50%;
 *     transform:translate(-50%,50%); z-index:10; }
 * .halo-floating-logo__img { max-width:200px; }
 */

/* ===========================================================================
 * 7. SYSTEME DE BOUTONS — aligné design system Halo
 * ========================================================================= */
.halo-btn {
    display: inline-flex;
    align-items: center;
    gap: clamp(10px, 1.2vw, 16px);
    padding: var(--halo-btn-pad-v) var(--halo-btn-pad-h);
    font-family: var(--halo-urbanist);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    border-radius: var(--halo-btn-radius);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    background: transparent;
    color: var(--halo-accent);
    white-space: nowrap;
}

.halo-btn__arrow {
    font-size: 1.25em;
    line-height: 1;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.halo-btn:hover .halo-btn__arrow,
.halo-btn:focus-visible .halo-btn__arrow {
    transform: translateX(5px);
}

/* --- Variants --- */

/* Primaire sauge : bouton "Retour au choix d'etage" */
.halo-btn--secondary {
    background: var(--halo-secondary);
    color: #fff;
    border-color: var(--halo-secondary);
}
.halo-btn--secondary:hover,
.halo-btn--secondary:focus-visible {
    background: #9DBAB4;
    border-color: #9DBAB4;
    color: #fff;
}

/* Accent marine : CTA principaux */
.halo-btn--accent {
    background: var(--halo-accent);
    color: #fff;
    border-color: var(--halo-accent);
}
.halo-btn--accent:hover,
.halo-btn--accent:focus-visible {
    background: #2A4166;
    border-color: #2A4166;
    color: #fff;
}

/* Olive */
.halo-btn--olive {
    background: var(--halo-olive);
    color: #fff;
    border-color: var(--halo-olive);
}
.halo-btn--olive:hover,
.halo-btn--olive:focus-visible {
    background: var(--halo-accent);
    border-color: var(--halo-accent);
    color: #fff;
}

/* Ghost : sur fond marine (barre actions fiche) */
.halo-btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}
.halo-btn--ghost:hover,
.halo-btn--ghost:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    color: #fff;
}

/* Ghost filled : "Cette unite m'interesse" — mis en avant sur fond marine */
.halo-btn--ghost-filled {
    background: var(--halo-secondary);
    border-color: var(--halo-secondary);
    color: #fff;
}
.halo-btn--ghost-filled:hover,
.halo-btn--ghost-filled:focus-visible {
    background: #9DBAB4;
    border-color: #9DBAB4;
    color: #fff;
}

/* Outline : bouton sur fond clair */
.halo-btn--outline {
    background: transparent;
    color: var(--halo-accent);
    border-color: var(--halo-accent);
}
.halo-btn--outline:hover,
.halo-btn--outline:focus-visible {
    background: var(--halo-accent);
    color: #fff;
}

/* ===========================================================================
 * 8. UTILITAIRES
 * ========================================================================= */

/* Spinner de chargement */
.halo-plans__loader {
    width: 52px;
    height: 52px;
    margin: 80px auto;
    border: 3px solid rgba(132, 160, 155, 0.25);
    border-top-color: var(--halo-secondary);
    border-radius: 50%;
    animation: halo-spin 0.85s linear infinite;
    display: block;
}

@keyframes halo-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Message d'erreur */
.halo-plans__error {
    padding: 28px 24px;
    background: #FDF4F4;
    border: 1px solid #E9C2C2;
    color: #9B3B3B;
    text-align: center;
    font-family: var(--halo-urbanist);
    font-size: 15px;
    max-width: 600px;
    margin: 40px auto;
}

/* ===========================================================================
 * 9. RESPONSIVE
 * ========================================================================= */

/* --- 9.1 Tablette (< 1024px) --- */
@media (max-width: 1024px) {
    .halo-unite__grid {
        gap: clamp(24px, 3vw, 48px);
    }
}

/* --- 9.2 Tablette portrait / grand mobile (< 768px) --- */
@media (max-width: 768px) {

    /* Fiche unite : empilement vertical */
    .halo-unite__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px clamp(20px, 4vw, 40px) 28px;
    }

    /* Mini-carte : pleine largeur */
    .halo-unite__minimap {
        max-width: 100%;
    }

    /* Header unite : passage en pile */
    .halo-unite__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .halo-unite__header-pipe {
        display: none;
    }

    /* Barre actions : colonne */
    .halo-unite__actions {
        flex-direction: column;
        align-items: stretch;
        padding: 20px clamp(20px, 4vw, 40px);
        gap: 12px;
    }

    .halo-unite__actions .halo-btn {
        justify-content: space-between;
        width: 100%;
    }

    .halo-unite__actions-placeholder {
        display: none;
    }

    /* Formulaire responsive : voir assets/css/halo-form.css (#gform_wrapper_1) */

    /* Labels etage batiment */
    .halo-plans__floor-num {
        min-width: 44px;
        min-height: 44px;
        font-size: 18px;
        padding: 6px 10px;
    }
}

/* --- 9.3 Mobile (< 480px) --- */
@media (max-width: 480px) {

    /* Filtres empiles */
    .halo-plans__filters {
        width: 100%;
        padding: 12px 16px;
    }

    .halo-plans__filter {
        padding: 5px 14px;
        font-size: 15px;
    }

    /* Bouton formulaire pleine largeur : voir halo-form.css */
}

/* ===========================================================================
 * 10. ACCESSIBILITE & PREFERENCES UTILISATEUR
 * ========================================================================= */

/* Skip link visible au focus */
.halo-skip-link {
    position: absolute;
    left: -9999px;
    top: 20px;
    z-index: 999;
    background: var(--halo-accent);
    color: #fff;
    padding: 10px 20px;
    font-family: var(--halo-urbanist);
    font-size: 14px;
}

.halo-skip-link:focus {
    left: 20px;
}

/* Reduction des animations si demandee par l'OS */
@media (prefers-reduced-motion: reduce) {
    .halo-plans__loader                 { animation: none; border-top-color: var(--halo-secondary); opacity: 0.6; }
    .halo-btn__arrow                    { transition: none; }
    .halo-plans__floor-num              { transition: none; }
    .halo-plans__floors-svg .halo-floor { transition: none; }
    .halo-plans__filter-box             { transition: none; }
}

/* Focus visible global dans le scope */
.halo-plans-page :focus-visible {
    outline: 2px solid var(--halo-olive);
    outline-offset: 3px;
}
