/* ==============================
   RESET & BASE
============================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0f0f0f;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* ==============================
   LOGO FIXE
============================== */
.site-header {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 3000;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.site-logo {
  width: 120px;
  height: auto;
}

.site-header.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

/* ==============================
   HORIZONTAL SCROLL WRAPPER
============================== */
.horizontal-wrapper {
  display: flex;
  flex-direction: row;
  width: 620vw; /* 5 sections */
  height: 100vh;
  will-change: transform;
}

/* ==============================
   PANEL / SECTIONS
============================== */
.panel {
  position: relative;
  width: 108vw;
  height: 100vh;
  padding: clamp(60px, 8vw, 100px);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.panel-left,
.panel-right {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.panel-left {
  justify-content: center;
  align-items: start;
  padding-left: 1%;
}

.panel-right {
  justify-content: flex-start;
}

/* ==============================
   TYPOGRAPHIE
============================== */
h1 {
  font-size: clamp(70px, 7vw, 46px);
  font-weight: 800;
}

h2 {
  font-size: clamp(2px, 3.5vw, 28px);
  margin-bottom: 12px;
}

p {
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.75;
  max-width: 520px;
}

small.seo { color: #f9df4c; }
small.sea { color: #ff6584; }

/* ==============================
   IMAGES / SVG
============================== */
.svg-hero,
.panel-right img, svg {
  width: 100%;
  max-width: 800px;
  height: 100%;
}

.svg-icon { width: 64px; margin-bottom: 20px; }

/* ==============================
   COULEURS DES SECTIONS
============================== */
.hero {   
  background-image: url("./assets/imgs/fond-w3mdi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.services { background: #111; }

.project { 
  background-image: url("./assets/imgs/fond-w3mdi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.offre { 
  background: #1d1d1d;
  background-image: url("./assets/imgs/simpleshiny.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.about { background: #111; }

.contact {   
  background-image: url("./assets/imgs/fond-w3mdi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  line-height: 1;
}

.contact h1 { padding: 1em 0em; font-size: 4em; }

.contact a {
  text-decoration: none;
  color: #f9df4c;
  font-size: 17px;
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==============================
   SERVICES
============================== */
.services-wrapper {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.service {
  max-width: 280px;
  padding: 2%;
  margin: 2% 0%;
  background-image: url("./assets/imgs/fond-w3mdi.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, background-image 0.3s ease;
}

.service:hover {
  transform: translateY(-6px);
  background: #2a2a2a;
}

/* ==============================
   FORM / SEO
============================== */
#search { margin: auto; width: 100%; max-width: 90%; }

#search fieldset {
  display: flex;
  gap: 10px;
  border: none;
}

#urlInput {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: #1a1a1a;
  color: #fff;
}

.main-button {
  display: inline-block;
  padding: 14px 18px;
  background-color: #f9df4c;
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid #f9df4c;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  margin: 1em 0.5em;
}

.main-button:hover {
  background-color: #ff6584;
  border-color: #ff6584;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.main-button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ==============================
   MAP / CONTACT RESPONSIVE FIX
============================== */
.map-container {
  position: relative;
  width: 100%;
  max-width: 520px; /* optional max width */
  margin-top: 20px;
  overflow: hidden;
  border-radius: 12px;
}

.map-container::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 ratio */
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ⚡ FIX DISPLAY ENTIER MAP */
.contact.panel {
  overflow-y: auto; /* permet de scroller vertical si contenu > 100vh */
}

.contact .panel-left {
  justify-content: flex-start; /* plus de centrage vertical, contenu fluide */
}

/* ==============================
   DESKTOP UNIQUEMENT
============================== */
@media (min-width: 1025px) {
  body { overflow: hidden; }
  .horizontal-wrapper { height: 100vh; }
}

/* ==============================
   TABLETTE & MOBILE
============================== */
@media (max-width: 1024px) {
  .horizontal-wrapper {
    flex-direction: column;
    width: 100%;
    height: auto;
    transform: none !important;
  }

  .panel {
    width: 100%;
    min-height: 100vh;
    height: auto;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
  }

  .panel-left,
  .panel-right {
    width: 100%;
    text-align: center;
    align-items: center;
  }

  .svg-hero,
  .panel-right img, svg {
    max-width: 420px;
    margin-top: 30px;
  }

  .services-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .site-logo { width: 90px; }
}

/* ==============================
   MOBILE
============================== */
/* ==============================
   RESPONSIVE CENTER LAST SECTION
============================== */
@media (max-width: 768px) {

  /* Toutes les sections */
  .panel {
    min-height: 100vh; /* occupe tout l'écran */
    padding: 40px 20px; /* réduit le padding pour mobile */
    display: flex;
    flex-direction: column;
    justify-content: center; /* centre verticalement tout le contenu */
    align-items: center; /* centre horizontalement */
    text-align: center;
  }

  /* Panel-left / panel-right */
  .panel-left,
  .panel-right {
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0; /* annule padding-left sur mobile */
  }

  /* Map container */
  .map-container {
    width: 100%;
    max-width: 420px;
    margin: 20px 0 0 0;
  }

  /* Texte */
  h1 { font-size: 32px; }
  p { font-size: 16px; line-height: 1.5; }
}

/* ==============================
   MICRO INTERACTIONS / SVG
============================== */
.panel img { user-select: none; }

.ping {
  fill: #111;
  animation: pingPulse 0.8s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.element {
  fill: #f9df4c;
  animation: pingPulse 0.8s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes pingPulse {
  0% { transform: scale(1); opacity: 1; fill: #f9df4c; }
  50% { transform: scale(1.15); opacity: 0.7; fill: #ff6584; }
  100% { transform: scale(1); opacity: 1; fill: #f9df4c; }
}

.pulsate {
  animation: pulsate 1.8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes pulsate {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}
