/* --------------------------------------------------------------------------
   Héros photo — Tension 90 (le reste du système est inchangé)
   Photo composée pour le héros (Divital-Tension90-photos/hero-scene-originale.jpg, 2000 × 1116) :
   mur clair à gauche, scène à droite. Elle remplit tout le cadre du héros sur ordinateur et se fond
   dans le ciel pastel par un dégradé à gauche, sous le texte.
   En dessous de 900 px : texte, bouton, puis la photo recadrée 4:3 sur la patiente, fondue par le haut ;
   sur téléphone elle occupe toute la largeur du cadre, sur tablette elle est centrée et fondue aussi sur les côtés.
   De 900 à 1199 px : texte à gauche, photo recadrée à droite, fondue sur ses quatre bords.
   Zones de la photo entière, en % (x gauche → droite, y haut → bas) :
     haut de la tête x 67–76 y 15–20 · chevelure x 63,5–82 y 20–52 · corps x 56–88 y 44–90 · brassard x 77–87 y 55–82
     mains x 66–78 y 74–91 · tensiomètre x 54–66,5 y 76–91 · carnet x 37–55 y 78–88 · rideau x 0–13
   Cartes flottantes dès 1200 px, sur le mur : « Semaine 3 » au-dessus, à droite de la tête ;
   « Jour 21 » entre le texte et la chevelure.
   -------------------------------------------------------------------------- */
.hero--photo .hero__text { width: min(640px, 100% - 32px); }
.hero--photo .hero__stage { position: relative; width: 100%; height: auto; margin: 28px 0 0; }
.hero--photo .hero__visual { position: relative; left: auto; top: auto; width: 100%; margin: 0; }
.hero--photo .hero__visual picture { display: block; height: auto; }
.hero--photo .ph--hero {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0;
  /* le mur au-dessus de la tête se fond dans le ciel ; la chevelure (≥ 7 % du recadrage) reste entière */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 4%, rgba(0, 0, 0, 0.88) 7.5%, #000 10%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 4%, rgba(0, 0, 0, 0.88) 7.5%, #000 10%);
}
.hero--photo .float { display: none; }

@media (min-width: 600px) and (max-width: 899px) {
  .hero--photo .hero__stage { width: min(100% - 48px, 760px); margin: 36px auto 0; }
  .hero--photo .ph--hero {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 4%, rgba(0, 0, 0, 0.88) 7.5%, #000 10%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 4%, rgba(0, 0, 0, 0.88) 7.5%, #000 10%);
    mask-composite: intersect;
  }
}

/* 900–1199 px : texte à gauche, photo recadrée à droite, fondue sur ses bords (visage au premier écran) */
@media (min-width: 900px) and (max-width: 1199px) {
  .hero--photo .hero__frame {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
    column-gap: 40px; min-height: max(600px, calc(100svh - 16px)); padding: 96px 40px 40px;
  }
  .hero--photo .hero__text { width: auto; padding: 0; align-items: flex-start; text-align: left; }
  .hero--photo .hero__text h1 { margin-top: 18px; max-width: none; font-size: clamp(2.25rem, 4.2vw, 3rem); }
  .hero--photo .hero__text .lead { margin: 16px 0 24px; }
  .hero--photo .hero__stage { width: 100%; margin: 0; }
  .hero--photo .ph--hero {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.45) 12%, #000 24%, #000 94%, transparent 100%), linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 4%, rgba(0, 0, 0, 0.88) 7.5%, #000 10%, #000 92%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.45) 12%, #000 24%, #000 94%, transparent 100%), linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 4%, rgba(0, 0, 0, 0.88) 7.5%, #000 10%, #000 92%, transparent 100%);
    mask-composite: intersect;
  }
}

@media (min-width: 1200px) {
  /* le héros prend la hauteur de l'écran, et au plus les proportions de la photo (aucun recadrage latéral) */
  .hero--photo .hero__frame {
    flex-direction: row; align-items: center; justify-content: flex-start;
    min-height: clamp(min(640px, calc(100svh - 16px)), calc((100vw - 16px) * 0.558), calc(100svh - 16px));
  }
  .hero--photo .hero__stage { position: absolute; inset: 0; z-index: 0; width: auto; height: auto; margin: 0; }
  .hero--photo .hero__visual { position: absolute; inset: 0; height: 100%; }
  .hero--photo .hero__visual > .rise, .hero--photo .hero__visual picture { height: 100%; }
  .hero--photo .ph--hero {
    width: 100%; height: 100%; aspect-ratio: auto;
    object-fit: cover; object-position: 100% 42%;
    -webkit-mask-image: none; mask-image: none;
  }
  /* dégradé à gauche : le ciel pastel du héros s'avance sur le mur et le rideau, et adoucit la table sous le texte */
  .hero--photo .hero__stage::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
      radial-gradient(52% 58% at 0% 100%, rgba(236, 238, 255, 0.94) 0%, rgba(236, 238, 255, 0.7) 50%, rgba(236, 238, 255, 0) 100%),
      linear-gradient(90deg, rgba(230, 236, 255, 0.95) 0%, rgba(236, 236, 255, 0.84) 26%, rgba(240, 238, 255, 0.4) 40%, rgba(240, 238, 255, 0) 52%);
  }
  .hero--photo .hero__text {
    position: relative; z-index: 2; width: min(40vw, 580px);
    margin-left: clamp(40px, 5.5vw, 104px); padding: 96px 0 44px;
    align-items: flex-start; text-align: left;
  }
  /* titre à la taille de l'écran : jamais plus haut que la place disponible (7,4 % de la hauteur) */
  .hero--photo .hero__text h1 { margin-top: 20px; max-width: none; font-size: clamp(2.5rem, min(4.2vw, 7.4svh), 4.25rem); }
  .hero--photo .hero__text .lead { max-width: 30em; margin: 20px 0 30px; }
}
/* cartes flottantes dès 1200 px, sur le mur, jamais sur la patiente */
@media (min-width: 1200px) {
  .hero--photo .float { display: block; z-index: 3; }
  .hero--photo .float--a { left: auto; right: 2.5%; top: 5%; }   /* au-dessus, à droite de la tête */
  .hero--photo .float--b { left: 47%; top: 25%; right: auto; }    /* entre le texte et la chevelure */
}
/* 1200–1439 px : carte « Semaine 3 » compacte, pour rester à droite du sommet de la chevelure */
@media (min-width: 1200px) and (max-width: 1439px) {
  .hero--photo .float--a .float__card { padding: 10px 16px 10px 10px; gap: 10px; }
  .hero--photo .float--a .float__text span { font-size: 0.875rem; max-width: 11em; }
  .hero--photo .float--a .tick { width: 32px; height: 32px; }
}
/* écrans bas (portables avec barre de navigateur) : carte « Semaine 3 » plus haute et compacte, texte resserré */
@media (min-width: 1200px) and (max-height: 800px) {
  .hero--photo .float--a { top: 3%; }
  .hero--photo .float--a .float__card { padding: 10px 16px 10px 10px; gap: 10px; }
  .hero--photo .float--a .float__text span { font-size: 0.875rem; max-width: 11em; }
  .hero--photo .float--a .tick { width: 32px; height: 32px; }
}
@media (min-width: 1200px) and (max-height: 680px) {
  .hero--photo .float--a { top: 2%; }
  .hero--photo .hero__text { padding: 84px 0 32px; }
  .hero--photo .hero__text .lead { margin: 14px 0 22px; }
  .hero--photo .hero__text .micro { margin-top: 12px; max-width: 20em; }   /* deux lignes courtes : s'arrête avant le carnet */
}
