/*
 * Page d'une annonce (complète annonces.css : header, fil d'Ariane, badges et cartes)
 */

.annonce-header {
    padding: 40px 0 32px;
}

/* Galerie : grande photo et jusqu'à 4 vignettes */

.annonce-gallery {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: 440px;
    overflow: hidden;
    border-radius: 20px;
}

.annonce-gallery--1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.annonce-gallery--2 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr;
}

.annonce-gallery--3 {
    grid-template-columns: 2fr 1fr;
}

.annonce-gallery--4 .annonce-gallery-item:nth-child(4) {
    grid-column: span 2;
}

.annonce-gallery-item {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: none;
    background: #f1ece8;
    cursor: zoom-in;
}

.annonce-gallery-item:first-child {
    grid-row: span 2;
}

.annonce-gallery--2 .annonce-gallery-item:first-child {
    grid-row: auto;
}

.annonce-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.15s ease;
}

.annonce-gallery-item:hover img {
    filter: brightness(0.92);
}

.annonce-gallery-item:focus-visible {
    outline: 3px solid var(--wizi-blue);
    outline-offset: -3px;
}

.annonce-gallery-actions {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    gap: 8px;
}

.annonce-gallery-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: none;
    border-radius: 999px;
    background: var(--pure-white);
    box-shadow: 0 4px 14px rgba(31, 35, 65, 0.18);
    color: var(--deep-blue);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.annonce-gallery-all:hover {
    background: var(--fake-white);
    color: var(--deep-blue);
}

.annonce-gallery--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 260px;
    background: #f1ece8;
    color: #8c8f94;
    font-weight: 600;
}

.annonce-gallery--empty i {
    font-size: 40px;
}

/* Contenu et carte de prix */

.annonce-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 48px;
    padding-top: 36px;
    padding-bottom: 64px;
}

.annonce-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    list-style: none;
}

.annonce-badge-light {
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef8f8;
    color: var(--vert-fonce);
    font-size: 12px;
    font-weight: 700;
}

.annonce-title {
    color: var(--deep-blue);
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
}

.annonce-place {
    margin-top: 10px;
    color: var(--carbon-grey);
    font-size: 16px;
}

.annonce-place i {
    margin-right: 6px;
    color: var(--wizi-blue);
}

.annonce-place a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #d8cfc9;
    text-underline-offset: 3px;
}

.annonce-place a:hover {
    color: var(--wizi-blue);
}

.annonce-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 10px;
    margin-top: 28px;
    list-style: none;
}

.annonce-facts li {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #ebe4df;
    border-radius: 14px;
}

.annonce-facts i {
    grid-row: span 2;
    color: var(--wizi-blue);
    font-size: 22px;
}

.annonce-facts span {
    color: var(--carbon-grey);
    font-size: 12px;
}

.annonce-facts strong {
    color: var(--deep-blue);
    font-size: 15px;
    white-space: nowrap;
}

.annonce-section {
    margin-top: 36px;
    padding-top: 32px;
    border-top: 1px solid #f1ece8;
}

.annonce-section h2 {
    margin-bottom: 16px;
    color: var(--deep-blue);
    font-size: 22px;
    font-weight: 700;
}

.annonce-description {
    color: var(--carbon-grey);
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.annonce-description p + p,
.annonce-description p + ul,
.annonce-description ul + p,
.annonce-description ul + ul {
    margin-top: 14px;
}

.annonce-description ul {
    padding-left: 20px;
}

.annonce-description.is-collapsed {
    position: relative;
    max-height: 300px;
    overflow: hidden;
}

.annonce-description.is-collapsed::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--pure-white));
}

.annonce-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 0;
    border: none;
    background: none;
    color: var(--wizi-blue);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.annonce-more i {
    font-size: 12px;
    transition: transform 0.15s ease;
}

.annonce-more.is-expanded i {
    transform: rotate(180deg);
}

.annonce-amenities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 24px;
    list-style: none;
    color: var(--deep-blue);
    font-size: 15px;
}

.annonce-amenities i {
    width: 18px;
    margin-right: 8px;
    color: var(--wizi-blue);
}

.annonce-amenities--plain {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.annonce-amenities--plain li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 12px;
    border-radius: 50%;
    background: var(--wizi-blue);
    vertical-align: middle;
}

.annonce-video-player {
    position: relative;
    overflow: hidden;
    background: var(--deep-blue);
    cursor: default;
}

.annonce-video-player > div {
    width: 100%;
    height: 100%;
}

.annonce-video-player.is-playing {
    background: #000;
}

.annonce-video-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: none;
    background: var(--deep-blue);
    cursor: pointer;
}

.annonce-video-start img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.annonce-video-start:hover img {
    opacity: 0.95;
}

.annonce-video-label {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--deep-blue);
    color: var(--pure-white);
    font-size: 13px;
    font-weight: 700;
}

.annonce-video-play {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--pure-white);
    box-shadow: 0 8px 24px rgba(31, 35, 65, 0.3);
    color: var(--wizi-blue);
    font-size: 24px;
    transition: transform 0.15s ease;
}

.annonce-video-play i {
    margin-left: 4px;
}

.annonce-video-start:hover .annonce-video-play {
    transform: scale(1.06);
}

.annonce-video-start:focus-visible {
    outline: 3px solid var(--turquoise);
    outline-offset: -3px;
}

/* Étiquettes énergie A à G */

.annonce-energy {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.annonce-energy-scale > p {
    margin-bottom: 10px;
    color: var(--carbon-grey);
    font-size: 14px;
}

.annonce-energy-scale ol {
    display: flex;
    gap: 4px;
    list-style: none;
}

.annonce-energy-scale li {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    height: 32px;
    border-radius: 6px;
    color: var(--pure-white);
    font-size: 13px;
    font-weight: 700;
    opacity: 0.35;
}

.annonce-energy-scale li.is-active {
    flex: 1.6;
    height: 40px;
    margin-top: -4px;
    font-size: 17px;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(31, 35, 65, 0.18);
}

.annonce-energy-scale--dpe .annonce-energy-a {
    background: #009c6d;
}
.annonce-energy-scale--dpe .annonce-energy-b {
    background: #52b153;
}
.annonce-energy-scale--dpe .annonce-energy-c {
    background: #a5cc74;
    color: var(--deep-blue);
}
.annonce-energy-scale--dpe .annonce-energy-d {
    background: #f4e70f;
    color: var(--deep-blue);
}
.annonce-energy-scale--dpe .annonce-energy-e {
    background: #f0b40f;
    color: var(--deep-blue);
}
.annonce-energy-scale--dpe .annonce-energy-f {
    background: #eb8235;
}
.annonce-energy-scale--dpe .annonce-energy-g {
    background: #d7221f;
}

.annonce-energy-scale--ges .annonce-energy-a {
    background: #a4dbf8;
    color: var(--deep-blue);
}
.annonce-energy-scale--ges .annonce-energy-b {
    background: #8cb4d3;
    color: var(--deep-blue);
}
.annonce-energy-scale--ges .annonce-energy-c {
    background: #7792b1;
}
.annonce-energy-scale--ges .annonce-energy-d {
    background: #606f8f;
}
.annonce-energy-scale--ges .annonce-energy-e {
    background: #4d5271;
}
.annonce-energy-scale--ges .annonce-energy-f {
    background: #393551;
}
.annonce-energy-scale--ges .annonce-energy-g {
    background: #281b35;
}

.annonce-energy-none {
    color: var(--deep-blue);
    font-weight: 600;
}

/* Localisation */

.annonce-location p {
    color: var(--carbon-grey);
    font-size: 15px;
}

.annonce-location a {
    color: var(--wizi-blue);
    font-weight: 600;
}

.annonce-map {
    height: 340px;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #ebe4df;
    border-radius: 20px;
    background: #f1ece8;
}

/* Propriétaire */
.annonce-owner-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.annonce-owner-avatar {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--turquoise);
    color: var(--deep-blue);
    font-size: 22px;
    font-weight: 700;
    object-fit: cover;
}

.annonce-owner-name {
    color: var(--deep-blue);
    font-size: 18px;
    font-weight: 700;
}

.annonce-owner-name small {
    display: block;
    color: var(--carbon-grey);
    font-size: 14px;
    font-weight: 400;
}

.annonce-owner-since {
    margin-top: 2px;
    color: var(--carbon-grey);
    font-size: 13px;
}

.annonce-owner-bio {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--fake-white);
    color: var(--carbon-grey);
    font-size: 15px;
    font-style: italic;
    line-height: 1.6;
}

.annonce-aside {
    position: sticky;
    top: 24px;
}

.annonce-price-card {
    padding: 24px;
    border: 1px solid #ebe4df;
    border-radius: 20px;
    background: var(--pure-white);
    box-shadow: 0 14px 34px rgba(31, 35, 65, 0.08);
}

.annonce-price {
    color: var(--deep-blue);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.annonce-price small,
.annonce-mobile-bar small {
    color: var(--carbon-grey);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
}

.annonce-price-details {
    margin-top: 12px;
}

.annonce-price-details div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1ece8;
    color: var(--carbon-grey);
    font-size: 14px;
}

.annonce-price-details dd {
    color: var(--deep-blue);
    font-weight: 600;
}

.annonce-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 20px;
    padding: 0 20px;
    border-radius: 14px;
    background: var(--wizi-blue);
    color: var(--pure-white);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    transition: background 0.15s ease;
}

.annonce-cta:hover {
    background: #007c85;
    color: var(--pure-white);
}

.annonce-promises {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    list-style: none;
    color: var(--vert-fonce);
    font-size: 14px;
    font-weight: 600;
}

.annonce-promises i {
    width: 18px;
    margin-right: 8px;
    color: var(--wizi-blue);
}

.annonce-published {
    margin-top: 18px;
    color: #8c8f94;
    font-size: 13px;
    text-align: center;
}

.annonce-mobile-bar {
    display: none;
}

/* Annonces similaires */

.annonce-similar {
    padding: 48px 0 72px;
    background: var(--fake-white);
}

.annonce-similar h2 {
    margin-bottom: 24px;
    color: var(--deep-blue);
    font-size: 24px;
    font-weight: 700;
}

.annonce-similar .annonces-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.annonce-similar .annonces-reset {
    margin-top: 28px;
}

.annonce-lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(15, 17, 32, 0.95);
}

.annonce-lightbox::backdrop {
    background: rgba(15, 17, 32, 0.95);
}

.annonce-lightbox-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.annonce-lightbox-track::-webkit-scrollbar {
    display: none;
}

.annonce-lightbox-slide {
    display: flex;
    flex: 0 0 100%;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 64px 80px;
    scroll-snap-align: center;
}

.annonce-lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.annonce-lightbox-counter {
    position: absolute;
    top: 22px;
    left: 50%;
    color: var(--pure-white);
    font-size: 15px;
    font-weight: 600;
    transform: translateX(-50%);
}

.annonce-lightbox-close,
.annonce-lightbox-button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--pure-white);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.annonce-lightbox-close:hover,
.annonce-lightbox-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.annonce-lightbox-close {
    top: 14px;
    right: 16px;
}

.annonce-lightbox-button {
    top: 50%;
    transform: translateY(-50%);
}

.annonce-lightbox-button--prev {
    left: 16px;
}

.annonce-lightbox-button--next {
    right: 16px;
}

.annonce-missing h1 {
    margin-bottom: 12px;
    font-size: 30px;
    line-height: 1.3;
}

@media (max-width: 1024px) {
    .annonce-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 32px;
    }

    .annonce-gallery {
        height: 360px;
    }
}

@media (max-width: 768px) {
    .annonce-header {
        padding: 20px 0 0;
    }

    /* Sur mobile : photos en défilement horizontal, pleine largeur */
    .annonce-gallery,
    .annonce-gallery--1,
    .annonce-gallery--2,
    .annonce-gallery--3 {
        display: flex;
        height: 280px;
        margin: 0 -16px;
        overflow-x: auto;
        border-radius: 0;
        gap: 4px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .annonce-gallery::-webkit-scrollbar {
        display: none;
    }

    .annonce-gallery-item {
        flex: 0 0 88%;
        scroll-snap-align: start;
    }

    .annonce-gallery--1 .annonce-gallery-item {
        flex-basis: 100%;
    }

    /* Les photos s'ouvrent au toucher, les boutons défileraient avec elles */
    .annonce-gallery-actions {
        display: none;
    }

    .annonce-video-play {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .annonce-gallery--empty {
        height: 200px;
        margin: 0;
        border-radius: 20px;
    }

    .annonce-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-top: 24px;
        /* Place pour la barre de contact */
        padding-bottom: 96px;
    }

    .annonce-aside {
        position: static;
    }

    .annonce-title {
        font-size: 26px;
    }

    .annonce-energy {
        grid-template-columns: minmax(0, 1fr);
    }

    .annonce-map {
        height: 260px;
    }

    .annonce-mobile-bar {
        position: fixed;
        z-index: 60;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid #ebe4df;
        background: var(--pure-white);
        box-shadow: 0 -8px 24px rgba(31, 35, 65, 0.08);
    }

    .annonce-mobile-bar p {
        color: var(--deep-blue);
        font-size: 20px;
        font-weight: 700;
    }

    .annonce-mobile-bar .annonce-cta {
        min-height: 46px;
        margin: 0;
    }

    .annonce-similar {
        padding-bottom: 110px;
    }

    .annonce-lightbox-slide {
        padding: 64px 0;
    }

    .annonce-lightbox-slide img {
        border-radius: 0;
    }

    .annonce-lightbox-button {
        display: none;
    }
}
