/* =============================================
   SECTION PROFILES — COMMUN AUX DEUX VERSIONS
   ============================================= */

div[data-anchor="profiles"] h2 {
  position: absolute;
}

.profiles-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Titre superposé à l'animation — z-index > 10 (vignette) */
.profiles-heading {
  position: absolute;
  z-index: 11;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  /* padding: 2rem 3.5rem; */
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201, 156, 68, 0.2);
  width: 60%;
  height: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .profiles-heading {
    width: 80%;
    height: 15%;
  }
}

.profiles-heading__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.profiles-heading__sub {
  margin: 0.6rem 0 0;
  font-family: var(--font-sans);
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.55);
}

/* Fondu sur les 4 bords pour masquer les coupures de la rotation */
.profiles-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    linear-gradient(to right,  #000 0%, rgba(0,0,0,0) 12%, rgba(0,0,0,0) 88%, #000 100%),
    linear-gradient(to bottom, #000 0%, rgba(0,0,0,0) 12%, rgba(0,0,0,0) 88%, #000 100%);
}

/* =============================================
   PROFILES V2 — MASONRY INCLINÉ INFINI
   ============================================= */
.msn-tilt {
  position: absolute;
  inset: -25%;
  transform: rotate(0deg);
  display: flex;
}

.msn-strip {
  flex: 1;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.msn-col {
  flex: 1;
  min-width: 0;
  /* clip-path instead of overflow:hidden — fixes iOS Safari flicker bug with CSS animations */
  clip-path: inset(0);
  -webkit-clip-path: inset(0);
}

.msn-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
  /* animation pilotée par rAF dans profiles-v2.js — pas de CSS animation */
}

.msn-img-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

/* Dégradé doré + cadre inséré — identique à la v1 */
.msn-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    to top,
    rgba(201, 156, 68, 0.55) 0%,
    rgba(201, 156, 68, 0.18) 45%,
    transparent 72%
  );
  box-shadow: inset 0 0 0 2px rgba(201, 156, 68, 0.65);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.msn-img-wrap:hover::after {
  opacity: 0;
}

.msn-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.7s ease;
  pointer-events: none;        /* bloque le drag — les événements remontent au wrapper pour le hover */
  -webkit-user-drag: none;     /* désactive le drag natif webkit */
}

.msn-img-wrap {
  -webkit-touch-callout: none; /* iOS : supprime le menu long-press */
}

.msn-tilt {
  user-select: none;
  -webkit-user-select: none;
}

.msn-img-wrap:hover .msn-img {
  filter: none;
}

/* @keyframes supprimé — l'animation est pilotée par requestAnimationFrame dans profiles-v2.js
   prefers-reduced-motion est géré côté JS (startAnimations retourne immédiatement si activé) */

.profiles-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 1.8vw, 1.8rem);
  padding: 0 2rem;
  width: 100%;
}

.profile-slot {
  flex: 0 0 auto;
  width: clamp(110px, 13vw, 210px);
  aspect-ratio: 3 / 4;
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.5s ease;
  cursor: pointer;
}

/* Voile doré + cadre inséré, au-dessus des images */
.profile-slot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    to top,
    rgba(201, 156, 68, 0.55) 0%,
    rgba(201, 156, 68, 0.18) 45%,
    transparent 72%
  );
  box-shadow: inset 0 0 0 2px rgba(201, 156, 68, 0.65);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.5s ease;
}

/* Survol : voile + cadre disparaissent, glow extérieur apparaît */
.profile-slot:hover {
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(201, 156, 68, 0.22);
}

.profile-slot:hover::after {
  opacity: 0;
}

.profile-slot__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

/* Survol : retour aux couleurs naturelles */
.profile-slot:hover .profile-slot__img {
  filter: none;
}

@media (hover: none) {
  /* Écrans tactiles : toujours en couleur, voile discret */
  .profile-slot__img { filter: none; }
  .profile-slot::after {
    background: none;
    box-shadow: inset 0 0 0 2px rgba(201, 156, 68, 0.4);
  }
}
