/* Offres One Expert – charte CBRE Cova Pro (vert #003f2d, accent #17e88f). */

:root {
    --cova-vert: #003f2d;
    --cova-accent: #17e88f;
    --cova-texte: #012a2d;
    --cova-gris: #cad1d3;
    --cova-gris-clair: #f3f5f5;
    --cova-bord: #e1e6e7;
    --cova-ombre: 0 2px 12px rgba(1, 42, 45, .08);
}

.cova-offres, .cova-fiche, .cova-recherche, .cova-carrousel { color: var(--cova-texte); }
.cova-offres *, .cova-fiche *, .cova-recherche *, .cova-carrousel * { box-sizing: border-box; }

/* Boutons et badges */
.cova-bouton {
    display: inline-block; padding: 12px 22px; border: 2px solid var(--cova-vert); border-radius: 0;
    background: var(--cova-vert); color: #fff !important; font-weight: 600; font-size: 15px; line-height: 1.2;
    text-align: center; cursor: pointer; transition: background .2s, color .2s;
}
.cova-bouton:hover { background: #fff; color: var(--cova-vert) !important; }
.cova-bouton--plein { width: 100%; }
.cova-badge {
    display: inline-block; padding: 4px 10px; background: var(--cova-vert); color: #fff;
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.cova-badge--clair { background: var(--cova-accent); color: var(--cova-vert); }

/* Champs (filtres et recherche) */
.cova-champ { display: flex; flex-direction: column; gap: 6px; flex: 1 1 180px; min-width: 0; }
.cova-champ > span { font-size: 13px; font-weight: 600; color: var(--cova-texte); }
.cova-champ select, .cova-champ input {
    width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--cova-bord); border-radius: 0;
    background: #fff; color: var(--cova-texte); font-size: 15px;
}
.cova-champ--double > div { display: flex; gap: 8px; }

/* Filtres de la liste */
.cova-filtres { background: var(--cova-gris-clair); padding: 24px; margin-bottom: 32px; }
.cova-filtres__ligne { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.cova-filtres__ligne + .cova-filtres__ligne { margin-top: 16px; }
.cova-filtres__actions { display: flex; align-items: center; gap: 16px; }
.cova-filtres__reset { font-size: 14px; color: var(--cova-vert); text-decoration: underline; }

.cova-resultats__entete { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.cova-resultats__nombre { margin: 0; padding: 0; font-weight: 600; }
.cova-tri select { height: 40px; padding: 0 10px; border: 1px solid var(--cova-bord); background: #fff; }

/* Grille de cartes */
.cova-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
@media (max-width: 980px) { .cova-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cova-grille { grid-template-columns: 1fr; } .cova-filtres { padding: 16px; } }

.cova-carte { background: #fff; box-shadow: var(--cova-ombre); transition: transform .2s, box-shadow .2s; }
.cova-carte:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(1, 42, 45, .14); }
.cova-carte__lien { display: flex; flex-direction: column; height: 100%; color: inherit !important; }
.cova-carte__image { position: relative; aspect-ratio: 3 / 2; background: var(--cova-gris); overflow: hidden; }
.cova-carte__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cova-carte__image .cova-badge { position: absolute; top: 12px; left: 12px; }
.cova-carte__sans-photo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--cova-vert); font-size: 14px; }
.cova-carte__surface { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; background: var(--cova-vert); color: #fff; font-size: 14px; }
.cova-carte__surface svg { width: 16px; height: 16px; }
.cova-carte__texte { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cova-carte__titre { margin: 0; padding: 0; font-family: 'Roboto', sans-serif; font-size: 17px; font-weight: 700; text-transform: uppercase; line-height: 1.3; color: var(--cova-texte); }
.cova-carte__ville { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: #5a6b6d; }
.cova-carte__prix { margin-top: 4px; }
.cova-carte__prix strong { font-size: 21px; color: var(--cova-texte); }
.cova-carte__prix span { font-size: 13px; color: #5a6b6d; margin-left: 4px; }
.cova-carte__extrait { margin: 6px 0 0; padding: 0; font-size: 14px; line-height: 1.5; color: #4a5a5c; }

/* Pagination */
.cova-pagination { margin-top: 40px; }
.cova-pagination ul { display: flex; justify-content: center; gap: 6px; list-style: none !important; padding: 0 !important; margin: 0; }
.cova-pagination li { padding: 0; }
.cova-pagination a, .cova-pagination span { display: block; min-width: 40px; padding: 9px 12px; text-align: center; border: 1px solid var(--cova-bord); color: var(--cova-vert); }
.cova-pagination .current { background: var(--cova-vert); border-color: var(--cova-vert); color: #fff; }
.cova-vide { padding: 40px 0; text-align: center; }

/* Recherche de l'accueil */
.cova-recherche { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; padding: 24px; background: #fff; box-shadow: var(--cova-ombre); }
.cova-recherche .cova-bouton { height: 44px; }

/* Carrousel « Nouveaux biens » */
.cova-carrousel { position: relative; }
.cova-carrousel__piste { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 20px; scrollbar-width: none; }
.cova-carrousel__piste::-webkit-scrollbar { display: none; }
.cova-carrousel__piste > .cova-carte { scroll-snap-align: start; }
@media (max-width: 980px) { .cova-carrousel__piste { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 640px) { .cova-carrousel__piste { grid-auto-columns: 85%; } }
.cova-carrousel__fleche { position: absolute; top: 35%; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--cova-vert); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--cova-ombre); }
.cova-carrousel__fleche--prec { left: -22px; }
.cova-carrousel__fleche--suiv { right: -22px; }
@media (max-width: 640px) { .cova-carrousel__fleche { display: none; } }

/* Fiche */
.cova-fiche { padding: 32px 0 60px; }
.cova-fiche__retour { display: inline-block; margin-bottom: 20px; font-size: 14px; color: var(--cova-vert); }
.cova-fiche__entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.cova-fiche__badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cova-fiche__titre { margin: 0; padding: 0; font-size: 34px; line-height: 1.2; color: var(--cova-vert); }
.cova-fiche__accroche { margin: 8px 0 0; padding: 0; color: #5a6b6d; }
.cova-fiche__prix { text-align: right; white-space: nowrap; }
.cova-fiche__prix strong { display: block; font-size: 28px; color: var(--cova-texte); }
.cova-fiche__prix span { font-size: 14px; color: #5a6b6d; }
@media (max-width: 767px) {
    .cova-fiche__entete { flex-direction: column; }
    .cova-fiche__prix { text-align: left; }
    .cova-fiche__titre { font-size: 26px; }
}

.cova-galerie { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: 460px; margin-bottom: 40px; }
/* Mise en page selon le nombre de photos (1 à 5 affichées). */
.cova-galerie--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.cova-galerie--2 { grid-template-columns: 2fr 1fr; }
.cova-galerie--2 .cova-galerie__item--vignette { grid-row: 1 / span 2; }
.cova-galerie--3 { grid-template-columns: 2fr 1fr; }
.cova-galerie--4 .cova-galerie__item:nth-child(4) { grid-column: 2 / span 2; }
.cova-galerie__item { position: relative; display: block; overflow: hidden; background: var(--cova-gris); }
.cova-galerie__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.cova-galerie__item:hover img { transform: scale(1.03); }
.cova-galerie__item--principale { grid-row: 1 / span 2; }
.cova-galerie__plus { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 63, 45, .6); color: #fff; font-size: 30px; font-weight: 600; }
@media (max-width: 767px) {
    .cova-galerie { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 110px; height: auto; }
    .cova-galerie__item--principale { grid-column: 1 / span 2; grid-row: 1; }
    .cova-galerie__item:nth-child(n+4) { display: none; }
}

.cova-fiche__colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
@media (max-width: 980px) { .cova-fiche__colonnes { grid-template-columns: 1fr; } }
.cova-fiche__aside { position: sticky; top: 120px; }

.cova-bloc { border: 1px solid var(--cova-bord); background: #fff; margin-bottom: 24px; }
.cova-bloc > h2 { margin: 0; padding: 14px 20px; background: var(--cova-gris-clair); border-bottom: 1px solid var(--cova-bord); font-family: 'Roboto', sans-serif; font-size: 18px; font-weight: 600; color: var(--cova-texte); }
.cova-bloc > *:not(h2) { margin-left: 20px; margin-right: 20px; }
.cova-bloc > h3 { margin-top: 16px; padding: 0; font-family: 'Roboto', sans-serif; font-size: 15px; font-weight: 600; }
.cova-bloc__texte { padding: 16px 0; line-height: 1.7; }
.cova-bloc__texte p { padding-bottom: 10px; }
.cova-bloc__note { padding: 0 0 16px; font-size: 13px; color: #5a6b6d; }
.cova-bloc__tableau table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cova-bloc__tableau td, .cova-bloc__tableau th { padding: 6px 10px; border: 1px solid var(--cova-bord); }
.cova-bloc__tableau tr:first-child td { background: var(--cova-gris-clair); font-weight: 600; }
.cova-bloc__tableau { overflow-x: auto; }

.cova-resume { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; list-style: none !important; padding: 18px 0 !important; }
.cova-resume li { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 3px solid var(--cova-accent); }
.cova-resume span { font-size: 13px; color: #5a6b6d; }

.cova-details { width: calc(100% - 40px); margin: 12px 20px 16px; border-collapse: collapse; border: 0; }
.cova-details th, .cova-details td { padding: 9px 0; border: 0; border-bottom: 1px solid var(--cova-bord); text-align: left; font-size: 15px; vertical-align: top; }
.cova-details th { width: 40%; font-weight: 400; color: #5a6b6d; }
.cova-details td { font-weight: 600; }
.cova-details tr:last-child th, .cova-details tr:last-child td { border-bottom: 0; }

.cova-liste { padding: 12px 0 16px 20px !important; line-height: 1.7; }

/* DPE / GES : échelles en flèches, comme sur l'ancien site. */
.cova-dpe { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 20px 0; }
@media (max-width: 640px) { .cova-dpe { grid-template-columns: 1fr; } }
.cova-dpe__etiquette { position: relative; }
.cova-dpe__etiquette--ges { padding: 12px 16px; border: 3px solid #a9d4f5; border-radius: 10px; }
.cova-dpe__entete { margin: 0 0 6px; padding: 0; font-size: 12px; font-weight: 700; color: #4a5a5c; }
.cova-dpe__echelle-zone { position: relative; }
.cova-dpe__legende { margin: 0; padding: 2px 0; font-size: 12px; color: #6b7a7c; }
.cova-dpe__echelle { list-style: none !important; padding: 2px 0 !important; margin: 0; }
.cova-dpe__echelle li { position: relative; display: flex; align-items: center; height: 24px; margin-bottom: 4px; color: #fff; font-size: 14px; font-weight: 700; }
.cova-dpe__echelle li span { display: block; height: 100%; padding-left: 8px; line-height: 24px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.cova-dpe__echelle li:nth-child(1) span { width: 50px; } .cova-dpe__echelle li:nth-child(2) span { width: 66px; }
.cova-dpe__echelle li:nth-child(3) span { width: 82px; } .cova-dpe__echelle li:nth-child(4) span { width: 98px; }
.cova-dpe__echelle li:nth-child(5) span { width: 114px; } .cova-dpe__echelle li:nth-child(6) span { width: 130px; }
.cova-dpe__echelle li:nth-child(7) span { width: 146px; }
.cova-dpe__echelle li em { margin-left: 10px; color: var(--cova-texte); font-style: normal; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cova-dpe__etiquette--dpe .cova-dpe__a span { background: #009c6d; } .cova-dpe__etiquette--dpe .cova-dpe__b span { background: #52b153; }
.cova-dpe__etiquette--dpe .cova-dpe__c span { background: #78bd76; } .cova-dpe__etiquette--dpe .cova-dpe__d span { background: #f4e70f; color: var(--cova-texte); }
.cova-dpe__etiquette--dpe .cova-dpe__e span { background: #f0b50f; } .cova-dpe__etiquette--dpe .cova-dpe__f span { background: #eb8235; }
.cova-dpe__etiquette--dpe .cova-dpe__g span { background: #d7221f; }
.cova-dpe__etiquette--ges .cova-dpe__a span { background: #f6edfd; color: var(--cova-texte); } .cova-dpe__etiquette--ges .cova-dpe__b span { background: #e4c7fa; color: var(--cova-texte); }
.cova-dpe__etiquette--ges .cova-dpe__c span { background: #d4a9f6; } .cova-dpe__etiquette--ges .cova-dpe__d span { background: #cb95f3; }
.cova-dpe__etiquette--ges .cova-dpe__e span { background: #ba72ef; } .cova-dpe__etiquette--ges .cova-dpe__f span { background: #a74deb; }
.cova-dpe__etiquette--ges .cova-dpe__g span { background: #8a19df; }
/* Diagnostic connu : la classe du bien ressort, les autres s'estompent. */
.cova-dpe__echelle li.is-actif { height: 30px; }
.cova-dpe__echelle li.is-actif span { line-height: 30px; font-size: 16px; box-shadow: none; }
.cova-dpe__etiquette:not(.is-absent) .cova-dpe__echelle li:not(.is-actif) span { opacity: .35; }
/* Diagnostic absent : échelle estompée, mention par-dessus. */
.cova-dpe__etiquette.is-absent .cova-dpe__echelle,
.cova-dpe__etiquette.is-absent .cova-dpe__legende { opacity: .22; }
.cova-dpe__absent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; padding: 0; text-align: center; font-size: 16px; font-weight: 700; line-height: 1.25; color: #5a5f62; }
.cova-dpe__absent strong { font-size: 19px; }

.cova-contact { padding: 24px; border: 1px solid var(--cova-bord); border-top: 4px solid var(--cova-vert); background: #fff; display: flex; flex-direction: column; gap: 12px; }
.cova-contact p { padding: 0; margin: 0; }
.cova-contact__prix strong { font-size: 24px; }
.cova-contact__ref { font-size: 13px; color: #5a6b6d; }

/* Visionneuse */
.cova-lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(1, 20, 18, .92); }
.cova-lightbox[hidden] { display: none; }
.cova-lightbox img { max-width: 88vw; max-height: 84vh; object-fit: contain; }
.cova-lightbox button { position: absolute; border: 0; background: transparent; color: #fff; cursor: pointer; }
.cova-lightbox__fermer { top: 16px; right: 24px; font-size: 40px; }
.cova-lightbox__fleche { top: 50%; transform: translateY(-50%); font-size: 54px; padding: 0 16px; }
.cova-lightbox__fleche--prec { left: 8px; }
.cova-lightbox__fleche--suiv { right: 8px; }
.cova-lightbox__compteur { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }
