:root {
  --bleu-petrole: rgb(0, 77, 122);
  --orange-doux: rgb(242, 140, 56);
  --gris-acier: rgb(166, 177, 183);
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f7fa;
  color: #333;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 20px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container {
  flex: 0 0 auto;
  z-index: 2;
}

.logo-container img {
  height: 40px;
}

.site-title {
  flex: 1 1 auto;
  text-align: center;
  font-size: 1.5rem;
  color: var(--bleu-petrole);
  margin: 0;
}

.site-title a {
  text-decoration: none;
  color: var(--bleu-petrole);
}

.site-title a:hover {
  color: var(--orange-doux);
}

nav {
  flex: 1 1 100%;
  text-align: center;
  z-index: 2;
}

nav a {
  display: inline-block;
  margin: 10px;
  text-decoration: none;
  color: var(--bleu-petrole);
  font-weight: 500;
}

nav a:hover {
  color: var(--orange-doux);
}

.banner {
  background: linear-gradient(135deg, var(--bleu-petrole), var(--gris-acier));
  color: white;
  text-align: center;
  padding: 60px 20px;
}

.banner h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.banner p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.section {
  padding: 40px 20px;
  max-width: 1000px;
  margin: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-top: 30px;
}

.section h3 {
  color: var(--bleu-petrole);
  border-left: 5px solid var(--orange-doux);
  padding-left: 10px;
}

.container {
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.container h1 {
  color: var(--bleu-petrole);
  border-left: 5px solid var(--orange-doux);
  padding-left: 10px;
}

.section-block {
  margin-bottom: 30px;
}

.section-block h3 {
  font-size: 1.4rem;
  color: var(--bleu-petrole);
  margin-bottom: 10px;
}

.service {
  margin: 20px 0;
  padding: 15px;
  border-left: 3px solid var(--bleu-petrole);
  background-color: #f9f9f9;
  border-radius: 5px;
  transition: transform 0.3s ease;
}

.service:hover {
  transform: scale(1.02);
  background-color: #fff;
}

.highlight {
  color: var(--orange-doux);
  font-weight: bold;
}

footer {
  background-color: var(--bleu-petrole);
  color: white;
  text-align: center;
  padding: 25px;
  margin-top: 40px;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

.carousel {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  margin: 20px auto;
  border-radius: 10px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  flex-shrink: 0;
  width: 100%;
  text-align: center;
}

.carousel-item img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.carousel-caption {
  margin: 10px 0;
  font-size: 1rem;
  color: var(--bleu-petrole);
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 5px;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 1.5rem;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.carousel button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel .prev {
  left: 10px;
}

.carousel .next {
  right: 10px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.contact-form:hover {
  transform: translateY(-5px);
}

.form-group {
  position: relative;
}

.form-group label {
  color: var(--bleu-petrole);
  font-weight: 600;
  font-size: 0.9rem;
  position: absolute;
  top: -10px;
  left: 15px;
  background: white;
  padding: 0 5px;
  transition: all 0.3s ease;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--gris-acier);
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: #f9f9f9;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--orange-doux);
  box-shadow: 0 0 8px rgba(242, 140, 56, 0.3);
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.consent-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.consent-group input {
  width: auto;
  margin: 0;
}

.consent-group label {
  position: static;
  font-size: 0.9rem;
  color: var(--bleu-petrole);
}

.consent-group a {
  color: var(--orange-doux);
  text-decoration: none;
}

.consent-group a:hover {
  text-decoration: underline;
}

.g-recaptcha {
  margin: 15px 0;
  text-align: center;
}

.form-submit {
  background: linear-gradient(135deg, var(--bleu-petrole), var(--orange-doux));
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  align-self: center;
}

.form-submit:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

p {
  line-height: 1.6;
  margin: 15px 0;
}

a {
  color: var(--orange-doux);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

footer a {
  color: var(--orange-doux);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Media Queries pour responsivité */
@media (min-width: 600px) {
  header {
    flex-wrap: nowrap;
    position: relative;
    justify-content: space-between;
    padding: 10px 30px; /* Plus d'espace */
  }

  .logo-container {
    flex: 0 0 auto;
    padding-right: 50px; /* Espace pour éviter chevauchement */
    z-index: 2;
  }

  .site-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex: none;
    text-align: center;
    z-index: 0; /* Sous logo et nav */
    width: auto;
    min-width: 200px; /* Évite écrasement */
    padding: 0 10px;
  }

  nav {
    flex: 0 0 auto;
    text-align: right;
    padding-left: 50px; /* Espace pour éviter chevauchement */
    z-index: 2;
  }
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
  }

  .logo-container img {
    height: 32px;
  }

  .site-title {
    font-size: 1.2rem;
    margin: 10px 0;
  }

  nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 5px;
  }

  nav a {
    margin: 5px;
    font-size: 0.9rem;
  }

  .banner {
    padding: 30px 15px;
  }

  .banner h2 {
    font-size: 1.5rem;
  }

  .banner p {
    font-size: 1rem;
    max-width: 90%;
  }

  .section {
    padding: 20px 15px;
    margin-top: 20px;
  }

  .section h3 {
    font-size: 1.3rem;
  }

  .container {
    padding: 15px;
  }

  .container h1 {
    font-size: 1.5rem;
  }

  .section-block h3 {
    font-size: 1.2rem;
  }

  .service {
    margin: 15px 0;
    padding: 10px;
  }

  .carousel-item img {
    max-height: 200px;
  }

  .carousel-caption {
    font-size: 0.8rem;
    padding: 8px;
    max-width: 90%;
  }

  .carousel button {
    font-size: 1rem;
    padding: 8px;
  }

  .contact-form {
    max-width: 100%;
    padding: 15px;
  }

  .form-group input,
  .form-group textarea {
    padding: 10px;
    font-size: 0.9rem;
  }

  .form-group label {
    font-size: 0.8rem;
  }

  .form-submit {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: center;
  }

  p {
    font-size: 0.9rem;
  }
}

@media (max-width: 400px) {
  .logo-container img {
    height: 28px;
  }

  .site-title {
    font-size: 1rem;
  }

  nav a {
    font-size: 0.8rem;
    margin: 3px;
  }

  .carousel-item img {
    max-height: 150px;
  }

  .carousel-caption {
    font-size: 0.7rem;
    padding: 6px;
  }

  .carousel button {
    font-size: 0.8rem;
    padding: 6px;
  }

  .g-recaptcha {
    transform: scale(0.75);
  }
}