/* Accueil V3 — « Taille douce ».
   Reprise de la V1 (même contenu, même sobriété) où l'image cesse d'être un
   rectangle posé à côté du texte : la photographie entre en biais, le texte
   la chevauche, les bandes se séparent par une diagonale. Aucune vidéo.
   Tout est scopé sous [data-accueil="3"]. */

html[data-accueil-pref='3'] [data-accueil='1'] {
  display: none;
}

/* ------------------------------------------------------------------ hero */

.v3-hero {
  position: relative;
  padding-block: clamp(40px, 7vh, 96px) clamp(72px, 14vh, 168px);
  overflow: hidden;
}

.v3-hero__grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.v3-hero__texte {
  position: relative;
  z-index: 2;
}

.v3-hero__lockup {
  width: min(100%, 380px);
  height: auto;
  display: block;
  margin-bottom: 24px;
}

.v3-hero h1 {
  margin: 0 0 24px;
}

.v3-hero .lead {
  font-size: clamp(1.1rem, 2.2vw, 1.34rem);
  line-height: 1.6;
  max-width: 40ch;
  color: var(--ink);
  margin: 0 0 30px;
}

/* La photographie entre en biais : coupe organique côté texte. */
.v3-hero__photo {
  position: relative;
  margin-right: calc(var(--gutter) * -1);
}

.v3-hero__photo img {
  width: 100%;
  height: auto;
  min-width: 0;
  display: block;
  aspect-ratio: 4 / 3.5;
  object-fit: cover;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
}

@supports (clip-path: path('M0 0')) {
  .v3-hero__photo img {
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 92%);
  }
}

/* Le filet rouge signe l'angle, comme un trait de plume. */
.v3-hero__trait {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56%;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
}

@media (prefers-reduced-motion: no-preference) {
  [data-accueil='3']:not([hidden]) .v3-hero__texte > * {
    animation: v3-monte 820ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  [data-accueil='3']:not([hidden]) .v3-hero__texte > :nth-child(2) { animation-delay: 80ms; }
  [data-accueil='3']:not([hidden]) .v3-hero__texte > :nth-child(3) { animation-delay: 160ms; }

  [data-accueil='3']:not([hidden]) .v3-hero__photo {
    animation: v3-entre 1100ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  [data-accueil='3']:not([hidden]) .v3-hero__trait {
    animation: v3-trait 900ms cubic-bezier(0.16, 1, 0.3, 1) 420ms both;
  }
}

@keyframes v3-monte {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes v3-entre {
  from { opacity: 0; transform: translateX(34px); }
  to { opacity: 1; transform: none; }
}

@keyframes v3-trait {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 860px) {
  .v3-hero__grille {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .v3-hero__photo {
    margin-inline: calc(var(--gutter) * -1);
    order: -1;
  }

  .v3-hero__photo img {
    aspect-ratio: 3 / 2;
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  }

  .v3-hero__trait {
    width: 40%;
  }
}

/* --------------------------------------------------- bande en diagonale */

.v3-bande {
  position: relative;
  background: var(--paper-2);
  padding-block: clamp(72px, 12vh, 148px);
  margin-block: clamp(-24px, -3vh, -12px) 0;
  clip-path: polygon(0 3.5vw, 100% 0, 100% calc(100% - 3.5vw), 0 100%);
  /* Le plan animé en scale déborderait la zone de défilement sans ceci. */
  overflow: clip;
}

.v3-bande__plan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  min-width: 0;
}

.v3-bande__grille {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 4vw, 64px);
}

.v3-bande h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin: 0 0 12px;
  color: var(--ink);
}

.v3-bande p {
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 46ch;
  margin: 0 0 18px;
}

/* ------------------------------------------- domaines : image en médaillon */

.v3-domaines {
  padding-block: clamp(64px, 10vh, 128px);
}

.v3-domaines__head {
  max-width: 56ch;
  margin-bottom: clamp(32px, 5vh, 56px);
}

.v3-domaines h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 0 0 14px;
  color: var(--ink);
  text-wrap: balance;
}

.v3-domaines__head p {
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0;
}

.v3-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(28px, 3.5vw, 52px);
}

.v3-item h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  margin: 16px 0 8px;
  color: var(--ink);
}

.v3-item p {
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
  font-size: 0.98rem;
}

/* Médaillon : la photo prend une forme organique, jamais un carré. */
.v3-item__vignette {
  overflow: hidden;
  border-radius: 46% 54% 52% 48% / 58% 44% 56% 42%;
  aspect-ratio: 5 / 3.6;
}

.v3-item__vignette img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.v3-item:hover .v3-item__vignette img {
  transform: scale(1.05);
}

/* --------------------------------------------- notaires : mosaïque en biais */

.v3-notaires {
  position: relative;
  padding-block: clamp(64px, 10vh, 128px);
  background: var(--paper-2);
  clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 100%);
}

.v3-notaires__grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.v3-notaires h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 0 0 14px;
  color: var(--ink);
}

.v3-notaires p {
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 42ch;
  margin: 0 0 24px;
}

.v3-mosaique {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.v3-mosaique a {
  display: block;
  overflow: hidden;
}

.v3-mosaique img {
  width: 100%;
  height: auto;
  min-width: 0;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: filter 300ms, transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.v3-mosaique a:hover img,
.v3-mosaique a:focus-visible img {
  filter: none;
  transform: scale(1.06);
}

/* Décalage d'une colonne sur deux : la grille respire au lieu de s'aligner. */
.v3-mosaique a:nth-child(even) {
  transform: translateY(14px);
}

@media (max-width: 860px) {
  .v3-notaires__grille {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------ contact en creux */

.v3-contact {
  padding-block: clamp(64px, 10vh, 128px);
}

.v3-contact__grille {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.v3-contact .map-embed {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%);
}

.v3-contact h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 0 0 14px;
  color: var(--ink);
}

.v3-contact p {
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 44ch;
  margin: 0 0 20px;
}

.v3-contact address {
  font-style: normal;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 22px;
}

@media (max-width: 860px) {
  .v3-contact__grille {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------- révélations au défilement */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .v3-reveal {
      animation: v3-monte linear both;
      animation-timeline: view();
      animation-range: entry 8% entry 52%;
    }

    .v3-bande__plan {
      animation: v3-plan linear both;
      animation-timeline: view();
      animation-range: entry exit;
    }
  }
}

@keyframes v3-plan {
  from { transform: scale(1.12) translateY(-2%); }
  to { transform: scale(1.12) translateY(2%); }
}
