/*
Theme Name: PC Batiment Pro
Theme URI: https://pc-batiment.fr
Description: Thème professionnel animé pour PC Bâtiment - Installation & Rénovation électrique
Author: PC Bâtiment
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: pcbat
*/

/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a1a1a;
  --primary-light: #2d2d2d;
  --accent: #f5c518;
  --accent-hover: #e0b200;
  --white: #ffffff;
  --light-bg: #f7f7f7;
  --dark-bg: #111111;
  --text: #333333;
  --text-light: #777777;
  --shadow: 0 10px 40px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 60px rgba(0,0,0,0.14);
  --radius: 10px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--white);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; }

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes boltFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.anim { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.anim.visible { opacity: 1; transform: translateY(0); }
.anim.d1 { transition-delay: 0.1s; }
.anim.d2 { transition-delay: 0.2s; }
.anim.d3 { transition-delay: 0.3s; }
.anim.d4 { transition-delay: 0.4s; }
.anim.d5 { transition-delay: 0.5s; }

/* ========== TOPBAR ========== */
.topbar {
  background: var(--white);
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  animation: slideDown 0.6s ease;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
}

.topbar-logo img { height: 55px; transition: var(--transition); }
.topbar-logo:hover img { transform: scale(1.05); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-phone {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.topbar-phone:hover { color: var(--accent-hover); }
.topbar-phone svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transition: width 0.5s, height 0.5s;
  transform: translate(-50%, -50%);
}
.btn:hover::after { width: 300px; height: 300px; }

.btn-dark {
  background: var(--primary);
  color: var(--white);
}
.btn-dark:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.btn-accent {
  background: var(--accent);
  color: var(--primary);
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245,197,24,0.4);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline-light:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-pulse { animation: pulse 2.5s infinite; }

/* Mobile toggle */
.mobile-toggle {
  display: none;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.mobile-toggle span {
  display: block; width: 26px; height: 3px;
  background: var(--primary); margin: 5px 0;
  border-radius: 3px; transition: var(--transition);
}
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ========== STATS BAR ========== */
.stats-bar {
  background: var(--primary);
  margin-top: 75px;
  padding: 18px 24px;
  border-bottom: 3px solid var(--accent);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.stat-percent {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  flex-shrink: 0;
}

.stat-stars {
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 2px;
}

.stat-sep {
  width: 1px;
  height: 30px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1.03); }

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(17,17,17,0.75) 0%, rgba(17,17,17,0.45) 50%, rgba(17,17,17,0.15) 100%);
  z-index: 1;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 24px;
  width: 100%;
}

.hero-text { max-width: 600px; }

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--white);
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.1;
  animation: fadeInLeft 1s ease 0.3s both;
}

.hero-title .highlight { color: var(--accent); }

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 30px;
  animation: fadeInLeft 1s ease 0.5s both;
}

.hero-cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.7s both;
}

/* ========== SECTION CONFORT ========== */
.section-comfort {
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 16px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 18px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.section-tag svg { width: 16px; height: 16px; animation: boltFlicker 2s infinite; }

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--primary);
  font-weight: 800;
}

.section-title em {
  font-style: normal;
  color: var(--accent-hover);
}

.section-line {
  width: 50px; height: 3px;
  background: var(--accent);
  margin: 14px auto 0;
  border-radius: 3px;
}

.comfort-intro {
  max-width: 750px;
  margin: 20px auto 14px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

.comfort-cta {
  text-align: center;
  margin-bottom: 40px;
}

/* ========== SERVICES GRID ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 0;
  background: var(--accent);
  transition: height 0.5s ease;
}
.service-card:hover::before { height: 100%; }

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.service-icon {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: var(--transition);
}
.service-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; }
.service-card:hover .service-icon { background: var(--accent); }
.service-card:hover .service-icon svg { stroke: var(--primary); }

.service-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* ========== ABOUT / PRÉSENTATION ========== */
.about-section {
  background: var(--dark-bg);
  padding: 60px 24px;
  overflow: hidden;
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-img-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.about-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.6s ease;
}
.about-img-wrap:hover img { transform: scale(1.05); }

.about-img-badge {
  position: absolute;
  bottom: 20px; left: 20px;
  background: var(--accent);
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
}

.about-text h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--white);
  font-weight: 800;
  margin-bottom: 20px;
}

.about-text h2 span { color: var(--accent); }

.about-text p {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 14px;
}

.about-text .tagline {
  color: var(--accent);
  font-weight: 700;
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 10px;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.6);
  padding: 50px 24px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--accent); }

/* ========== PAGE TEMPLATE ========== */
.page-main { margin-top: 75px; }

.page-hero {
  position: relative;
  background: var(--primary);
  padding: 70px 24px 50px;
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse, rgba(245,197,24,0.06) 0%, transparent 70%);
}

.page-hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--white);
  font-weight: 800;
  position: relative;
  animation: fadeInUp 0.8s ease both;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  margin-top: 10px;
  position: relative;
  animation: fadeInUp 0.8s ease 0.2s both;
}
.page-breadcrumb a { color: var(--accent); transition: var(--transition); }
.page-breadcrumb a:hover { color: var(--white); }

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 24px 70px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.page-content h2 { font-size: 1.6rem; color: var(--primary); font-weight: 800; margin: 30px 0 14px; }
.page-content h3 { font-size: 1.2rem; color: var(--primary); font-weight: 700; margin: 24px 0 10px; }
.page-content p { margin-bottom: 14px; font-size: 0.95rem; line-height: 1.8; }
.page-content img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 20px 0; }
.page-content ul, .page-content ol { padding-left: 24px; margin-bottom: 14px; }

/* WP Contact Form styling */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
  margin-bottom: 6px;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(245,197,24,0.15);
}
.wpcf7-form input[type="submit"] {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 14px 36px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.wpcf7-form input[type="submit"]:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245,197,24,0.3);
}

/* WP Block styles */
.wp-block-gallery { margin: 24px 0; }
.wp-block-image img { border-radius: var(--radius); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }

  .topbar-right {
    position: fixed;
    top: 75px; left: 0; width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-120%);
    transition: var(--transition);
    z-index: 999;
  }
  .topbar-right.open { transform: translateY(0); }
  .topbar-right .btn { width: 100%; justify-content: center; }

  .hero { min-height: 60vh; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .stats-inner { flex-wrap: wrap; gap: 16px; justify-content: center; }
  .stat-sep { display: none; }
}