/* RESET DE BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #ffffff;
  object-fit: contain;
}
.logo-text-title {
  font-size: 16px;
  font-weight: 600;
}
.logo-text-sub {
  font-size: 10px;
  color: #6b7280;
  max-width: 150px;
  line-height: 1.2;
}

/* NAVIGATION (MENU) */
.nav {
  display: none; /* Caché par défaut sur mobile */
}

/* Menu Burger Button (Visible seulement sur mobile) */
.burger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 60;
}
.burger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background: #0f172a;
  border-radius: 3px;
  transition: all 0.3s;
}

/* Style du menu ouvert sur mobile */
.nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  gap: 20px;
  align-items: flex-start;
  border-top: 1px solid #f1f1f1;
}
.nav-link {
  font-size: 16px;
  font-weight: 500;
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

/* Version PC (Tablette et +) */
@media (min-width: 900px) {
  .burger-menu {
    display: none; /* On cache le burger */
  }
  .nav {
    display: flex; /* On affiche le menu normal */
    gap: 20px;
    align-items: center;
    font-size: 14px;
    position: static;
    flex-direction: row;
    box-shadow: none;
    border: none;
    padding: 0;
    width: auto;
    background: transparent;
  }
  .nav-link {
    width: auto;
    border: none;
    padding: 0;
  }
}

.nav a:hover {
  color: #46acff;
}
.btn-call {
  padding: 8px 14px;
  border-radius: 999px;
  background: #46acff;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  border: none;
}
.phone-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid currentColor;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
}

/* HERO (CORRIGÉ : DOUBLE IMAGE + MOBILE FRIENDLY) */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Hauteur minimale pour que le fond s'affiche bien */
  display: flex;
  flex-direction: column;
  min-height: 400px; 
}

/* La boîte qui contient les 2 images */
.hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  height: 100%;
  width: 100%;
  z-index: 1;
}
.hero-bg-half {
  flex: 1;
  height: 100%;
  position: relative;
}
.hero-bg-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Sur mobile, on peut choisir de ne garder qu'une seule image pour éviter que ce soit tout écrasé */
@media (max-width: 768px) {
  /* Astuce : sur mobile, on cache la 2eme image pour que la première prenne toute la place */
  .hero-bg-right {
    display: none; 
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.75));
  z-index: 2; /* L'overlay est au dessus des images */
}

.hero-content {
  position: relative;
  z-index: 3; /* Le texte est au dessus de tout */
  padding-top: 60px;
  padding-bottom: 60px;
  display: flex;
  justify-content: center; /* Centré sur mobile */
  align-items: center;
  height: 100%;
  flex: 1;
}

.hero-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  width: 100%;
  max-width: 650px;
  text-align: center;
  margin: auto;
}
@media (min-width: 768px) {
  /* Version PC : aligné à gauche */
  .hero-card {
    text-align: left;
    padding: 30px;
    margin: 0; /* Plus centré automatiquement */
  }
}

.hero-logo {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: #ffffff;
  object-fit: contain;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .hero-logo { margin: 0 auto 12px; display: block; }
}

.hero-main-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}
.hero-main-sub {
  margin-top: 8px;
  font-size: 14px;
  color: #4b5563;
}
.hero-main-small {
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
  font-size: 11px;
}
@media (min-width: 768px) {
  .hero-tags { justify-content: flex-start; }
}
.hero-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5f2ff;
  color: #0369a1;
  font-weight: 500;
}
.hero-cta {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; justify-content: center; }
}
@media (min-width: 768px) {
  .hero-cta { justify-content: flex-start; }
}

.btn-main {
  padding: 12px 20px;
  border-radius: 999px;
  background: #46acff;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
}
.btn-outline {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  text-align: center;
}

/* SECTIONS GÉNÉRALES */
.section {
  padding: 40px 0;
}
.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.section-sub {
  font-size: 14px;
  color: #6b7280;
}

/* SERVICES */
.services-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.service-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  font-size: 13px;
}
.service-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e3f3ff;
  color: #1d4ed8;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}
.service-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 15px;
}
.service-text {
  color: #6b7280;
  font-size: 13px;
}

/* PROJETS */
.projects-section {
  background: #e5e7eb;
}
.projects-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.project-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}
.project-image {
  height: 240px;
  background: #cbd5f5;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.project-image:hover {
  transform: scale(1.03);
}
.project-body {
  padding: 16px;
  font-size: 13px;
  flex: 1;
}
.project-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}
.project-sub {
  color: #6b7280;
  font-size: 13px;
}

/* DEVIS */
.quote-box {
  margin-top: 24px;
  border-radius: 18px;
  padding: 24px;
  background: #46acff;
  color: #ffffff;
  display: grid;
  gap: 20px;
}
@media (min-width: 768px) {
  .quote-box {
    grid-template-columns: 1fr 1.2fr;
    padding: 30px;
  }
}
.quote-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.quote-text {
  font-size: 15px;
  opacity: 0.95;
  margin-bottom: 10px;
}
.quote-legal {
  font-size: 12px;
  opacity: 0.8;
}
.quote-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  font-size: 14px;
}
.quote-form input,
.quote-form textarea {
  width: 100%;
  border-radius: 8px;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
}
.quote-form textarea {
  resize: vertical;
  min-height: 80px;
}
.quote-form button {
  border-radius: 999px;
  padding: 12px;
  background: #020617;
  color: #ffffff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

/* CONTACT */
.contact-grid {
  margin-top: 24px;
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.contact-list {
  font-size: 15px;
  display: grid;
  gap: 14px;
}
.contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.contact-label {
  font-weight: 600;
  min-width: 80px;
}
.contact-legal {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}
.contact-legal-note {
  margin-top: 8px;
  color: #4b5563;
}

/* FOOTER */
footer {
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
  margin-top: 40px;
}
.footer-inner {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.footer-legal {
  color: #9ca3af;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* MODALE GALERIE */
.ba-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 80;
}
.ba-modal.is-visible {
  display: block;
}
.ba-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
}
.ba-dialog {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  max-width: 900px;
  width: 95%; /* Prend presque toute la largeur sur mobile */
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

/* BOUTON FERMER */
.ba-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@media (min-width: 768px) {
  .ba-close {
    top: -10px;
    right: -50px;
    width: 40px;
    height: 40px;
    background: white;
  }
}

.ba-close:hover {
  background: #f1f5f9;
}

/* BOUTONS SLIDE */
.ba-slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ba-slide-prev { left: -15px; }
.ba-slide-next { right: -15px; }

@media (min-width: 768px) {
  .ba-slide-btn { width: 50px; height: 50px; }
  .ba-slide-prev { left: -25px; }
  .ba-slide-next { right: -25px; }
}

.ba-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  --position: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f172a;
}
.ba-image-container {
  position: relative;
  width: 100%;
  height: 60vh; 
}
@media (min-width: 768px) {
  .ba-image-container { height: 70vh; max-height: 600px; }
}

.ba-slider-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.ba-before-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  overflow: hidden;
}
.ba-image-before {
  -webkit-clip-path: inset(0 calc(100% - var(--position)) 0 0);
  clip-path: inset(0 calc(100% - var(--position)) 0 0);
}
.ba-slider {
  position: absolute;
  inset: 0;
  cursor: ew-resize;
  opacity: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.ba-slider-line {
  position: absolute;
  inset: 0;
  width: 2px;
  height: 100%;
  background-color: #fff;
  left: var(--position);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
}

/* BOUTON DU SLIDER (CORRIGÉ POUR LE DÉCALAGE) */
.ba-slider-button {
  position: absolute;
  background-color: #fff;
  color: black;
  /* Retrait du padding excessif qui décalait */
  padding: 0; 
  border-radius: 50%;
  /* Centrage absolu propre */
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  left: var(--position);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 3;
  width: 32px;
  height: 32px;
}
