/* /performer/ et /optimiser/ — pages piliers V3 : mobile d'abord, charte Volt.
   Même famille que /recuperer/ (recuperer.css) : bandeau photo, « pour qui » en
   trois images, grandes cartes photo, matériel, trois étapes, bas de page.
   Angles droits partout (charte). Le masquage d'apparition appartient au socle
   (`js-anim`, animations.js) : sans JS, tout est visible. */

.pl-section {
  padding-block: 72px;
  overflow: hidden;
}

/* ---------- Bandeau ---------- */

.pl-hero {
  position: relative;
  min-height: min(680px, 80vh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--pa-fond-profond);
}

.pl-hero__voile {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(1, 26, 47, 0.96) 0%, rgba(1, 38, 71, 0.8) 48%, rgba(1, 38, 71, 0.26) 100%);
}

.pl-hero__contenu {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: 72px 60px;
}

.pl-hero__titre,
.pl-titre {
  margin: 0;
  font-family: var(--pa-police-titre);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--pa-blanc);
  letter-spacing: -0.04em;
}

.pl-hero__titre {
  max-width: 900px;
  margin-top: 16px;
  font-size: clamp(42px, 8vw, 104px);
  line-height: 0.88;
  overflow-wrap: anywhere;
}

.pl-hero__accroche {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--pa-blanc);
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.3;
}

.pl-hero__cta {
  margin-top: 26px;
  min-width: 240px;
}

/* ---------- En-têtes de section ---------- */

.pl-entete {
  max-width: 760px;
  margin-bottom: 34px;
}

.pl-entete .pa-surtitre {
  margin-bottom: 12px;
}

.pl-titre {
  font-size: clamp(32px, 5.3vw, 70px);
  line-height: 0.92;
}

/* ---------- Pour qui : trois situations ---------- */

.pl-quand__liste,
.pl-materiel__liste,
.pl-etapes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pl-quand__liste {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pl-quand__item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--pa-panneau);
  border-bottom: 4px solid var(--pa-accent);
}

.pl-quand__media {
  height: clamp(340px, 40vw, 540px);
  overflow: hidden;
  background: var(--pa-carte-alt);
}

.pl-quand__media picture,
.pl-quand__media img {
  display: block;
  width: 100%;
  height: 100%;
}

.pl-quand__media img {
  object-fit: cover;
  transform: scale(1.01) translate3d(var(--pl-x, 0), var(--pl-y, 0), 0);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.pl-quand__item:hover .pl-quand__media img {
  transform: scale(1.06) translate3d(var(--pl-x, 0), var(--pl-y, 0), 0);
}

.pl-quand__titre {
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  padding: 72px 20px 22px;
  color: var(--pa-blanc);
  background: linear-gradient(0deg, rgba(1, 26, 47, 0.96) 0%, rgba(1, 26, 47, 0.7) 55%, rgba(1, 26, 47, 0) 100%);
  font-family: var(--pa-police-titre);
  font-size: clamp(22px, 2.3vw, 31px);
  font-weight: 400;
  line-height: 1.02;
  text-transform: uppercase;
}

/* Cadrages : les photos sont des portraits recadrés en bandeau. */
.pl-cadre--haut { object-position: 50% 18%; }
.pl-cadre--mi-haut { object-position: 50% 36%; }
.pl-cadre--centre { object-position: 50% 50%; }
.pl-cadre--droite { object-position: 62% 50%; }

/* ---------- Services : grandes cartes photo ---------- */

.pl-groupe-tete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 56px 0 18px;
}

.pl-groupe {
  margin: 0 0 18px;
  color: var(--pa-blanc);
  font-family: var(--pa-police-titre);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.pl-groupe-tete .pl-groupe {
  margin: 0;
}

.pl-groupe__lien {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--pa-accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pl-groupe__lien:hover {
  color: var(--pa-blanc);
}

.pl-grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.pl-grille--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pl-grille > .pl-carte:only-child,
.pl-grille:not(.pl-grille--3) > .pl-carte:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.pl-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--pa-panneau);
  border-top: 4px solid var(--pa-accent);
}

.pl-carte__media {
  position: relative;
  height: clamp(250px, 27vw, 400px);
  overflow: hidden;
  background: var(--pa-carte-alt);
}

.pl-carte__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01) translate3d(var(--pl-x, 0), var(--pl-y, 0), 0);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.pl-carte:hover .pl-carte__media img,
.pl-carte:focus-within .pl-carte__media img {
  transform: scale(1.06) translate3d(var(--pl-x, 0), var(--pl-y, 0), 0);
}

/* Pastille « durée · prix » posée sur la photo. */
.pl-pastille {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 11px 16px;
  color: var(--pa-fond);
  background: var(--pa-accent);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.pl-bientot {
  position: absolute;
  top: 0;
  left: 0;
  padding: 8px 12px;
  color: var(--pa-fond);
  background: var(--pa-blanc);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pl-carte__corps {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 24px 26px;
}

.pl-carte__nom {
  margin: 0;
  color: var(--pa-blanc);
  font-family: var(--pa-police-titre);
  font-size: clamp(21px, 2.1vw, 28px);
  font-weight: 400;
  line-height: 1.04;
  text-transform: uppercase;
}

.pl-carte__nom a {
  color: inherit;
}

/* Toute la carte cliquable : le lien du titre s'étend, le bouton reste au-dessus. */
.pl-carte__nom a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pl-carte__nom a:hover {
  color: var(--pa-accent);
}

.pl-carte__nom a:focus-visible {
  outline: none;
}

.pl-carte__nom a:focus-visible::after {
  outline: 3px solid var(--pa-accent);
  outline-offset: -3px;
}

.pl-carte__desc,
.pl-carte__repere {
  margin: 10px 0 0;
  color: var(--pa-texte-3);
  font-size: 15px;
  line-height: 1.5;
}

.pl-carte__repere {
  color: var(--pa-accent);
  font-weight: 800;
}

.pl-carte__action {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 20px;
}

.pl-carte__action .pa-btn,
.pl-carte__action .pa-btn-secondaire {
  min-height: 48px;
}

.pl-carte--sans-photo {
  border-left: 4px solid var(--pa-accent);
}

/* ---------- Matériel ---------- */

.pl-materiel__liste {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* Trois appareils (QA 19/10/2026) : trois colonnes, jamais une case vide. */
.pl-materiel__liste--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pl-materiel__item {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--pa-panneau);
}

.pl-materiel__item picture,
.pl-materiel__item img {
  display: block;
  width: 100%;
  height: 100%;
}

.pl-materiel__item img {
  object-fit: cover;
  transform: scale(1.01) translate3d(var(--pl-x, 0), var(--pl-y, 0), 0);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.pl-materiel__item:hover img {
  transform: scale(1.06) translate3d(var(--pl-x, 0), var(--pl-y, 0), 0);
}

.pl-materiel__legende {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 10px 14px;
  color: var(--pa-fond);
  background: var(--pa-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* ---------- Comment ça se passe ---------- */

.pl-etapes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pl-etape {
  position: relative;
  min-width: 0;
  background: var(--pa-panneau);
  border-bottom: 4px solid var(--pa-accent);
}

.pl-etape__media {
  height: clamp(240px, 31vw, 380px);
  overflow: hidden;
  background: var(--pa-carte-alt);
}

.pl-etape__media picture,
.pl-etape__media img {
  display: block;
  width: 100%;
  height: 100%;
}

.pl-etape__media img {
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.pl-etape:hover .pl-etape__media img {
  transform: scale(1.045);
}

.pl-etape__numero {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--pa-fond);
  background: var(--pa-accent);
  font-family: var(--pa-police-titre);
  font-size: 21px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

.pl-etape h3 {
  margin: 0;
  padding: 22px 20px 24px;
  color: var(--pa-blanc);
  font-family: var(--pa-police-titre);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.js-piliers .pl-etape.est-active .pl-etape__numero {
  transform: translateY(-6px);
  background: var(--pa-blanc);
}

/* ---------- Bas de page ---------- */

.pl-fin {
  padding-block: 76px;
}

.pl-fin__contenu {
  text-align: center;
}

.pl-fin .pa-surtitre {
  margin-bottom: 14px;
}

.pl-fin__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.pl-fin__actions a {
  min-width: 210px;
  min-height: 48px;
}

#services {
  scroll-margin-top: 72px;
}

/* ---------- Tablette et téléphone : on empile, aucun rail ---------- */

@media (max-width: 900px) {
  .pl-section {
    padding-block: 52px;
  }

  .pl-hero {
    min-height: 560px;
  }

  .pl-hero__contenu {
    padding-block: 64px 44px;
  }

  .pl-hero__titre {
    font-size: clamp(40px, 13vw, 72px);
  }

  .pl-quand__liste,
  .pl-grille,
  .pl-grille--3,
  .pl-etapes {
    grid-template-columns: 1fr;
  }

  .pl-materiel__liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Trois appareils sur deux colonnes : le premier en grand, deux dessous. */
  .pl-materiel__liste--3 .pl-materiel__item:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
  }

  .pl-quand__media {
    height: min(82vw, 360px);
  }

  .pl-carte__media {
    height: min(74vw, 340px);
  }

  .pl-etape__media {
    height: min(88vw, 350px);
  }

  .pl-groupe-tete {
    margin-top: 44px;
  }
}

@media (max-width: 480px) {
  /* QA 19/10/2026 : le voile uni à 62 % cachait le geste des photos sur
     téléphone ; le texte reste en bas, sur la partie sombre. */
  .pl-hero__voile {
    background: linear-gradient(0deg, rgba(1, 26, 47, 0.98) 0%, rgba(1, 38, 71, 0.86) 50%, rgba(1, 38, 71, 0.3) 100%);
  }

  .pl-hero__cta,
  .pl-fin__actions,
  .pl-fin__actions a,
  .pl-carte__action a {
    width: 100%;
  }

  .pl-carte__corps {
    padding: 22px 18px 24px;
  }

  .pl-materiel__legende {
    padding: 8px 10px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pl-quand__media img,
  .pl-carte__media img,
  .pl-materiel__item img,
  .pl-etape__media img,
  .pl-etape__numero {
    transform: none !important;
    transition: none !important;
  }
}
