/* public/css/services.css */

/* ===========================================================
   1. Variables, polices & reset minimal
   =========================================================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
  --color-primary: #013c54; /* Bleu-canard foncé */
  --color-secondary: #005b7f; /* Teal moyen */
  --color-accent: #008faf; /* Teal clair */
  --color-light: #f4f6f8; /* Fond clair */
  --color-white: #ffffff;
  --color-gray: #555555;
  --font-base: "Poppins", sans-serif;
  --spacing: 1.5rem;
  --radius: 8px;
  --transition-fast: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  color: var(--color-gray);
  background-color: var(--color-white);
  line-height: 1.6;
}

section {
  padding: calc(var(--spacing) * 2) 0;
}

/* ===========================================================
      2. Hero & Intro
      =========================================================== */
.services-hero {
  position: relative;
  background: url("/images/services/hero-services.jpg") center/cover no-repeat;
  height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Animation d'entrée pour l'image de fond */
  animation: heroEntrance 1.5s ease-out forwards;
}

@keyframes heroEntrance {
  0% {
    filter: blur(2px);
  }
  100% {
    filter: blur(0);
  }
}

.services-hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(1, 60, 84, 0.6);
  animation: overlayFadeIn 1.5s ease-out forwards;
}

@keyframes overlayFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.services-hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  /* Animation d'entrée pour le texte */
  animation: heroTextSlide 0.8s ease-out forwards;
  animation-delay: 0.5s;
}

@keyframes heroTextSlide {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.services-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-white);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.services-hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-white);
}

/* ===========================================================
      3. Section headings
      =========================================================== */
.service-section > .container h2 {
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--spacing);
}
.service-section.alt {
  background-color: var(--color-light);
}

/* ===========================================================
      4. Grid utility
      =========================================================== */
.grid {
  display: grid;
  gap: var(--spacing);
}
.grid--2cols {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===========================================================
      5. Service cards
      =========================================================== */
.service-card {
  background-color: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
/* 5. Service cards – mise à jour de la figure pour images uniformes */
.service-figure {
  width: 100%;
  max-height: 35vh;
  overflow: hidden;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.service-figure.smaller {
  height: 30vh; /* Hauteur réduite pour les figures “smaller” */
}

.service-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Recadrage centre + couverture */
  display: block;
}

.service-body {
  padding: var(--spacing);
  flex: 1;
}
.service-body h3 {
  font-size: 1.25rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.service-body p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-gray);
}

/* Animation Reveal */
.reveal {
  opacity: 0.2;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: transform, opacity;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================================
      6. Values & Points Forts
      =========================================================== */
.services-values {
  text-align: center;
  padding: calc(var(--spacing) * 2) 0;
}
.services-values h2 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.values-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing);
  list-style: none;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}
.values-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1rem;
}
.values-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--color-secondary);
  font-size: 1rem;
}

/* ===========================================================
      7. Call To Action (CTA)
      =========================================================== */
.services-cta {
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: calc(var(--spacing) * 2) 0;
}
.services-cta h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.services-cta p {
  font-size: 1rem;
  margin-bottom: var(--spacing);
}
.services-cta .btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-white);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background-color var(--transition-fast),
    transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.services-cta .btn-primary:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
}

 .btn-secondary {
  background-color: transparent;
  border: 2px solid var(--color-white);
  color: var(--color-white);
}
 .btn-secondary i {
  margin-right: 0.5rem;
}
.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--color-white);
  color: var(--color-primary);
  transform: translateY(-2px);
}
.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  margin: 0 0.5rem;
  transition: background-color var(--transition-fast),
    transform var(--transition-fast);
}
/* ===========================================================
      8. Responsive adjustments
      =========================================================== */
@media (max-width: 768px) {
  .services-hero {
    height: 45vh;
  }
  .services-hero h1 {
    font-size: 2rem;
  }
  .service-body h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .services-hero {
    height: 35vh;
  }
  .services-hero h1 {
    font-size: 1.75rem;
  }
  .service-body p {
    font-size: 0.9rem;
  }
}
/* ===========================================================
   Alternance “Z-layout” sur grands écrans
   =========================================================== */
@media (min-width: 992px) {
  /* 1. Empiler les cartes verticalement */
  .grid--2cols {
    display: flex;
    flex-direction: column;
  }

  /* 2. Chaque carte devient un flex row */
  .grid--2cols .service-card {
    display: flex;
    flex-direction: row;
    align-items: center;

    margin: 0; /* on gère le gap via le parent */
  }

  /* 3. Inversion pour les cartes paires */
  .grid--2cols .service-card:nth-child(even) {
    flex-direction: row-reverse;
  }

  .service-figure {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
  /* 4. Image / texte partagent 50% de la largeur */
  .service-figure,
  .service-figure.smaller,
  .service-body {
    width: 50%;
  }

  /* 5. S’assurer que l’image couvre bien son conteneur */
  .service-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* media queries 718 974*/
@media ((min-width: 718px) and (max-width: 974px)) {
  /* pour que sur cette largeur d'écran, les cartes soient en 2 colonnes */
  .values-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
