/* ============================================================
   AIDC Theme – Agence Immobilière Dieguem Consulting
   Colors from official logo
   ============================================================ */

:root {
  --primary: #0a3d6b;
  --primary-dark: #062844;
  --primary-light: #1565a0;
  --accent: #c9a227;
  --accent-soft: #d4b84a;
  --accent-hover: #b8911f;
  --book: #8b6b2e;
  --bg: #f5f7fa;
  --bg-alt: #ffffff;
  --text: #1a2b3c;
  --text-muted: #5a6a7a;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(10, 61, 107, 0.08);
  --shadow-lg: 0 16px 48px rgba(10, 61, 107, 0.14);
  --radius: 14px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 80px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ========== ENTRY ANIMATIONS ========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* ========== HEADER ========== */
header#masthead,
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition);
}

header#masthead.scrolled,
.site-header.scrolled {
  box-shadow: var(--shadow);
  border-bottom-color: var(--border);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

.logo img,
.logo .custom-logo {
  max-height: 52px;
  width: auto;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(10, 61, 107, 0.25);
}

#site-navigation ul,
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
}

#site-navigation a,
.main-navigation a {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all var(--transition);
}

#site-navigation a:hover,
#site-navigation a.active,
.main-navigation a:hover,
.main-navigation a.active {
  color: var(--primary);
  background: rgba(10, 61, 107, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  line-height: 1.3;
}

.btn-primary {
  background: var(--primary);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(10, 61, 107, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 61, 107, 0.35);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #1a1a1a !important;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn {
  padding: 10px 18px;
  font-size: 0.875rem;
}

.mobile-extra {
  display: none !important;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ========== HERO ========== */
.hero {
  padding: 140px 28px 110px;
  background: linear-gradient(155deg, var(--primary-dark) 0%, var(--primary) 45%, #0e5a9a 100%);
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath fill='%23f5f7fa' d='M0,120 L0,80 L40,80 L40,40 L80,40 L80,70 L120,70 L120,30 L160,30 L160,60 L200,60 L200,20 L240,20 L240,55 L280,55 L280,35 L320,35 L320,75 L360,75 L360,45 L400,45 L400,65 L440,65 L440,25 L480,25 L480,70 L520,70 L520,40 L560,40 L560,80 L600,80 L600,50 L640,50 L640,30 L680,30 L680,60 L720,60 L720,40 L760,40 L760,70 L800,70 L800,35 L840,35 L840,55 L880,55 L880,25 L920,25 L920,65 L960,65 L960,45 L1000,45 L1000,75 L1040,75 L1040,50 L1080,50 L1080,80 L1120,80 L1120,40 L1160,40 L1160,70 L1200,70 L1200,120 Z'/%3E%3C/svg%3E") no-repeat bottom center;
  background-size: 100% 120px;
  z-index: 2;
}

.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.18) 0%, transparent 65%);
  border-radius: 50%;
  z-index: 0;
}

.hero-content {
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}

.hero-text h1 {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 22px;
  letter-spacing: -0.025em;
  animation: fadeUp 0.8s ease both;
}

.hero-text h1 span {
  color: var(--accent);
}

.hero-text p {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.75;
  animation: fadeUp 0.8s 0.15s ease both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: fadeUp 0.8s 0.3s ease both;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  animation: scaleIn 0.9s 0.25s ease both;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  transition: transform var(--transition), background var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.16);
}

.stat-card .number {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  line-height: 1.2;
}

.stat-card .label {
  font-size: 0.82rem;
  opacity: 0.88;
  margin-top: 6px;
  font-weight: 500;
}

/* ========== SECTIONS ========== */
section {
  padding: 90px 28px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(10, 61, 107, 0.08), rgba(201, 162, 39, 0.12));
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(10, 61, 107, 0.1);
}

.section-header h2 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 580px;
  margin: 0 auto;
}

/* ========== SERVICES – 4 columns same line ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  align-items: stretch;
}

.service-category {
  background: var(--bg-alt);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-category:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(10, 61, 107, 0.15);
}

.category-header {
  padding: 26px 22px 18px;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.category-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: rgba(201, 162, 39, 0.2);
  border-radius: 50%;
}

.category-header .icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 1.35rem;
  position: relative;
  z-index: 1;
}

.category-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  position: relative;
  z-index: 1;
}

.category-body {
  padding: 20px 22px 24px;
  flex: 1;
}

.category-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-body li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.category-body li:last-child {
  border-bottom: none;
}

.category-body li::before {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 6px;
}

/* ========== WHY US ========== */
.why-us {
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature {
  text-align: center;
  padding: 36px 22px;
  border-radius: var(--radius);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.feature:hover {
  background: var(--bg);
  border-color: var(--border);
  transform: translateY(-4px);
}

.feature-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  background: linear-gradient(145deg, rgba(10, 61, 107, 0.08), rgba(201, 162, 39, 0.15));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  transition: transform var(--transition);
}

.feature:hover .feature-icon {
  transform: scale(1.08);
}

.feature h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
}

.feature p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ========== CTA ========== */
.cta {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: white;
  text-align: center;
  padding: 100px 28px;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.15) 0%, transparent 55%);
  border-radius: 50%;
}

.cta .container {
  position: relative;
  z-index: 1;
}

.cta h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 18px;
}

.cta p {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.cta .btn-accent {
  font-size: 1.05rem;
  padding: 16px 40px;
}

#espace-pro {
  background: var(--bg-alt);
}

/* ========== CONTACT + CF7 ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 52px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--primary);
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.contact-item .icon-box {
  width: 46px;
  height: 46px;
  background: linear-gradient(145deg, rgba(10, 61, 107, 0.08), rgba(201, 162, 39, 0.12));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 3px;
  color: var(--text);
}

.contact-item span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-form,
.wpcf7,
.aidc-cf7-wrap {
  background: var(--bg-alt);
  padding: 36px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-group,
.wpcf7 p {
  margin-bottom: 18px;
}

.form-group label,
.wpcf7 label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 61, 107, 0.12);
}

.form-group textarea,
.wpcf7 textarea {
  resize: vertical;
  min-height: 130px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wpcf7 input[type="submit"],
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(10, 61, 107, 0.25);
}

.wpcf7 input[type="submit"]:hover,
.wpcf7-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.wpcf7-response-output {
  margin: 16px 0 0 !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  font-size: 0.9rem !important;
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: #22c55e !important;
  background: #f0fdf4;
  color: #166534;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
  border-color: #ef4444 !important;
  background: #fef2f2;
  color: #991b1b;
}

/* ========== FOOTER ========== */
footer#colophon,
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 28px 32px;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 16px;
}

.footer-brand .logo img,
.footer-brand .custom-logo {
  max-height: 56px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.75;
}

.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 0.9rem;
  opacity: 0.75;
  transition: all var(--transition);
}

.footer-col a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ========== ELEMENTOR ========== */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 1240px;
}

.admin-bar header#masthead {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar header#masthead {
    top: 46px;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    max-width: 400px;
    margin: 0 auto;
  }
  .hero {
    min-height: auto;
    padding: 120px 20px 100px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-actions {
    display: none;
  }
  #site-navigation ul,
  .main-navigation ul {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  #site-navigation.open ul,
  .main-navigation.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: white;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 999;
  }
  #site-navigation.open ul li a,
  .main-navigation.open ul li a {
    display: block;
    padding: 12px 16px;
  }
  #site-navigation.open .mobile-extra,
  .main-navigation.open .mobile-extra {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    list-style: none;
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  section {
    padding: 64px 20px;
  }
  .contact-form,
  .wpcf7,
  .aidc-cf7-wrap {
    padding: 24px;
  }
}
