/*
Theme Name:   Astra Child — ImmoCopilot
Theme URI:    https://immocopilot.io
Description:  Thème enfant Astra pour ImmoCopilot
Author:       ImmoCopilot
Author URI:   https://immocopilot.io
Template:     astra
Version:      1.4.0
Text Domain:  astra-child-immocopilot
*/

/* ===== ImmoCopilot — Palette bordeaux ===== */

:root {
  --ast-global-color-0: #8B1A1A !important;
  --ast-global-color-1: #6d1515 !important;
}

/* Boutons UAGB/Spectra */
.uagb-infobox-cta-link,
.uagb-infobox-cta-link.wp-block-button__link,
.uagb-button__link,
.uagb-buttons-repeater .uagb-button__link {
  background-color: #8B1A1A !important;
  border-color: #8B1A1A !important;
  color: #ffffff !important;
}

.uagb-infobox-cta-link:hover,
.uagb-button__link:hover {
  background-color: #6d1515 !important;
  border-color: #6d1515 !important;
}

/* Logo texte ImmoCopilot */
.site-title a,
.ast-site-identity .site-title a {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 20px !important;
  letter-spacing: 0.02em;
}

/* ===== Bouton CTA sur fond bordeaux — blanc avec bordure ===== */
.uagb-block-feat-cta .uagb-infobox-cta-link,
.uagb-block-feat-cta .uagb-infobox-cta-link.wp-block-button__link {
  background-color: transparent !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

.uagb-block-feat-cta .uagb-infobox-cta-link:hover,
.uagb-block-feat-cta .uagb-infobox-cta-link.wp-block-button__link:hover {
  background-color: #ffffff !important;
  color: #8B1A1A !important;
}

/* ===== Footer ImmoCopilot ===== */
.site-footer {
  background-color: #1a1a1a;
  color: #cccccc;
}

.site-footer .widget-title,
.site-footer h3 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.site-footer p,
.site-footer li {
  color: #aaaaaa;
  font-size: 14px;
  line-height: 1.7;
}

.site-footer a {
  color: #cccccc !important;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff !important;
}

.site-footer .ast-footer-copyright {
  color: #666666;
  font-size: 13px;
}

/* ===== Section "Un arsenal complet" — Cards visuelles ===== */

/* Fond légèrement coloré pour toute la section */
.ic-section:has(.ic-grid-3) {
  background: linear-gradient(135deg, #fdf6f6 0%, #f8f0f0 100%);
  padding: 80px 0;
}

/* Grille des cards */
.ic-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 40px 0 20px;
}

/* Card individuelle */
.ic-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 36px 28px 32px !important;
  box-shadow: 0 2px 8px rgba(139, 26, 26, 0.06), 0 8px 32px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  border: 1px solid rgba(139, 26, 26, 0.1) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Ligne accent bordeaux en haut */
.ic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8B1A1A, #c04040);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(139, 26, 26, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ic-card:hover::before {
  opacity: 1;
}

/* Icône — carré bordeaux */
.ic-icon-circle {
  width: 60px !important;
  height: 60px !important;
  background: linear-gradient(135deg, #8B1A1A, #a82222) !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 20px !important;
  font-size: 26px !important;
  box-shadow: 0 4px 16px rgba(139, 26, 26, 0.25) !important;
}

/* Titre de la card */
.ic-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
  line-height: 1.3;
}

/* Description */
.ic-muted-text {
  font-size: 14px;
  color: #666;
  line-height: 1.65;
}

/* ===== SureForms — Page Contact ===== */

/* Conteneur centré */
.srfm-form-container {
  max-width: 720px !important;
  margin: 40px auto !important;
  padding: 40px 48px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
}

/* Labels */
.srfm-form-container .srfm-label {
  font-weight: 600 !important;
  color: #1a1a1a !important;
  font-size: 14px !important;
  margin-bottom: 6px !important;
}

/* Champs */
.srfm-form-container input[type="text"],
.srfm-form-container input[type="email"],
.srfm-form-container textarea {
  border: 1.5px solid #e0d0d0 !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  transition: border-color 0.2s ease !important;
  width: 100% !important;
}

.srfm-form-container input[type="text"]:focus,
.srfm-form-container input[type="email"]:focus,
.srfm-form-container textarea:focus {
  border-color: #8B1A1A !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(139,26,26,0.1) !important;
}

/* Bouton submit bordeaux */
.srfm-submit-button,
.srfm-btn-frontend {
  background-color: #8B1A1A !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 14px 32px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  width: 100% !important;
  margin-top: 8px !important;
}

.srfm-submit-button:hover,
.srfm-btn-frontend:hover {
  background-color: #6d1515 !important;
}

/* Masquer le bouton "Submit" custom (doublon) */
.srfm-custom-button {
  display: none !important;
}

/* ===== Blog ImmoCopilot — Redesign grille cards ===== */

/* Pleine largeur, sidebar masquée */
.blog #primary.site-content,
.archive #primary.site-content {
  width: 100% !important;
  float: none !important;
  padding-right: 0 !important;
}
.blog #secondary.widget-area,
.archive #secondary.widget-area {
  display: none !important;
}

/* Bandeau héro bordeaux */
.blog .site-content,
.archive .site-content {
  padding-top: 0 !important;
}

/* Hero bordeaux en haut de la page blog — injecté via astra_primary_content_top */
.ic-blog-hero {
  background: linear-gradient(135deg, #8B1A1A 0%, #5a1010 100%);
  padding: 64px 24px;
  text-align: center;
  margin-bottom: 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.ic-blog-hero__title {
  color: #ffffff !important;
  font-size: 38px !important;
  font-weight: 800 !important;
  margin-bottom: 12px !important;
  letter-spacing: -0.02em;
}
.ic-blog-hero__desc {
  color: rgba(255,255,255,0.78) !important;
  font-size: 17px !important;
  margin: 0 !important;
  max-width: 560px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Grille 3 colonnes — centrage de la dernière ligne */
.blog .ast-row,
.archive .ast-row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 28px !important;
  max-width: 1160px;
  margin: 48px auto !important;
  padding: 0 24px !important;
  float: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Cards : largeur fixe pour 3 par ligne */
.blog article.post,
.archive article.post {
  flex: 0 0 calc(33.333% - 19px) !important;
  max-width: calc(33.333% - 19px) !important;
}

/* Card article — apparence */
.blog article.post,
.archive article.post {
  background: #ffffff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.06) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}
.blog article.post:hover,
.archive article.post:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 40px rgba(139,26,26,0.12), 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* Zone image avec fallback */
.blog .ast-blog-featured-section,
.archive .ast-blog-featured-section {
  width: 100% !important;
  height: 200px !important;
  overflow: hidden !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  position: relative !important;
  background: linear-gradient(135deg, #f9f0f0 0%, #f0e4e4 50%, #e8d5d5 100%) !important;
}
.blog .ast-blog-featured-section::after,
.archive .ast-blog-featured-section::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z' stroke='%238B1A1A' stroke-width='1.2' fill='%238B1A1A' fill-opacity='0.08'/%3E%3Cpath d='M9 22V12h6v10' stroke='%238B1A1A' stroke-width='1.2' stroke-opacity='0.15'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 72px !important;
}
.blog .ast-blog-featured-section img,
.archive .ast-blog-featured-section img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.4s ease !important;
  position: relative !important;
  z-index: 1 !important;
}
.blog article.post:hover .ast-blog-featured-section img,
.archive article.post:hover .ast-blog-featured-section img {
  transform: scale(1.04) !important;
}

/* Header de la card */
.blog .entry-header,
.archive .entry-header {
  padding: 20px 24px 8px !important;
}
.blog .entry-content,
.archive .entry-content {
  padding: 0 24px 24px !important;
  flex: 1 !important;
}

/* Badge catégorie */
.blog .ast-taxonomy-container,
.archive .ast-taxonomy-container {
  margin-bottom: 10px !important;
  display: block !important;
}
.blog .cat-links a,
.archive .cat-links a {
  display: inline-block !important;
  background: rgba(139,26,26,0.1) !important;
  color: #8B1A1A !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  text-decoration: none !important;
}
.blog .cat-links a:hover,
.archive .cat-links a:hover {
  background: #8B1A1A !important;
  color: #fff !important;
}

/* Titre article */
.blog .entry-title,
.archive .entry-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #1a1a1a !important;
  margin-bottom: 10px !important;
}
.blog .entry-title a,
.archive .entry-title a {
  color: #1a1a1a !important;
  text-decoration: none !important;
}
.blog .entry-title a:hover,
.archive .entry-title a:hover {
  color: #8B1A1A !important;
}

/* Extrait — 3 lignes max */
.blog .entry-content p,
.archive .entry-content p {
  font-size: 14px !important;
  color: #555 !important;
  line-height: 1.65 !important;
  margin-bottom: 14px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* Lien "Lire la suite" */
.blog .entry-content a,
.archive .entry-content a,
.blog .more-link,
.archive .more-link {
  color: #8B1A1A !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

/* Masquer méta auteur/date */
.blog .entry-meta,
.archive .entry-meta {
  display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog article.post,
  .archive article.post {
    flex: 0 0 calc(50% - 14px) !important;
    max-width: calc(50% - 14px) !important;
  }
}
@media (max-width: 640px) {
  .blog article.post,
  .archive article.post {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .blog .ast-row, .archive .ast-row {
    gap: 20px !important;
  }
}

/* ===== Images dans les sections — contrainte max-width ===== */
.ic-section img,
.ic-section .ic-container img {
  max-width: 100% !important;
  height: auto !important;
}

/* ===== Header — hauteur compacte ===== */
.main-header-bar,
.ast-primary-header-bar {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.site-branding,
.ast-site-identity {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* Logo texte — alignement vertical */
.ast-site-identity .site-title {
  line-height: 1.2 !important;
}
