@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}

/* Additional styles Tailwind may not generate or that are used in the Twig ported layout */
/* Accent and muted color tokens used in Twig/TSX */
.text-accent {
  color: var(--main-green-color);
}

.bg-muted\/30 {
  background-color: rgba(15, 23, 42, 0.03);
}

.text-muted-foreground {
  color: rgba(55, 65, 81, 0.8);
}

.bg-card {
  background-color: #fff;
}

.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.min-h-screen {
  min-height: 100vh;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.overflow-hidden {
  overflow: hidden;
}

.group:hover .group-hover\\:scale-110 {
  transform: scale(1.1);
}

.group-hover\\:opacity-100 {
  opacity: 1;
}

.transition-opacity {
  transition: opacity 0.3s;
}

.transition-transform {
  transition: transform 0.3s;
}

.duration-500 {
  transition-duration: 500ms;
}

.aspect-square {
  /* fallback for aspect-square */
  padding-top: 100%;
  position: relative;
}

.aspect-square>img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* small helpers */
.text-background {
  color: var(--secondary-font-color);
}

.text-muted-foreground {
  color: #6b7280;
}

.text-accent {
  color: var(--main-green-color);
}

.bg-foreground {
  background-color: rgba(0, 0, 0, 0.6);
}

/* simple scale-in animation used in cards */
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scale-in 0.35s ease-out both;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero .accent {
  color: #679d43;
}

.hero p {
  font-size: 1.2rem;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (min-width: 640px) {

  /* sm */
  .hero-content {
    margin-left: 6%;
  }
}

@media (min-width: 768px) {

  /* md */
  .hero h1 {
    font-size: 3.75rem;
  }

  .hero p {
    font-size: 1.15rem;
  }

  .hero-content {
    margin-left: 12%;
  }
}

@media (min-width: 1024px) {

  /* lg */
  .hero h1 {
    font-size: 4.5rem;
  }

  .hero p {
    font-size: 1.25rem;
  }

  .hero-content {
    margin-left: 20%;
  }
}

/* Make sure aspect-square fallback uses padding-bottom to maintain the ratio in responsive layouts */
.aspect-square {
  position: relative;
  width: 100%;
}

.aspect-square::before {
  content: "";
  display: block;
  padding-bottom: 100%;
}

.aspect-square>img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.btn.primary {
  background: #000;
  color: #fff;
}

.btn.primary:hover {
  background: #222;
}

.btn.secondary {
  background: #fff;
  color: #000;
}

.btn.secondary:hover {
  background: #eee;
}

.btn-outline {
  display: inline-block;
  border: 2px solid #000;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: #000;
  text-decoration: none;
  transition: 0.3s;
}

.btn-outline:hover {
  background: #000;
  color: white;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid white;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  animation: bounce 1s infinite;
}

.wheel {
  width: 4px;
  height: 10px;
  background: white;
  margin-top: 5px;
  border-radius: 2px;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }

  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* Section */
.section {
  padding: 5rem 1rem;
  color: #222;
}

.section.light-bg {
  background: #f7f7f7;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  /* 1 colonne par défaut */
  gap: 1.5rem;
  /* équivaut à 'gap-6' dans Tailwind (6 * 0.25rem = 1.5rem) */
}

/* À partir de 768px (md:) → 2 colonnes */
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* À partir de 1024px (lg:) → 4 colonnes */
@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-images-overlay {
  background: linear-gradient(to top, rgba(33, 36, 44, 0.8), rgba(0, 0, 0, 0));
  background-repeat: no-repeat;
  background-size: cover;
}

/* Card */
.card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: white;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.2rem;
}

/* Portfolio */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.portfolio-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  backdrop-filter: blur(2px);
  z-index: 1;
}

.portfolio-item:hover .overlay {
  opacity: 1;
}

.accent {
  color: #14a539;
}

.portfolio-button {
  background-color: #d4bca0;

  border-radius: 12px;

  white-space: nowrap;

  gap: 0.5rem;

  justify-content: center;

  align-items: center;

  height: 3.5rem;
  cursor: pointer;
  display: inline-flex;
}

.portfolio-button:hover {
  background-color: #d6c1a9;
}

/*------------------ Carousel / Hero Section CORRIGÉE ----------------*/
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.slide {
  min-width: 100%;
  box-sizing: border-box;
  background-color: var(--main-dark-color);
  display: flex;
  /* Utiliser flex pour centrer le contenu */
  align-items: center;
}

.slide-inner {
  display: grid;
  grid-template-columns: 55% 45%;
  /* Donne plus d'espace au texte */
  align-items: center;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.slide-content {
  padding: 2rem 12%;
  /* Augmentation du padding pour centrer davantage le texte */
  box-sizing: border-box;
}

.company-name {
  background-color: var(--primary);
  color: var(--main-dark-color);
  font-size: 0.9rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.slide-content h2 {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin: 0;
  margin-bottom: 1.5rem;
}

.slide-content p {
  font-size: 1rem;
  color: var(--secondary-font-color);
  margin-bottom: 2rem;
  max-width: 60ch;
  /* Limiter la largeur de ligne */
  line-height: 1.7;
}

.btn-slide-cta {
  background-color: var(--olive-drab);
  color: var(--background);
  font-weight: bold;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-slide-cta:hover {
  background-color: var(--dark-green);
  color: var(--background);
  border: solid 1px var(--official-green);
}

.slide-image-container {
  height: 100vh;
  /* L'image prend toute la hauteur disponible */
  max-height: 700px;
  min-height: 600px;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* CORRECTION : Remplacement par un chemin SVG pour la courbe ondulée */
  clip-path: path("M 80 0 L 1000 0 L 1000 1000 L 80 1000 C 180 750, -20 250, 80 0 Z"
    );
}

/* --- RESPONSIVITÉ CORRIGÉE --- */
@media (max-width: 767px) {
  .slide {
    height: auto;
    /* CORRECTION CLÉ: La hauteur s'adapte au contenu */
    padding: 4rem 0 3rem 0;
    /* Ajout de padding vertical */
  }

  .slide-inner {
    grid-template-columns: 1fr;
    /* Passage à une seule colonne */
    gap: 2rem;
    padding: 0 1.5rem;
    /* Padding horizontal pour le contenu */
  }

  .slide-image-container {
    order: -1;
    /* L'image passe en haut */
    height: 300px;
    /* Hauteur fixe pour l'image */
    min-height: auto;
    /* Annule la hauteur min du desktop */
  }

  .slide-image {
    clip-path: none;
    /* Pas de diagonale sur mobile */
    border-radius: 8px;
    /* Coins arrondis */
  }

  .slide-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    /* Padding simplifié */
  }

  .slide-content h2 {
    font-size: 2.2rem;
    /* Police ajustée pour mobile */
  }
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 165, 0, 0.5);
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}

.carousel-control.prev {
  left: 15px;
}

.carousel-control.next {
  right: 15px;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.indicator.active {
  background-color: var(--primary);
}

/* Partners' section */
/* Partners horizontal scroller */
.partners-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 1.5rem 0;
  background: transparent;
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  will-change: transform;
  /* smooth hardware-accelerated transform */
  transform: translateZ(0);
}

/* Each item size: show 7 per view (20% each) on large screens */
.partner-item {
  flex: 0 0 14.2857%;
  /* 100 / 7 */
  max-width: 14.2857%;
  box-sizing: border-box;
}

.partner-card {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  height: 10.25rem;
  /* consistent height */
}

.partner-card img {
  max-height: 6.25rem;
  width: auto;
  object-fit: contain;
}

/* Responsive: fewer items on smaller screens */
@media (max-width: 1023px) {

  /* md and below: show 3 items */
  .partner-item {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

@media (max-width: 639px) {

  /* sm and below: show 2 items */
  .partner-item {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Optional: pause visual cue */
.partners-carousel.paused .partner-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ------------------Section 2x2 grid------------------ */
.hero-grid {
  padding: 0;
  /* Remove outer padding */
  padding-top: 3rem;
  background: #f8f9fa;
  width: 100vw;
  /* Full viewport width */
  margin: 0;
  overflow: hidden;
}

@media (max-width: 640px) {
  .hero-grid {
    padding-top: 0;
  }
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 2 equal columns */
  grid-template-rows: 1fr 1fr;
  /* 2 equal rows */
  gap: 0;
  /* No gap between cards */
  width: 100vw;
  height: 100vh;
  /* Full viewport height */
  margin: 0;
  padding: 0;
}

/* ---------- CARD ---------- */
.grid-item {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    opacity 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Background image container (for animation) */
.grid-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: inherit;
  background-size: inherit;
  background-position: inherit;
  background-repeat: inherit;
  z-index: 0;
  transition: transform 0.35s ease;
  transform: scale(1);
}

/* Zoom on hover */
.grid-item:hover::before {
  transform: scale(1.15);
  /* 15% zoom – adjust as needed */
}

/* Optional: slight opacity fade on hover */
.grid-item:hover {
  opacity: 0.95;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Ensure content stays above animated layer */
.grid-item-inner,
.grid-overlay,
.grid-content {
  position: relative;
  z-index: 1;
}

/* dark overlay for readability */
/*
.grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  pointer-events: none;
} */

/* inner wrapper – keeps content above overlay */
.grid-item-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* place content top and bottom */
  align-items: flex-start;
  /* left-align on desktop */
  height: 100%;
  padding: 2rem;
  text-align: left;
}

/* text block: stack with title at top, description pushed to bottom, button under description */
.grid-content {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  width: 100%;
  padding: 0.25rem 0;
  box-sizing: border-box;
  z-index: 2;
  max-width: 90%;
  height: 100%;
}

.grid-content h2 {
  margin: 0.5rem 0 0.5rem;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  display: inline-block;
}

/* push description to bottom */
.grid-content p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  display: block;
  margin-top: auto;
  /* pushes description down */
}

/* button under description, left-aligned on desktop */
.btn-grid-cta {
  margin-top: 0.6rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--olive-drab);
  color: var(--background);
  font-weight: bold;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.btn-grid-cta:hover {
 
  transform: translateY(-3px);
  background-color: var(--dark-green);
  color: var(--background);
  border: solid 1px var(--official-green);
}

/* ---------- TABLET & MOBILE (keep title top-left, description bottom-left) ---------- */
@media (max-width: 500px) {
  .grid-container {
    gap: 0;
  }

  .grid-item-inner {
    padding: 1rem;
    justify-content: space-between;
    /* ensure top & bottom distribution */
    align-items: flex-start;
    /* keep left alignment */
  }

  /* Keep H2 top-left, description pushed to bottom, CTA under description */
  .grid-content {
    align-items: flex-start;
    text-align: left;
    height: 100%;
  }

  .grid-content h2 {
    font-size: 1.6rem;
    margin: 0.9rem 0 0.5rem;
  }

  .grid-content p {
    display: none;
  }

  .btn-grid-cta {
    font-size: 0.6rem;
    padding: 0.6rem 1.1rem;
    align-self: flex-start;
    margin-top: auto;
    /* pushes description down */

  }
}

.grid-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease-out;
}

.grid-item:hover .grid-image {
  transform: scale(1.05);
}

/* Force 2x2 on mobile — no stacking */
@media (max-width: 425px) {
  .grid-container {
    grid-template-columns: 1fr 1fr;
    height: 70vh;
    padding-top: 0;
  }

  .grid-content {
    padding: 1rem;
    align-items: flex-start;
    text-align: left;
    height: 100%;
  }

  .grid-content h2 {
    font-size: 1.3rem;
  }

  .grid-content p {
    font-size: 0.75rem;
    margin-top: auto;
    /* keep pushed to bottom on very small screens */
  }

  .grid-image-container {
    height: 140px;
  }
}

/* ------------------Promotion section---------------- */
@keyframes zoom-in-up {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }

  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1.03);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Promotion - discount button styling styling */
.promo-disctount-btn {
  display: inline-block;
  padding: 5px 10px;
  background: #cf3838;
  color: white;
  border-radius: 14px;
  font-weight: 700;
  animation: bounceGlow 1s infinite;
}

.promo-card:hover {
  color: var(--olive-drab);
}

.promo-card:hover .promo-glow {
  opacity: 0;
  transform: scale(1.2);
}

.promo-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  transform: skewX(-20deg);
  transition: all 0.6s ease;
  pointer-events: none;
}

.promo-card:hover::after {
  left: 120%;
}

.promo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center,
      var(--accent-color, #7cb87f) 0%,
      transparent 70%);
  opacity: 0;
  transform: scale(0.8);
  transition: 0.5s ease;
  pointer-events: none;
  filter: blur(40px);
}

.promo-card:hover::before {
  opacity: 0.4;
  transform: scale(1.1);
}

@keyframes bounceGlow {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }

  50% {
    transform: scale(1.06);
    box-shadow: 0 10px 25px rgba(46, 125, 50, 0.3);
  }
}

.animate-zoom-in-up {
  animation: zoom-in-up 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: var(--delay);
}

@keyframes title-pop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  80% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.animate-title-pop {
  animation: title-pop 0.8s ease forwards;
}

@media (max-width: 640px) {

  /* Hero */
  #heroCarousel .slide-content h2 {
    font-size: 1.75rem !important;
    /* 28px */
    line-height: 1.2;
  }

  #heroCarousel .slide-content p {
    font-size: 0.95rem !important;
    /* 15px */
    line-height: 1.5;
  }

  #heroCarousel .btn-slide-cta {
    font-size: 0.875rem !important;
    /* 14px */
    padding: 0.5rem 1rem !important;
  }

  /* Promotions */
  #promotions h2 {
    font-size: 1.875rem !important;
    /* 30px */
  }

  #promotions .promo-card h3 {
    font-size: 1.125rem !important;
    /* 18px */
  }

  #promotions .promo-card p {
    font-size: 0.875rem !important;
    /* 14px */
  }

  #promotions .btn-slide-cta {
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
  }

  /* Portfolio */
  #portfolio h2 {
    font-size: 1.875rem !important;
  }

  #portfolio .portfolio-item-category {
    font-size: 1.25rem !important;
    /* 20px */
  }

  #portfolio .portfolio-item-description {
    font-size: 0.8125rem !important;
    /* 13px */
  }

  /* Partners */
  #partners h2 {
    font-size: 1.875rem !important;
  }
}

/* CTA styles (moved from services.css) */
.cta-section {
  padding: 5rem 0;
  background: linear-gradient(90deg, var(--official-green),#1b4d3e);
  color: var(--secondary-font-color);
  text-align: center;
}

.cta-section .cta__title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cta-section .cta__subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

/* Button variant used in CTA - scoped under .cta-section to avoid global override */
.cta-section .btn--hero {
  background: var(--background);
  color: var(--foreground);
  font-size: 1.125rem;
  padding: 0.875rem 1.75rem;
}

.cta-section .btn--hero:hover {
  background: rgba(255, 255, 255, 0.9);
}

.cta-section .btn__icon {
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.cta-section .btn:hover .btn__icon {
  transform: translateX(4px);
}

/* Base button styles used by services.css - scoped to CTA to avoid global collisions */
.cta-section .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

/* ensure icon spacing matches original */
.cta-section .btn__icon {
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

@media (max-width: 425px) {
  .cta-section .cta__title {
    font-size: 1.5rem;
  }

  .cta-section .cta__subtitle {
    font-size: 1rem;
  }

  /* Button variant used in CTA - scoped under .cta-section to avoid global override */
  .cta-section .btn--hero {
    font-size: 1rem;
    padding: 0.575rem 1.25rem;
  }

  .cta-section .btn__icon {
    margin-left: 0.2rem;
    transition: transform 0.2s;
  }
}
