/* ====== Flexbox wrapper for sticky footer ====== */
html,
body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
}
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
}

/* ====== Réinitialisation basique ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ====== Body, conteneur, etc. ====== */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: rgba(218, 218, 218, 0.8);
}

main {
  position: relative;
  margin-top: 80px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ====== Container pour le header ====== */
.top-nav .container {
  display: flex; /* Active Flexbox */
  align-items: center; /* Centre verticalement le contenu */
  justify-content: space-between;
}

/* ====== Première barre de navigation (top-nav) ====== */
.top-nav {
  position: fixed; /* On la fixe en haut */
  top: 0;
  left: 0;
  width: 100%;
  background: #858585; /* Couleur de fond */
  color: #fff;
  padding: 15px 0;
  z-index: 999; /* Toujours au-dessus */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ====== Logo Styling ====== */
.top-nav .logo img {
  max-height: 50px; /* Ajustez la hauteur selon vos besoins */
  width: auto; /* Maintient le ratio d'aspect */
  display: block; /* Assure un comportement de bloc */
}

.top-nav .logo {
  margin: 0; /* Supprime la marge par défaut */
  padding: 0; /* Supprime le padding */
}

.top-nav .logo a {
  display: flex; /* Assure que le logo est flexible si du texte est ajouté plus tard */
  align-items: center; /* Centre l'image verticalement */
  text-decoration: none; /* Supprime le soulignement */
}

/* Logique d’affichage/masquage avec des classes utilitaires */
.top-nav.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* ====== Deuxième barre de navigation (secondary-nav) ====== */
.secondary-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #333;
  color: #fff;
  padding: 10px 0;
  z-index: 998;
  display: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.secondary-nav.visible {
  display: block;
}

/* ====== Styles d’exemple pour les liens ====== */
.top-nav .nav-links,
.secondary-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.top-nav .nav-links a,
.secondary-nav a {
  color: #ffa500;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.top-nav .nav-links a:hover,
.secondary-nav a:hover {
  color: #ff0000;
}

main {
  margin-top: 80px;
}

/* Hero Section */
.hero {
  position: relative;
  color: #000;
  padding: 25px 0;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/hero.jpg") no-repeat center center/cover;
  opacity: 1;
  z-index: -1;
}

.hero h2 {
  font-size: 48px;
  margin-bottom: 20px;
  color: #ffa500;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero p {
  font-size: 20px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-logo {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 150px;
  margin-right: 5rem;
}

.hero-text {
  flex: 2;
  min-width: 300px;
}

.hero-logo img {
  max-width: 100%;
  height: auto;
  max-height: 250px;
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .hero-text,
  .hero-logo {
    flex: none;
    width: 100%;
  }
  .hero-logo {
    margin-top: 20px;
  }
}

section {
  padding: 60px 0;
}

section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
  color: #ffa500;
}

/* About List */
#about {
  padding: 0;
  margin-top: 0;
  margin-bottom: 2rem;
}

.about-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 40px auto;
  max-width: 800px;
}

.about-list li {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.about-list li:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-list-icon {
  flex-shrink: 0;
  background: #ffa500;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  font-size: 24px;
}

.about-list-text {
  font-size: 18px;
  color: #333;
  font-weight: 500;
}

@media (max-width: 576px) {
  .about-list {
    grid-template-columns: 1fr;
  }
  .about-list li {
    flex-direction: row;
    text-align: left;
  }
}

.about p {
  text-align: center;
}

/* Services Section */
.services .services-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
  margin: 5rem auto;
}

.service-items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex: 1 1 50%;
}

.service-item {
  background: #f9f9f9;
  width: 49%;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.service-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-item h3 {
  color: #ffa500;
  margin-bottom: 10px;
}

.service-item p {
  color: #000;
}

@media (max-width: 992px) {
  .services .services-content {
    flex-direction: column;
    align-items: center;
  }
  .service-items,
  .carousel {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .carousel-inner {
    height: 0;
  }
}

/* Contact Section */
.contact-container {
  background-color: #fff;
  padding: 1rem;
  border-radius: 15px;
}

.contact .contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 30px;
}

.contact .contact-info h2 {
  margin-bottom: 20px;
  color: #ffa500;
  margin-top: 1rem;
}

.contact .contact-details {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 800px;
}

.contact .contact-details div {
  flex: 1 1 300px;
  margin: 10px;
  text-align: center;
}

.contact .contact-info h3 {
  color: #ffa500;
}

.contact .contact-info p {
  font-size: 18px;
  color: #fff;
}

.contact .contact-info a {
  font-size: 18px;
  color: #fff;
}

.contact-info {
  background-color: #858585d0;
  border-radius: 10px;
}

.contact .map iframe {
  border: 0;
  border-radius: 5px;
}

/* Footer */
footer {
  background: #f0ab2c;
  color: #fff;
  text-align: center;
  padding: 20px 0;
}

footer p {
  margin: 0;
}

/* Back to Top Button */
#backToTop {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 100;
  background: transparent;
  border: none;
  outline: none;
  width: 60px;
  height: 60px;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s ease;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTop.show {
  display: flex;
}

#backToTop:hover {
  opacity: 1;
  transform: scale(1.1);
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.progress-ring__background {
  stroke: #ffa500;
  opacity: 0.2;
}

.progress-ring__progress {
  stroke: #ffa500;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
}

.back-to-top-arrow {
  position: relative;
  z-index: 1;
  fill: #ffa500;
  transition: fill 0.3s;
}

#backToTop:hover .back-to-top-arrow {
  fill: #ff0000;
}

/* Carousel Styles */
.carousel {
  position: relative;
  overflow: hidden;
  flex: 0 0 100%;
  max-width: 80%;
  margin: 0 auto;
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 1s ease, opacity 0.7s ease;
  z-index: 0;
}

.carousel-item.active {
  transform: translateX(0);
  opacity: 1;
  z-index: 1;
}

.carousel-item.leave-left {
  transform: translateX(-100%);
  opacity: 0;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  display: block;
}

.carousel-indicators {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-indicators .indicator {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-indicators .indicator.active {
  background: #ffa500;
}

@media (max-width: 768px) {
  .carousel {
    max-width: 100%;
  }
  .carousel-inner {
    padding-bottom: 56.25%;
  }
  .carousel-indicators .indicator {
    width: 10px;
    height: 10px;
  }
}

/* Industries Section */
.industries {
  padding: 60px 0;
}

.industries h2 {
  color: #ffa500;
  font-size: 32px;
  margin-bottom: 20px;
}

.industries .intro-text {
  text-align: center;
  font-size: 18px;
  color: #333;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.industry-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.industry-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.industry-card i {
  font-size: 40px;
  color: #ffa500;
  margin-bottom: 15px;
  transition: color 0.3s;
}

.industry-card h3 {
  font-size: 22px;
  color: #333;
  margin-bottom: 10px;
}

.industry-card p {
  font-size: 16px;
  color: #666;
}

.industry-card:hover i {
  color: #ff6600;
}

.card-index {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 24px;
  color: rgba(0, 0, 0, 0.1);
  font-weight: bold;
  pointer-events: none;
}

.additional-text {
  text-align: center;
  font-size: 18px;
  color: #333;
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .industries-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
  .industry-card {
    padding: 20px 15px;
  }
  .industry-card i {
    font-size: 36px;
    margin-bottom: 10px;
  }
  .industry-card h3 {
    font-size: 20px;
  }
  .industry-card p {
    font-size: 14px;
  }
  .intro-text,
  .additional-text {
    font-size: 16px;
  }
  .card-index {
    font-size: 20px;
    bottom: 8px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .industry-card {
    padding: 15px 10px;
  }
  .industry-card i {
    font-size: 32px;
    margin-bottom: 8px;
  }
  .industry-card h3 {
    font-size: 18px;
  }
  .industry-card p {
    font-size: 13px;
  }
  .intro-text,
  .additional-text {
    font-size: 14px;
  }
  .card-index {
    font-size: 18px;
    bottom: 6px;
    right: 8px;
  }
}

/* Detailed Services (Timeline) */
.details {
  padding: 60px 0;
}

.details h2 {
  color: #ffa500;
  font-size: 32px;
  text-align: center;
  margin-bottom: 20px;
}

.details-intro {
  text-align: center;
  font-size: 18px;
  color: #333;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background-color: #ffa500;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  z-index: 1;
}

.timeline-item {
  padding: 20px 30px;
  position: relative;
  width: 50%;
  z-index: 2;
}

.timeline-item::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -13px;
  background-color: #fff;
  border: 4px solid #ffa500;
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item:nth-child(even)::after {
  left: -13px;
}

.timeline-icon {
  position: absolute;
  top: 10px;
  width: 40px;
  height: 40px;
  background-color: #ffa500;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 1000 !important;
  transform: translateZ(0);
}

.timeline-item:nth-child(odd) .timeline-icon {
  right: -20px;
}

.timeline-item:nth-child(even) .timeline-icon {
  left: -20px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: #fff;
  position: relative;
  border-radius: 6px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
  color: #ffa500;
  font-size: 22px;
  margin-bottom: 10px;
}

.timeline-content p {
  font-size: 16px;
  color: #666;
  line-height: 1.5;
}

.timeline-content:hover i {
  color: #ff6600;
}

@media screen and (max-width: 768px) {
  .timeline::after {
    left: 31px;
    z-index: 1;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-item:nth-child(even) {
    left: 0%;
  }
  .timeline-item::after {
    left: 18px;
  }
  .timeline-icon {
    left: 0px;
    right: auto;
  }
  .timeline-item:nth-child(odd) .timeline-icon,
  .timeline-item:nth-child(even) .timeline-icon {
    left: 0px;
  }
}

@media screen and (max-width: 480px) {
  .timeline-content h3 {
    font-size: 20px;
  }
  .timeline-content p {
    font-size: 14px;
  }
  .timeline-icon {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

/* Gas Particles and Buse Extinction */
#gasParticles {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
}

.buse-extinction {
  position: absolute;
  bottom: 0;
  transform: translateY(120px);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: -10;
  padding: 0 5rem;
}

.buse-extinction img {
  width: 200px;
  height: auto;
  opacity: 0.7;
}
