/* === Styles Globaux === */
@font-face {
  font-family: "Coolvetica";
  src: url("fonts/Coolvetica.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Coolvetica-Italic";
  src: url("fonts/Coolvetica-Italic.otf") format("opentype");
  font-weight: normal;
  font-style: italic;
}
@font-face {
  font-family: "Coolvetica-Condensed";
  src: url("fonts/Coolvetica-Condensed.otf") format("opentype");
  font-weight: normal;
  font-style: condensed;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.no-scroll {
  overflow: hidden;
}

body {
  font-family: "Inter", "inter-Italic", "Coolvetica", "Coolvetica-Condensed",
    "Coolvetica-Italic", sans-serif;
  line-height: 1.4;
  background-color: #ffffff;
}

.grid-bg-white {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  background-image: radial-gradient(rgba(12, 12, 12, 0.085) 2px, transparent 0);
  background-size: 25px 25px;
  background-position: -5px -5px;
}

/* === STRUCTURE PRINCIPALE === */
.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 1600px;
  width: 95%;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 10px;
  position: relative;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
}

.logo img {
  display: block;
  height: 150px;
  width: auto;
  padding: 10px;
  margin-top: 20px;
  transition: opacity 0.25s ease;
}

.topbar::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  height: 2px;
  background: #383838;
  border-radius: 2px;
  margin-left: 220px;
  transition: margin 0.3s ease;
}

.nav-container {
  display: flex;
  flex: 1;
  align-items: center;
}
.nav-container .bottom-links {
  display: none;
}

.menu {
  flex: 1;
  display: flex;
  gap: 70px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

/* --- Zone Centrale --- */
.frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.rule {
  height: 2px;
  background: #383838;
  border-radius: 2px;
  width: 100%;
  flex: 0 0 auto;
}
.frame .rule:first-child {
  display: none;
}

.zone {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #0066ff #f1f1f1;
}

.zone::-webkit-scrollbar {
  width: 8px;
}
.zone::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.zone::-webkit-scrollbar-thumb {
  background: #0066ff;
  border-radius: 10px;
}
.zone > * {
  width: 100%;
}

/* --- Footer --- */
footer {
  flex: 0 0 auto;
  width: 100%;
  padding: 20px 0;
  background: transparent;
  z-index: 10;
}

.bottom-links {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  text-align: center;
  font-family: Roboto Slab, sans-serif;
  font-size: 14px;
}

.bottom-links a {
  color: #000;
  text-decoration: none;
  transition: color 0.25s ease;
}
.bottom-links a:hover {
  color: #008cff9c;
}

/* === MENU BURGER === */
.burger-btn {
  display: none;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.burger-btn span {
  display: block;
  position: absolute;
  left: 5px;
  width: 30px;
  height: 3px;
  background-color: #000;
  border-radius: 3px;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.burger-btn span:nth-child(1) {
  top: 10px;
}
.burger-btn span:nth-child(2) {
  top: 18px;
}
.burger-btn span:nth-child(3) {
  top: 26px;
}

.burger-btn.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger-btn.is-open span:nth-child(2) {
  opacity: 0;
}
.burger-btn.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* === Effets === */
.logo,
.frame,
.footer {
  transition: filter 0.4s ease;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.25);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

body.no-scroll .logo,
body.no-scroll .frame,
body.no-scroll .footer {
  filter: blur(5px);
}
body.no-scroll::before {
  opacity: 1;
}

.mobile-section-title {
  display: none;
  margin: 0;
  font-family: "Coolvetica", sans-serif;
  font-size: 1.5rem;
  color: #006ff0;
  opacity: 0.5;
  pointer-events: none;
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
  .menu {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    padding: 0 10px;
  }

  .topbar {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding-bottom: 10px;
    /* CORRECTION: z-index auto pour que le wipe (z-20) puisse couvrir les enfants */
    z-index: auto;
    position: relative;
  }
  .topbar::after {
    display: none;
  }

  .logo {
    width: auto;
    justify-content: flex-start;
    margin-bottom: 0;
  }
  .logo img {
    height: 70px;
    margin-top: 5px;
  }

  .frame .rule:first-child {
    display: block;
  }
  .footer {
    display: none;
  }

  .burger-btn {
    display: block;
    /* Position absolue dans le topbar relatif pour un placement parfait */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    /* Le z-index ici est écrasé par contact.js en cas de besoin */
    z-index: 1003;
  }

  /* Conserve le centrage même ouvert */
  .burger-btn.is-open {
    transform: translateY(-50%);
  }

  .nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    left: auto;
    width: 75%;
    height: 100vh;
    padding: 120px 20px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s;
    overflow-y: auto;
  }

  .nav-container.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  .nav-container .menu {
    flex-direction: column;
    width: 100%;
    gap: 25px;
    flex: 0;
  }
  .nav-container .button3 {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  .nav-container .contact-btn {
    width: 100%;
    max-width: 320px;
    margin: 40px auto 0 auto;
  }

  .nav-container .bottom-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    align-items: center;
    width: 100%;
    font-size: 0;
  }
  .nav-container .bottom-links a {
    font-size: 14px;
    color: #000;
    font-family: Roboto Slab, sans-serif;
  }

  .zone.no-scrollbar-mobile {
    scrollbar-width: none;
  }
  .zone.no-scrollbar-mobile::-webkit-scrollbar {
    display: none;
  }

  .mobile-section-title {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 28px;
    z-index: 10;
    white-space: nowrap;
  }
}
