/* Hair Finder immersif (04/12) : chaque question occupe l'écran sur une grande photo, assombrie par un voile garanti
   (les photos changeront : le texte blanc ne dépend jamais de la photo du jour). À l'ordinateur, survoler une réponse
   montre la nuance portée ou la longueur sur le modèle ; au doigt, rien n'est chargé pour rien. Les réponses se lisent
   comme une liste éditoriale, la ligne du bas dit combien de nuances restent possibles. Le conseil s'ouvre sur la nuance
   portée en plein écran, puis le pourquoi et le prix côte à côte. Transitions entre questions : mouvement.css (quiz). */

html[data-vue="finder"] body { background: #FFFDFA; }

/* ---------- La scène : photo plein cadre sous l'en-tête clair ---------- */
.hf, .hf-revele { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: #2A1C14; }
.hf-fond { position: absolute; inset: 0; z-index: -1; background: #2A1C14; view-transition-name: hf-fond; }
.hf-fond__cadre { position: absolute; inset: 0; }
.hf-fond img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.hf-fond__apercu { opacity: 0; transition: opacity .6s var(--ios); }
.hf-fond::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(24, 15, 10, .55), rgba(24, 15, 10, 0) 22%),
              linear-gradient(to right, rgba(24, 15, 10, .88), rgba(24, 15, 10, .66) 40%, rgba(24, 15, 10, .1) 74%); }
@media (hover: hover) {
  .hf:has(.hf-choix[data-i="0"]:is(:hover, :focus-visible)) .hf-fond__apercu[data-i="0"],
  .hf:has(.hf-choix[data-i="1"]:is(:hover, :focus-visible)) .hf-fond__apercu[data-i="1"],
  .hf:has(.hf-choix[data-i="2"]:is(:hover, :focus-visible)) .hf-fond__apercu[data-i="2"],
  .hf:has(.hf-choix[data-i="3"]:is(:hover, :focus-visible)) .hf-fond__apercu[data-i="3"],
  .hf:has(.hf-choix[data-i="4"]:is(:hover, :focus-visible)) .hf-fond__apercu[data-i="4"],
  .hf:has(.hf-choix[data-i="5"]:is(:hover, :focus-visible)) .hf-fond__apercu[data-i="5"] { opacity: 1; }
}
@media (hover: none) { .hf-fond__apercu { display: none; } }
/* Ordinateur : la photo occupe la droite de la scène, à une taille proche de celle du fichier (pas d'agrandissement flou),
   et se fond dans le fond sombre où se lit la question. Le voile reste garanti en haut pour l'en-tête. */
@media (min-width: 761px) {
  .hf-fond__cadre { left: max(38%, calc(100% - 960px)); -webkit-mask-image: linear-gradient(to right, transparent, #000 34%); mask-image: linear-gradient(to right, transparent, #000 34%); }
  .hf-fond::after { background: linear-gradient(to bottom, rgba(24, 15, 10, .6), rgba(24, 15, 10, 0) 24%), linear-gradient(to right, rgba(24, 15, 10, .35), rgba(24, 15, 10, 0) 50%); }
  .hf .hf-fond img[src*="longueur"], .hf .hf-fond img[srcset*="longueur"] { object-position: 50% 30%; }
}
.hf__mention { top: auto; left: auto; right: 16px; bottom: 16px; z-index: 2; }

/* ---------- La question ---------- */
.hf__scene { display: grid; align-content: center; width: min(100%, calc(var(--bord) + 600px)); min-height: calc(100svh - var(--annonce));
  padding: calc(var(--entete) + clamp(20px, 3.4vh, 48px)) var(--marge) clamp(28px, 4vh, 56px) var(--bord); }
.hf__etape { display: flex; align-items: baseline; gap: 14px; margin: 0; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--or-clair); }
.hf__etape b { font-size: clamp(34px, 3vw, 44px); font-weight: 400; line-height: 1; letter-spacing: -.01em; color: #fff; font-variant-numeric: tabular-nums; }
.hf__fil { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 440px; margin: 18px 0 0; padding: 0; list-style: none; }
.hf__fil li { height: 2px; background: rgba(255, 255, 255, .22); }
.hf__fil li.fait { background: var(--or-clair); }
.hf__fil li.ici { background: #fff; }
.hf__nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 440px; margin-top: 6px; font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.hf__retour, .hf__passer { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; color: #fff; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .35); }
.hf__retour svg { width: 12px; height: 12px; }
.hf__titre { margin: clamp(16px, 2.6vh, 36px) 0 0; font-size: clamp(34px, min(4.2vw, 6.4vh), 62px); font-weight: 400; line-height: 1.04; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.hf__titre:focus { outline: none; }
.hf__aide { margin: 14px 0 0; max-width: 34em; font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, .78); }

/* Réponses : une liste éditoriale, la vignette de la matière ou de la longueur, la flèche au survol. */
.hf__choix { display: grid; margin-top: clamp(18px, 3vh, 36px); border-top: 1px solid rgba(255, 255, 255, .18); }
.hf-choix { display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; align-items: center; gap: 18px; width: 100%; min-height: clamp(60px, 7.2vh, 72px); padding: 8px 8px 8px 0;
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, .18); background: none; color: #fff; font: inherit; text-align: left; cursor: pointer;
  transition: background-color .3s var(--ios), padding .35s var(--ios), scale .14s var(--ios); }
.hf__choix:not(:has(.hf-choix__vignette)) .hf-choix { grid-template-columns: minmax(0, 1fr) 16px; }
.hf-choix__vignette { width: 48px; height: 48px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.hf-choix__vignette img { width: 100%; height: 100%; object-fit: cover; }
.hf-choix__vignette--mosaique { display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 1px; }
.hf-choix__vignette--mosaique img { min-height: 0; }
.hf-choix__texte strong { display: block; font-size: 18px; font-weight: 400; line-height: 1.3; }
.hf-choix__texte span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, .68); }
.hf-choix__fleche { display: grid; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .35s var(--ios); }
.hf-choix__fleche svg { width: 14px; height: 14px; }
.hf-choix:hover, .hf-choix:focus-visible { padding-left: 10px; background: linear-gradient(to right, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0)); }
.hf-choix:hover .hf-choix__fleche, .hf-choix:focus-visible .hf-choix__fleche { opacity: 1; transform: none; }
.hf-choix:focus-visible { outline: 1px solid var(--or-clair); outline-offset: 2px; }
.hf-choix:active { scale: .99; }

/* Ce qui reste possible : les six matières, celles écartées en retrait. */
.hf__pied { display: grid; gap: 6px; margin-top: clamp(16px, 2.4vh, 32px); font-size: 13px; color: rgba(255, 255, 255, .7); }
.hf__pied p { margin: 0; }
.hf__possibles { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: #fff; }
.hf__teintes { display: flex; padding-left: 5px; }
.hf__teintes i { width: 22px; height: 22px; margin-left: -5px; border-radius: 50%; border: 1.5px solid #2A1C14; background: center 30% / cover; transition: opacity .4s, filter .4s; }
.hf__teintes i.ecartee { opacity: .3; filter: grayscale(1); }

/* ---------- Le conseil : la nuance portée en plein écran ---------- */
.hf-resultat { background: #FFFDFA; padding-bottom: clamp(56px, 6vw, 96px); }
.hf-resultat:has(> .hf-detail:last-child) { padding-bottom: 0; }
.hf-revele { display: grid; align-items: end; min-height: calc(100svh - var(--annonce)); }
.hf-revele--court { min-height: clamp(440px, 64svh, 640px); }
.hf-revele .hf-fond::after { background: linear-gradient(to bottom, rgba(24, 15, 10, .5), rgba(24, 15, 10, 0) 22%),
  linear-gradient(to top, rgba(24, 15, 10, .9), rgba(24, 15, 10, .45) 42%, rgba(24, 15, 10, 0) 70%); }
@media (min-width: 761px) { .hf-revele .hf-fond::after { background: linear-gradient(to bottom, rgba(24, 15, 10, .6), rgba(24, 15, 10, 0) 24%), linear-gradient(to top, rgba(24, 15, 10, .6), rgba(24, 15, 10, 0) 40%); } }
.hf-revele__texte { padding: calc(var(--entete) + 40px) var(--marge) clamp(44px, 6vw, 88px) var(--bord); max-width: calc(var(--bord) + 820px); }
.hf-revele h1 { margin: 14px 0 0; font-size: clamp(64px, 9vw, 148px); font-weight: 400; line-height: .92; letter-spacing: -.035em; color: #fff; }
.hf-revele--court h1 { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -.02em; }
.hf-revele__desc { margin: 18px 0 0; max-width: 34em; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: rgba(255, 255, 255, .84); }
.hf-revele .hf-actions { margin-top: 30px; }
.hf-revele .cq-btn--creme { background: var(--porcelaine); color: var(--encre); }
.hf-revele .cq-btn--creme:hover { background: #fff; }
.hf-revele__lien { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #fff;
  text-decoration: underline; text-underline-offset: 6px; text-decoration-color: rgba(255, 255, 255, .4); }
/* La révélation : la photo se pose (léger zoom arrière), puis le nom et le reste montent l'un après l'autre. */
@media (prefers-reduced-motion: no-preference) {
  :root:not(.calme) .hf-revele .hf-fond__defaut { animation: hf-pose 1.6s var(--ios) both; }
  :root:not(.calme) .hf-revele__texte > * { animation: vt-monte .6s var(--ios) both; }
  :root:not(.calme) .hf-revele__texte > :nth-child(1) { animation-delay: .2s; }
  :root:not(.calme) .hf-revele__texte > :nth-child(2) { animation-delay: .3s; }
  :root:not(.calme) .hf-revele__texte > :nth-child(3) { animation-delay: .42s; }
  :root:not(.calme) .hf-revele__texte > :nth-child(4) { animation-delay: .54s; }
}
@keyframes hf-pose { from { transform: scale(1.06); } }

/* Pourquoi elle, et son prix complet, côte à côte. */
.hf-detail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 112px); padding: clamp(56px, 6vw, 96px) var(--bord); background: #FFFDFA; }
.hf__sur { margin: 0; font-size: 11.5px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--or-texte); }
.hf-raisons { display: grid; width: 100%; margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--filet); }
.hf-raisons li { padding: 12px 0; border-bottom: 1px solid var(--filet); font-size: 15px; line-height: 1.5; color: var(--encre); }
.hf-prix { width: 100%; margin: 18px 0 0; border-top: 1px solid var(--filet); }
.hf-prix div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--filet); font-size: 15px; }
.hf-prix dt { color: var(--voile); }
.hf-prix dd { margin: 0; font-weight: 500; color: var(--cerise); }
.hf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 24px; }
.hf-reponses { margin: 20px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--voile); }
.hf-reponses a { color: var(--encre); text-decoration: underline; text-underline-offset: 3px; }
.hf-reponses .cq-lien { min-height: 44px; margin-left: 6px; }

/* Aucun résultat exact : les nuances les plus proches, avec l'écart réel en cerise. */
.hf-proche { padding: clamp(40px, 5vw, 80px) var(--bord) 0; background: #FFFDFA; }
.hf-proche .hf-cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; margin: 0; }
.hf-carte__ecart { margin: 0; font-size: 14px; font-weight: 500; color: var(--cerise); }
.hf-proche__pied { display: grid; gap: 4px; max-width: 760px; margin-top: clamp(32px, 3vw, 48px); padding-top: 20px; border-top: 1px solid var(--filet); }
.hf-proche__pied .hf-reponses { margin: 0; }
.hf-proche__pied .hf-reponses .cq-lien { margin: 0 14px 0 0; }
.hf-pourquoi { margin-top: 14px; }
.hf-pourquoi summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--encre); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--or); }
.hf-pourquoi summary::-webkit-details-marker { display: none; }
.hf-pourquoi summary::after { content: '+'; font-size: 16px; }
.hf-pourquoi[open] summary::after { content: '−'; }
.hf-pourquoi .hf-exclues { margin: 8px 0 0; }

/* Aussi pour toi, et les nuances écartées. */
.hf-aussi { padding: clamp(56px, 6vw, 96px) var(--bord) 0; }
.hf-aussi h2 { margin: 0 0 clamp(24px, 2.6vw, 36px); text-align: center; font-size: clamp(26px, 2.4vw, 36px); font-weight: 400; color: var(--encre); }
.hf-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(16px, 2vw, 32px); max-width: 960px; margin: 0 auto; }
.hf-carte { display: grid; align-content: start; gap: 8px; }
.hf-carte__photo { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--puits); margin-bottom: 8px; }
.hf-carte__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hf-carte__haut { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hf-carte h3 { margin: 0; font-size: 20px; font-weight: 400; color: var(--encre); }
.hf-carte__haut strong { font-weight: 500; color: var(--cerise); }
.hf-carte > p { margin: 0; font-size: 14px; color: var(--voile); }
.hf-exclues { display: grid; gap: 0; max-width: 720px; margin: 0 auto; padding: 0; list-style: none; border-top: 1px solid var(--filet); }
.hf-exclues li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--filet); font-size: 14.5px; text-align: left; }
.hf-exclues strong { font-weight: 500; color: var(--encre); }
.hf-exclues span { color: var(--voile); }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 900px) {
  .hf-detail, .hf-proche .hf-cartes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  /* La photo en haut, la question et les réponses sur le voile sombre du bas ; rien sous la barre d'onglets. */
  .hf-fond::after { background: linear-gradient(to bottom, rgba(24, 15, 10, .5), rgba(24, 15, 10, .12) 22%, rgba(24, 15, 10, .62) 46%, rgba(24, 15, 10, .92) 70%); }
  .hf__scene { width: 100%; align-content: end; padding: calc(var(--entete) + 28vh) var(--marge) calc(28px + var(--onglets)); }
  .hf__etape b { font-size: 32px; }
  .hf__titre { font-size: 32px; }
  .hf__aide { font-size: 14.5px; }
  .hf-choix { grid-template-columns: 44px minmax(0, 1fr) 16px; gap: 14px; min-height: 64px; }
  .hf-choix__vignette { width: 44px; height: 44px; }
  .hf-choix__texte strong { font-size: 17px; }
  .hf-choix__fleche { opacity: .6; transform: none; }
  .hf-revele__texte { padding-bottom: calc(36px + var(--onglets)); }
  .hf-revele h1 { font-size: clamp(56px, 17vw, 80px); }
  .hf-exclues li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .hf-fond__apercu, .hf-choix, .hf-choix__fleche { transition: none; } }
