/* ==============================
   VARIABLES & PALETTE
============================== */
:root {
  --petrol-blue: #003049;
  --burnt-orange: #E76F51;
  --light-grey: #f9f9f9;
  --charcoal-black: #212529;
  --fresh-green: #2788ae;

  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Montserrat', sans-serif;
}

/* ==============================
 RESET & BASE
============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  /* overflow: hidden;  <-- Supprimé pour éviter soucis sur mobile */
  font-size: 18px; 
}

body {
  font-family: var(--font-primary);
  background-color: var(--light-grey);
  color: var(--charcoal-black);
  line-height: 1.7;
  /* overflow-x: hidden; // tu peux le laisser ou non, au besoin */
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* ==============================
 NAVBAR LATERALE PETROL-BLUE
============================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px; 
  height: 100vh;
  background: var(--petrol-blue);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: transform 0.4s ease;
  /* On laisse translateX(-300px) géré par JS + animate.css */
}

.nav-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.logo-container {
  text-align: center;
  margin-bottom: 40px;
}

#nav-left {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: center;
}

#nav-left li a {
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: #fff;
  padding: 8px 0;
  position: relative;
}

#nav-left li a:hover {
  color: var(--fresh-green);
}

#nav-left li a.active {
  color: var(--burnt-orange);
  font-weight: 700;
  position: relative;
}

.cta-bottom {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 15px;
}

.cta-contact {
  display: inline-block;
  background: var(--burnt-orange);
  color: #fff;
  padding: 12px 25px;
  border-radius: 25px;
  font-weight: 700;
  transition: background 0.3s ease, transform 0.3s ease;
}
.cta-contact:hover {
  background: var(--fresh-green);
  transform: translateY(-2px);
}

.social-icons {
  display: flex;
  gap: 10px;
}
.social-icons a {
  color: #fff;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}
.social-icons a:hover {
  color: var(--burnt-orange);
}

/* ==============================
 BOUTON MENU MOBILE
============================== */
#mobile-menu-button {
  display: none;
  position: fixed;
  top: 25px;
  right: 25px;
  font-size: 1.5rem;
  color: #fff;
  z-index: 1100;
  cursor: pointer;
  background: var(--petrol-blue);
  border: none;
  padding: 10px 12px;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

#mobile-menu-button.open i {
  transform: rotate(90deg);
  transition: transform 0.4s ease;
}

/* ==============================
 SEPARATOR (BARRE VERTICALE)
============================== */
.separator {
  position: fixed;
  top: 0;
  left: 300px;
  width: 2px;
  height: 100vh;
  background: #eee;
  z-index: 999;
}

/* ==============================
 SCROLL WRAPPER
============================== */
.scroll-wrapper {
  position: absolute;
  top: 0;
  left: 302px;
  width: calc(100% - 302px);
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  transition: left 0.4s ease;
}

.scroll-wrapper::-webkit-scrollbar {
  width: 12px;
}
.scroll-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0; 
  margin: 2px;
  border-radius: 6px;
}
.scroll-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--petrol-blue), var(--burnt-orange));
  border-radius: 6px;
  border: 2px solid #f0f0f0;
}
.scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--fresh-green), var(--burnt-orange));
}
.scroll-wrapper {
  scrollbar-width: thin;
  scrollbar-color: var(--petrol-blue) #f0f0f0;
}

/* BANNER & ACCUEIL */
.banner {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: url('fallback.jpg') center/cover no-repeat;
}
#background-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.6;
}
.gradient-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* style inline plus léger déjà mis dans index.html */
}
.banner-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  color: #fff;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeBanner 1s ease forwards 0.4s;
}
@keyframes fadeBanner {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.banner-content h1 {
  font-size: 3.2rem;
  margin-bottom: 15px;
  font-family: var(--font-secondary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.banner-subtitle {
  font-size: 1.3rem;
  margin-bottom: 30px;
  font-family: var(--font-primary);
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  min-height: 50px;
}
.cursor {
  display: inline-block;
  margin-left: 3px;
  color: #fff;
  font-weight: 600;
  animation: blink 0.8s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.banner-buttons a {
  margin: 0 10px;
}
.button-primary,
.button-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 25px;
  font-weight: 700;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease, transform 0.3s ease;
  font-family: var(--font-secondary);
}
.button-primary {
  background: var(--burnt-orange);
}
.button-primary:hover {
  background: var(--fresh-green);
  transform: translateY(-2px);
}
.button-secondary {
  background: var(--petrol-blue);
}
.button-secondary:hover {
  background: var(--fresh-green);
  transform: translateY(-2px);
}
.wave {
  width: 100%;
  height: 100px;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translateY(1px);
}
.wave1 {
  background-image: url('https://raw.githubusercontent.com/jeff-olaf/wave-svg/main/svg/wave1.svg');
}
.wave2 {
  background-image: url('https://raw.githubusercontent.com/jeff-olaf/wave-svg/main/svg/wave2.svg');
}
.wave3 {
  background-image: url('https://raw.githubusercontent.com/jeff-olaf/wave-svg/main/svg/wave3.svg');
}

/* SECTIONS */
section {
  position: relative;
  padding: 80px 40px;
  overflow: hidden;
}
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.4rem;
  font-family: var(--font-secondary);
  color: var(--petrol-blue);
  letter-spacing: 1px;
}
.section-intro {
  max-width: 800px;
  margin: 0 auto 50px;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--charcoal-black);
  font-family: var(--font-primary);
  text-align: center;
}

/* INTRO (À PROPOS) */
#intro-particles {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.intro-grid {
  position: relative;
  z-index: 1; 
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.flip-card {
  perspective: 1000px;
  min-height: 340px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s;
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
}
.flip-card-front {
  background: #fff;
}
.flip-card-front i {
  font-size: 50px;
  color: var(--burnt-orange);
  margin-bottom: 12px;
}
.flip-card-front h3 {
  font-size: 1.5rem;
  color: var(--burnt-orange);
  font-family: var(--font-secondary);
  margin-bottom: 15px;
  text-align: center;
}
.flip-card-back {
  background: linear-gradient(135deg, var(--burnt-orange), var(--petrol-blue));
  color: #fff;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.5;
  transform: rotateY(180deg);
}
.flip-card:hover .flip-card-inner,
.flip-card-inner.flipped {
  transform: rotateY(180deg);
}

/* SERVICES (FLIP CARDS) */
.services-flip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  justify-items: center;
}
.services-flipcard {
  width: 380px;
  min-height: 400px;
}
.services-flipcard .flip-card-front {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.services-flipcard .flip-card-front i {
  font-size: 60px;
  color: var(--burnt-orange);
  margin-bottom: 20px;
  transition: color 0.3s, transform 0.3s;
}
.services-flipcard .flip-card-front h3 {
  margin-bottom: 15px;
  font-family: var(--font-secondary);
  font-size: 1.6rem;
  color: var(--petrol-blue);
  text-transform: uppercase;
}
.services-flipcard .flip-card-back {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 25px;
}
.services-flipcard .flip-card-back ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.6;
  text-align: left;
}
.services-flipcard .flip-card-back ul li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}
.services-flipcard .flip-card-back ul li::before {
  content: "\f111";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 4px;
  font-size: 0.7rem;
  color: #fff;
}
.services-flipcard:hover i {
  color: var(--fresh-green);
  transform: scale(1.1);
}

/* SLIDER ADDONS */
.slider-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}
.slider-arrow {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--burnt-orange);
  cursor: pointer;
  padding: 10px;
  transition: color 0.3s ease, transform 0.3s ease;
}
.slider-arrow:hover {
  color: var(--fresh-green);
  transform: scale(1.1);
}
.video-slider {
  width: 800px;
  max-width: 90%;
  overflow: hidden;
  position: relative;
}
.video-slide {
  display: none;
  text-align: center;
}
.video-slide.active {
  display: block;
}

/* CONTACT */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
}
.contact-card {
  background: #fff;
  border-radius: 10px;
  width: 240px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  transition: transform 0.5s, box-shadow 0.5s;
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}
.contact-card i {
  font-size: 2.2rem;
  color: var(--burnt-orange);
  margin-bottom: 12px;
  transition: color 0.3s ease;
}
.contact-card:hover i {
  color: var(--fresh-green);
}
.contact-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-family: var(--font-secondary);
  color: var(--petrol-blue);
}

/* MODALE DE CONNEXION */
.modal-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
#login-modal.show {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  padding: 30px 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  position: relative;
}
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.2rem;
  color: var(--charcoal-black);
  cursor: pointer;
}
.login-form .form-group {
  margin-bottom: 15px;
}
.login-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--charcoal-black);
}
.login-form input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-primary);
}
.login-form button[type="submit"] {
  margin-top: 10px;
}
.form-note {
  margin-top: 10px;
  font-size: 0.85rem;
}

/* BOUTON RETOUR EN HAUT */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--burnt-orange);
  color: #fff;
  font-size: 20px;
  padding: 12px;
  border-radius: 50%;
  z-index: 3000;
  cursor: pointer;
  transition: 0.4s;
  opacity: 0;
  transform: translateY(50px);
}
#back-to-top.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--fresh-green);
}

/* FOOTER */
footer {
  background: var(--petrol-blue);
  color: #fff;
  padding: 25px 0;
  text-align: center;
  font-size: 1rem;
  position: relative;
}

/* ==============================
 RESPONSIVE
============================== */
/* Smartphone max-width 768px */
@media (max-width: 768px) {
  #mobile-menu-button {
    display: block !important;
  }

  #navbar {
    transform: translateX(-300px); /* caché sur mobile par défaut */
  }
  #navbar.active {
    transform: translateX(0);
  }

  .separator {
    display: none;
  }

  .scroll-wrapper {
    left: 0;
    width: 100%;
    height: 100vh;
  }

  .banner {
    min-height: 70vh;
  }
  .banner-content h1 {
    font-size: 2.2rem;
  }
  .banner-subtitle {
    font-size: 1rem;
  }

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

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

  .services-flipcard {
    width: 100%;
  }

  .video-slider {
    width: 100% !important;
  }
}

/* TABLETTE entre 769px et 992px */
@media (min-width: 769px) and (max-width: 992px) {
  #navbar {
    width: 260px;
  }
  .separator {
    left: 262px;
  }
  .scroll-wrapper {
    left: 262px;
    width: calc(100% - 262px);
  }

  .banner {
    min-height: 85vh;
  }

  .logo-container svg {
    max-width: 80%;
    height: auto;
  }

  .services-flipcard,
  .intro-card {
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
  }
}
