/*
 * Progress Immo — CSS thème enfant
 * Accessibilité, contraste WCAG AA, touch targets, corrections CLS/LCP
 * Enqueué via wp_enqueue_style dans functions.php
 */

/* ══════════════════════════════════════════════════════════════
   VARIABLES CSS GLOBALES — contraste WCAG AA
   --primary : #eb5757 → #c94343  (4.99:1 sur blanc ✓)
   --accent  : #f2994a → #b05800  (4.95:1 sur blanc ✓)
     #f2994a ne donnait que 2.23:1 sur blanc (gradient text + btn)
   ══════════════════════════════════════════════════════════════ */
:root {
  --primary: #c94343 !important;
  --accent:  #b05800 !important;
}

/* ══════════════════════════════════════════════════════════════
   CONTRASTE COULEURS — WCAG AA (ratio min 4.5:1 texte normal)
   ══════════════════════════════════════════════════════════════ */

.pifb-card-price,
.pifb-card-cta,
.pi-read-more,
.pi-blog-eyebrow,
.nav a.active, .nav a:hover,
.pi-nav a.active, .pi-nav a:hover { color: #c94343 !important; }

.pifb-filter-btn.active,
.pifb-search-btn,
.pifb-filter-btn:hover,
.pifb-search-btn:hover { background: #c94343 !important; border-color: #c94343 !important; color: #fff !important; }

.search-tabs button.active,
.search-tabs button[data-type="acheter"].active,
.search-tabs button[data-type="louer"].active {
  background: #c94343 !important;
  border-color: #c94343 !important;
  color: #fff !important;
}

.pi-blog-tag {
  background: linear-gradient(135deg, #c94343, #b05800) !important;
}

.pi-annonces-banner p,
.pi-blog-cta-text p {
  font-size: 1.17rem !important;
  font-weight: 700 !important;
  color: #fff !important;
}

input::placeholder { color: #767676; opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   TOUCH TARGETS — min 44×44px (WCAG 2.5.5)
   ══════════════════════════════════════════════════════════════ */
.nav a, .pi-nav a {
  padding-top: 6px;
  padding-bottom: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.pi-mobile-toggle,
.mobile-toggle {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pifb-filter-btn,
.pifb-search-btn,
.pifb-page-btn,
.pi-cta-btn,
.search-tabs button { min-height: 44px; }
.pifb-page-btn { min-width: 44px; }

.btn, .btn-primary, .btn-outline, a.btn, button.btn,
.search-form button, .search-card button {
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

footer a, .footer a,
.footer-socials a,
[class*="social"] a,
.footer-col a,
.footer-links a {
  min-height: 44px;
  min-width:  44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER SOCIALS — icônes réseaux sociaux
   ══════════════════════════════════════════════════════════════ */
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.footer-socials a {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.footer-socials a:hover {
  background: #eb5757;
  transform: translateY(-2px);
}
.footer-socials svg {
  display: block;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   CLS — réserver la hauteur des grilles
   ══════════════════════════════════════════════════════════════ */
.pifb-grid { min-height: 640px; }
.blog-grid  { min-height: 320px; }

/* ══════════════════════════════════════════════════════════════
   CATCH-ALL — éléments avec couleur inline #eb5757
   ══════════════════════════════════════════════════════════════ */
[style*="color:#eb5757"],
[style*="color: #eb5757"] { color: #c94343 !important; }

[style*="background:#eb5757"],
[style*="background: #eb5757"],
[style*="background-color:#eb5757"],
[style*="background-color: #eb5757"] {
  background-color: #c94343 !important;
  border-color:     #c94343 !important;
}

[style*="linear-gradient(135deg, #eb5757"],
[style*="linear-gradient(135deg,#eb5757"] {
  background: linear-gradient(135deg, #c94343, #b05800) !important;
}

/* ══════════════════════════════════════════════════════════════
   CATCH-ALL GRIS — #777777 sur blanc = 3.95:1 (échoue WCAG AA)
   ══════════════════════════════════════════════════════════════ */
[style*="color: #777"],
[style*="color:#777"],
[style*="color: #777777"],
[style*="color:#777777"] { color: #595959 !important; }

/* ══════════════════════════════════════════════════════════════
   BLOG THUMB — aspect-ratio stable, zéro CLS
   ══════════════════════════════════════════════════════════════ */
img.blog-thumb, .blog-card img.blog-thumb {
  width:        100%;
  height:       auto;
  aspect-ratio: 16/10;
  object-fit:   cover;
  display:      block;
  flex-shrink:  0;
}

/* ══════════════════════════════════════════════════════════════
   CTA BANNER — contraste WCAG AA
   ══════════════════════════════════════════════════════════════ */
.cta-banner {
  background: linear-gradient(135deg, #c94343 0%, #b05800 100%) !important;
}
.cta-banner p {
  opacity:     1 !important;
  font-size:   1.17rem !important;
  font-weight: 700 !important;
  color:       #fff !important;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER BOTTOM — contraste sur fond sombre #1e1e1e
   ══════════════════════════════════════════════════════════════ */
.footer-bottom,
.footer-bottom a { color: #b0b0b0 !important; }

/* ══════════════════════════════════════════════════════════════
   HEADING FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer-col h3 {
  font-size:      0.85rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom:  12px;
  color:          white;
}

/* ══════════════════════════════════════════════════════════════
   HERO MOBILE — image 900px (LCP optimisé)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero {
    background:
      linear-gradient(135deg, rgba(235,87,87,0.04) 0%, rgba(245,195,96,0.08) 100%),
      url('https://www.progress-immo.com/wp-content/uploads/2026/05/photo-1502672260266-1c1ef2d93688.webp') center/cover !important;
  }
}

/* Misc */
.pifb-count { font-size: 1rem; font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   GRILLE BLOG — cartes articles (homepage + single "À lire aussi")
   Classes sans préfixe : blog-grid, blog-card, blog-body, blog-tag, read-more
   ══════════════════════════════════════════════════════════════ */
.blog-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap:                   28px;
  min-height:            320px; /* anti-CLS */
}

.blog-card {
  background:      #fff;
  border-radius:   14px;
  overflow:        hidden;
  text-decoration: none;
  color:           #1a1a2e;
  box-shadow:      0 4px 20px rgba(0,0,0,.07);
  transition:      transform .25s, box-shadow .25s;
  display:         flex;
  flex-direction:  column;
}
.blog-card:hover {
  transform:  translateY(-4px);
  box-shadow: 0 8px 32px rgba(201,67,67,.15);
}

.blog-body {
  padding:        20px;
  display:        flex;
  flex-direction: column;
  flex:           1;
}

.blog-tag {
  display:        inline-block;
  background:     linear-gradient(135deg, #c94343, #b05800);
  color:          #fff;
  font-size:      .73rem;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding:        3px 10px;
  border-radius:  50px;
  margin-bottom:  10px;
  align-self:     flex-start;
}

.blog-body h3 {
  font-size:   1rem;
  font-weight: 700;
  margin:      0 0 8px;
  line-height: 1.4;
  color:       #1a1a2e;
}

.blog-body p {
  font-size:   .88rem;
  color:       #595959;
  margin:      0 0 14px;
  line-height: 1.55;
  flex:        1;
}

.read-more {
  font-size:   .85rem;
  font-weight: 700;
  color:       #c94343;
  margin-top:  auto;
}

.blog-cta {
  text-align: center;
  margin-top: 36px;
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   PAGE ARTICLE — single.php
   Classes : article-page, meta, article-hero, article-content
   ══════════════════════════════════════════════════════════════ */
.article-page {
  max-width: 800px;
  margin:    0 auto;
  padding:   60px 20px 80px;
}

.article-page .meta {
  display:     flex;
  gap:         14px;
  align-items: center;
  font-size:   .8rem;
  font-weight: 600;
  color:       #595959;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 16px;
}

.article-page .meta span {
  display:     inline-flex;
  align-items: center;
  gap:         5px;
}

.article-page .meta span:first-child {
  color:           #c94343;
  background:      rgba(201,67,67,.08);
  padding:         2px 10px;
  border-radius:   50px;
}

.article-page h1 {
  font-size:   clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin:      0 0 32px;
  color:       #1a1a2e;
}

.article-hero {
  width:         100%;
  aspect-ratio:  16 / 8;
  border-radius: 16px;
  margin-bottom: 40px;
  background-position: center;
  background-size:     cover;
  background-color:    #f0f0f0;
}

.article-content {
  font-size:   1rem;
  line-height: 1.8;
  color:       #333;
}

.article-content h2 {
  font-size:     clamp(20px, 2.5vw, 26px);
  font-weight:   800;
  margin:        2.2em 0 .7em;
  line-height:   1.25;
  color:         #1a1a2e;
}

.article-content h3 {
  font-size:   1.1rem;
  font-weight: 700;
  margin:      1.8em 0 .5em;
  color:       #1a1a2e;
}

.article-content p {
  margin-bottom: 1.3em;
}

.article-content ul,
.article-content ol {
  padding-left:  1.4em;
  margin-bottom: 1.3em;
}

.article-content li {
  margin-bottom: .5em;
}

.article-content a {
  color:           #c94343;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: #a03030;
}

.article-content img {
  max-width:     100%;
  height:        auto;
  border-radius: 10px;
  margin: 1.5em 0;
}

.article-content blockquote {
  border-left:   4px solid #c94343;
  margin:        1.5em 0;
  padding:       12px 20px;
  background:    rgba(201,67,67,.05);
  border-radius: 0 8px 8px 0;
  font-style:    italic;
  color:         #444;
}

.article-content strong { color: #1a1a2e; }

@media (max-width: 640px) {
  .article-page    { padding: 40px 16px 60px; }
  .article-hero    { aspect-ratio: 4/3; border-radius: 10px; }
  .article-content { font-size: .95rem; }
}


/* ------------------------------------------------------------------
   Correctif 19/09/2026 — libellé des boutons invisible dans les articles
   `.article-content a` (spécificité 0-1-1) écrasait `.btn-primary` (0-1-0) :
   le texte du bouton « Demander une estimation gratuite » s'affichait en
   rouge sur le rouge du bouton, donc illisible. On rend sa couleur aux
   boutons partout où ils sont imbriqués dans du contenu rédactionnel.
------------------------------------------------------------------- */
.article-content a.btn-primary,
.entry-content a.btn-primary,
.article-content a.btn,
.entry-content a.btn {
  color: #fff;
  text-decoration: none;
}
.article-content a.btn-outline,
.entry-content a.btn-outline {
  color: var(--primary-btn, #c42f2f);
}
.article-content a.btn-outline:hover,
.entry-content a.btn-outline:hover {
  color: #fff;
}
