/*
Theme Name:        Astra Child — ISD Construction
Theme URI:         https://isd-construction.com
Description:       Thème enfant Astra premium pour ISD Construction — Agence immobilière N°1 au Sénégal. Achat, vente, location et gestion immobilière à Dakar, Diamniadio et partout au Sénégal.
Author:            Elimboo
Author URI:        https://elimboo.com
Template:          astra
Version:           3.0.0
Requires at least: 5.9
Tested up to:      6.5
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       astra-child-isd
Tags:              immobilier, senegal, real-estate, child-theme, astra, dakar, diamniadio
*/

/* Variables */
:root {
  --rouge: #C0392B;
  --rouge-f: #96281B;
  --noir: #0D0D0D;
  --or: #BFA46A;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
  --bebas: 'Bebas Neue', Impact, sans-serif;
}

/* Reset minimal - nos pages ont leur propre header/footer */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: var(--sans); }

/* Masquer le contenu Astra sur les pages ISD */
body.isd-page #page > .site-content,
body.isd-page .site-main,
body.isd-page #content > .ast-container { display: none !important; }
body.isd-page #page { display: block !important; }
body.isd-page #isd-site { display: block !important; }
/* Visibilité ISD garantie sur mobile */
.isd-wrap, #isd-topbar, #isd-hdr { visibility: visible !important; }

/* Astra admin bar offset */
body.admin-bar #isd-header { top: 32px !important; }
@media screen and (max-width: 782px) {
  body.admin-bar #isd-header { top: 46px !important; }
}

/* Blog archive styling */
.blog article, .archive article {
  background: #fff !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: 0 3px 18px rgba(0,0,0,.07) !important;
  transition: all .3s !important;
  margin-bottom: 0 !important;
}
.blog article:hover { transform: translateY(-5px) !important; box-shadow: 0 12px 40px rgba(192,57,43,.14) !important; }
.blog .ast-loop-wrapper { display: grid !important; grid-template-columns: repeat(3,1fr) !important; gap: 26px !important; }
.blog .entry-title a { color: #0D0D0D !important; font-family: var(--serif) !important; font-size: 20px !important; text-decoration: none !important; }
.blog .entry-title a:hover { color: var(--rouge) !important; }
.blog .ast-blog-featured-section { height: 200px; overflow: hidden; }
.blog .ast-blog-featured-section img { width: 100%; height: 100%; object-fit: cover; }
.blog .ast-article-post { padding: 0 !important; }
.blog .entry-content-wrap, .blog .ast-article-inner-wrap { padding: 18px 20px 20px !important; }
.blog .entry-meta a { color: var(--rouge) !important; }
.blog .ast-pagination .page-numbers.current { background: var(--rouge) !important; border-color: var(--rouge) !important; color: #fff !important; }

/* Post type archive property */
.post-type-archive-property .ast-loop-wrapper { display: grid !important; grid-template-columns: repeat(3,1fr) !important; gap: 26px !important; }
.post-type-archive-property article { background: #fff; border-radius: 10px !important; overflow: hidden; transition: all .3s !important; margin-bottom: 0 !important; }
.post-type-archive-property article:hover { transform: translateY(-5px) !important; }
.post-type-archive-property .ast-archive-description { display: none !important; }

@media (max-width: 768px) {
  body.admin-bar #isd-header { top: 46px !important; }
  .blog .ast-loop-wrapper { grid-template-columns: 1fr !important; }
  .post-type-archive-property .ast-loop-wrapper { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════
   RESPONSIVE MOBILE GLOBAL
══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Grilles → 1 colonne */
  [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2,1fr) !important;
  }
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:1fr 1.5fr"],
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns:2fr 1fr 1fr 1.4fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Padding sections */
  [style*="padding:90px 0"],
  [style*="padding:80px 0"],
  [style*="padding:72px"] {
    padding: 48px 0 !important;
  }
  /* Containers */
  [style*="padding:0 40px"],
  [style*="padding:80px 40px"],
  [style*="padding:90px 40px"],
  [style*="max-width:1200px"] {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  /* Hero */
  [style*="min-height:90vh"] {
    min-height: 75vh !important;
  }
  /* H1 hero */
  [style*="clamp(46px,6vw,80px)"] {
    font-size: 36px !important;
  }
  [style*="clamp(36px,5vw,60px)"] {
    font-size: 30px !important;
  }
  /* Barre recherche */
  [style*="display:flex;align-items:flex-end;gap:14px"] {
    flex-direction: column !important;
    gap: 10px !important;
  }
  /* Stats bar */
  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2,1fr) !important;
  }
  /* Flex → colonne */
  [style*="display:flex;justify-content:space-between;align-items:flex-end"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  /* Buttons hero */
  [style*="display:flex;flex-wrap:wrap;gap:14px;margin-bottom:46px"] {
    flex-direction: column !important;
  }
  /* CTA buttons */
  [style*="display:flex;justify-content:center;gap:16px;flex-wrap:wrap"] {
    flex-direction: column !important;
    align-items: center !important;
  }
  /* Order inversé pour services */
  [style*="order:2"] { order: 1 !important; }
  [style*="order:1"]  { order: 2 !important; }
  /* Images visuel */
  [style*="height:480px"] { height: 260px !important; }
  [style*="height:380px"] { height: 220px !important; }
  /* Footer grid */
  [style*="grid-template-columns:2fr 1fr 1fr 1.4fr"] {
    grid-template-columns: 1fr !important;
    padding: 32px 18px !important;
  }
}

@media (max-width: 480px) {
  [style*="clamp(26px,3vw,42px)"] { font-size: 22px !important; }
  [style*="font-size:17px"] { font-size: 15px !important; }
  [style*="padding:14px 30px"] { padding: 13px 20px !important; }
  [style*="font-size:62px"] { font-size: 48px !important; }
  [style*="font-size:60px"] { font-size: 46px !important; }
}

/* ══════════════════════════════════════════════════════
   FILTRES BIENS — Boutons de filtre page-biens.php
══════════════════════════════════════════════════════ */
.isd-fbtn {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 10px 22px;
  border-radius: 30px;
  border: 2px solid rgba(0,0,0,.15);
  background: transparent;
  color: #555;
  cursor: pointer;
  transition: all .25s;
}
.isd-fbtn:hover {
  border-color: #C0392B;
  color: #C0392B;
}
.isd-fbtn.active {
  background: #C0392B;
  border-color: #C0392B;
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   PROPERTY CARD — amélioration hover image
══════════════════════════════════════════════════════ */
.isd-prop-card-wrap:hover img { transform: scale(1.06) !important; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE — Layout page property unique
══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .isd-prop-layout { grid-template-columns: 1fr !important; }
  .isd-prop-layout aside { position: static !important; }
}
@media (max-width: 768px) {
  .isd-prop-gallery { padding: 0 !important; }
  .isd-gallery-main { border-radius: 0 !important; }
  .isd-single-grid { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════
   BLOG ARTICLE CONTENT
══════════════════════════════════════════════════════ */
.isd-article-content > * + * { margin-top: 0; }
.isd-article-content p + p { margin-top: 1rem; }

/* ══════════════════════════════════════════════════════
   SEARCH FORM OVERRIDE
══════════════════════════════════════════════════════ */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 5px 0 0 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
}
.search-form input[type="search"]:focus {
  border-color: #C0392B;
}
.search-form input[type="submit"] {
  background: #C0392B;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 0 5px 5px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════
   PAGINATION GLOBAL
══════════════════════════════════════════════════════ */
.isd-pagination .nav-links a.page-numbers:hover,
.isd-pagination .nav-links span.current {
  background: #C0392B !important;
  border-color: #C0392B !important;
  color: #fff !important;
}

/* ══════════════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════════════ */
@media print {
  #isd-topbar, #isd-hdr, #isd-mnav, #isd-wa, footer { display: none !important; }
  .isd-wrap { padding-top: 0 !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  img { max-width: 100% !important; }
}

/* ══════════════════════════════════════════════════════
   MOBILE — corrections globales supplémentaires
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Ensure grids inside new templates collapse */
  .isd-blog-grid .isd-blog-sub-grid { grid-template-columns: 1fr !important; }
  .isd-specs-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .isd-rel-grid   { grid-template-columns: 1fr !important; }
  /* Padding correction */
  .isd-prop-gallery,
  .isd-article-body { padding: 22px !important; }
}
