/* Import Google Fonts */
html, body {
  min-height: 100vh !important;
  height: auto !important;
  overflow: visible !important;
}
body {
  /* min-height: 100vh; */
  /* display: flex; */
  /* flex-direction: column; */
  font-family: 'Montserrat', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f6f7fb;
  color: #1a2236;
  font-size: 1.08rem;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  color: #162447;
  letter-spacing: 0.01em;
  margin-top: 0;
}
h1 { font-size: 2.7rem; margin-bottom: 1.2rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.7rem; }

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

header {
  background: #162447;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
}
.logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.logo span {
  color: #eab543;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
nav a:hover {
  color: #eab543;
  border-bottom: 2px solid #eab543;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  display: block;
}

.hero {
  background: linear-gradient(120deg, #162447 70%, #eab543 100%);
  color: #fff;
  padding: 6rem 0 4rem 0;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}
.btn {
  background: linear-gradient(90deg, #eab543 60%, #fffbe6 100%);
  color: #162447;
  padding: 0.85rem 2.2rem;
  border: none;
  border-radius: 28px;
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(22,36,71,0.08);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn:hover {
  background: #fffbe6;
  color: #eab543;
  box-shadow: 0 4px 24px rgba(22,36,71,0.13);
  transform: translateY(-2px) scale(1.04);
}

.about, .services, .team, .contact {
  padding: 4rem 0 3rem 0;
  background: #fff;
  margin-bottom: 2rem;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(22,36,71,0.04);
}
.about h2, .services h2, .team h2, .contact h2 {
  color: #162447;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.service-card, .team-card {
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(22,36,71,0.06);
  padding: 2rem 1.5rem;
  flex: 1 1 250px;
  min-width: 220px;
  max-width: 320px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.service-card:hover, .team-card:hover {
  box-shadow: 0 4px 24px rgba(22,36,71,0.10);
}
.service-card h3, .team-card h3 {
  color: #162447;
  margin-bottom: 0.7rem;
}

.avatar {
  width: 70px;
  height: 70px;
  background: #eab543;
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin-bottom: 1.5rem;
}
.contact input, .contact textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: none;
}
.contact textarea {
  min-height: 100px;
}
.contact-info {
  color: #162447;
  font-size: 1rem;
}

footer {
  /* flex-shrink: 0; */
  position: relative;
  z-index: 10;
  background: #162447;
  color: #fff;
  padding: 1.5rem 0;
  font-size: 1.05rem;
  border-top: 4px solid #eab543;
  box-shadow: 0 -2px 16px rgba(22,36,71,0.08);
  z-index: 99999 !important;
  position: relative !important;
  display: block !important;
  outline: 3px solid red !important; /* debug, à retirer après */
}
.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
footer a {
  color: #eab543;
  text-decoration: none;
  margin: 0 0.5rem;
  font-weight: 500;
  transition: text-decoration 0.2s, color 0.2s;
}
footer a:hover {
  text-decoration: underline;
  color: #fffbe6;
}

/* --- Effet 3D minimal sur les sections --- */
.section-3d {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 2px 24px rgba(22,36,71,0.06);
  margin-bottom: 2.5rem;
  padding: 4.2rem 0 3.2rem 0;
}

/* --- Cartes 3D avec effet tilt --- */
.card-3d {
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1), box-shadow 0.3s;
  will-change: transform;
  box-shadow: 0 2px 16px rgba(22,36,71,0.08);
  background: linear-gradient(120deg, #f8f9fa 80%, #eab54310 100%);
}
.card-3d.tilted {
  box-shadow: 0 8px 32px rgba(22,36,71,0.18), 0 1.5px 8px rgba(234,181,67,0.10);
}

/* --- Animation d'apparition au scroll --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(60px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(.25,.8,.25,1), transform 0.7s cubic-bezier(.25,.8,.25,1);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: none;
}

/* --- Animation d'entrée du header --- */
.animate-header {
  animation: headerFadeIn 1.1s cubic-bezier(.25,.8,.25,1);
}
@keyframes headerFadeIn {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: none; }
}

/* --- Animation bouton principal --- */
.btn-animate {
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 2px 12px rgba(234,181,67,0.10);
  transition: box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn-animate::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(234,181,67,0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(.25,.8,.25,1), height 0.4s cubic-bezier(.25,.8,.25,1);
  z-index: -1;
}
.btn-animate:hover::before {
  width: 220%;
  height: 600%;
}
.btn-animate:hover {
  box-shadow: 0 6px 32px rgba(234,181,67,0.18);
}

/* --- Avatar effet 3D --- */
.avatar {
  box-shadow: 0 4px 16px rgba(234,181,67,0.10);
  background: linear-gradient(120deg, #eab543 80%, #fffbe6 100%);
}

/* --- Amélioration responsive pour les effets 3D --- */
@media (max-width: 700px) {
  .section-3d {
    box-shadow: 0 2px 8px rgba(22,36,71,0.08);
    border-radius: 10px;
  }
  .card-3d {
    box-shadow: 0 1px 4px rgba(22,36,71,0.08);
  }
}

@media (max-width: 900px) {
  .grid {
    flex-direction: column;
    gap: 1.5rem;
  }
  .header-flex {
    flex-direction: column;
    gap: 1rem;
  }
  .footer-flex {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
@media (max-width: 700px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #162447;
    position: absolute;
    top: 60px;
    right: 5%;
    width: 180px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(22,36,71,0.10);
    padding: 1rem 0;
    z-index: 200;
  }
  nav ul.open {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 0;
}
.logo-img {
  width: 80px;
  max-width: 90vw;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(22,36,71,0.10);
  background: #fff;
  padding: 8px;
  transition: box-shadow 0.2s;
}
.logo-block:hover .logo-img {
  box-shadow: 0 6px 24px rgba(234,181,67,0.18);
}
.brand-highlight {
  color: #eab543;
  font-weight: 700;
  font-size: 1.2em;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-top: 0.2em;
}

.icon-law {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.value-card, .news-card {
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(22,36,71,0.06);
  padding: 2rem 1.5rem;
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 320px;
  text-align: center;
  transition: box-shadow 0.2s;
  margin-bottom: 0.5rem;
}
.value-card h3, .news-card h3 {
  color: #162447;
  margin-bottom: 0.7rem;
}
.values, .news {
  margin-bottom: 2.5rem;
}
section.section-3d {
  margin-bottom: 3.5rem;
}

.hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.hero-content {
  flex: 1 1 320px;
  min-width: 260px;
}
.hero-img {
  flex: 1 1 320px;
  min-width: 220px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-img img {
  width: 100%;
  max-width: 340px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(22,36,71,0.10);
  object-fit: cover;
}

.about-flex {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.about-img {
  flex: 1 1 220px;
  min-width: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.about-img img {
  width: 100%;
  max-width: 260px;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(22,36,71,0.10);
  object-fit: cover;
}
.about-content {
  flex: 2 1 320px;
  min-width: 220px;
}

.value-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.7rem;
  filter: grayscale(0.2) brightness(0.95);
}

.team-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem auto;
  box-shadow: 0 4px 16px rgba(234,181,67,0.10);
  background: #fffbe6;
  display: block;
}

.news-img {
  width: 100%;
  max-width: 220px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(22,36,71,0.08);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .hero-flex, .about-flex {
    flex-direction: column;
    gap: 1.5rem;
  }
  .hero-img img, .about-img img {
    max-width: 100%;
  }
}

/* Menu glassmorphism */
.glass-nav {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(22,36,71,0.08);
  border-bottom: 1px solid rgba(234,181,67,0.10);
  transition: background 0.3s, box-shadow 0.3s;
}

/* Hero overlay et zoom */
.hero-img {
  position: relative;
  overflow: hidden;
}
.hero-img-zoom img {
  transition: transform 0.7s cubic-bezier(.25,.8,.25,1);
}
.hero-img-zoom:hover img {
  transform: scale(1.07);
}
.hero-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(22,36,71,0.18) 60%, rgba(234,181,67,0.10) 100%);
  pointer-events: none;
  z-index: 2;
}

/* Animation de texte du slogan */
.slogan-anim .slogan-word {
  opacity: 0;
  transform: translateY(30px);
  display: inline-block;
  animation: sloganFadeIn 0.7s forwards;
}
.slogan-anim .slogan-word:nth-child(1) { animation-delay: 0.1s; }
.slogan-anim .slogan-word:nth-child(2) { animation-delay: 0.3s; }
.slogan-anim .slogan-word:nth-child(3) { animation-delay: 0.5s; }
.slogan-anim .slogan-word:nth-child(4) { animation-delay: 0.7s; }
@keyframes sloganFadeIn {
  to { opacity: 1; transform: none; }
}

/* Chiffres-clés */
.keyfigures h2 {
  text-align: center;
}
.keyfigures .grid {
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}
.keyfig-card {
  padding: 2.5rem 1.5rem 2rem 1.5rem;
  min-width: 180px;
  max-width: 220px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(22,36,71,0.08);
  text-align: center;
  transition: box-shadow 0.2s, box-shadow 0.3s;
  position: relative;
}
.keyfig-number {
  font-size: 2.7rem;
  font-weight: 700;
  color: #eab543;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.keyfig-label {
  color: #162447;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Glow doré sur cartes au hover */
.card-3d:hover, .keyfig-card:hover {
  box-shadow: 0 8px 32px rgba(234,181,67,0.18), 0 2px 12px rgba(22,36,71,0.10);
  border: 1.5px solid #eab54333;
}

/* Citation animée */
.quote-anim {
  font-size: 1.5rem;
  color: #162447;
  text-align: center;
  font-style: italic;
  opacity: 0;
  transform: translateY(40px);
  animation: quoteFadeIn 1.2s 0.3s forwards;
}
.quote-author {
  display: block;
  margin-top: 1rem;
  color: #eab543;
  font-size: 1.1rem;
  font-style: normal;
}
@keyframes quoteFadeIn {
  to { opacity: 1; transform: none; }
}

/* Parallax images */
.parallax-img img, .parallax-img.value-icon {
  will-change: transform;
  transition: transform 0.5s cubic-bezier(.25,.8,.25,1);
}

.glass-nav.compact {
  background: rgba(255,255,255,0.85);
  box-shadow: 0 8px 32px rgba(22,36,71,0.16);
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}
.glass-nav.compact .logo-img {
  height: 60px;
  border-radius: 12px;
  padding: 4px;
  transition: height 0.2s, border-radius 0.2s, padding 0.2s;
}
.glass-nav.compact .header-flex {
  padding: 0.5rem 0;
}

/* Cursor highlight */
.cursor-highlight {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234,181,67,0.18) 0%, rgba(234,181,67,0.08) 80%, transparent 100%);
  mix-blend-mode: lighten;
  opacity: 0.7;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.2s, transform 0.2s;
  will-change: transform, opacity;
  display: none;
}
@media (pointer: fine) {
  .cursor-highlight {
    display: block;
  }
}

/* Footer signature SVG */
.footer-signature {
  margin-bottom: 0.5rem;
  text-align: left;
}
.signature-svg {
  display: inline-block;
  vertical-align: middle;
  animation: signatureDraw 2.2s cubic-bezier(.25,.8,.25,1) 0.5s both;
}
@keyframes signatureDraw {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

.keyfigures {
  position: relative;
  overflow: visible;
}
.keyfig-bg {
  position: absolute;
  top: 0; left: 50%;
  width: 120vw;
  height: 100%;
  min-height: 340px;
  background: radial-gradient(ellipse at 50% 30%, #eab54322 0%, #16244705 100%);
  z-index: 0;
  transform: translateX(-50%);
  pointer-events: none;
}
.keyfigures .container, .keyfigures .grid, .keyfig-card {
  position: relative;
  z-index: 1;
}
.keyfig-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.7rem;
}
.keyfig-icon svg {
  width: 38px;
  height: 38px;
  display: block;
}
.pulse-glow {
  box-shadow: 0 0 0 0 #eab54388;
  animation: pulseGlow 1.2s cubic-bezier(.25,.8,.25,1) infinite alternate;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 #eab54344; color: #eab543; }
  100% { box-shadow: 0 0 24px 8px #eab54355; color: #fffbe6; }
}
.keyfig-card.card-3d {
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1), box-shadow 0.3s;
}
.keyfig-card.card-3d:hover {
  transform: rotateY(8deg) scale(1.04);
  box-shadow: 0 12px 40px #eab54333, 0 2px 12px #16244722;
}

.keyfig-card {
  text-align: center;
}
.keyfig-number {
  display: block;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.keyfig-icon {
  justify-content: center;
  align-items: center;
  display: flex;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode .contact-info,
body.dark-mode .keyfig-label,
body.dark-mode .testimonial-author,
body.dark-mode footer,
body.dark-mode footer a,
body.dark-mode .about-content,
body.dark-mode .news-card,
body.dark-mode .value-card,
body.dark-mode .service-card,
body.dark-mode .team-card,
body.dark-mode .carousel-slide,
body.dark-mode .carousel-btn,
body.dark-mode .btn,
body.dark-mode .btn-animate {
  color: #f8f9fa !important;
}
body.dark-mode input,
body.dark-mode textarea {
  background: #23283a;
  border-color: #444a5a;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #bfc3d1;
  opacity: 1;
}
body.dark-mode footer a {
  color: #eab543;
}
body.dark-mode footer a:hover {
  color: #fffbe6;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .keyfigures .grid {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
  .keyfig-card {
    max-width: 320px;
    width: 100%;
  }
}

/* Loader animé */
.loader {
  position: fixed;
  inset: 0;
  background: #fffbe6;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.5s;
  opacity: 1;
}
.loader.hide {
  opacity: 0;
  pointer-events: none;
}
#loader {
  z-index: 1 !important;
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #eab543 0%, #162447 100%);
  width: 0%;
  z-index: 1500;
  transition: width 0.2s;
}

/* Distinctions */
.distinctions-logos {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.distinction-logo {
  height: 54px;
  width: auto;
  filter: grayscale(0.2) brightness(0.95);
  opacity: 0.85;
  transition: filter 0.2s, opacity 0.2s, transform 0.2s;
}
.distinction-logo:hover {
  filter: grayscale(0) brightness(1.1) drop-shadow(0 2px 8px #eab54388);
  opacity: 1;
  transform: scale(1.08) rotate(-2deg);
}

/* Méthodologie */
.method-steps {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.method-step {
  min-width: 180px;
  max-width: 220px;
  text-align: center;
  padding: 2rem 1.2rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(22,36,71,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  animation: stepFadeIn 0.8s cubic-bezier(.25,.8,.25,1) forwards;
}
.method-step .method-icon {
  width: 44px;
  height: 44px;
  background: #eab543;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  box-shadow: 0 2px 8px #eab54344;
}
@keyframes stepFadeIn {
  to { opacity: 1; transform: none; }
}
.method-step:nth-child(1) { animation-delay: 0.1s; }
.method-step:nth-child(2) { animation-delay: 0.3s; }
.method-step:nth-child(3) { animation-delay: 0.5s; }
.method-step:nth-child(4) { animation-delay: 0.7s; }

/* FAQ interactive */
.faq-list {
  margin-top: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.faq-item {
  margin-bottom: 1.2rem;
  border-radius: 12px;
  background: #f8f9fa;
  box-shadow: 0 1px 6px #16244711;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1.1rem 1.2rem;
  color: #162447;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
}
.faq-item.open .faq-question {
  background: #eab54322;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: #fffbe6;
  color: #162447;
  font-size: 1rem;
  padding: 0 1.2rem;
  transition: max-height 0.4s cubic-bezier(.25,.8,.25,1), padding 0.2s;
}
.faq-item.open .faq-answer {
  max-height: 200px;
  padding: 1rem 1.2rem;
}

/* Newsletter stylée */
.newsletter-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.newsletter-form input[type="email"] {
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  border: 1.5px solid #eab543;
  font-size: 1rem;
  font-family: inherit;
  min-width: 220px;
}
.newsletter-form button {
  padding: 0.8rem 2rem;
}
.newsletter-success {
  display: none;
  color: #162447;
  font-weight: 600;
  margin-top: 1.2rem;
  text-align: center;
}
.newsletter-success.active {
  display: block;
  animation: fadeIn 0.7s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Back to top button */
#back-to-top {
  position: fixed;
  right: 2vw;
  bottom: 2vw;
  background: #eab543;
  color: #162447;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  box-shadow: 0 2px 12px #16244722;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  z-index: 1200;
  transition: opacity 0.3s, transform 0.2s;
}
#back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1.08);
}

/* Apparition animée améliorée */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(60px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(.25,.8,.25,1), transform 0.7s cubic-bezier(.25,.8,.25,1);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .distinctions-logos {
    gap: 1.2rem;
  }
  .method-steps {
    flex-direction: column;
    gap: 1.2rem;
  }
}

/* Timeline animée */
.timeline {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin: 2.5rem 0 1.5rem 0;
  position: relative;
  overflow-x: auto;
}
.timeline-event {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px #16244711;
  padding: 1.2rem 1.1rem;
  min-width: 180px;
  max-width: 220px;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s, transform 0.7s;
}
.timeline-event.visible {
  opacity: 1;
  transform: none;
}
.timeline-date {
  font-weight: 700;
  color: #eab543;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #eab543 0%, #162447 100%);
  z-index: 0;
  transform: translateY(-50%);
}
.timeline-event {
  z-index: 1;
}
@media (max-width: 900px) {
  .timeline {
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;
  }
  .timeline::before {
    left: 50%;
    top: 0; bottom: 0; right: auto;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #eab543 0%, #162447 100%);
    transform: translateX(-50%);
  }
  .timeline-event {
    min-width: 0;
    max-width: 100%;
    margin-left: 2.2rem;
  }
}

/* Success stories slider */
.success-slider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2rem;
}
.success-track {
  display: flex;
  gap: 2rem;
  overflow: hidden;
  width: 340px;
  perspective: 1200px;
  position: relative;
}
.success-card {
  min-width: 320px;
  max-width: 320px;
  transition: transform 0.6s cubic-bezier(.25,.8,.25,1), box-shadow 0.3s;
  box-shadow: 0 2px 16px rgba(22,36,71,0.08);
  background: #fff;
  border-radius: 18px;
  opacity: 0.7;
  transform: scale(0.92) rotateY(10deg);
  z-index: 1;
  text-align: center;
  padding: 2rem 1.2rem 1.5rem 1.2rem;
}
.success-card.active {
  opacity: 1;
  transform: scale(1.05) rotateY(0deg) translateY(-10px);
  box-shadow: 0 8px 32px rgba(234,181,67,0.18), 0 2px 12px rgba(22,36,71,0.10);
  z-index: 2;
}
.success-card img {
  width: 100%;
  max-width: 220px;
  border-radius: 12px;
  margin-bottom: 1rem;
  object-fit: cover;
  box-shadow: 0 2px 8px #16244711;
}
.success-quote {
  color: #eab543;
  font-style: italic;
  margin-top: 1rem;
}
.success-btn {
  background: #eab543;
  color: #162447;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.7rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(22,36,71,0.10);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-btn:hover {
  background: #fffbe6;
  color: #eab543;
}
@media (max-width: 900px) {
  .success-track {
    width: 100vw;
    max-width: 98vw;
    gap: 1rem;
  }
  .success-card {
    min-width: 90vw;
    max-width: 98vw;
  }
}

/* RSE section */
.rse-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
  justify-content: center;
}
.rse-badges {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.rse-badge {
  background: #eab543;
  color: #162447;
  font-weight: 700;
  border-radius: 18px;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  box-shadow: 0 2px 8px #eab54333;
  margin-bottom: 0.2rem;
  display: inline-block;
}
.rse-text {
  flex: 2 1 320px;
  min-width: 220px;
  font-size: 1.1rem;
  color: #162447;
}
.rse-imgs {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.rse-imgs img {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 2px 8px #16244722;
}
@media (max-width: 900px) {
  .rse-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
  }
  .rse-imgs {
    justify-content: center;
  }
}

/* Animation SVG balance */
.balance-anim path {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: balanceDraw 1.5s cubic-bezier(.25,.8,.25,1) 0.2s forwards;
}
@keyframes balanceDraw {
  to { stroke-dashoffset: 0; }
}

/* FAQ search */
.faq-search {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 2rem auto;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  border: 1.5px solid #eab543;
  font-size: 1rem;
  font-family: inherit;
  background: #fffbe6;
  color: #162447;
  box-shadow: 0 1px 6px #16244711;
}

/* Focus visible */
button:focus, .btn:focus, .success-btn:focus, .carousel-btn:focus, input:focus, textarea:focus {
  outline: 2.5px solid #eab543;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px #eab54333;
  z-index: 10;
}

/* Parallax multi-couches */
.parallax-hero {
  position: relative;
  overflow: hidden;
}
.parallax-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  will-change: transform;
}

/* Images responsive et centrées */
.hero-img img, .team-img, .success-card img, .news-img, .rse-imgs img {
  width: 100%;
  max-width: 320px;
  max-height: 220px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 900px) {
  .hero-img img, .team-img, .success-card img, .news-img, .rse-imgs img {
    max-width: 95vw;
    max-height: 180px;
  }
}

/* Grilles et carrousels en colonne sur mobile */
@media (max-width: 900px) {
  .grid, .team-carousel, .success-slider, .rse-content, .timeline {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.2rem;
  }
  .carousel-track, .success-track {
    width: 100vw;
    max-width: 98vw;
    overflow-x: auto;
  }
  .team-card, .success-card {
    min-width: 90vw;
    max-width: 98vw;
  }
  .timeline-event {
    min-width: 0;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
  }
}

/* SVG/icônes dans .value-card */
.value-card svg, .value-card img.value-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.7rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Timeline vertical sur mobile */
@media (max-width: 900px) {
  .timeline {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }
  .timeline::before {
    left: 50%;
    top: 0; bottom: 0; right: auto;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #eab543 0%, #162447 100%);
    transform: translateX(-50%);
  }
  .timeline-event {
    min-width: 0;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
  }
}

/* Padding/margin adaptés sur mobile */
@media (max-width: 700px) {
  .about, .services, .team, .contact, .values, .news, .keyfigures, .testimonials, .quote, .distinctions, .methodology, .faq, .newsletter, .rse, .history, .success-stories {
    padding: 2.2rem 0 1.5rem 0;
    margin-bottom: 1.2rem;
    border-radius: 10px;
  }
  .container {
    width: 98%;
    padding: 0 2vw;
  }
}

/* Ajout d'une marge en bas de la dernière section pour dégager le footer */
.success-stories {
  margin-bottom: 6rem;
}

/* S'assurer que le loader ne masque pas le footer après chargement */
.loader.hide {
  display: none !important;
}

/* Optionnel : s'assurer que le footer est bien au-dessus du loader */
footer {
  z-index: 9999 !important;
  position: relative;
  background: #162447;
  color: #fff;
  padding: 1.2rem 0;
  font-size: 1rem;
}

@media (max-width: 900px) {
  footer {
    padding: 2rem 0 !important;
    font-size: 1.1rem !important;
    outline: 3px solid orange !important; /* debug mobile */
  }
}
