/* ========================================
   PAGE NOS SERVICES (/services)
   Haut de page, « Nos engagements » et « Notre démarche » : styles de la page À propos
   (a-propos.css, classe about-page sur le body). Ici : la liste des services en rangées
   alternées photo / texte et l'appel à contact. Contenu réglé dans l'admin (« Page Nos services »).
   ======================================== */

/* ---- Haut de page, tablette et mobile : la photo occupe l'essentiel du premier écran ---- */
@media (max-width: 1199px) {
  .services-list-page .about-hero {
    min-height: calc(78vh - var(--site-header-h, 76px));
    min-height: calc(78svh - var(--site-header-h, 76px));
  }
}

/* Tablette : textes un peu plus grands, posés sur un léger fond noir en fondu */
@media (min-width: 576px) and (max-width: 1199px) {
  .services-list-page .about-content {
    position: relative;
  }

  .services-list-page .about-content::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -60px;
    z-index: -1;
    width: min(120%, 900px);
    height: 150%;
    /* Ovale « closest-side » : il s'éteint avant les bords de sa zone (aucun cadre visible) */
    background: radial-gradient(closest-side, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.62) 38%, rgba(0, 0, 0, 0.36) 68%, rgba(0, 0, 0, 0.12) 88%, rgba(0, 0, 0, 0) 100%);
    transform: translateY(-50%);
    pointer-events: none;
  }

  .services-list-page .about-eyebrow {
    margin-bottom: 14px;
    font-size: 13px;
  }

  .services-list-page .about-title {
    margin-bottom: 22px;
    font-size: clamp(50px, 7.4vw, 64px);
  }

  .services-list-page .about-intro {
    margin-bottom: 30px;
    font-size: 17px;
    line-height: 1.5;
  }

  .services-list-page .about-btn {
    height: 50px;
    padding: 0 24px 0 28px;
    font-size: 16px;
  }
}

/* ---- Liste des services ---- */
.svl-list {
  position: relative;
  padding: clamp(72px, 9vw, 130px) 0; /* index.css donne 60 px à toutes les sections */
  overflow: hidden;
  background: var(--site-green-deep, #10201a);
  isolation: isolate;
}

/* Lueur verte qui dérive lentement derrière les rangées */
.svl-glow {
  position: absolute;
  top: 18%;
  left: -260px;
  z-index: -1;
  width: 720px;
  height: 720px;
  background: radial-gradient(closest-side, rgba(157, 198, 107, 0.12), rgba(157, 198, 107, 0));
  pointer-events: none;
  animation: svl-drift 26s ease-in-out infinite alternate;
}

@keyframes svl-drift {
  to {
    transform: translate(220px, 260px) scale(1.12);
  }
}

.svl-head {
  max-width: 720px;
  margin-bottom: clamp(44px, 5vw, 76px);
}

.svl-head .ab-title {
  margin-bottom: 0;
}

.about-page .svl-intro {
  margin: 18px 0 0;
  font-family: var(--site-sans);
  font-size: clamp(15px, 1.1vw, 16.5px);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.svl-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(64px, 7vw, 112px);
}

/* Une rangée : photo d'un côté, texte de l'autre ; une rangée sur deux inversée */
.svl-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(36px, 5.5vw, 96px);
  align-items: center;
}

.svl-row:nth-child(even) .svl-media {
  order: 2;
}

/* Photo du service en fondu derrière la rangée, sur toute la largeur de l'écran : elle part du
   côté de la photo et s'efface vers le texte, en haut et en bas ; elle apparaît avec la rangée */
.svl-row {
  position: relative;
}

.svl-row-bg {
  position: absolute;
  top: calc(clamp(64px, 7vw, 112px) / -2);
  bottom: calc(clamp(64px, 7vw, 112px) / -2);
  left: 50%;
  z-index: -1;
  width: 100vw;
  margin-left: -50vw;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
  -webkit-mask-image:
    linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 22%, #000 78%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 22%, #000 78%, rgba(0, 0, 0, 0) 100%);
  mask-composite: intersect;
}

/* Photo à droite : le fondu part de la droite */
.svl-row:nth-child(even) .svl-row-bg {
  -webkit-mask-image:
    linear-gradient(270deg, #000 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 22%, #000 78%, rgba(0, 0, 0, 0) 100%);
  mask-image:
    linear-gradient(270deg, #000 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 22%, #000 78%, rgba(0, 0, 0, 0) 100%);
}

.svl-row-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.15);
  transform: scale(1.06);
  transition: transform 8s ease-out;
}

/* Sans script, ou quand la rangée apparaît : fondu visible */
html:not(.js-reveal) .svl-row-bg,
.svl-row:has(.is-visible) .svl-row-bg {
  opacity: 0.36;
}

.svl-row:has(.is-visible) .svl-row-bg img {
  transform: scale(1);
}

.svl-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #1f3a2e, #142820);
  border-radius: 18px;
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.85);
}

.svl-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Voile en bas et cadre fin vert clair en retrait, qui se resserre au survol */
.svl-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(16, 32, 26, 0) 55%, rgba(16, 32, 26, 0.4) 100%);
  pointer-events: none;
}

.svl-media::after {
  content: "";
  position: absolute;
  inset: 16px;
  z-index: 1;
  border: 1px solid rgba(157, 198, 107, 0.4);
  border-radius: 10px;
  pointer-events: none;
  transition: inset 0.7s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.svl-row:hover .svl-media img {
  transform: scale(1.05);
}

.svl-row:hover .svl-media::after {
  inset: 10px;
  border-color: rgba(157, 198, 107, 0.7);
}

.svl-text {
  max-width: 540px;
}

.svl-row:nth-child(even) .svl-text {
  justify-self: end;
}

.about-page .svl-name {
  margin: 0;
  font-family: var(--site-serif);
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 600;
  line-height: 1.05;
  color: #fff;
}

.about-page .svl-name a {
  color: inherit;
  transition: color 0.25s ease;
}

.about-page .svl-name a:hover {
  color: var(--site-lime);
}

/* Filet vert sous le titre, qui s'allonge au survol de la rangée */
.about-page .svl-name::after {
  content: "";
  display: block;
  width: 48px;
  height: 1.5px;
  margin-top: 20px;
  background: var(--site-lime);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.svl-row:hover .svl-name::after {
  width: 88px;
}

.about-page .svl-desc {
  margin: 20px 0 0;
  font-family: var(--site-sans);
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

/* Bouton pilule en contour (même famille que les boutons du haut de page) */
.svl-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  margin-top: 28px;
  padding: 0 22px 0 26px;
  font-family: var(--site-sans);
  font-size: 15px;
  font-weight: 400;
  color: #fff;
  border: 1.5px solid rgba(157, 198, 107, 0.75);
  border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.svl-link svg {
  width: 17px;
  height: 17px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.svl-link:hover {
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-color: var(--site-lime);
}

.svl-link:hover svg {
  transform: translateX(4px);
}

.svl-link:focus-visible,
.svl-name a:focus-visible {
  outline: 2px solid var(--site-lime);
  outline-offset: 4px;
}

.about-page .svl-empty {
  margin: 0;
  font-family: var(--site-sans);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---- Un projet en tête ? ---- */
.svl-cta {
  position: relative;
  padding: clamp(72px, 9vw, 120px) 0;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(157, 198, 107, 0.16) 0%, rgba(157, 198, 107, 0) 60%),
    var(--site-green-deep, #10201a);
  isolation: isolate;
}

/* Feuille au trait en filigrane, qui se balance lentement */
.svl-cta-leaf {
  position: absolute;
  top: -40px;
  right: -60px;
  z-index: -1;
  width: clamp(240px, 26vw, 380px);
  color: var(--site-lime);
  opacity: 0.07;
  transform: rotate(8deg);
  transform-origin: bottom left;
  pointer-events: none;
  animation: svl-sway 14s ease-in-out infinite alternate;
}

@keyframes svl-sway {
  to {
    transform: rotate(2deg) translateY(-6px);
  }
}

.svl-cta-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* Surtitre centré entre deux filets */
.about-page .svl-cta-eyebrow {
  justify-content: center;
}

.about-page .svl-cta-eyebrow::before,
.about-page .svl-cta-eyebrow::after {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.svl-cta .ab-title {
  margin-bottom: 0;
}

.about-page .svl-cta-text {
  margin: 16px auto 0;
  font-family: var(--site-sans);
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
}

.svl-cta-btn {
  margin-top: 30px;
  background: rgba(16, 40, 24, 0.92);
}

/* ========================================
   TABLETTE ET MOBILE (tailles alignées sur l'accueil et la page À propos)
   ======================================== */
@media (max-width: 1199px) {
  .about-page .svl-name {
    font-size: clamp(26px, 3.4vw, 34px);
  }

  .about-page .svl-desc,
  .about-page .svl-cta-text {
    font-size: 14.5px;
  }

  .about-page .svl-intro {
    font-size: 14.5px;
  }
}

@media (max-width: 991px) {
  .svl-glow {
    width: 520px;
    height: 520px;
  }

  .svl-rows {
    gap: 56px;
  }

  /* Tablette : photo et texte restent côte à côte, plus serrés */
  .svl-row {
    gap: 32px;
  }

  .svl-media {
    border-radius: 16px;
  }

  .about-page .svl-name::after {
    margin-top: 14px;
  }

  .about-page .svl-desc {
    margin-top: 14px;
  }

  .svl-link {
    height: 46px;
    margin-top: 20px;
  }
}

@media (max-width: 767px) {
  /* Petite tablette et mobile : photo en haut, texte dessous, sur toute la largeur */
  .svl-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .svl-row:nth-child(even) .svl-media {
    order: 0;
  }

  .svl-row:nth-child(even) .svl-text {
    justify-self: start;
  }

  /* Fondu centré derrière la photo et le texte empilés */
  .svl-row-bg,
  .svl-row:nth-child(even) .svl-row-bg {
    top: -22px;
    bottom: -22px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 25%, rgba(0, 0, 0, 0.6) 70%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-composite: source-over;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 25%, rgba(0, 0, 0, 0.6) 70%, rgba(0, 0, 0, 0) 100%);
    mask-composite: add;
  }

  html:not(.js-reveal) .svl-row-bg,
  .svl-row:has(.is-visible) .svl-row-bg {
    opacity: 0.22;
  }

  .svl-media {
    aspect-ratio: 16 / 10;
  }

  .svl-text {
    max-width: 640px;
  }
}

@media (max-width: 575px) {
  .svl-list {
    padding: 56px 0 64px;
  }

  .svl-head {
    margin-bottom: 36px;
  }

  .about-page .svl-intro {
    margin-top: 12px;
    font-size: 13.5px;
  }

  .svl-rows {
    gap: 44px;
  }

  .svl-row {
    gap: 18px;
  }

  .svl-media {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }

  .svl-media::after {
    inset: 10px;
    border-radius: 8px;
  }

  .about-page .svl-name {
    font-size: 22px;
  }

  .about-page .svl-name::after {
    width: 36px;
    margin-top: 12px;
  }

  .about-page .svl-desc {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.65;
  }

  .svl-link {
    height: 42px;
    gap: 10px;
    margin-top: 18px;
    padding: 0 18px 0 22px;
    font-size: 14px;
  }

  .svl-link svg {
    width: 15px;
    height: 15px;
  }

  .svl-cta {
    padding: 64px 0;
  }

  .about-page .svl-cta-eyebrow::before,
  .about-page .svl-cta-eyebrow::after {
    width: 24px;
  }

  .about-page .svl-cta-text {
    margin-top: 12px;
    font-size: 13.5px;
  }

  .svl-cta-btn {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svl-glow,
  .svl-cta-leaf {
    animation: none;
  }

  .svl-media img,
  .svl-media::after,
  .svl-name::after,
  .svl-row-bg,
  .svl-row-bg img {
    transition: none;
  }

  .svl-row:hover .svl-media img {
    transform: none;
  }
}
