/* =======================
   PALETTE & BACKGROUNDS
   ======================= */
:root {
  --kanopix: #9CCC65;
  --bluenuit: #1a237e;
  --grisclair: #f9fafb;
  --grisfonce: #1f2937;
  --vert-deep: #5b7d6a;
  --vert-pale: #b7d7b1;
}

/* Backgrounds principaux */
.bg-hero {
  background: url('images/forêt.jpeg') center/cover no-repeat;
}
.bg-genese {
  background: url('../images/image4.png') center/cover no-repeat;
}
.bg-vision {
  background: url('../images/image3.png') center/cover no-repeat;
}
#cibles {
  background: linear-gradient(135deg, #ffffff 0%, #f4ffe7 60%, #e8f0ff 100%);
}

/* =======================
   LAYOUT & CONTAINERS
   ======================= */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (max-width: 640px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* =======================
   SERVICES : CARDS GLASSMORPHISM + ANIMATION
   ======================= */
.service-card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px) saturate(1.2);
  box-shadow: 0 2px 12px rgba(26,35,126,0.10), 0 1.5px 12px rgba(156,204,101,0.07);
  border-radius: 1.25rem;
  transition: box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
  perspective: 600px;
  padding: 2rem;
}
@media (max-width: 640px) {
  .service-card {
    padding: 1.2rem;
  }
}
.service-card:hover {
  box-shadow: 0 16px 40px #9CCC6540, 0 2px 12px rgba(26,35,126,0.15);
  transform: translateY(-12px) scale(1.035) rotateY(4deg);
  z-index: 2;
}
.service-card img {
  transition: all 0.35s cubic-bezier(.5,1.5,.5,1);
  max-width: 100%;
  height: auto;
}
.service-card:hover img {
  filter: drop-shadow(0 0 18px #9CCC65) brightness(1.03);
  transform: scale(1.09) rotate(-1.5deg);
}
.service-card:hover h3 {
  animation: pulseTitle 0.5s;
  color: #9CCC65;
}
@keyframes pulseTitle {
  0% { transform: scale(1);}
  50% { transform: scale(1.10);}
  100% { transform: scale(1);}
}

/* =======================
   IMAGES GLASSMORPHISM (SECTIONS)
   ======================= */
.section-img-glass {
  position: relative;
}
.section-img-glass img {
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(26,35,126,0.13);
  max-width: 100%;
  height: auto;
}
.section-img-glass .overlay {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(156,204,101,0.16) 0%, rgba(26,35,126,0.09) 100%);
}

/* =======================
   PILLS, BADGES, CIBLES
   ======================= */
.cible-pill, .badge {
  display: inline-block;
  background: linear-gradient(135deg, #9CCC65 0%, #c0ea8c 100%);
  color: #000;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(156,204,101,0.13);
  margin: 0.25rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
}
.cible-pill:hover, .badge:hover {
  box-shadow: 0 8px 24px #9CCC6533;
  transform: translateY(-4px) scale(1.04);
  background: linear-gradient(135deg, #8dbf4d 0%, #a0e060 100%);
}

/* =======================
   BOUTONS CTA ANIMÉS
   ======================= */
.btn-cta, .contact-btn, .cta-anim {
  background: linear-gradient(90deg, #9CCC65 0%, #1a237e 100%);
  color: #fff;
  font-weight: bold;
  border-radius: 9999px;
  padding: 0.75rem 2.2rem;
  box-shadow: 0 4px 16px #9CCC6555;
  transition: background 0.3s, color 0.3s, transform 0.2s, box-shadow 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.1rem;
  outline: none;
  border: none;
  cursor: pointer;
}
.btn-cta:hover, .contact-btn:hover, .cta-anim:hover {
  background: linear-gradient(90deg, #1a237e 0%, #9CCC65 100%);
  color: #fff;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 32px #1a237e33;
}
.btn-cta:focus-visible, .contact-btn:focus-visible, .cta-anim:focus-visible {
  outline: 2px solid #9CCC65;
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .btn-cta, .contact-btn, .cta-anim {
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
  }
}

/* =======================
   OVERLAYS & BACKDROPS
   ======================= */
.section-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.60);
  z-index: 1;
  pointer-events: none;
}

/* =======================
   FORMULAIRE CONTACT
   ======================= */
input, textarea {
  max-width: 100%;
  width: 100%;
  font-size: 1rem;
}
input:focus, textarea:focus {
  outline: none;
  border-color: #9CCC65;
  box-shadow: 0 0 0 2px #9CCC6533;
  background: #f4ffec;
  transition: background 0.3s, box-shadow 0.3s;
}
@media (max-width: 640px) {
  form {
    padding: 1.5rem !important;
  }
}

/* =======================
   MENU : HOVER & FOCUS
   ======================= */
nav a.relative.group {
  position: relative;
  overflow: hidden;
  transition: color 0.2s;
}
nav a.relative.group::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, #9CCC65 0%, #1a237e 100%);
  transform: scaleX(0);
  transition: transform 0.3s;
}
nav a.relative.group:hover::after,
nav a.relative.group:focus::after {
  transform: scaleX(1);
}

/* =======================
   RESPONSIVE & UTILITAIRES
   ======================= */
@container (min-width: 600px) {
  .service-card {
    min-height: 370px;
  }
}
.blur-bg {
  backdrop-filter: blur(8px) saturate(1.2);
  background: rgba(255,255,255,0.75);
}
.shadow-xl-modern {
  box-shadow: 0 8px 32px 0 rgba(26,35,126,0.13), 0 1.5px 12px rgba(156,204,101,0.07);
}
*:focus-visible {
  outline: 2px solid #9CCC65;
  outline-offset: 2px;
  transition: outline 0.2s;
}

/* =======================
   CIBLES : SECTION MODERNE
   ======================= */
.cible-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .cible-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .cible-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.cible-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-radius: 1.25rem;
  box-shadow: 0 2px 16px 0 rgba(26,35,126,0.07);
  border: 1.5px solid rgba(156,204,101,0.10);
  transition: 
    box-shadow 0.3s cubic-bezier(.4,0,.2,1),
    border-color 0.3s cubic-bezier(.4,0,.2,1),
    transform 0.3s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-width: 0;
}
@media (max-width: 640px) {
  .cible-card {
    padding: 1rem !important;
  }
}
.cible-card:hover {
  box-shadow: 0 8px 32px 0 rgba(156,204,101,0.18), 0 2px 12px rgba(26,35,126,0.09);
  border-color: #9CCC65;
  transform: translateY(-8px) scale(1.03);
  z-index: 2;
}
.cible-card svg {
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
}
.cible-card:hover svg {
  transform: scale(1.12) rotate(-6deg);
}
.cible-card .p-3 {
  transition: background 0.3s, box-shadow 0.3s;
}
.cible-card:hover .p-3 {
  background: #9CCC65;
  box-shadow: 0 0 0 4px #e8f0ff;
}
.cible-card p {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.4s, max-height 0.4s;
  margin: 0;
  pointer-events: none;
}
.cible-card:hover p,
.cible-card:focus p,
.cible-card:active p {
  opacity: 1;
  max-height: 100px;
  margin-top: 0.5rem;
  pointer-events: auto;
}
.cible-card h3 {
  transition: color 0.3s;
}
.cible-card:hover h3 {
  color: #9CCC65;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 1;}
  75%, 100% { transform: scale(2.2); opacity: 0; }
}
.animate-ping {
  animation: ping 1.5s cubic-bezier(0,0,.2,1) infinite;
}
#cibles .container {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  #cibles .container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

/* =======================
   ANIMATIONS & EFFETS AVANCÉS
   ======================= */
.animated-gradient {
  background-size: 200% 200%;
  animation: gradient-move 4s linear infinite;
}
@keyframes gradient-move {
  0% { background-position: 0% 50%;}
  50% { background-position: 100% 50%;}
  100% { background-position: 0% 50%;}
}
.badge-anim, .animate-badge-pop {
  animation: badge-pop 1s cubic-bezier(.5,1.5,.5,1) both;
}
@keyframes badge-pop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.floating, .floating-img {
  animation: floating 3.5s ease-in-out infinite;
}
@keyframes floating {
  0% { transform: translateY(0);}
  50% { transform: translateY(-12px);}
  100% { transform: translateY(0);}
}
.halo-anim {
  background: radial-gradient(circle, rgba(156,204,101,0.18) 0%, rgba(26,35,126,0.10) 80%, transparent 100%);
  opacity: 0.9;
  animation: haloPulse 3s ease-in-out infinite;
}
@keyframes haloPulse {
  0%,100% { opacity: 0.7;}
  50% { opacity: 1;}
}

/* =======================
   TITRE SAVOIR-FAIRE & CONTACT (1 ligne, responsive)
   ======================= */
.savoir-faire-title,
.titre-contact {
  font-size: clamp(1.2rem, 5vw, 2.1rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #9CCC65 0%, #1a237e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .savoir-faire-title,
  .titre-contact {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    white-space: normal;
    text-overflow: initial;
  }
}

/* =======================
   AUTRES UTILITAIRES
   ======================= */
.gallery-hero-img {
  max-width: 480px;
  min-width: 180px;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 2rem;
  box-shadow: 0 16px 64px 0 rgba(156,204,101,0.13), 0 2px 12px rgba(26,35,126,0.09);
  background: transparent;
  z-index: 2;
  height: auto;
}

/* Menu desktop underline animation */
.nav-link {
  color: #24343c;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, #9CCC65 0%, #1a237e 100%);
  transition: width 0.3s;
}
.nav-link:hover, .nav-link:focus {
  color: var(--kanopix);
}
.nav-link:hover::after, .nav-link:focus::after {
  width: 100%;
}

/* Menu mobile */
#mobile-menu {
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.97);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.nav-link-mobile {
  color: #24343c;
  padding: 0.7rem 2rem;
  border-radius: 9999px;
  transition: background 0.2s, color 0.2s;
  font-weight: 600;
  font-size: 1.25rem;
}
.nav-link-mobile:hover, .nav-link-mobile:focus {
  background: #e6f6d9;
  color: var(--kanopix);
}
#mobile-menu .bg-kanopix {
  background: linear-gradient(90deg, #9CCC65 0%, #1a237e 100%) !important;
}

/* Overlay animé pour l’overlay sombre */
@keyframes fade-bg {
  0%, 100% { background-color: rgba(0,0,0,0.60);}
  50% { background-color: rgba(26,35,126,0.45);}
}
.animate-fade-bg {
  animation: fade-bg 8s ease-in-out infinite;
}

/* Timeline progress bar animée */
@keyframes timeline-progress {
  0% { width: 0%; }
  80% { width: 100%; }
  100% { width: 0%; }
}
.animate-timeline-progress {
  animation: timeline-progress 6s cubic-bezier(.4,0,.2,1) infinite;
}

/* Overlay animé pour l’overlay sombre */
@keyframes fade-bg {
  0%, 100% { background-color: rgba(0,0,0,0.60);}
  50% { background-color: rgba(26,35,126,0.45);}
}
.animate-fade-bg {
  animation: fade-bg 8s ease-in-out infinite;
}

/* Animation gradient sur le titre */
.animated-gradient {
  background-size: 200% 200%;
  animation: gradient-move 4s linear infinite;
}
@keyframes gradient-move {
  0% { background-position: 0% 50%;}
  50% { background-position: 100% 50%;}
  100% { background-position: 0% 50%;}
}

/* Fade-in texte au scroll */
@keyframes fadeInText {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in-text {
  opacity: 0;
  animation: fadeInText 1.2s cubic-bezier(.4,0,.2,1) both;
  animation-delay: 0.3s;
}

/* Badge valeurs animées */
.badge-vision {
  display: inline-block;
  background: linear-gradient(90deg, #9CCC65 0%, #1a237e 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px #9CCC6533;
  opacity: 0;
  transform: translateY(20px);
  animation: badgeIn 0.7s cubic-bezier(.4,0,.2,1) forwards;
}
.badge-vision:nth-child(1) { animation-delay: 0.5s;}
.badge-vision:nth-child(2) { animation-delay: 0.7s;}
.badge-vision:nth-child(3) { animation-delay: 0.9s;}
.badge-vision:nth-child(4) { animation-delay: 1.1s;}
@keyframes badgeIn {
  to { opacity: 1; transform: none; }
}



/* Empêche le swipe horizontal qui dévoile le off-canvas */
html, body {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
