/* RESET + BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }
h1, h2, h3 { margin-bottom: 15px; }

/* HEADER */
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 20px; background: #333; color: #fff;
}
.logo-container { display: flex; align-items: center; gap: 10px; }
.logo-container img { height: 60px; width: auto; object-fit: contain; }
.company-name { font-weight: 700; font-size: 1.25rem; }

/* NAV */
nav { display: flex; align-items: center; gap: 12px; }
nav ul { display: flex; list-style: none; gap: 12px; }
nav ul li a { color: #fff; text-decoration: none; font-weight: bold; }
nav ul.show,
nav ul.open { right: 0; }
body.nav-open { overflow: hidden; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.burger span { width: 25px; height: 3px; background: #fff; border-radius: 2px; transition: all .3s; }


/* Menu mobile – assure visibilité + clics */
@media (max-width: 768px) {
  nav ul {
    position: fixed;            /* déjà présent chez toi */
    z-index: 9999;              /* passe au-dessus du hero et autres éléments */
    overflow-y: auto;           /* scroll si liste longue */
    -webkit-overflow-scrolling: touch;
  }

  /* Le bouton burger au-dessus du panneau pour rester cliquable */
  .burger { position: relative; z-index: 10000; }

  /* Les items remplissent la largeur */
  nav ul li, nav ul li a { display: block; }
  nav ul li a {
    padding: 10px 0;
    color: #fff;                /* force le contraste sur fond #333 */
    text-decoration: none;
    font-weight: 700;
  }

  /* Optionnel : empêche le scroll du fond quand le menu est ouvert */
  body.nav-open { overflow: hidden; }
}

/* HERO Avant / Après */
.hero { padding: 0; }
.hero-comparison {
  position: relative; width: 100%;
  height: min(78vh, 720px); background: #111; overflow: hidden;
}
.hero-comparison .img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* On part à 50% visible pour l'image APRÈS (droite) */
.hero-comparison .reveal {
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.05s linear;
}
.hero-comparison .divider {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: rgba(255,255,255,0.85); pointer-events: none;
  transition: left 0.05s linear;
}
/* Range transparent plein écran */
.compare-range {
  position: absolute; inset: 0;
  width: 100%; height: 100%; appearance: none;
  background: transparent; outline: none; cursor: ew-resize;
}
.compare-range::-webkit-slider-thumb,
.compare-range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2px solid #1d6b34;
  box-shadow: 0 0 0 4px rgba(29,107,52,0.25);
}

/* Labels dynamiques */
.label {
  position: absolute; bottom: 10px;
  padding: 5px 10px; font-size: .9rem; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.6); border-radius: 4px; z-index: 3;
  white-space: nowrap; transition: left 0.1s linear;
}
.label-avant { left: calc(50% - 60px); }
.label-apres { left: calc(50% + 10px); }

/* Texte et CTA sur le hero */
.hero-content {
  position: absolute; inset: auto 0 8% 0; z-index: 2;
  display: grid; place-items: center; text-align: center; color: #fff;
  padding: 0 16px;
  background: linear-gradient(to top, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 60%);
}
.hero-content h1 { font-size: clamp(1.8rem, 3.5vw, 3rem); margin-bottom: 6px; letter-spacing: .5px; }
.hero-content p  { font-size: clamp(1rem, 2.4vw, 1.3rem); margin-bottom: 14px; }
.btn-cta {
  display: inline-block; background: #333; color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 8px; font-weight: 700;
}
.btn-cta:hover { background: #145423; }

/* SECTIONS GÉNÉRALES */
section { padding: 40px 20px; }
section h2 { text-align: center; margin-bottom: 20px; }
#services ul { max-width: 900px; margin: 0 auto; list-style: disc; padding-left: 20px; }

/* FORMULAIRE */
form { display: flex; flex-direction: column; max-width: 420px; margin: 0 auto; gap: 12px; }
form input, form textarea {
  padding: 10px; border: 1px solid #ccc; border-radius: 6px; font: inherit;
}
form button {
  padding: 10px; background: #333; color: #fff; border: 0;
  border-radius: 6px; cursor: pointer; font-weight: 700;
}
form button:hover { background: #555; }

/* FOOTER */
footer { background: #222; color: #fff; text-align: center; padding: 20px; }
.footer-content {
  display: flex; flex-wrap: wrap; justify-content: space-around; gap: 16px; margin-bottom: 10px;
}
.footer-content h3 { margin-bottom: 10px; }
.btn-avis {
  display: inline-block; padding: 8px 15px; background: #ff9800;
  color: #fff; border-radius: 6px; text-decoration: none; font-weight: 700;
}
.btn-avis:hover { background: #e68900; }

/* Réseaux sociaux */
.social-icon {
  display: inline-flex; justify-content: center; align-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: #fff; text-decoration: none; margin: 5px; font-size: 1.2rem;
  transition: transform .25s ease, opacity .25s ease;
}
.social-icon:hover { transform: scale(1.08); opacity: .95; }
.social-icon.fb { background: #1877f2; }
.social-icon.insta {
  background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  nav ul {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 220px;
    background: #333; flex-direction: column; align-items: center; justify-content: center;
    transition: right .3s ease; gap: 16px; padding: 20px;
  }
  nav ul li a { color: #fff; }

  nav ul.show { right: 0; }
  .burger { display: flex; }
  .burger.active span:nth-child(1){ transform: rotate(45deg) translate(5px,5px); }
  .burger.active span:nth-child(2){ opacity: 0; }
  .burger.active span:nth-child(3){ transform: rotate(-45deg) translate(6px,-6px); }

  .hero-comparison { height: min(60vh, 520px); }
}










/* === Services (final propre) === */
#services .section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px;
}

#services .section-header {
  text-align: center;
  margin-bottom: 20px;
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
}
#services .section-header .eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  opacity: .7;
  margin-bottom: 6px;
}
#services h2 { margin: 0 0 6px; font-weight: 700; }
#services h2::before,
#services h2::after { content: none !important; }
#services .section-subtitle {
  max-width: 720px;
  margin: 0 auto;
  opacity: .9;
}

/* Grille responsive */
#services .services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 900px) {
  #services .services-grid { grid-template-columns: 1fr 1fr; }
}

/* Carte horizontale */
#services .service-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: #fff;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
#services .service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 22px rgba(0,0,0,.10);
}

/* Vignette image */
#services .service-media {
  flex: 0 0 160px;
  max-width: 160px;
  height: 120px;
  overflow: hidden;
  background: #f7f7f7;
}
#services .service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Texte */
#services .service-body {
  flex: 1 1 auto;
  padding: 12px 16px;
}
#services .service-title { font-size: 1rem; margin: 0; }
#services .service-desc { font-size: .95rem; opacity: .9; }
#services .service-bullets { padding-left: 16px; margin: 2px 0 0; }
#services .service-bullets li { margin: 2px 0; }

/* Mobile : carte verticale, image en haut */
@media (max-width: 640px) {
  #services .service-card { flex-direction: column; }
  #services .service-media {
    width: 100%;
    max-width: 100%;
    height: 160px;
  }
  #services .service-media img {
    aspect-ratio: 16/9;
  }
}

/* CTA */
#services .section-cta {
  text-align: center;
  margin-top: 18px;
}
#services .btn {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
#services .btn-primary {
  background: #333;
  color: #fff;
}
#services .btn-primary:hover { filter: brightness(1.08); }

/* === Services • media avec 2 images empilées === */
section#services figure.service-media.media-2 {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
  height: 240px !important;            /* 2 vignettes de 120px empilées */
  display: grid !important;
  grid-template-rows: 1fr 1fr !important;
  gap: 8px !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #f7f7f7 !important;
}
section#services figure.service-media.media-2 img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
}

/* Variante mobile : 2 images côte à côte au-dessus du texte */
@media (max-width: 640px) {
  section#services .service-card { flex-direction: column !important; }
  section#services figure.service-media.media-2 {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    grid-template-columns: 1fr 1fr !important;  /* deux colonnes */
    grid-template-rows: none !important;
  }
  section#services figure.service-media.media-2 img {
    aspect-ratio: 16 / 9 !important;            /* belles proportions sur mobile */
  }
}
/* === Réalisations : réutiliser le style de la section Services === */
:is(#services, #realisations) .section-wrap {
  max-width: 1100px; margin: 0 auto; padding: 48px 20px;
}
:is(#services, #realisations) .section-header {
  text-align: center; margin-bottom: 20px; background: transparent; box-shadow: none; border: none; padding: 0;
}
:is(#services, #realisations) .section-header .eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; opacity: .7; margin-bottom: 6px;
}
:is(#services, #realisations) h2 { margin: 0 0 6px; font-weight: 700; }
:is(#services, #realisations) h2::before,
:is(#services, #realisations) h2::after { content: none !important; }
:is(#services, #realisations) .section-subtitle { max-width: 720px; margin: 0 auto; opacity: .9; }

:is(#services, #realisations) .services-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px;
}
@media (min-width: 900px) {
  :is(#services, #realisations) .services-grid { grid-template-columns: 1fr 1fr; }
}

:is(#services, #realisations) .service-card {
  display: flex; flex-direction: row; align-items: stretch;
  background: #fff; border: none; border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
:is(#services, #realisations) .service-card:hover {
  transform: translateY(-2px); box-shadow: 0 14px 22px rgba(0,0,0,.10);
}

:is(#services, #realisations) .service-media {
  flex: 0 0 160px; max-width: 160px; height: 120px; overflow: hidden; background: #f7f7f7;
}
:is(#services, #realisations) .service-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

:is(#services, #realisations) .service-body { flex: 1 1 auto; padding: 12px 16px; }
:is(#services, #realisations) .service-title { font-size: 1rem; margin: 0; }
:is(#services, #realisations) .service-desc { font-size: .95rem; opacity: .9; }

@media (max-width: 640px) {
  :is(#services, #realisations) .service-card { flex-direction: column; }
  :is(#services, #realisations) .service-media { width: 100%; max-width: 100%; height: 160px; }
  :is(#services, #realisations) .service-media img { aspect-ratio: 16 / 9; }
}

:is(#services, #realisations) .section-cta { text-align: center; margin-top: 18px; }
:is(#services, #realisations) .btn {
  display: inline-block; padding: 11px 16px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
:is(#services, #realisations) .btn-primary { background: #333; color: #fff; }
:is(#services, #realisations) .btn-primary:hover { filter: brightness(1.08); }

/* === Bouton Retour Haut === */
#backToTop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #333;          /* cohérent avec ton thème */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  z-index: 999;              /* au-dessus du contenu */
}
#backToTop svg { fill: #fff; }   /* flèche blanche */
#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

#backToTop:hover { filter: brightness(1.08); }
#backToTop:focus-visible { outline: 3px solid #1d6b34; outline-offset: 2px; }
#backToTop svg { width: 22px; height: 22px; pointer-events: none; }

/* Mobile : plus grand pour la zone tactile */
@media (max-width: 640px) {
  #backToTop { right: 12px; bottom: 12px; width: 56px; height: 56px; }
  #backToTop svg { width: 24px; height: 24px; }
}

/* Respecte la préférence "réduire les animations" */
@media (prefers-reduced-motion: reduce) {
  #backToTop { transition: none; }
}
