/* ==========================================================================
   ANNONCES — Styles
   Palette : #FF5B4A (corail), #6E8A48 / #8EAA7B (verts), #AB9B84 (brun)
   Typo : Roboto / Roboto Slab (hérité du thème Qwery)
   ========================================================================== */

/* --- CONTENEUR --- */
.ann-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* --- BREADCRUMB --- */
.ann-breadcrumb {
    font-size: 0.85rem;
    color: #7a7a7a;
    margin-bottom: 25px;
    padding: 10px 0;
}
.ann-breadcrumb a {
    color: #6E8A48;
    text-decoration: none;
}
.ann-breadcrumb a:hover {
    color: #537741;
    text-decoration: underline;
}
.ann-breadcrumb-sep {
    margin: 0 8px;
    color: #bbb;
}
.ann-breadcrumb-current {
    color: #222733;
}

/* --- ARCHIVE HEADER --- */
.ann-archive-header {
    text-align: center;
    margin-bottom: 35px;
}
.ann-archive-title {
    font-family: 'Roboto Slab', serif;
    font-size: 2.2rem;
    color: #222733;
    margin: 0 0 10px;
}
.ann-archive-subtitle {
    font-size: 1.05rem;
    color: #7a7a7a;
    margin: 0;
}

/* --- CATÉGORIES GRID --- */
.ann-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}
.ann-category-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #e0dcd7;
    color: #222733;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
}
.ann-category-card:hover {
    border-color: #6E8A48;
    color: #6E8A48;
    box-shadow: 0 2px 8px rgba(110, 138, 72, 0.15);
}
.ann-category-card--active {
    background: #6E8A48;
    border-color: #6E8A48;
    color: #fff;
}
.ann-category-card--active:hover {
    background: #537741;
    color: #fff;
}
.ann-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 9999px;
    background: rgba(0,0,0,0.08);
    font-size: 0.8rem;
    font-weight: 600;
}
.ann-category-card--active .ann-category-count {
    background: rgba(255,255,255,0.25);
}

/* --- FILTRES --- */
.ann-filters {
    margin-bottom: 25px;
}
.ann-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.ann-filters-form select {
    padding: 10px 36px 10px 14px;
    border: 1px solid #e0dcd7;
    border-radius: 8px;
    background: #fff;
    color: #222733;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7a7a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.ann-filters-form select:focus {
    border-color: #6E8A48;
    outline: none;
    box-shadow: 0 0 0 3px rgba(110, 138, 72, 0.12);
}
.ann-filters-reset {
    color: #FF5B4A;
    font-size: 0.85rem;
    text-decoration: none;
}
.ann-filters-reset:hover {
    text-decoration: underline;
}

/* --- COMPTEUR RÉSULTATS --- */
.ann-count-results {
    color: #7a7a7a;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* --- GRILLE ANNONCES --- */
.ann-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* --- CARTE ANNONCE --- */
.ann-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 12px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ann-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}
.ann-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.ann-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0ece6;
}
.ann-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.ann-card:hover .ann-card-image img {
    transform: scale(1.05);
}
.ann-card-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #AB9B84;
    font-size: 0.9rem;
}
.ann-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #FF5B4A;
    color: #fff;
    padding: 4px 14px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ann-card-body {
    padding: 18px 20px 20px;
}
.ann-card-type {
    display: inline-block;
    font-size: 0.75rem;
    color: #6E8A48;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.ann-card-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: #222733;
    margin: 0 0 8px;
    line-height: 1.35;
}
.ann-card-location {
    font-size: 0.85rem;
    color: #7a7a7a;
    margin: 0 0 12px;
}
.ann-card-meta {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 8px;
}
.ann-card-price {
    font-size: 1.15rem;
    font-weight: 600;
    color: #FF5B4A;
}
.ann-card-price--hidden {
    font-size: 0.9rem;
    font-style: italic;
    color: #AB9B84;
}
.ann-card-surface {
    font-size: 0.9rem;
    color: #222733;
    font-weight: 500;
}
.ann-card-ref {
    font-size: 0.75rem;
    color: #AB9B84;
}

/* --- PAGINATION --- */
.ann-pagination {
    text-align: center;
    margin-top: 10px;
}
.ann-pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 6px;
    padding: 0;
    margin: 0;
}
.ann-pagination li a,
.ann-pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #222733;
    background: #fff;
    border: 1px solid #e0dcd7;
    transition: all 0.2s ease;
}
.ann-pagination li a:hover {
    border-color: #6E8A48;
    color: #6E8A48;
}
.ann-pagination li span.current {
    background: #6E8A48;
    border-color: #6E8A48;
    color: #fff;
}

/* --- NO RESULTS --- */
.ann-no-results {
    text-align: center;
    padding: 60px 20px;
}
.ann-no-results h2 {
    color: #222733;
    margin-bottom: 10px;
}
.ann-no-results a {
    color: #6E8A48;
}

/* ==========================================================================
   SINGLE ANNONCE
   ========================================================================== */

/* --- LAYOUT 2 COLONNES --- */
.ann-single-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}
.ann-single-main {
    min-width: 0;
}

/* --- HEADER SINGLE --- */
.ann-single-header {
    margin-bottom: 30px;
}
.ann-single-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.ann-single-badge {
    display: inline-block;
    background: #FF5B4A;
    color: #fff;
    padding: 5px 16px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}
.ann-single-ref {
    font-size: 0.85rem;
    color: #AB9B84;
}
.ann-single-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.8rem;
    color: #222733;
    margin: 0 0 8px;
    line-height: 1.3;
}
.ann-single-location {
    font-size: 1rem;
    color: #7a7a7a;
    margin: 0 0 20px;
}

/* --- KEY INFO BAND --- */
.ann-single-key-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #f8f6f3;
    border-radius: 10px;
    overflow: hidden;
}
.ann-key-item {
    flex: 1 1 0;
    min-width: 140px;
    padding: 18px 20px;
    border-right: 1px solid #e8e4de;
    text-align: center;
}
.ann-key-item:last-child {
    border-right: none;
}
.ann-key-item--price {
    background: #6E8A48;
    color: #fff;
}
.ann-key-item--price .ann-key-label {
    color: rgba(255,255,255,0.75);
}
.ann-key-item--price .ann-key-value {
    color: #fff;
}
.ann-key-label {
    display: block;
    font-size: 0.75rem;
    color: #7a7a7a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.ann-key-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #222733;
}
.ann-key-detail {
    display: block;
    font-size: 0.75rem;
    margin-top: 4px;
    opacity: 0.8;
}

/* --- GALERIE --- */
.ann-gallery {
    margin-bottom: 35px;
}
.ann-gallery-main {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #f0ece6;
}
.ann-gallery-main-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}
.ann-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.ann-gallery-thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color 0.2s;
}
.ann-gallery-thumb.active,
.ann-gallery-thumb:hover {
    border-color: #6E8A48;
}
.ann-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- SECTIONS --- */
.ann-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}
.ann-section:last-of-type {
    border-bottom: none;
}
.ann-section-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.25rem;
    color: #222733;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #6E8A48;
    display: inline-block;
}
.ann-section-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
}

/* --- SPECS GRID --- */
.ann-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}
.ann-spec {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #f2f0ed;
}
.ann-spec:nth-child(odd) {
    background: #faf9f7;
}
.ann-spec-label {
    color: #7a7a7a;
    font-size: 0.9rem;
}
.ann-spec-value {
    font-weight: 500;
    color: #222733;
    font-size: 0.9rem;
    text-align: right;
}

/* --- DPE BADGES --- */
.ann-dpe-badges {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.ann-dpe-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    border-radius: 10px;
    min-width: 120px;
}
.ann-dpe-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
    color: rgba(0,0,0,0.5);
}
.ann-dpe-letter {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.ann-dpe-val {
    font-size: 0.75rem;
    margin-top: 4px;
    opacity: 0.7;
}
/* DPE couleurs énergie */
.ann-dpe-badge--a { background: #319834; color: #fff; }
.ann-dpe-badge--b { background: #33cc31; color: #fff; }
.ann-dpe-badge--c { background: #cbfc34; color: #222; }
.ann-dpe-badge--d { background: #fbfe06; color: #222; }
.ann-dpe-badge--e { background: #fbcc05; color: #222; }
.ann-dpe-badge--f { background: #fc9935; color: #fff; }
.ann-dpe-badge--g { background: #fc0205; color: #fff; }
/* GES couleurs climat */
.ann-dpe-badge--ges-a { background: #f1eafc; color: #5b21b6; }
.ann-dpe-badge--ges-b { background: #d8b4fe; color: #3b0764; }
.ann-dpe-badge--ges-c { background: #c084fc; color: #fff; }
.ann-dpe-badge--ges-d { background: #a855f7; color: #fff; }
.ann-dpe-badge--ges-e { background: #9333ea; color: #fff; }
.ann-dpe-badge--ges-f { background: #7e22ce; color: #fff; }
.ann-dpe-badge--ges-g { background: #581c87; color: #fff; }

.ann-dpe-mention {
    font-style: italic;
    color: #7a7a7a;
}

/* --- GÉORISQUES --- */
.ann-section--georisques {
    background: #faf5ef;
    padding: 15px 20px;
    border-radius: 8px;
    border-bottom: none;
}
.ann-georisques-text {
    font-size: 0.85rem;
    color: #7a7a7a;
    margin: 0;
}
.ann-georisques-text a {
    color: #6E8A48;
}

/* --- NAVIGATION PREV/NEXT --- */
.ann-single-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}
.ann-single-nav-link {
    color: #6E8A48;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.ann-single-nav-link:hover {
    color: #537741;
}
.ann-single-nav-next {
    margin-left: auto;
    text-align: right;
}

/* ==========================================================================
   SIDEBAR ANNONCES
   ========================================================================== */

.ann-single-sidebar {
    position: sticky;
    top: 100px;
}

.ann-sidebar-widget {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    padding: 25px;
    margin-bottom: 20px;
}

.ann-sidebar-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.1rem;
    color: #222733;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #8EAA7B;
}

/* Contact négociateur */
.ann-sidebar-contact {
    background: #f8f6f3;
}
.ann-contact-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222733;
    margin: 0 0 15px;
}
.ann-contact-btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    transition: all 0.25s ease;
}
.ann-contact-btn:last-child {
    margin-bottom: 0;
}
.ann-contact-btn--phone {
    background: #6E8A48;
    color: #fff;
}
.ann-contact-btn--phone:hover {
    background: #537741;
    color: #fff;
}
.ann-contact-btn--email {
    background: #FF5B4A;
    color: #fff;
}
.ann-contact-btn--email:hover {
    background: #e04a3a;
    color: #fff;
}

/* Formulaire sidebar */
.ann-sidebar-form-ref {
    font-size: 0.85rem;
    color: #7a7a7a;
    margin: 0 0 15px;
}

/* Catégories sidebar */
.ann-sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ann-sidebar-categories li {
    border-bottom: 1px solid #f2f0ed;
}
.ann-sidebar-categories li:last-child {
    border-bottom: none;
}
.ann-sidebar-categories li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    color: #222733;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.ann-sidebar-categories li a:hover,
.ann-sidebar-categories li.active a {
    color: #6E8A48;
}
.ann-sidebar-cat-count {
    color: #AB9B84;
    font-size: 0.8rem;
}

/* Annonces similaires */
.ann-similar-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f2f0ed;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}
.ann-similar-item:last-child {
    border-bottom: none;
}
.ann-similar-item:hover {
    opacity: 0.8;
}
.ann-similar-img {
    flex: 0 0 70px;
    width: 70px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
}
.ann-similar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ann-similar-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.ann-similar-title {
    font-size: 0.85rem;
    color: #222733;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ann-similar-price {
    font-size: 0.85rem;
    color: #FF5B4A;
    font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .ann-single-layout {
        grid-template-columns: 1fr 300px;
        gap: 25px;
    }
    .ann-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .ann-single-layout {
        grid-template-columns: 1fr;
    }
    .ann-single-sidebar {
        position: static;
    }
    .ann-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .ann-archive-title {
        font-size: 1.6rem;
    }
    .ann-single-title {
        font-size: 1.4rem;
    }
    .ann-single-key-info {
        flex-direction: column;
    }
    .ann-key-item {
        border-right: none;
        border-bottom: 1px solid #e8e4de;
    }
    .ann-key-item:last-child {
        border-bottom: none;
    }
    .ann-specs-grid {
        grid-template-columns: 1fr;
    }
    .ann-categories-grid {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }
    .ann-category-card {
        flex-shrink: 0;
    }
    .ann-filters-form {
        flex-direction: column;
    }
    .ann-filters-form select {
        width: 100%;
    }
    .ann-dpe-badges {
        flex-direction: column;
    }
    .ann-single-nav {
        flex-direction: column;
        gap: 10px;
    }
    .ann-single-nav-next {
        margin-left: 0;
        text-align: left;
    }
}
