/* =======================================
   🎨 Thème DPM - Style principal
   ======================================= */

/* --- Palette principale --- */
:root {
  --accent: #d97706;
  --accent-2: #fbbf24;
  --bg: #fffdf8;
  --text: #1f2937;
  --card: #ffffff;
  --dark: #7c2d12;
  --shadow: rgba(124, 45, 18, 0.15);
  --hover-shadow: rgba(124, 45, 18, 0.25);
}

/* --- Typographie --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  margin: 0;
}

h1, h2, h3 {
  font-weight: 800;
  color: var(--dark);
  letter-spacing: 0.3px;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 1.5em; }
h3 { font-size: 1.2rem; }

p, label, a, li { font-weight: 400; }
strong { font-weight: 600; }

/* =======================================
   🧱 Structure & Mise en page
   ======================================= */

* {
  box-sizing: border-box;
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* =======================================
   🧭 Header & Navigation
   ======================================= */

.header {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border-bottom: 1px solid #f1d8a8;
  box-shadow: 0 3px 10px var(--shadow);
}

.header-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Logo & marque --- */
.logo-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-title {
  font-weight: 900;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 13px;
  color: #3f3f46;
}

/* --- Navigation --- */
nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

nav a:hover,
nav a:focus-visible {
  color: #111;
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 8px;
  border-radius: 6px;
}

nav a.active {
  text-decoration: underline;
}

/* --- Bouton Appelez-nous --- */
.logo-call {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 50px;
}

.logo-call img {
  height: 36px;
  transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
  cursor: pointer;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.5));
}

.logo-call:hover img {
  transform: scale(1.08);
  opacity: 0.9;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.6));
}

/* =======================================
   🦺 Sections & Contenu
   ======================================= */

/* ===============================
   🌟 Section Avis Clients
   =============================== */

.avis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  justify-items: center;
  align-items: stretch;
  margin: 40px auto;
  max-width: 1000px;
  text-align: center;
}

.avis-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border-radius: 18px;
  padding: 26px 20px;
  box-shadow: 0 5px 14px var(--shadow);
  text-align: center;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avis-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 26px var(--hover-shadow);
}

.avis-logo {
  width: 80px;
  height: auto;
  margin-bottom: 10px;
}

.avis-stars {
  color: #fbbf24;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.avis-card p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.96rem;
}

.avis-card a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
}

.avis-card a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .avis-grid { grid-template-columns: 1fr; }
}

/* --- Cartes génériques --- */
.card {
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 4px 14px var(--shadow);
  padding: 20px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--hover-shadow);
}

/* --- Boutons --- */
button, .cta, form button, .btn {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px var(--shadow);
}

button:hover, .cta:hover, form button:hover, .btn:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--hover-shadow);
}

/* --- Champs du formulaire --- */
input, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 4px var(--accent-2);
}

/* =======================================
   🧩 Pied de page
   ======================================= */

.footer {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  padding: 30px 0;
  box-shadow: 0 -6px 20px var(--shadow);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  margin-top: 40px;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.footer small { opacity: 0.85; }

.footer small a {
  color: #fff !important;
  text-decoration: none;
}

.footer small a:hover {
  color: #fef3c7 !important;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-links a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.footer-links img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-links a:hover img {
  transform: scale(1.2);
  opacity: 0.9;
}

/* =======================================
   🎞 Animations globales
   ======================================= */

section {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

section:nth-of-type(1) { animation-delay: 0.1s; }
section:nth-of-type(2) { animation-delay: 0.2s; }
section:nth-of-type(3) { animation-delay: 0.3s; }

/* =======================================
   🟧 Slider Avant / Après DPM
   ======================================= */

.before-after-container {
  position: relative;
  max-width: 850px;
  margin: 50px auto;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.ba-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.ba-slider img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
  user-select: none;
  pointer-events: none;
}

.ba-resize {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
}

.ba-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--accent);
  cursor: ew-resize;
  z-index: 10;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.ba-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: url('logo-dpm.gif') center/contain no-repeat;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.ba-handle:hover::before {
  transform: translate(-50%, -50%) scale(1.05);
}

@media (max-width: 600px) {
  .ba-handle::before { width: 48px; height: 48px; }
}

/* =======================================
   🌄 HERO — nettoyé + SANS fond-hero.webp
   ======================================= */

/* Base hero (valable partout) */
.hero {
  position: relative;
  display: grid;
  gap: 18px;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
  overflow: hidden;
  color: #fff;
}

/* ✅ Fond par défaut (si aucune classe spécifique) : gradient (pas d'image) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(217,119,6,0.95) 0%, rgba(251,191,36,0.95) 100%);
  filter: none;
  z-index: 0;
  animation: fadeHero 0.9s ease-in-out forwards;
}

@keyframes fadeHero {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dégradé bas */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(255, 253, 248, 0.9) 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* Contenu au-dessus */
.hero * {
  position: relative;
  z-index: 1;
}

/* Texte hero */
.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 3px 8px rgba(0,0,0,0.6);
  margin-bottom: 12px;
}

.hero p {
  color: #fefce8;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Kicker */
.hero .kicker {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.85);
  color: #422006;
  font-weight: 800;
  padding: 0.6rem 1.6rem;
  border-radius: 50px;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-shadow: 0 1px 1px rgba(255,255,255,0.4);
  margin-bottom: 1.2rem;
}

@media (max-width: 600px) {
  .hero { padding: 40px 16px; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.95rem; }
  .hero .kicker { font-size: 0.9rem; padding: 0.4rem 1rem; }
}

/* ✅ Liens dans main/sections */
main.container a,
section a {
  color: #7c2d12;
  font-weight: 600;
  text-decoration: underline;
  background-color: rgba(255, 255, 255, 0.75);
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.3s ease, color 0.3s ease;
}

main.container a:hover,
section a:hover {
  background-color: rgba(251, 191, 36, 0.85);
  color: #1a1a1a;
  text-decoration: none;
}

/* =======================================
   ⚙️ HERO pages (uniquement les overrides)
   ======================================= */

.hero-electricite,
.hero-depannage,
.hero-domotique,
.hero-vmc,
.hero-isolation,
.hero-accueil {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding: 100px 20px 120px;
  margin: 40px auto;
  max-width: 1100px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Fonds spécifiques (images) */
.hero-electricite::before {
  background: url('images/hero-electricite.webp') center/cover no-repeat;
  filter: brightness(0.75);
}

.hero-depannage::before {
  background: url('images/hero-depannage.webp') center/cover no-repeat;
  filter: brightness(0.75);
}

.hero-domotique::before {
  background: url('images/hero-domotique.webp') center/cover no-repeat;
  filter: brightness(0.85);
}

.hero-vmc::before {
  background: url('images/hero-vmc.webp') center/cover no-repeat;
  filter: brightness(0.9);
}

.hero-isolation::before {
  background: url('images/hero-isolation.webp') center/cover no-repeat;
  filter: brightness(0.8);
}

/* ✅ Accueil : ton image d'index */
.hero-accueil::before {
  background: url('images/hero-electricite.webp') center/cover no-repeat;
  filter: brightness(0.6);
}

/* Fondu bas sur ces héros aussi */
.hero-electricite::after,
.hero-depannage::after,
.hero-domotique::after,
.hero-vmc::after,
.hero-isolation::after,
.hero-accueil::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(255,253,248,1) 100%);
  z-index: 0;
}

/* Textes */
.hero-electricite h1,
.hero-depannage h1,
.hero-domotique h1,
.hero-vmc h1,
.hero-isolation h1,
.hero-accueil h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 0 3px 10px rgba(0,0,0,0.6);
}

.hero-electricite p,
.hero-depannage p,
.hero-domotique p,
.hero-vmc p,
.hero-isolation p,
.hero-accueil p {
  font-size: 1.05rem;
  color: #fefce8;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .hero-electricite,
  .hero-depannage,
  .hero-domotique,
  .hero-vmc,
  .hero-isolation,
  .hero-accueil {
    padding: 60px 16px 80px;
  }

  .hero-electricite h1,
  .hero-depannage h1,
  .hero-domotique h1,
  .hero-vmc h1,
  .hero-isolation h1,
  .hero-accueil h1 {
    font-size: 1.6rem;
  }

  .hero-electricite p,
  .hero-depannage p,
  .hero-domotique p,
  .hero-vmc p,
  .hero-isolation p,
  .hero-accueil p {
    font-size: 0.95rem;
  }
}

/* =======================================
   ✨ Encadrement des 4 blocs de services
   ======================================= */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.feature {
  background: #fffdf8;
  border: 2px solid rgba(217, 119, 6, 0.25);
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 4px 14px rgba(124, 45, 18, 0.08);
  transition: all 0.3s ease;
}

.feature:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(124, 45, 18, 0.2);
  background: #fffaf2;
}

.feature h3 {
  color: var(--dark);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.feature p {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .feature { padding: 18px 14px; }
  .feature h3 { font-size: 1rem; }
}

/* ✅ Encadrés cliquables */
.feature-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.3s ease;
}

.feature-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(124, 45, 18, 0.25);
}

.feature-link h3,
.feature-link p { color: inherit; }

/* Réalisations “photos à venir” */
.realisations-soon {
  margin: 3rem auto 0;
  padding: 2rem;
  max-width: 800px;
  background: #f7f7f7;
  border-left: 6px solid #f4c400;
  border-radius: 6px;
  text-align: center;
}

.realisations-soon h3 { margin-bottom: 0.5rem; }

.realisations-soon a {
  color: #000;
  text-decoration: underline;
}
#callImage {
  transition: opacity 0.3s ease;
}

#callImage.fade-out {
  opacity: 0;
}
/* anti décalage horizontal */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* anti décalage horizontal (OK à garder) */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

@media (max-width: 900px){

  .header-container{
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 12px;
  }

  .logo-img{
    width: 80px;
    height: 80px;
  }

  .brand{
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-bottom: 8px;
  }

  nav{
    margin-left: 0;
    width: 100%;
    display: flex;
    flex-direction: row;     /* ← RESTE HORIZONTAL */
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  nav a{
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.18);
    line-height: 1.2;
  }

  .logo-call{
    margin-left: 0;
  }

  .logo-call img{
    height: 34px;
  }
}

/* Sur mobile/tactile : pas de hover "collant" */
@media (hover: none) and (pointer: coarse){
  nav a:hover{
    background: transparent;
    color: #fff;
    padding: 0;
    border-radius: 0;
  }
}
@media (hover: none) and (pointer: coarse){
  nav a:active{
    background: rgba(255,255,255,0.28);
    color: #111;
    border-radius: 10px;
  }
}
nav a{
  padding: 4px 8px;
  border-radius: 6px;
}
nav a:hover,
nav a:focus-visible{
  background: rgba(255,255,255,0.25);
  color: #111;
}
/* Mobile/tactile : empêcher hover/focus "collant" sur les liens du menu */
@media (hover: none) and (pointer: coarse){

  nav a:hover,
  nav a:focus,
  nav a:focus-visible{
    background: transparent !important;
    color: #fff !important;
  }

  /* si tu mets des paddings/border-radius au hover dans le CSS global */
  nav a{
    padding: 6px 10px;          /* padding fixe */
    border-radius: 10px;         /* radius fixe */
  }

  /* petit feedback au tap (très court, pas collant) */
  nav a:active{
    background: rgba(255,255,255,0.28) !important;
    color: #111 !important;
  }
}
.gallery-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:18px;
  margin-top:1.2rem;
}

.chantier{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
}

.chantier img{
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
}

.chantier h3{
  margin:12px 12px 6px;
  font-size:1.02rem;
}

.chantier p{
  margin:0 12px 14px;
  color:#555;
  font-size:.95rem;
  line-height:1.35;
}
