/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 93.75%; /* 15px base pour plus de lisibilité et meilleure gestion */
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: 4.5rem; /* header height */
  background: #f3f7fb;
  color-scheme: light;
  font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  line-height: 1.5;
  color: #2c3e50;
  min-height: 100vh;
  font-weight: 400;
  background:
    linear-gradient(145deg, #e4efff 0%, #cddff8 40%, #9abbe6 100%);
  background-attachment: fixed;
  -webkit-font-feature-settings: "liga" 1;
  font-feature-settings: "liga" 1;
  user-select: text;
}

/* ===== Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&family=Poppins:wght@700;900&display=swap');

/* ===== Container ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== Links ===== */
a {
  color: #3178c6;
  text-decoration: none;
  transition: color 0.3s ease;
  outline-offset: 3px;
  outline-color: transparent;
  outline-style: solid;
  outline-width: 3px;
}
a:hover,
a:focus-visible {
  color: #204d74;
  text-decoration: underline;
  outline-color: #204d74;
}

/* ===== Buttons ===== */
.cta-btn,
.btn-devis-header {
  display: inline-block;
  background-color: #3a7bd5;
  color: #fff;
  padding: 0.65rem 1.5rem;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgb(58 123 213 / 0.35);
  text-align: center;
  cursor: pointer;
  border: none;
  user-select: none;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.15s ease;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0.05em;
  font-family: 'Poppins', sans-serif;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover,
.cta-btn:focus-visible,
.btn-devis-header:hover,
.btn-devis-header:focus-visible {
  background-color: #2a5a9e;
  box-shadow: 0 8px 25px rgb(42 90 158 / 0.6);
  transform: translateY(-2.5px);
  outline-offset: 4px;
  outline-color: #204d74;
  outline-style: solid;
  outline-width: 3px;
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  background: rgba(255 255 255 / 0.92);
  border-bottom: 1px solid #d1dce6;
  z-index: 9999;
  box-shadow: 0 4px 18px rgb(0 0 0 / 0.08);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-weight: 900;
  font-size: 1.75rem;
  color: #3178c6;
  user-select: none;
  letter-spacing: 0.15em;
  cursor: default;
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  text-shadow:
    0 1.5px 5px rgba(49, 120, 198, 0.5);
}

nav#menu-principal ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav#menu-principal a {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  position: relative;
  transition: color 0.3s ease;
  user-select: none;
}

nav#menu-principal a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #3178c6, #204d74);
  border-radius: 2px;
  transition: width 0.3s ease;
  will-change: width;
}

nav#menu-principal a:hover::after,
nav#menu-principal a:focus-visible::after,
nav#menu-principal a[aria-current="page"]::after {
  width: 100%;
}

.btn-devis-header {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 1.2rem;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgb(49 120 198 / 0.4);
  border-radius: 10px;
}

.hero {
  position: relative;
  min-height: 380px;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  text-align: center;
  color: #fff;
  overflow: hidden;
  border-radius: 0 0 48px 48px;
  box-shadow: 0 8px 28px rgba(49, 120, 198, 0.4);
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero picture,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 0 48px 48px;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(49, 120, 198, 0.85) 20%, rgba(32, 77, 116, 0.7) 80%);
  border-radius: 0 0 48px 48px;
  mix-blend-mode: multiply;
  z-index: 1;
  filter: drop-shadow(0 0 18px rgba(49, 120, 198, 0.75));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  width: 100%;
  user-select: text;
  text-shadow:
    0 2px 9px rgba(49, 120, 198, 0.9),
    0 4px 25px rgba(49, 120, 198, 0.6);
}

/* Titre - taille adaptative, ligne multiple possible, pas de coupure au milieu */
.hero-content h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  word-break: keep-all; /* Évite la coupure de mots */
  hyphens: none;
}

/* Sous-titre */
.hero-content p {
  font-size: clamp(1rem, 1.7vw, 1.4rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #c7d9ff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
}

/* Bouton */
.hero-content .cta-btn {
  font-size: 1.2rem;
  padding: 1rem 2rem;
  box-shadow: 0 9px 22px rgb(49 120 198 / 0.65);
  letter-spacing: 0.06em;
  transition:
    box-shadow 0.35s ease,
    transform 0.25s ease;
  user-select: none;
  border: none;
  background-color: #3178c6;
  color: white;
  border-radius: 32px;
  cursor: pointer;
}

.hero-content .cta-btn:hover,
.hero-content .cta-btn:focus-visible {
  box-shadow: 0 12px 35px rgb(32 77 116 / 0.85);
  transform: translateY(-2.8px);
  outline: none;
}

/* Responsive - réductions sur petits écrans */
@media (max-width: 768px) {
  .hero {
    min-height: 280px;
    padding: 0 1.2rem;
  }
  .hero-content h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }
  .hero-content p {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
  }
  .hero-content .cta-btn {
    font-size: 1rem;
    padding: 0.8rem 1.6rem;
  }
}


/* ===== Sections ===== */
section {
  padding: 3.8rem 0 3rem;
}

h2 {
  font-size: 2.4rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 2.5rem;
  color: #204d74;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.07em;
  user-select: none;
  text-transform: uppercase;
}

/* ===== Presentation Text ===== */
.section-presentation p {
  max-width: 900px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
  font-weight: 400;
  color: #34495e;
  line-height: 1.7;
  user-select: text;
  text-align: center;
  letter-spacing: 0.03em;
}

/* ===== Services Grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem 2.8rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

.service-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgb(0 0 0 / 0.1);
  padding: 2rem 1.8rem;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s cubic-bezier(0.4,0,0.2,1);
  cursor: default;
  user-select: none;
  will-change: transform;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 24px 46px rgb(0 0 0 / 0.16);
  outline: none;
}

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1.3rem;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  user-select: none;
}

.service-card .icon {
  font-size: 2.3rem;
  user-select: none;
  line-height: 1;
  color: #3a7bd5;
  filter: drop-shadow(0 0 4px rgba(58, 123, 213, 0.7));
}

/* ===== Avant/Après Slider ===== */
.slider-container {
  max-width: 1080px;
  margin: 0 auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 1.3rem;
  padding-bottom: 1.2rem;
  -webkit-overflow-scrolling: touch;
}

.slider {
  display: flex;
  gap: 1.3rem;
}

.slide {
  flex: 0 0 auto;
  width: 320px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.12);
  scroll-snap-align: center;
  transition: transform 0.35s ease;
  background: #fff;
  cursor: zoom-in;
  will-change: transform;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.slide:hover,
.slide:focus-within {
  transform: scale(1.07);
  outline: none;
  box-shadow: 0 14px 32px rgb(0 0 0 / 0.22);
}

/* ===== Avis Clients ===== */
.section-avis {
  background: #eaf3fe;
  padding: 4rem 1.25rem 5rem;
  border-radius: 26px;
  max-width: 1080px;
  margin: 0 auto 3rem;
  box-shadow: 0 6px 22px rgb(58 123 213 / 0.15);
}

.avis-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem 2.5rem;
}

.avis {
  background: white;
  border-radius: 18px;
  padding: 1.7rem 2rem;
  box-shadow: 0 9px 24px rgb(0 0 0 / 0.09);
  font-style: italic;
  font-weight: 600;
  color: #2c3e50;
  user-select: text;
  cursor: default;
  transition: box-shadow 0.3s ease;
}

.avis:hover,
.avis:focus-within {
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.17);
  outline: none;
}

/* ===== FAQ ===== */
.section-faq {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 1.25rem;
  font-weight: 600;
  color: #204d74;
}

details {
  border: 1.8px solid #acc9f5;
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.25rem;
  background: #f3f9ff;
  cursor: pointer;
  transition: background-color 0.4s ease, border-color 0.4s ease;
  user-select: none;
}

details[open] {
  background: #d1e4ff;
  border-color: #2a5a9e;
}

summary {
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  outline-offset: 4px;
  color: #204d74;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  display: inline-block;
  margin-right: 0.8rem;
  font-weight: 900;
  color: #3178c6;
  transition: transform 0.3s ease;
  user-select: none;
}

details[open] summary::before {
  content: "−";
  color: #204d74;
  transform: rotate(180deg);
}

/* ===== Contact ===== */
.section-contact form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* un peu plus d'espace pour respirer */
  padding: 1.5rem;
  background-color: #f5f8ff; /* fond très léger pour délimiter le form */
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(32, 77, 116, 0.15);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #204d74;
}

/* Labels */
.section-contact label {
  font-weight: 700;
  color: #204d74;
  user-select: none;
  font-size: 1.125rem; /* légèrement plus grand pour confort lecture */
  letter-spacing: 0.02em;
  cursor: pointer;
}

/* Inputs & Textarea */
.section-contact input,
.section-contact textarea {
  padding: 0.85rem 1.25rem;
  font-size: 1.125rem;
  border-radius: 14px;
  border: 2.5px solid #bbccee;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
  resize: vertical;
  font-family: inherit;
  color: #34495e;
  box-shadow: inset 0 0 10px rgba(187, 204, 238, 0.35);
  background-color: #ffffff;
  min-height: 44px; /* minimum confortable */
  outline-offset: 2px;
}

/* Focus state */
.section-contact input:focus,
.section-contact textarea:focus {
  outline: none;
  border-color: #3a7bd5;
  box-shadow: 0 0 18px rgba(58, 123, 213, 0.75);
  background-color: #f9fbff;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Textarea min height */
.section-contact textarea {
  min-height: 120px;
}

/* Message feedback */
.form-message {
  font-weight: 700;
  font-size: 1.125rem;
  min-height: 1.8rem;
  margin-top: -0.5rem;
  user-select: none;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

/* Success message color */
.form-message.success {
  color: #2a7d32;
}

/* Error message color */
.form-message.error {
  color: #c62828;
}

/* ===== Contact infos ===== */
.contact-infos {
  max-width: 640px;
  margin: 2.5rem auto 0;
  font-size: 1.125rem;
  color: #555d6e;
  text-align: center;
  user-select: text;
  letter-spacing: 0.03em;
  line-height: 1.6;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.contact-infos strong {
  color: #204d74;
}

/* Responsive : confort sur petits écrans */
@media (max-width: 480px) {
  .section-contact form {
    padding: 1rem 1.25rem;
    gap: 1.25rem;
  }
  
  .section-contact label,
  .section-contact input,
  .section-contact textarea,
  .contact-infos {
    font-size: 1rem;
  }
  
  .section-contact textarea {
    min-height: 100px;
  }
}

/* ===== Map ===== */
#map {
  border-radius: 20px;
  box-shadow: 0 9px 30px rgb(0 0 0 / 0.13);
}

/* ===== Mentions légales ===== */
.section-mentions {
  max-width: 720px;
  margin: 3rem auto 6rem;
  font-size: 0.9rem;
  color: #6b7a8f;
  text-align: center;
  user-select: text;
  letter-spacing: 0.02em;
}

.section-mentions a {
  color: #3178c6;
  font-weight: 600;
  transition: color 0.3s ease;
}

.section-mentions a:hover,
.section-mentions a:focus-visible {
  color: #204d74;
}

/* ===== Footer ===== */
footer {
  background-color: #204d74;
  color: #e6ecf6;
  padding: 1.2rem 0;
  user-select: none;
  box-shadow: 0 -2px 14px rgb(0 0 0 / 0.2);
  font-family: 'Montserrat', sans-serif;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

footer p {
  margin: 0;
  user-select: text;
}

footer a.whatsapp {
  font-size: 1.8rem;
  text-decoration: none;
  color: #25d366;
  transition: color 0.3s ease;
  filter: drop-shadow(0 0 3px #25d366);
}

footer a.whatsapp:hover,
footer a.whatsapp:focus-visible {
  color: #128c3e;
  outline-offset: 3px;
  outline-color: #128c3e;
  outline-style: solid;
  outline-width: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  nav#menu-principal ul {
    gap: 1.3rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1.15rem;
  }

  section {
    padding: 3.2rem 1rem 2.2rem;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .slider-container {
    justify-content: flex-start;
  }
}

@media (max-width: 550px) {
  nav#menu-principal ul {
    flex-direction: column;
    gap: 0.9rem;
    background: #fff;
    padding: 1rem 1.6rem;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 5px 18px rgb(0 0 0 / 0.18);
    position: absolute;
    top: 4.7rem;
    right: 1.5rem;
    width: 220px;
    display: none;
  }
  nav#menu-principal.active {
    display: flex;
  }

  .burger {
    display: block;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.3rem 0.5rem;
  }

  .btn-devis-header {
    display: none;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .slider-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
}

/* ===== Accessibility ===== */
:focus-visible {
  outline: 3px solid #3178c6 !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

/* ===== Animation: fade-in/out ===== */
.fade-init {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.appear {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition-delay: 0.15s;
}

/* Optional: utility for fade out */
.fade-out {
  opacity: 0 !important;
  transform: translateY(10px) !important;
  transition: opacity 0.5s ease-in, transform 0.5s ease-in;
}

/* ===== KEYFRAMES for smooth entrance ===== */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
