* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  scroll-behavior: smooth;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity 0.5s ease;
}

.spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #ff6600;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #ff6600;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  transition: background 0.3s ease;
}

#scrollToTop:hover {
  background: #e65c00;
}

/* Navigation */
header {
  background: rgba(0, 0, 0, 0.7);
  position: fixed;
  top: 0;
  width: 100%;
  padding: 10px 0;
  z-index: 100;
  backdrop-filter: blur(5px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: #fff;
  font-size: 1.5em;
  font-weight: 600;
  margin-left: 20px;
}

.nav-links {
  list-style: none;
  display: flex;
  margin-right: 20px;
}

.nav-links li {
  margin: 0 15px;
}

.nav-links li a,
.nav-links li button {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.nav-links li a:hover,
.nav-links li button:hover,
.nav-links li a:focus,
.nav-links li button:focus {
  color: #ff6600;
  outline: none;
}

/* Menu hamburger pour mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  margin-right: 20px;
}

.menu-toggle .hamburger {
  width: 25px;
  height: 3px;
  background: #fff;
  display: block;
  position: relative;
  transition: all 0.3s ease;
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  content: "";
  width: 25px;
  height: 3px;
  background: #fff;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.menu-toggle .hamburger::before {
  top: -8px;
}

.menu-toggle .hamburger::after {
  top: 8px;
}

/* Section Accueil */
#accueil {
  background-color: #ccc; /* Fond gris existant */
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding-top: 60px;
  overflow: hidden;
}

/* Slider d'arrière-plan de la section Accueil */
.accueil-swiper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.accueil-swiper-container {
  width: 100%;
  height: 100%;
}
.accueil-swiper-container .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay semi-transparent pour améliorer la lisibilité */
#accueil .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Contenu de la section Accueil */
.accueil-container {
  position: relative;
  z-index: 2;
}

#accueil h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

#accueil p {
  font-size: 1.2em;
  margin-bottom: 30px;
}

/* Bouton d'appel à l'action */
.cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(45deg, #ff6600, #ff9900);
  color: #fff;
  text-decoration: none;
  font-size: 1.1em;
  border-radius: 50px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.cta-button:hover,
.cta-button:focus {
  transform: scale(1.05);
  background: linear-gradient(45deg, #ff9900, #ff6600);
  outline: none;
}

/* Sections générales */
section {
  padding: 80px 0;
}

section h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2em;
  position: relative;
}

section h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background: #ff6600;
  display: block;
  margin: 10px auto 0;
}

/* Services */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.service-item {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  flex: 1 1 250px;
  text-align: center;
  transition: transform 0.3s ease;
}

.service-item:hover {
  transform: translateY(-10px);
}

.service-item h3 {
  margin-bottom: 15px;
  font-size: 1.4em;
  color: #ff6600;
}

/* Portfolio */
.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.portfolio-item img {
  width: 100%;
  display: block;
}

.portfolio-item h3 {
  padding: 15px;
  font-size: 1.2em;
  color: #333;
}

.portfolio-item p {
  padding: 0 15px 15px;
  color: #777;
  text-align: center;
}

/* À propos */
#a-propos p {
  max-width: 800px;
  margin: auto;
  text-align: center;
  font-size: 1.1em;
  color: #555;
}

/* Formulaire de contact */
#contact form {
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
  transition: border 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #ff6600;
  outline: none;
}

#contact button {
  padding: 15px;
  background: #ff6600;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

#contact button:hover,
#contact button:focus {
  background: #e65c00;
  outline: none;
}

#formFeedback {
  margin-top: 10px;
  font-size: 1em;
  color: green;
}

/* Footer */
footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9em;
}

/* Styles Responsive pour Mobile */
@media (max-width: 768px) {
.nav-links {
  position: fixed;
  top: 0;
  right: -100%;
  width: 220px;
  height: 100vh; /* 100% de la hauteur visible */
  background: rgba(0, 0, 0, 0.7);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 80px; /* pour laisser de l'espace au-dessus des liens */
  transition: right 0.3s ease;
  z-index: 999; /* s'assurer qu'il passe au-dessus du header */
}

  .nav-links li {
    margin: 20px 0;
  }
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1001;
  }
  .nav-links.active {
    right: 0;
  }
  /* Bouton de fermeture dans le menu mobile */
  .nav-links .close-nav {
    margin-top: auto;
    margin-bottom: 20px;
  }
}

/* Section Partenaires */
#partenaires {
  background: #f7f7f7;
  padding: 40px 0;
}

#partenaires h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

/* Slider des partenaires */
.slider {
  overflow: hidden;
  position: relative;
}

.slide-track {
  display: flex;
  animation: scroll 20s linear infinite;
}

.slide {
  width: 200px;
  height: 100px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.slide img:hover {
  filter: grayscale(0%);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Swiper Portfolio (pour les slides hors section Accueil) */
.swiper-container:not(.accueil-swiper-container) {
  width: 100%;
  padding: 20px 0;
}

.swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}
.swiper-slide {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  padding-bottom: 20px;
}

.swiper-slide img {
  flex-shrink: 0;
  height: 200px; /* fixe une hauteur ou utilise object-fit si besoin */
  object-fit: cover;
}

.swiper-slide h3,
.swiper-slide p {
  text-align: center;
  padding: 10px;
  width: 100%;
}

.swiper-slide h3 {
  min-height: 50px; /* ou plus selon besoin */
}

.swiper-slide p {
  min-height: 120px; /* ajuste cette hauteur à ta description la plus longue */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cache la croix en mode desktop */
.nav-links .close-nav {
  display: none;
}

/* Affiche la croix uniquement en mobile quand le menu est actif */
@media (max-width: 768px) {
  .nav-links.active .close-nav {
    display: block;
    margin-top: auto;
    margin-bottom: 20px;
    text-align: center;
  }

  .nav-links .close-nav button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
  }
}



.swiper-slide p {
  font-size: 0.9em; /* ou 0.9em pour plus petit */
  padding: 0 10px 10px;
  color: #555;
  line-height: 1.4;
  text-align: center;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 20px;
}

.footer-left p,
.footer-right p {
  margin: 5px 0;
  color: #ccc;
  font-size: 0.9em;
}



.footer-left a {
  color: #ccc;
  text-decoration: none;
}

.footer-left a:hover {
  text-decoration: underline;
}

/* Adaptation pour mobile */
@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-left,
  .footer-right {
    margin: 10px 0;
  }
}

/* Animation pour la section "À propos de moi" */
#a-propos {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#a-propos.visible {
  opacity: 1;
  transform: translateY(0);
}

#a-propos a {
  color: #ff6600;
  font-weight: bold;
  position: relative;
  transition: color 0.3s ease-in-out;
}

#a-propos a:hover {
  color: #e65c00;
}

#a-propos a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #ff6600;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-in-out;
}

#a-propos a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Animation pour la section "Contact" */
#contact form {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#contact.visible form {
  opacity: 1;
  transform: translateY(0);
}

#contact button {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Animation pour la section "À propos de moi" */
#a-propos {
  opacity: 0;
  transform: translateY(80px); /* Augmente la distance de déplacement */
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

#a-propos.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Effet progressif sur les liens */
#a-propos a {
  color: #ff6600;
  font-weight: bold;
  position: relative;
  transition: color 0.5s ease-in-out;
}

#a-propos a:hover {
  color: #e65c00;
}

#a-propos a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #ff6600;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s ease-in-out;
}

#a-propos a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Animation pour la section "Contact" */
#contact form {
  opacity: 0;
  transform: translateY(80px); /* Effet plus lent */
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

#contact.visible form {
  opacity: 1;
  transform: translateY(0);
}

/* Animation plus douce pour le bouton d'envoi */
#contact button {
  animation: bounce 3s infinite; /* Ralentissement du rebond */
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px); /* Effet de reb

