/* Sitegrow Inventaire locatif : styles token-driven.
   AUCUNE couleur/typo de marque en dur : tout dérive des tokens --sgl-* (eux-mêmes
   hérités des globals Elementor / du thème). Fallbacks NEUTRES uniquement. */

.sgl { color: var(--sgl-color-text, inherit); font-family: var(--sgl-font-body, inherit); line-height: 1.6; }
.sgl *, .sgl *::before, .sgl *::after { box-sizing: border-box; }
.sgl-container { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 4vw, 48px) 20px; }
.sgl h1, .sgl h2, .sgl h3, .sgl .sgl-title, .sgl .sgl-h2 { font-family: var(--sgl-font-heading, inherit); color: var(--sgl-color-heading, inherit); line-height: 1.2; }

/* Boutons */
.sgl-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border-radius: calc(var(--sgl-radius) * .7); font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s; }
.sgl-btn--primary { background: var(--sgl-color-accent); color: var(--sgl-on-accent, #fff); }
.sgl-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in srgb, var(--sgl-color-accent) 35%, transparent); }
.sgl-btn--ghost { background: transparent; color: var(--sgl-color-accent); border-color: color-mix(in srgb, var(--sgl-color-accent) 45%, transparent); }
.sgl-btn--ghost:hover { background: color-mix(in srgb, var(--sgl-color-accent) 8%, transparent); }
.sgl-btn--loue { background: #6b7280; color: #fff; cursor: default; pointer-events: none; }
/* Le libelle « Loue » est un etat, pas une action. Deux selecteurs doubles
   (.sgl-btn.sgl-btn--loue) parce que les themes repeignent les <button> et
   gagnaient autrement sur la regle simple : la carte louee ressortait en
   orange, exactement comme le bouton d'appel a l'action d'a cote. On neutralise
   aussi le grisage que le navigateur applique a un bouton desactive. */
.sgl-btn.sgl-btn--loue,
.sgl-btn.sgl-btn--loue[disabled] { background: #6b7280; color: #fff; opacity: 1;
  border-color: transparent; cursor: default; pointer-events: none; box-shadow: none; transform: none; }
.sgl-btn.sgl-btn--loue:hover { background: #6b7280; transform: none; box-shadow: none; }

/* Badges & statuts */
.sgl-badge { display: inline-flex; align-items: center; padding: .32em .7em; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--sgl-color-soft); color: var(--sgl-color-heading, inherit); letter-spacing: .01em; }
.sgl-badge--type { background: color-mix(in srgb, var(--sgl-color-accent) 12%, transparent); color: var(--sgl-color-accent); }
.sgl-status--disponible { background: color-mix(in srgb, var(--sgl-color-accent) 16%, transparent); color: var(--sgl-color-accent); }
.sgl-status--bientot { background: var(--sgl-color-soft); }
.sgl-status--loue { background: color-mix(in srgb, currentColor 10%, transparent); color: color-mix(in srgb, currentColor 55%, transparent); }
/* v2.2 (§4.3) : VR / LR / SR - « En cours de location », distinct du loué sec */
.sgl-status--reserve { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #6d28d9; }

/* Fil d'Ariane */
.sgl-crumbs { display: flex; gap: .5em; flex-wrap: wrap; font-size: .85rem; opacity: .75; margin-bottom: 18px; }
.sgl-crumbs a { color: inherit; text-decoration: none; }
.sgl-crumbs a:hover { color: var(--sgl-color-accent); }

/* Fiche : hero */
.sgl-hero { display: grid; grid-template-columns: 1fr; gap: var(--sgl-gap); align-items: start; }
@media (min-width: 860px) { .sgl-hero { grid-template-columns: 1.6fr 1fr; } }
.sgl-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sgl-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 0 0 10px; }
.sgl-addr { display: flex; align-items: center; gap: .5em; opacity: .8; margin: 0; }
.sgl-i { flex: none; opacity: .8; }
.sgl-hero-cta { background: var(--sgl-color-surface, #fff); border: 1px solid var(--sgl-color-border); border-radius: var(--sgl-radius);
  padding: 22px; box-shadow: 0 14px 40px color-mix(in srgb, currentColor 8%, transparent); position: sticky; top: 20px; }
.sgl-price { font-family: var(--sgl-font-heading, inherit); color: var(--sgl-color-heading, inherit); font-size: 1.9rem; font-weight: 700; }
/* v2.2 (§3.5) : loyer avec stationnement, mention « sous réserve » */
.sgl-price-parking { font-size: .95rem; color: #4b5563; margin-top: 4px; }
.sgl-dispo { font-size: .9rem; opacity: .8; margin: 6px 0 16px; }
.sgl-hero-cta .sgl-btn--primary { width: 100%; }
.sgl-tourlinks { display: flex; gap: 8px; margin-top: 10px; }
.sgl-tourlinks .sgl-btn { flex: 1; padding: .6em .8em; font-size: .85rem; }

/* Média */
.sgl-media { margin: var(--sgl-gap) 0; border-radius: var(--sgl-radius); overflow: hidden; }
.sgl-media img { width: 100%; height: auto; display: block; }
.sgl-media-ph { display: grid; place-items: center; aspect-ratio: 16 / 7; text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sgl-color-accent) 16%, transparent), color-mix(in srgb, currentColor 8%, transparent)); }
.sgl-media-ph span { font-family: var(--sgl-font-heading, inherit); font-size: clamp(2.4rem, 8vw, 5rem); font-weight: 700; color: var(--sgl-color-accent); line-height: 1; }
.sgl-media-ph em { display: block; font-style: normal; opacity: .7; margin-top: 8px; }

/* Specs */
.sgl-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.sgl-spec { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--sgl-color-border);
  border-radius: calc(var(--sgl-radius) * .8); background: var(--sgl-color-surface, #fff); }
.sgl-spec-i { color: var(--sgl-color-accent); }
.sgl-spec-k { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; opacity: .65; }
.sgl-spec-v { font-weight: 600; color: var(--sgl-color-heading, inherit); }

/* Blocs */
.sgl-block { margin-top: var(--sgl-gap); }
.sgl-h2 { font-size: 1.3rem; margin: 0 0 14px; }
.sgl-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.sgl-chip { padding: .5em .9em; border-radius: 999px; background: var(--sgl-color-soft); font-size: .88rem; }
.sgl-prose { opacity: .92; }
.sgl-prose p { margin: 0 0 1em; }

/* Bande CTA bas de fiche */
.sgl-cta-band { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  margin-top: var(--sgl-gap); padding: 22px; border-radius: var(--sgl-radius);
  background: color-mix(in srgb, var(--sgl-color-accent) 8%, transparent); }

/* ------------------------------- Sélecteur ------------------------------- */
.sgl-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; padding: 18px; border: 1px solid var(--sgl-color-border);
  border-radius: var(--sgl-radius); background: var(--sgl-color-surface, #fff); }
.sgl-field { display: flex; flex-direction: column; gap: 4px; }
.sgl-field label { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; opacity: .7; }
.sgl-field select, .sgl-field input { padding: .6em .7em; border: 1px solid var(--sgl-color-border); border-radius: 8px;
  background: var(--sgl-color-surface, #fff); color: inherit; font: inherit; min-width: 150px; }
.sgl-field label.sgl-check, .sgl-check { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem;
  text-transform: none; letter-spacing: normal; opacity: 1; line-height: 1.2; }
/* Les cases a cocher heritaient de la mise en forme des champs texte (bordure,
   remplissage, min-width 150px) : la case se retrouvait a 150 px de son libelle. */
.sgl-field input[type="checkbox"], .sgl-field input[type="radio"],
.sgl-check input[type="checkbox"], .sgl-check input[type="radio"] {
  min-width: 0; width: auto; flex: 0 0 auto; padding: 0; margin: 0; border-radius: 3px; }
/* Point 11 du client : plusieurs types a la fois. Le fieldset fait annoncer
   « Type » avant chaque case par les lecteurs d'ecran ; les cases s'enroulent
   sur une rangee au lieu d'allonger le formulaire. */
.sgl-field--cases { border: 0; margin: 0; padding: 0; }
.sgl-field--cases legend { padding: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; opacity: .7; }
.sgl-cases { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 6px; align-items: center; }
/* Les actions prennent toute la largeur : sinon, quand il y a beaucoup de criteres,
   la rangee de cases s'enroule autour du bouton et le laisse en plein milieu. */
.sgl-actions { flex-basis: 100%; display: flex; align-items: center; gap: 14px; }
/* Combien de logements resteraient si on cochait : zero se grise plutot que de se cacher,
   pour que la liste des criteres ne saute pas sous le curseur. */
.sgl-facette { color: #6b7280; font-size: .8em; font-variant-numeric: tabular-nums; }
.sgl-check--vide { opacity: .45; cursor: not-allowed; }
.sgl-check--vide input { cursor: not-allowed; }
.sgl-results-head { margin: 18px 2px; font-weight: 600; opacity: .8; }
.sgl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sgl-gap); }
.sgl-empty { padding: 40px; text-align: center; opacity: .7; border: 1px dashed var(--sgl-color-border); border-radius: var(--sgl-radius); }

/* Sortie de secours d'une liste vide : les pistes heritent des jetons du site,
   comme tout le reste du module. Pas de puce : ce sont des boutons de texte. */
.sgl-secours { margin-top: 16px; text-align: center; }
.sgl-secours-intro { margin: 0 0 10px; font-weight: 600; }
.sgl-secours-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sgl-secours-lien { display: inline-block; padding: 8px 14px; border: 1px solid var(--sgl-color-border); border-radius: var(--sgl-radius); text-decoration: none; color: inherit; background: var(--sgl-color-surface, #fff); }
.sgl-secours-lien:hover, .sgl-secours-lien:focus-visible { border-color: var(--sgl-color-primary); color: var(--sgl-color-primary); }
.sgl-relance { margin-left: 8px; padding: 6px 14px; border: 1px solid var(--sgl-color-border); border-radius: var(--sgl-radius);
  background: var(--sgl-color-surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.sgl-relance:hover { background: color-mix(in srgb, currentColor 8%, transparent); }

/* Carte */
.sgl-card { border: 1px solid var(--sgl-color-border); border-radius: var(--sgl-radius); overflow: hidden; background: var(--sgl-color-surface, #fff);
  display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.sgl-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px color-mix(in srgb, currentColor 12%, transparent); }
.sgl-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.sgl-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.sgl-card:hover .sgl-card-media img { transform: scale(1.06); }
/* Un plan n'est pas une photo : on le montre en entier sur un fond clair plutot que recadre. */
.sgl-card-media img.sgl-card-img--plan { object-fit: contain; background: #fff; padding: 6px; }
.sgl-card:hover .sgl-card-media img.sgl-card-img--plan { transform: scale(1.03); }
.sgl-card-media .sgl-media-ph { width: 100%; height: 100%; aspect-ratio: auto; }
.sgl-card-top .sgl-badge { white-space: nowrap; flex: 0 0 auto; }
.sgl-card-flags { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: none; }
.sgl-card-media .sgl-status { box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.sgl-card-flags .sgl-badge { white-space: nowrap; flex: 0 0 auto; box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.sgl-card-flags .sgl-badge--aph, .sgl-card-flags .sgl-badge--new { font-size: .72rem; padding: .28em .66em; line-height: 1.5; letter-spacing: .02em; }
/* Sur une photo : fond plein, sinon illisible (orange pâle sur image) */
.sgl-card-media .sgl-status--disponible { background: var(--sgl-color-accent); color: var(--sgl-on-accent, #fff); }
.sgl-card-media .sgl-status--bientot { background: rgba(255,255,255,.94); color: var(--sgl-color-heading, #1c2430); }
.sgl-card-media .sgl-status--loue { background: rgba(31,41,55,.85); color: #fff; }
.sgl-card-media .sgl-status--reserve { background: rgba(109,40,217,.88); color: #fff; }
.sgl-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sgl-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Une pastille ne se replie jamais : repliee, le fond arrondi devient un gros pate. */
.sgl-card-price { font-weight: 700; color: var(--sgl-color-heading, inherit); white-space: nowrap; margin-left: auto; }
/* Mentions (APH Select, Nouveau) : meme hauteur, meme graisse, sous le prix. */
.sgl-card-title { font-size: 1.1rem; margin: 0; }
/* LD-17 : un titre de carte garde la meme couleur, visite ou non. Le style
   « lien visite » du navigateur le faisait virer au violet, et une rangee
   melangeait alors deux couleurs. Seul le survol change, partout pareil. */
.sgl-card-title a,
.sgl-card-title a:link,
.sgl-card-title a:visited,
.sgl-card-title a:active { color: inherit; text-decoration: none; }
.sgl-card-title a:hover,
.sgl-card-title a:focus-visible { color: var(--sgl-color-accent, #de4d09); text-decoration: none; }
.sgl-card-meta { font-size: .86rem; opacity: .72; margin: 0; }
.sgl-card-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 2px 0 6px; font-size: .85rem; opacity: .85; }
.sgl-card-facts li { position: relative; }
.sgl-card-facts li + li::before { content: "·"; position: absolute; left: -9px; opacity: .5; }
.sgl-card-btn { margin-top: auto; }
.sgl-status-ctx--loue .sgl-card-media img { filter: grayscale(.5) opacity(.85); }

/* ------------------------------- Contact -------------------------------- */
.sgl-contact { scroll-margin-top: 90px; }
.sgl-contact-lead { opacity: .85; margin: 0 0 16px; }
.sgl-form { background: var(--sgl-color-surface, #fff); border: 1px solid var(--sgl-color-border); border-radius: var(--sgl-radius); padding: 22px; }
.sgl-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 560px) { .sgl-form-grid { grid-template-columns: 1fr; } }
.sgl-form label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--sgl-color-heading, inherit); }
.sgl-form input, .sgl-form textarea { padding: .7em .8em; border: 1px solid var(--sgl-color-border); border-radius: 8px; background: var(--sgl-color-surface, #fff); color: inherit; font: inherit; font-weight: 400; }
.sgl-form .sgl-form-full { display: flex; flex-direction: column; gap: 5px; margin: 14px 0; }
.sgl-form input:focus, .sgl-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--sgl-color-accent) 45%, transparent); border-color: var(--sgl-color-accent); }
.sgl-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.sgl-form .sgl-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.sgl-form .sgl-consent input { margin: 3px 0 0; width: 18px; height: 18px; flex: none; }
.sgl-form .sgl-consent a { text-decoration: underline; }
.sgl-notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; }
.sgl-notice--ok { background: color-mix(in srgb, var(--sgl-color-accent) 12%, transparent); color: var(--sgl-color-accent); font-weight: 600; }
html { scroll-behavior: smooth; }

/* ---------------------------- Phase 4 : sélecteur ------------------------ */
.sgl-sel-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 18px; }
/* titre="aucun" : rendu en span, meme allure qu'un titre, hors hierarchie */
.sgl-sel-title--muet { display: block; font-weight: 700; line-height: 1.2; }
.sgl-field select[name="orderby"] { min-width: 160px; }

/* État de chargement AJAX */
.sgl-selector.sgl-loading .sgl-results { opacity: .45; pointer-events: none; transition: opacity .2s; }
.sgl-selector { position: relative; }
.sgl-selector.sgl-loading::after { content: ""; position: absolute; top: 120px; left: 50%; width: 34px; height: 34px;
  margin-left: -17px; border-radius: 50%; border: 3px solid var(--sgl-color-border);
  border-top-color: var(--sgl-color-accent); animation: sgl-spin .7s linear infinite; z-index: 3; }
@keyframes sgl-spin { to { transform: rotate(360deg); } }

/* Double CTA sur la carte */
.sgl-card-actions { display: flex; gap: 8px; margin-top: auto; }
.sgl-card-actions .sgl-btn { flex: 1 1 auto; max-width: 100%; padding: .6em .6em; font-size: .85rem; white-space: nowrap; min-width: max-content; }
/* Un thème qui met les boutons en majuscules avec de l'interlettrage (L'Allié) rend
   « Nous joindre » plus large que la moitié de la carte : le texte était rogné
   (« NOUS JOINDF »). On laisse les deux boutons passer l'un sous l'autre plutôt que
   de couper le libellé. */
.sgl-card-actions { flex-wrap: wrap; }
@media (max-width: 1100px) { .sgl-nav-grid .sgl-card-actions { flex-wrap: wrap; } .sgl-nav-grid .sgl-card-actions .sgl-btn { flex: 1 1 100%; } }

/* Pagination numérotée */
.sgl-pagination { margin: 28px 0 6px; }
.sgl-pagination .page-numbers { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; justify-content: center; }
.sgl-pagination .page-numbers li { margin: 0; }
.sgl-pagination a.page-numbers, .sgl-pagination span.page-numbers { display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--sgl-color-border);
  text-decoration: none; color: inherit; font-weight: 600; background: var(--sgl-color-surface, #fff); }
.sgl-pagination a.page-numbers:hover { border-color: var(--sgl-color-accent); color: var(--sgl-color-accent); }
.sgl-pagination .page-numbers.current { background: var(--sgl-color-accent); color: var(--sgl-on-accent, #fff); border-color: transparent; }
.sgl-pagination .page-numbers.dots { border: none; background: none; }

/* ------------------------- Phase 3b : galerie photos -------------------- */
.sgl-gallery { margin: var(--sgl-gap) 0; }
.sgl-gallery-main { position: relative; margin: 0; border-radius: var(--sgl-radius); overflow: hidden; background: var(--sgl-color-soft); aspect-ratio: 16 / 9; }
.sgl-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Point 25 du client : « l'icone pour agrandir dans le coin de l'image n'est pas
   correcte ». Le theme habille tous les <button> (padding 10px 50px, coins
   carres, fond accent) : le bouton sortait en bloc orange de 100 x 40 avec un
   glyphe. On reprend la main avec la meme specificite que le theme, dimensions
   forcees et icone SVG centree. */
.sgl-gallery-zoom,
.sgl-gallery .sgl-gallery-zoom,
button.sgl-gallery-zoom {
  position: absolute; top: 12px; right: 12px;
  box-sizing: border-box; width: 40px; height: 40px; min-width: 0; min-height: 0;
  padding: 0; margin: 0; border: none; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
.sgl-gallery-zoom svg { width: 18px; height: 18px; display: block; }
.sgl-gallery-zoom:hover, button.sgl-gallery-zoom:hover { background: var(--sgl-color-accent); }
.sgl-gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.sgl-thumb { flex: 0 0 auto; width: 96px; height: 68px; border-radius: 10px; border: 2px solid transparent;
  background-size: cover; background-position: center; cursor: pointer; padding: 0; }
.sgl-thumb.is-active { border-color: var(--sgl-color-accent); }

/* Lightbox */
.sgl-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; }
.sgl-lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 6px; box-shadow: 0 10px 60px rgba(0,0,0,.5); }
.sgl-lb-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%; font-size: 30px; line-height: 52px; }
.sgl-lb-btn:hover { background: rgba(255,255,255,.28); }
.sgl-lb-close { top: 20px; right: 20px; }
.sgl-lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.sgl-lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Plan de l'unité */
.sgl-plan { position: relative; margin: 0; border: 1px solid var(--sgl-color-border); border-radius: var(--sgl-radius); background: #fff; padding: 12px; }
.sgl-plan img { display: block; width: 100%; max-height: 620px; object-fit: contain; cursor: zoom-in; }

/* --------------------------- Modale sélecteur --------------------------- */
.sgl-reset { align-self: center; font-size: .85rem; color: inherit; opacity: .7; text-decoration: underline; }
.sgl-reset:hover { color: var(--sgl-color-accent); opacity: 1; }
.sgl-modal-trigger { display: inline-flex; }
.sgl-modal[hidden] { display: none; }
.sgl-modal { position: fixed; inset: 0; z-index: 99998; display: flex; align-items: center; justify-content: center; padding: 3vh 2vw; }
.sgl-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.sgl-modal-box { position: relative; z-index: 1; width: 100%; max-width: 1180px; max-height: 94vh; overflow: auto;
  background: var(--sgl-color-surface, #fff); border-radius: var(--sgl-radius); box-shadow: 0 24px 80px rgba(0,0,0,.4); padding: 8px 22px 22px; }
.sgl-modal-close { position: sticky; top: 6px; float: right; width: 40px; height: 40px; border: none; border-radius: 10px;
  background: var(--sgl-color-soft); color: inherit; font-size: 22px; line-height: 40px; cursor: pointer; z-index: 2; }
.sgl-modal-close:hover { background: var(--sgl-color-accent); color: var(--sgl-on-accent, #fff); }
.sgl-modal-box .sgl-selector { padding-top: 4px; }
/* Animation d'ouverture/fermeture de la modale */
.sgl-modal { opacity: 0; transition: opacity .2s ease; }
.sgl-modal.is-shown { opacity: 1; }
.sgl-modal-overlay { opacity: 0; transition: opacity .2s ease; }
.sgl-modal.is-shown .sgl-modal-overlay { opacity: 1; }
.sgl-modal-box { transform: translateY(18px) scale(.985); transition: transform .24s cubic-bezier(.2,.8,.2,1); }
.sgl-modal.is-shown .sgl-modal-box { transform: none; }
@media (prefers-reduced-motion: reduce) { .sgl-modal, .sgl-modal-overlay, .sgl-modal-box { transition: none; } }


/* Modale : croix de fermeture ronde et discrète (le thème stylait le <button> en gros rectangle) */
.sgl-modal .sgl-modal-close, .sgl-modal button.sgl-modal-close {
  position: sticky; top: 10px; float: right; z-index: 5; margin: 6px 6px 0 0;
  width: 40px; height: 40px; min-width: 40px; padding: 0; margin: 0; border: 0; border-radius: 50%;
  background: #f3f4f6 !important; color: #111827 !important; font-size: 26px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: none !important; cursor: pointer; text-transform: none; border-radius: 50% !important; border: 0 !important;
}
.sgl-modal .sgl-modal-close:hover { background: #e5e7eb !important; }

/* Titres du module sur téléphone : bornés, quel que soit le h1 du thème */
@media (max-width: 600px) {
  .sgl .sgl-sel-title, .sgl .sgl-title, .sgl h1.sgl-title { font-size: clamp(1.5rem, 7vw, 2.1rem); line-height: 1.15; }
}

/* « Reinitialiser » ne faisait que 22 px de haut : trop court pour un doigt.
   On le monte a 32 px au telephone, sans toucher a la mise en page de bureau. */
@media (max-width: 600px) {
  .sgl .sgl-reset { display: inline-flex; align-items: center; min-height: 32px; }
}

/* Ancre « inventaire » sous un en-tête collant */
#sgl-inventaire { scroll-margin-top: 130px; }

/* Filtres en fourchette (prix, superficie) */
.sgl-range { display: flex; align-items: center; gap: 6px; }
.sgl-range input { width: 100%; min-width: 0; }
.sgl-range span { color: #9ca3af; }
.sgl-filters input[type=date] { font: inherit; }

/* Pastilles « Nouveau » et « APH Select » */
.sgl-badge--new { background: #12925a; color: #fff; }
.sgl-badge--aph { background: #1f2937; color: #fff; }
.sgl-badge--plan { background: rgba(255,255,255,.94); color: var(--sgl-color-heading, #1c2430); }
/* Téléphone cliquable à côté du bouton principal */
.sgl-hero-cta .sgl-tel { display: inline-flex; margin-top: 8px; width: 100%; justify-content: center; }
/* FIC-07 : barre collante en bas d'écran sur mobile (bouton + téléphone visibles sans défiler) */
.sgl-mobile-cta { display: none; }
@media (max-width: 600px) {
  .sgl-mobile-cta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
  .sgl-mobile-cta .sgl-btn { flex: 1; justify-content: center; white-space: nowrap; }
  /* La barre d'action du bas mesure 73 px : 150 px remontaient la pastille en
     plein milieu de la fiche, juste au-dessus du bouton « Reserver une visite ».
     On la pose juste au-dessus de la barre. */
  body:has(.sgl-mobile-cta) .sgl.sgl-chat { bottom: 88px; }
  /* 2 dec. 2026 : le bouton d appel du theme (Call Now Button, en bas a gauche) couvrait le
     numero de notre barre fixe sur votreallie.com ; on le remonte au-dessus de la barre. */
  body:has(.sgl-mobile-cta) #callnowbutton { bottom: 84px !important; }
  body:has(.sgl-mobile-cta) { padding-bottom: 72px; }
  .sgl-hero-cta .sgl-tel { display: none; }
}

/* FIC-08 : unités similaires */
.sgl-grid--similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.sgl-crumbs a { color: inherit; text-decoration: none; }
.sgl-crumbs a:hover { text-decoration: underline; }

/* Sections du gabarit (compris dans le loyer, électroménagers, logement, immeuble) */
.sgl-inclus-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; }
.sgl-inclus-group .sgl-h2 { font-size: 1.05rem; margin-bottom: .5rem; }
.sgl-note { font-size: .85rem; color: #6b7280; grid-column: 1 / -1; margin: 0; }
.sgl-price--loue { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }

/* FIC-06 : mention photos représentatives */
.sgl-photo-note { font-size: .82rem; color: #6b7280; margin: 6px 0 0; }
.sgl-photo-row { display: grid; grid-template-columns: 220px 1fr auto; gap: 12px; align-items: start; padding: 8px 0; border-top: 1px solid #eef0f3; }
.sgl-photo-row .sgl-gal-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; min-height: 40px; }
.sgl-photo-row li { position: relative; width: 90px; height: 70px; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; cursor: move; }
.sgl-photo-row img { width: 100%; height: 100%; object-fit: cover; }
.sgl-photo-row .sgl-gal-rm { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; line-height: 18px; padding: 0; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }

/* Point 12 du client : l'avis de validation suit le prix dans l'encadre d'appel.
   Discret mais lisible, et il ne doit pas pousser le bouton hors de l'ecran. */
.sgl-avis { margin: .6rem 0 0; font-size: .74rem; line-height: 1.45; color: #6b7280; }
/* Point 8 : la politique sur les animaux vaut pour tous les complexes. */
.sgl-note--animaux { margin-top: .4rem; }
/* Point 15 : le plan de l'unite est l'image principale. Un plan recadre perd ses
   cotes, donc il se montre en entier sur fond blanc ; les photos gardent le
   recadrage plein cadre. */
.sgl-gallery-main--plan { background: #fff; }
.sgl-gallery-main--plan img { object-fit: contain; }
.sgl-thumb--plan { background-size: contain; background-repeat: no-repeat; background-color: #fff; }
/* Point 14 : pictogramme devant chaque inclusion (modele Logisco, Le Muso). La
   pastille passe en ligne pour que le dessin et le mot restent sur la meme
   ligne de base, et le dessin ne se retrecit jamais sous la pression du texte. */
.sgl-chips--ico .sgl-chip { display: inline-flex; align-items: center; gap: .45em; }
.sgl-chip-i { flex: 0 0 auto; opacity: .75; }

/* Etiquettes du client sur la carte d immeuble : promotion, projet neuf, taux
   fixe. Elles se posent sur la photo, en haut a gauche, au-dessus du prix. */
.sgl-imm-media { position: relative; }
.sgl-imm-etiq { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; z-index: 2; }
.sgl-imm-etiq-item { font-size: 12px; font-weight: 600; line-height: 1.2; padding: 5px 9px; border-radius: 999px; color: #fff; background: #333; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sgl-imm-etiq--promo { background: #b32d2e; }
.sgl-imm-etiq--neuf  { background: #1d6a3a; }
.sgl-imm-etiq--taux  { background: #1f4f82; }
@media (max-width: 480px) { .sgl-imm-etiq-item { font-size: 11px; padding: 4px 8px; } }

/* LD-02 : la disponibilite se lit en texte dans la carte, plus en etiquette
   posee sur le plan. Vert pour « maintenant », orange de la marque pour une
   date a venir, gris pour un logement loue. */
.sgl-card-dispo { margin: .35rem 0 .1rem; font-weight: 700; font-size: .92rem; }
.sgl-card-dispo--maintenant { color: #15803d; }
.sgl-card-dispo--futur { color: var(--sgl-color-accent, #de4d09); }
.sgl-card-dispo--loue { color: var(--sgl-color-muted, #6b7280); font-weight: 600; }

/* LD-09 : caracteristiques en pastilles, meme style arrondi que la typologie. */
.sgl-card-facts--pastilles { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: .45rem 0 0; padding: 0; }
.sgl-card-facts--pastilles li {
  display: inline-flex; align-items: center; padding: .18em .6em; border-radius: 999px;
  background: color-mix(in srgb, currentColor 7%, transparent); font-size: .82rem; font-weight: 600;
}
/* LD-09 : inclusions en icones. Le libelle se lit au survol, au toucher et au
   focus clavier ; il reste dans le DOM pour les lecteurs d'ecran. */
/* Pas de « overflow: hidden » ici : l'infobulle sort de la liste par le haut,
   le masquer la coupait. C'est le script qui replie les icones en trop. */
.sgl-card-inclus { display: flex; flex-wrap: nowrap; gap: .5rem; list-style: none; margin: .5rem 0 0; padding: 0; min-width: 0; }
.sgl-card-inclus-i {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px;
  background: color-mix(in srgb, var(--sgl-color-heading, #1c2430) 7%, transparent);
  color: var(--sgl-color-heading, #1c2430); cursor: default;
}
.sgl-card-inclus-i .sgl-i { width: 18px; height: 18px; }
.sgl-card-inclus-l {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: var(--sgl-color-heading, #1c2430); color: #fff;
  padding: .25em .6em; border-radius: 6px; font-size: .78rem; font-weight: 600;
  opacity: 0; visibility: hidden; transition: opacity .12s ease; z-index: 3; pointer-events: none;
}
.sgl-card-inclus-i:hover .sgl-card-inclus-l,
.sgl-card-inclus-i:focus .sgl-card-inclus-l,
.sgl-card-inclus-i:focus-within .sgl-card-inclus-l { opacity: 1; visibility: visible; }
.sgl-card-inclus-i--plus { font-weight: 700; font-size: .8rem; }
.sgl-card-inclus-i--plus .sgl-card-inclus-l { white-space: normal; width: 190px; text-align: left; }
/* LD-24 : les dessins de la bibliotheque (LD-18) remplacent le petit jeu au trait.
   Les dessins du client sont des JPEG sur fond blanc : la pastille devient blanche,
   cernee, pour qu'aucun carre blanc ne s'y voie. */
.sgl-card-inclus-i { background: #fff; border: 1px solid var(--sgl-color-border, #e2e8f0); width: 32px; height: 28px; }
.sgl-card-inclus-i img.sgl-com-i { display: block; height: 18px; width: auto; max-width: 26px; }
.sgl-card-inclus-i svg.sgl-com-i { display: block; width: 26px; height: 18px; }
.sgl-card-inclus-i.is-open .sgl-card-inclus-l { opacity: 1; visibility: visible; }
.sgl-card-inclus-i--plus { width: auto; min-width: 32px; padding: 0 .45em; }

/* LD-24 : dans une rangee, pastilles, disponibilite et icones a la meme hauteur
   d'une carte a l'autre, quelle que soit la longueur du nom ou de l'adresse. Chaque
   carte devient une sous-grille des rangees de la grille : les huit blocs d'une
   carte partagent leurs hauteurs avec ceux des cartes voisines. */
@supports (grid-template-rows: subgrid) {
  .sgl-grid > .sgl-card:not(.sgl-imm-card),
  .sgl-nav-grid > .sgl-card:not(.sgl-imm-card),
  .sgl-grid--similar > .sgl-card:not(.sgl-imm-card) { display: grid; grid-template-rows: subgrid; grid-row: span 8; row-gap: 8px; }
  .sgl-grid > .sgl-card:not(.sgl-imm-card) > .sgl-card-body,
  .sgl-nav-grid > .sgl-card:not(.sgl-imm-card) > .sgl-card-body,
  .sgl-grid--similar > .sgl-card:not(.sgl-imm-card) > .sgl-card-body { display: contents; }
  .sgl-card-body > .sgl-card-top     { grid-row: 2; padding: 16px 16px 0; }
  .sgl-card-body > .sgl-card-title   { grid-row: 3; padding: 0 16px; }
  .sgl-card-body > .sgl-card-meta    { grid-row: 4; padding: 0 16px; }
  .sgl-card-body > .sgl-card-facts   { grid-row: 5; padding: 0 16px; margin: 0; }
  .sgl-card-body > .sgl-card-dispo   { grid-row: 6; padding: 0 16px; margin: 0; }
  .sgl-card-body > .sgl-card-inclus  { grid-row: 7; padding: 0 16px; margin: 0; }
  .sgl-card-body > .sgl-card-actions { grid-row: 8; padding: 8px 16px 16px; margin: 0; align-self: end; }
  .sgl-card > .sgl-card-media { grid-row: 1; }
}

/* LD-09 : la liste des logements est plafonnee a cinq cartes par rangee, en
   restant fluide avec la largeur et le zoom. La grille des pages d'immeubles
   garde son propre plafond a quatre colonnes, a cote du selecteur (LD-05). */
.sgl-selector .sgl-grid {
  --sgl-u-min: 280px;
  --sgl-u-gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(max(var(--sgl-u-min), (100% - 4 * var(--sgl-u-gap)) / 5), 1fr));
  gap: var(--sgl-u-gap);
}

/* LD-11 : la pastille de disponibilite de la fiche porte le meme code couleur
   que la ligne des cartes : verte pour « maintenant », orange pour une date. */
.sgl-badge--dispo { font-weight: 700; }
.sgl-badge-dispo--maintenant { background: rgba(22, 163, 74, .14); color: #15803d; }
.sgl-badge-dispo--futur { background: color-mix(in srgb, var(--sgl-color-accent, #de4d09) 14%, transparent); color: var(--sgl-color-accent, #de4d09); }
.sgl-badge-dispo--loue { background: color-mix(in srgb, currentColor 10%, transparent); color: var(--sgl-color-muted, #6b7280); }

/* LD-14 : une typologie sans logement a louer se lit en gris pale, comme les
   pastilles grises des cartes d'immeubles. Jamais un ancien prix. */
/* Chaque prix sur sa ligne, quelle que soit la typographie du widget qui l'entoure : WordPress retire le <p>
   autour d'un shortcode seul sur sa ligne (shortcode_unautop), et une hauteur de ligne de 10 px posee en
   production sur ces widgets faisait se chevaucher les lignes (constate le 1er dec. 2026). */
.elementor-widget-text-editor .sgl-lien-prix { display: block; line-height: 1.5; margin: 0 0 .25em; }
.sgl-lien-prix--sans-prix { color: var(--sgl-color-muted, #6b7280); opacity: .75; }

/* LD-10 : « Decouvrez le secteur ». Panneau de categories a gauche, carte a
   droite ; sur petit ecran le panneau se replie derriere « Categories ». */
.sgl-secteur-sous { margin: -.4rem 0 1rem; color: var(--sgl-color-muted, #6b7280); }
.sgl-secteur-corps { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
/* 2 dec. 2026 : le theme de L Allie habille tout <button> en display:block avec plus de
   specificite ; sans le !important le bouton mobile restait visible sur ordinateur et la carte
   tombait dans la colonne de 260 px. */
.sgl-secteur-toggle { display: none !important; }
.sgl-secteur-panneau { display: flex; flex-direction: column; gap: .4rem; }
.sgl-secteur-groupe { margin: .7rem 0 .1rem; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sgl-color-muted, #6b7280); }
/* Le theme habille tous les <button> en orange plein : on l'emporte sur lui,
   sinon le bouton actif ne se distingue plus des autres. */
.sgl-secteur .sgl-secteur-cat, .sgl-secteur .sgl-secteur-cat:hover, .sgl-secteur .sgl-secteur-cat:focus {
  text-align: left; padding: .5em .9em; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--sgl-color-accent, #de4d09) 40%, transparent);
  background: #fff; color: var(--sgl-color-heading, #1c2430); font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: none; text-transform: none; letter-spacing: normal; line-height: 1.3;
}
.sgl-secteur .sgl-secteur-cat:hover { background: color-mix(in srgb, var(--sgl-color-accent, #de4d09) 8%, transparent); }
.sgl-secteur .sgl-secteur-cat.is-active, .sgl-secteur .sgl-secteur-cat.is-active:hover, .sgl-secteur .sgl-secteur-cat.is-active:focus {
  background: var(--sgl-color-accent, #de4d09); color: #fff; border-color: var(--sgl-color-accent, #de4d09);
}
.sgl-secteur-itin { display: flex; flex-direction: column; gap: .5rem; }
.sgl-secteur-lab { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; }
.sgl-secteur-lab input, .sgl-secteur-lab select { font: inherit; padding: .45em .6em; border: 1px solid #cfd4dc; border-radius: 8px; }
.sgl-secteur-externe { font-size: .85rem; }
.sgl-secteur-carte { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 360px; border-radius: var(--sgl-radius, 10px); overflow: hidden; background: #eef0f3; }
.sgl-secteur-carte iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 900px) {
  .sgl-secteur-corps { grid-template-columns: 1fr; }
  .sgl-secteur-toggle { display: inline-flex !important; width: fit-content; }
  .sgl-secteur-panneau { display: none; }
  .sgl-secteur-panneau.is-open { display: flex; }
  .sgl-secteur-carte { min-height: 300px; }
}

/* LD-18 : grille des commodites, meme rendu sur les 9 pages d'immeubles. */
.sgl-commodites { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem 1.25rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.sgl-com { display: flex; align-items: center; gap: .75rem; }
.sgl-com-i { flex: 0 0 auto; height: 44px; width: auto; }
.sgl-com-l { font-weight: 600; line-height: 1.25; }

/* LD-31 : prix « à partir de » des pages d'immeubles, une ligne par type de logement. */
.sgl-prix-types { list-style: none; margin: 0; padding: 0; }
.sgl-prix-types li { margin: 0 0 .35em; }

/* 2 dec. 2026 : sur telephone, un titre d'un seul mot long (« confidentialité ») debordait de
   l'ecran et creait un defilement horizontal (vu sur votreallie.com). */
@media (max-width: 600px) {
  h1, .elementor-heading-title { overflow-wrap: anywhere; }
  /* Le diaporama Elementor de l'accueil (ken burns) et la rangee des types debordaient de
     quelques pixels a droite sur telephone : plus de glissement lateral de la page. */
  html, body { overflow-x: hidden; }
}
