:root {
  --nav-height: 70px; /* Hauteur par défaut de la navigation */
}

/* --- Défilement fluide --- */
html {
  scroll-behavior: smooth;
}

textarea {
  resize: none;           /* empêche l’utilisateur de redimensionner manuellement */
  overflow: hidden;       /* masque la scrollbar */
  min-height: 80px;       /* hauteur minimale de base */
  transition: height 0.2s ease; /* effet fluide lors de l’allongement */
}

/* --- Date Picker personnalisé --- */
input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #e5e4f2;
  color: #545e45;
  font-family: "Poppins", sans-serif;
  border: 1px solid #a28b5c;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="date"]:hover,
input[type="date"]:focus {
  background-color: #e9e5d7;
  border-color: #8f7a50;
  outline: none;
}

/* Icône calendrier */
input[type="date"]::-webkit-calendar-picker-indicator {
  background-color: #a28b5c;
  border-radius: 50%;
  padding: 4px;
  cursor: pointer;
  filter: invert(1);
  transition: background-color 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background-color: #8f7a50;
}



body {
  margin: 0;
  background-color: #f2eee4;
  /* fond général uniforme */
  color: #545e45;
  /* couleur du texte principale */
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* --- Navigation fixe --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: #f2eee4;
  /* même ton que les sections */
  border-bottom: 1px solid #dcd6c9;
  /* léger contraste */
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(6px);
  /* effet légèrement diffus sur scroll */
}

#rts {
  color: #ab5e3c;
  font-size: 2rem;
  letter-spacing: 1px;
}

/* --- Zone gauche (logo + texte RTS) --- */
.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-logo {
  height: 110px; /* 👈 ajuste selon ton logo */
  width: auto;
  vertical-align: middle;
}

/* --- Bouton burger --- */
#menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #545e45;
}

/* --- Liens du menu --- */
#menu-links {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

/* --- Responsive : affichage mobile --- */
@media (max-width: 768px) {
  #menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    color: #545e45;
    cursor: pointer;
    margin-right: 0.5rem;
    position: relative;
    transition: color 0.3s ease;
  }

  #menu-toggle:hover {
    color: #a28b5c;
  }

  #menu-links {
    position: absolute;
    top: 100%;                         /* ✅ s’ouvre juste sous la barre de navigation */
    right: 0;
    left: 0;
    background-color: #f2eee4;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1rem;
    border-top: 1px solid #dcd6c9;
    display: none;
    margin: 0;
    box-sizing: border-box;
  }

  #menu-links.show {
    display: flex;
  }

    #menu-links a:hover {
    background-color: #e8e3d7;
    color: #a28b5c;
  }
}

nav a {
  color: #545e45;
  text-decoration: none;
}

nav a:hover {
  color: #7a8667;
  /* teinte un peu plus claire au survol */
}

/* --- Lien actif --- */
nav a.active {
  color: #a28b5c;
  font-weight: bold;
}

/* --- Contenu principal --- */
main {
  padding-top: var(--nav-height); /* Correspond à la hauteur de la nav */
  min-height: calc(100vh - var(--nav-height)); /* Assure que le main prend au moins la hauteur de l'écran moins la nav */
}

/* --- Sections --- */
section {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem;
  background-color: #f2eee4;
  border-top: 1px solid #e4dfd4;
  border-bottom: 1px solid #e4dfd4;
  color: #545e45;
  margin: 0;
  padding-bottom: 3rem;
  border: none;
  /* texte des sections */
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

#section1{

  margin-top: 2%;
}

/* --- Option : légère alternance visuelle sans changer la teinte --- */
section:nth-child(even) {
  background-color: #f5f1e9;
  /* variation subtile */
}

h1,
h2,
h3,
h4,
h5,
p {
  color: #545e45;
}


label {
  color: #545e45;
}

input,
textarea {
  color: #545e45;
  border-color: #cfcabf;
}

/* --- Formulaire --- */
form {
  background-color: #fffefb;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #eae6da;
}

button {
  background-color: #8e9b75;
  color: #fffefb;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #7a8667;
}



/*                     Section 1              */

/* --- Mise en page de la première section --- */
.intro-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  /* Pour le responsive */
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Texte à gauche */
.intro-text {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.intro-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #545e45;
}

.intro-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #545e45;
}


/* Image à droite */
.intro-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.intro-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Responsive : empilement sur petits écrans --- */
@media (max-width: 768px) {
  .intro-container {
    flex-direction: column;
    text-align: center;
  }

  .intro-text {
    text-align: center;
  }
}





/* === SECTION WHY CHOOSE US === */

#section2 {
  background-color: #f2eee4;
  padding: 4rem 1rem;
  border-top: 1px solid #e4dfd4;
  border-bottom: 1px solid #e4dfd4;
  display: flex;
  padding: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 80vh;
}

/* --- Boîte principale --- */
.why-container {
  display: flex;
  align-items: flex-center; /* place les éléments en haut */
  justify-content: center;
  gap: 3rem;
  padding: 1.5rem 1rem;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}


/* --- Contenu principal (image + texte) --- */
.why-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  /* pour le responsive */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Image à gauche */
.why-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.why-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Texte à droite */
.why-text {
  flex: 1;
  color: #545e45;
  text-align: center; /* ✅ centre le contenu horizontalement */
  display: flex;
  flex-direction: column;
  align-items: center; /* ✅ centre le bloc sur l’axe horizontal */
}

.why-text h2 {
  font-size: 3rem;
  font-weight: bold;
  text-decoration: underline;
  margin-bottom: 5rem; /* ✅ espace entre le titre et la liste */
}

.why-text ul {
  list-style-type: none;
  color: #545e45;
  padding: 0;
  text-align: left; /* ✅ pour garder les puces alignées proprement à gauche */
  display: inline-block; /* ✅ permet de centrer la liste tout en gardant alignement interne */
}

.why-text li {
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .why-content {
    flex-direction: column;
  }

  /* Réorganisation pour mobile : texte d'abord, puis image */
  .why-text {
    order: 1; /* Texte en premier */
    text-align: center;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
  }

  .why-image {
    order: 2; /* Image en second */
    width: 100%;
    margin-top: 1rem;
  }

  .why-text ul {
    padding-left: 1rem;
  }

  .why-header h2 {
    font-size: 1.6rem;
  }

  /* Ajustement des tailles pour mobile */
  .why-text h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .why-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  /* Espacement optimisé pour mobile */
  .why-container {
    padding: 1rem 0;
  }

  .why-content {
    gap: 1.5rem;
  }
}


/* === SECTION OUR SERVICES === */

#section3 {
  background-color: #f2eee4;
  padding: 4rem 1rem;
  border-top: 1px solid #e4dfd4;
  border-bottom: 1px solid #e4dfd4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- Container global --- */
.services-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  box-sizing: border-box;
}

/* --- Header --- */
.services-header {
  text-align: center;
}

.services-header h2 {
  font-size: 3rem;
  font-weight: bold;
  text-decoration: underline;
  color: #545e45;
  margin-bottom: 0;
}

/* --- Grille des services --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  width: 100%;
}

/* --- Box individuelle --- */
.service-box {
  background-color: #ab5e3c;
  border: 1px solid #eae6da;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.service-box h3 {
  color: #f7f5f0;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  text-decoration: underline;

}

.service-box p {
  color: #f7f5f0;
  line-height: 1.6;
  font-size: 1rem;
  text-align: left;
}

.service-box ul {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
  color: #f7f5f0;
  line-height: 1.6;
  text-align: left;
  /* 👈 Force l’alignement du texte à gauche */
}

.service-box ul li {
  margin-bottom: 0.4rem;
  text-align: left;
  /* 👈 Force l’alignement du texte à gauche */
}

.service-box p strong {
  color: #f7f5f0;
}


/* --- Responsive --- */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-header h2 {
    font-size: 1.6rem;
  }

  .service-box {
    padding: 1.5rem;
  }
}

/* === SECTION OUR about === */

#section4 {
  background-color: #f2eee4;
  padding: 4rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid #e4dfd4;
  border-bottom: 1px solid #e4dfd4;
}

/* --- Container principal --- */
.about-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  gap: 3rem;
  flex-wrap: wrap;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* --- Zone de texte --- */
.about-text {
  flex: 1;
  color: #545e45;
  text-align: left;
}

.about-text h2 {
  font-size: 3rem;
  font-weight: bold;
  text-decoration: underline;
  margin-bottom: 1rem;
  text-align: center;
}

.about-text p {
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* --- Zone des deux images --- */
.about-image {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* Espace entre les deux images */
  align-items: center;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 550px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: center;
  }

  .about-image {
    width: 100%;
  }
}

/* --- Section Contact --- */
#section5 {
  background-color: #f2eee4;
  color: #545e45;
  padding: 4rem 1rem;
  text-align: center;
  overflow-x: hidden;
}

.contact-container {
  max-width: 1000px;
  margin-top: 12%;
}

.contact-container h2 {
  font-size: 3rem;
}

.contact-forms {
  display: flex;
  flex-wrap: wrap;
  /* <-- permet le passage à la ligne sur mobile */
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

/* --- Box contenant chaque formulaire --- */
.form-box {
  background-color: #ab5e3c;
  min-width: 300px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 0;
  flex: 1;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* --- Bouton principal (titre déroulant) --- */
.accordion-btn {
  width: 100%;
  text-align: left;
  background-color: #ab5e3c;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  padding: 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-btn:hover {
  background-color: #6b7658;
}

.chevron {
  transition: transform 0.3s ease;
  font-size: 1rem;
  margin-left: 0.5rem;
}

/* --- Contenu du formulaire (déroulant) --- */
.accordion-content {
  max-height: 0;
  display: none;
  background: #ab5e3c;
  padding: 1rem;
  transition: max-height 0.4s ease;
  padding: 0 1rem;
}

/* --- Contenu visible quand actif --- */
.form-box.active .accordion-content {
  padding: 1rem;
  max-height: 1200px;
  /* ajuster selon contenu */
}

/* --- Quand le formulaire est ouvert --- */
.form-box.active .chevron {
  transform: rotate(180deg);
}

/* --- Formulaire compact --- */
.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group.full-width {
  grid-column: span 2;
}

input[type="file"] {
  display: none;
  /* Cache le bouton natif */
}

.file-label {
  display: inline-block;
  background: #a28b5c;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.file-label:hover {
  background: #8e7a4e;
}

#file-name {
  margin-left: 0.5rem;
  color: #545e45;
  font-size: 0.9rem;
}


/* --- Champs réduits --- */
.contact-form input,
.contact-form textarea {
  padding: 0.3rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fafafa;
  color: #545e45;
}

.contact-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 80px;
}

/* --- Bouton submit --- */
.contact-form button {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  background-color: #ab5e3c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.contact-form button:hover {
  background-color: #6b7658;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .contact-forms {
    flex-direction: column;
  }

  .contact-form {
    display: block;
    grid-template-columns: 1fr; /* Empile tous les inputs verticalement */
  }

  /* Corrections spécifiques pour mobile */
  .form-box {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1.5rem; /* Espacement entre les formulaires */
  }

  /* Optimisation complète des formulaires pour mobile */
  .contact-form input,
  .contact-form textarea {
    padding: 0.6rem 0.8rem; /* Espacement confortable pour les doigts */
    font-size: 1rem; /* Taille de texte lisible */
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #fafafa;
    color: #545e45;
    width: 100%; /* Pleine largeur */
    box-sizing: border-box;
  }

  .contact-form textarea {
    min-height: 100px; /* Hauteur minimale plus généreuse */
    resize: vertical; /* Permet le redimensionnement vertical */
  }

  /* Boutons optimisés pour mobile */
  .contact-form button {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    width: 100%; /* Boutons pleine largeur */
    margin-top: 0.5rem;
    background-color: #ab5e3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
  }

  .contact-form button:hover {
    background-color: #8a4a2c;
  }

  /* Labels améliorés */
  .contact-form label {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
    display: block;
  }

  /* Espacement des groupes de formulaire */
  .form-group {
    margin-bottom: 1rem;
  }

  /* Upload de fichier optimisé */
  .file-label {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }

  /* Assure que les images ne dépassent pas */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Correction pour les sections */
  section {
    padding: 2rem 0.5rem;
  }

  /* Correction pour le conteneur principal */
  main {
    overflow-x: hidden;
  }
}

/* --- Pied de page --- */
.site-footer {
  background-color: #f2eee4; /* même ton que tes sections */
  color: #545e45; /* cohérent avec ton texte */
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  border-top: 1px solid #dcd7c9; /* léger séparateur */
  position: relative; /* garde la position normale */
}

.site-footer p {
  margin: 0;
  font-weight: 500;
}

/* --- Popup overlay --- */
.popup-overlay {
  display: none; /* cachée par défaut */
  position: fixed;
  top: 40%;
  left: 40%;
  width: 30%;
  height: 40%;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* --- Contenu de la popup --- */
.popup-content {
  background-color: #f2eee4;
  color: #545e45;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  min-width: 280px;
  animation: fadeIn 0.3s ease-in-out;
}

/* --- Bouton Fermer --- */
#close-popup {
  margin-top: 1rem;
  background-color: #a28b5c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

#close-popup:hover {
  background-color: #8c774b;
}

/* --- Animation --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Popup d'erreur --- */
.popup-content.error {
  background-color: #fff0f0; /* ton rouge pâle */
  color: #8b2e2e;
  border: 1px solid #d77;
}

#close-error-popup {
  margin-top: 1rem;
  background-color: #c94b4b;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

#close-error-popup:hover {
  background-color: #a83737;
}

/* Le spinner d’attente */
.spinner {
  border: 5px solid #ddd;
  border-top: 5px solid #545e45; /* couleur dans ton thème */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem auto;
  animation: spin 1s linear infinite;
}

/* Animation de rotation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Texte sous le spinner */
#popup-waiting p {
  color: #545e45;
  font-weight: 500;
}



