/* Studio 200 · scène S5 « idées » : la pilule et ses trois réponses, « quelques idées », le contact, la fausse
   fin. [lot B4]
   La page du contact et son pied (`.s5-page`) est aussi recopiée par la scène S6 dans chaque éclat de la vitre :
   ses règles valent donc sous #s5 ET sous #s6, et elle a une taille écrite (largeur et hauteur de l'écran),
   pour que la copie tombe au pixel sur l'original. */

/* ------------------------------------------------------------------ le cadre commun aux deux mises en page */
html.film #s5 .s5-ask,
html.film :is(#s5, #s6) .s5-page {
  --s5-gap: clamp(8px, calc(var(--vh, 1vh) * 2.3), 22px);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    calc(var(--safe-t) + clamp(10px, calc(var(--vh, 1vh) * 2.8), 34px))
    max(var(--gutter), var(--safe-r))
    calc(var(--safe-b) + 4px)
    max(var(--gutter), var(--safe-l));
}

/* ------------------------------------------------------------------ 0 → 0,45 : la pilule et ses réponses */
html.film #s5 .s5-ask__pill {
  width: min(100%, 35rem);
  will-change: transform;
}
html.film #s5 .s5-ask__pill .pill { width: 100%; }
html.film #s5 .s5-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(7px, calc(var(--vh, 1vh) * 1.3), 12px);
  width: min(100%, 35rem);
  margin-top: clamp(12px, calc(var(--vh, 1vh) * 1.9), 18px);
}
/* une ligne de résultat : une suggestion sous le champ de recherche */
html.film #s5 .s5-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: clamp(8px, calc(var(--vh, 1vh) * 1.7), 16px);
  padding-inline: 18px 10px;
  border-radius: 20px;
  background:
    linear-gradient(104deg, rgb(150 170 230 / .12) 0%, rgb(150 170 230 / 0) 30%),
    linear-gradient(180deg, rgb(13 20 58 / .78) 0%, rgb(7 10 30 / .86) 100%);
  box-shadow: inset 0 0 0 1px rgb(var(--ice-rgb) / .2), 0 18px 40px -26px rgb(var(--electric-rgb) / .7);
  text-align: start;
  cursor: pointer;
  transform-origin: 50% 0;
  will-change: transform;
}
html.film #s5 .s5-row__text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
html.film #s5 .s5-row__q {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .8125rem;
  line-height: 1.25;
  color: var(--text-faint);
}
html.film #s5 .s5-row__a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
  line-height: 1.2;
  color: var(--white);
  text-wrap: balance;
}
html.film #s5 .s5-row__film {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.25;
  color: var(--amber);
}
/* la mention (Wix, Osem) : petite et discrète, mais elle se lit sans effort sur le verre sombre */
html.film #s5 .s5-row__tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .8125rem;
  line-height: 1.3;
  color: rgb(var(--white-rgb) / .72);
  text-wrap: balance;
}
html.film #s5 .s5-row__q:lang(he),
html.film #s5 .s5-row__tag:lang(he) { font-size: .8125rem; }
html.film #s5 .s5-row__a:lang(he) { font-weight: 800; }
html.film #s5 .s5-row__thumbs {
  display: flex;
  flex: none;
  gap: 6px;
}
html.film #s5 .s5-thumb {
  position: relative;
  display: block;
  height: clamp(64px, calc(var(--vh, 1vh) * 11.4), 104px);
  aspect-ratio: var(--ar);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgb(var(--ice-rgb) / .34);
}
html.film #s5 .s5-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
html.film #s5 .s5-thumb .icon {
  position: absolute;
  inset-inline-start: 4px;
  bottom: 4px;
  width: 15px;
  height: 15px;
  padding: 3px;
  border-radius: 50%;
  color: var(--white);
  background: rgb(3 5 15 / .62);
  fill: currentColor;
  stroke-width: 0;
}
html.film #s5 .s5-thumb:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ------------------------------------------------------------------ 0,45 → 0,6 : « quelques idées », seul */
html.film #s5 .s5-ideas {
  position: absolute;
  top: calc(var(--vh, 1vh) * 47);
  left: max(var(--gutter), var(--safe-l));
  right: max(var(--gutter), var(--safe-r));
  max-width: 84rem;
  margin-inline: auto;
  text-align: center;
  will-change: transform;
}
/* le mot fort ne se coupe pas : « quelques idées » reste sur une ligne */
html.film #s5 .s5-ideas .em { white-space: nowrap; }

/* ------------------------------------------------------------------ 0,6 → 1 : le contact et la fausse fin */
/* la vraie page est sur sa propre couche, comme ses copies dans les éclats : le texte est dessiné pareil des
   deux côtés de l'échange (sinon son lissage change à la première fissure) */
html.film #s5 .s5-page { will-change: transform; }
html.film :is(#s5, #s6) .s5-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s5-gap);
  width: min(100%, 35rem);
  text-align: center;
}
html.film :is(#s5, #s6) .s5-turn {
  max-width: 22ch;
  text-wrap: balance;
}
html.film :is(#s5, #s6) .s5-field {
  display: grid;
  width: 100%;
}
html.film :is(#s5, #s6) .s5-field > .pill {
  grid-area: 1 / 1;
  width: 100%;
}
/* la pilule où le site reprend la parole (« Et quand on dit quelques… ») : cachée tant qu'il se tait ; son
   curseur ne clignote pas, pour que la copie figée dans les éclats soit la même image */
html.film :is(#s5, #s6) .s5-voice { visibility: hidden; }
html.film :is(#s5, #s6) .s5-voice .pill__caret::after { animation: none; }
html.film :is(#s5, #s6) .is-frozen .s5-voice { visibility: visible; }
html.film :is(#s5, #s6) .is-frozen .s5-input { visibility: hidden; }
/* en hébreu, le texte d'attente du champ part de la droite, comme la phrase tapée dans la pilule du dessus
   (un champ vide en `dir="auto"` se range sinon à gauche) */
html.film #s5 .s5-input .pill__input:lang(he):placeholder-shown { direction: rtl; }

html.film :is(#s5, #s6) .s5-needs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: min(calc(var(--vw, 1vw) * 100 - 2 * var(--gutter)), 60rem);
}
html.film :is(#s5, #s6) .s5-send { width: 100%; }
html.film :is(#s5, #s6) .s5-send .btn { min-width: min(100%, 19rem); }
html.film :is(#s5, #s6) .s5-formats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgb(var(--white-rgb) / .72);
}
html.film :is(#s5, #s6) .s5-formats__frames {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
}
html.film :is(#s5, #s6) .s5-formats__frames i {
  display: block;
  height: 18px;
  aspect-ratio: var(--ar);
  border-radius: 3px;
  box-shadow: inset 0 0 0 1.5px rgb(var(--ice-rgb) / .62);
}

/* le pied de page : celui d'un site fini. Le logo, deux liens, la mention ; et tout en bas, la dernière ligne. */
html.film :is(#s5, #s6) .s5-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 2px;
  width: min(100%, 76rem);
  margin-top: auto;
  padding-top: 14px;
}
/* (aucune opacité écrite ici sur ce que la timeline fait paraître : elle finirait à 1 sur la vraie page et pas
   sur sa copie dans les éclats, et l'échange se verrait) */
/* le logo sans sa signature : à cette taille, ses petites lettres ne se liraient pas */
html.film :is(#s5, #s6) .s5-foot__logo {
  width: auto;
  height: 26px;
  justify-self: start;
}
html.film :is(#s5, #s6) .s5-foot__links {
  display: flex;
  gap: 4px;
  justify-self: end;
}
html.film :is(#s5, #s6) .s5-foot__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding-inline: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .875rem;
  color: var(--text-dim);
}
html.film :is(#s5, #s6) .s5-foot__links .icon { width: 1.1rem; height: 1.1rem; }
/* les mentions d'un site fini : petites, mais lisibles sans effort sur le sol et sa lueur */
html.film :is(#s5, #s6) .s5-foot__copy {
  grid-column: 1 / -1;
  font-size: max(.875rem, var(--fs-small));
  color: rgb(var(--white-rgb) / .72);
  text-align: start;
}
/* la dernière ligne est la seule chose qui dit au visiteur de continuer : discrète, mais elle se lit sans
   effort. De l'air au-dessus (elle n'est pas une mention de plus du pied de page), de l'air dessous (elle ne
   touche ni le compteur ni la barre du bas). */
html.film :is(#s5, #s6) .s5-foot__end {
  grid-column: 1 / -1;
  margin-top: clamp(10px, calc(var(--vh, 1vh) * 2.4), 24px);
  padding-bottom: clamp(4px, calc(var(--vh, 1vh) * 1.5), 14px);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: rgb(var(--white-rgb) / .8);
  text-align: center;
}

@media (min-width: 760px) {
  /* le pied de page prend toute la largeur : son logo tombe sous celui de l'en-tête, sa mention sous le bouton du son */
  html.film :is(#s5, #s6) .s5-foot {
    grid-template-columns: 1fr auto 1fr;
    width: 100%;
    padding-top: 18px;
  }
  html.film :is(#s5, #s6) .s5-foot__logo { height: 30px; }
  html.film :is(#s5, #s6) .s5-foot__links { justify-self: center; gap: 14px; }
  html.film :is(#s5, #s6) .s5-foot__copy { grid-column: auto; justify-self: end; text-align: end; }
  html.film :is(#s5, #s6) .s5-foot__end { font-size: 1rem; }
  /* sur un grand écran, le contact est le final d'un site : il se tient au milieu de ce qui reste au-dessus du
     pied de page, la phrase en grand, et la pilule, les besoins et le bouton à son échelle */
  html.film :is(#s5, #s6) .s5-page { --s5-gap: clamp(12px, calc(var(--vh, 1vh) * 3), 30px); }
  html.film :is(#s5, #s6) .s5-foot { margin-top: 0; }
  html.film :is(#s5, #s6) .s5-contact { width: min(100%, 60rem); margin-block: auto; }
  html.film :is(#s5, #s6) .s5-turn {
    max-width: 20ch;
    font-size: min(calc(var(--fs-line) * 1.36), calc(var(--vh, 1vh) * 8));
    line-height: 1.05;
    letter-spacing: -.02em;
  }
  html.film :is(#s5, #s6) .s5-field { width: min(100%, 46rem); }
  html.film :is(#s5, #s6) .s5-field > .pill {
    --pill-h: clamp(58px, calc(var(--vh, 1vh) * 8.2), 76px);
    gap: 1rem;
    padding-inline: 1.7rem 2.1rem;
  }
  html.film :is(#s5, #s6) .s5-field .pill__icon { width: 1.9rem; height: 1.9rem; }
  html.film :is(#s5, #s6) .s5-field :is(.pill__field, .pill__input) { font-size: clamp(1.25rem, calc(var(--vh, 1vh) * 2.9), 1.625rem); }
  html.film :is(#s5, #s6) .s5-needs { gap: 12px; }
  html.film :is(#s5, #s6) .s5-needs .chip {
    min-height: clamp(46px, calc(var(--vh, 1vh) * 6), 56px);
    padding-inline: 1.5rem;
    font-size: clamp(.9375rem, calc(var(--vh, 1vh) * 1.9), 1.0625rem);
  }
  html.film :is(#s5, #s6) .s5-send .btn {
    --btn-h: clamp(56px, calc(var(--vh, 1vh) * 7.6), 70px);
    min-width: min(100%, 23rem);
    padding-inline: 2.6rem;
    font-size: clamp(1.0625rem, calc(var(--vh, 1vh) * 2.3), 1.25rem);
  }
  html.film :is(#s5, #s6) .s5-send .btn .icon { width: 1.6rem; height: 1.6rem; }
  html.film :is(#s5, #s6) .s5-formats { gap: 14px; font-size: 1rem; }
  html.film :is(#s5, #s6) .s5-formats__frames i { height: 22px; }
  html.film #s5 .s5-ask__pill,
  html.film #s5 .s5-rows { width: min(100%, 40rem); }
  html.film #s5 .s5-rows { gap: 7px; margin-top: 12px; }
  html.film #s5 .s5-row { padding-block: 12px; padding-inline: 24px 12px; gap: 20px; }
  html.film #s5 .s5-thumb { height: clamp(64px, calc(var(--vh, 1vh) * 8.6), 84px); border-radius: 9px; }
  html.film #s5 .s5-row__q { font-size: .86rem; }
  html.film #s5 .s5-row__a { font-size: 1.35rem; }
  html.film #s5 .s5-row__film { font-size: .98rem; }
  html.film #s5 .s5-row__tag { font-size: .8125rem; }
}

/* un écran bas (téléphone en 700 de haut, ordinateur en 640) : tout se resserre, rien ne disparaît */
@media (max-height: 760px) {
  html.film :is(#s5, #s6) .s5-contact .chip { min-height: 44px; }
  html.film :is(#s5, #s6) .s5-contact .btn--lg { --btn-h: 52px; }
  html.film :is(#s5, #s6) .s5-contact .pill { --pill-h: 52px; }
  html.film :is(#s5, #s6) .s5-foot__logo { height: 23px; }
  html.film :is(#s5, #s6) .s5-foot__links a { min-height: 40px; }
}
@media (max-height: 620px) {
  html.film #s5 .s5-row { padding-block: 7px; }
}
/* un ordinateur bas : les réponses se resserrent, et le final garde de l'air au-dessus de l'horizon */
@media (min-width: 760px) and (max-height: 760px) {
  html.film #s5 .s5-row { padding-block: 7px; }
}
@media (min-width: 760px) and (max-height: 700px) {
  html.film :is(#s5, #s6) .s5-page { --s5-gap: 13px; }
  html.film :is(#s5, #s6) .s5-turn { font-size: calc(var(--vh, 1vh) * 7); }
  html.film :is(#s5, #s6) .s5-foot__end { margin-top: 6px; padding-bottom: 2px; }
}

/* ------------------------------------------------------------------ sans le film : la page qui se lit */
html:not(.film) #s5 .s5-thumb img { width: calc(6rem * var(--ar)); max-height: 6rem; }
html:not(.film) #s5 .s5-row__thumbs { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
html:not(.film) #s5 .s5-row__a { font-weight: 700; color: var(--white); }
html:not(.film) #s5 .s5-row__film { color: var(--amber); }
html:not(.film) #s5 .s5-row__tag { font-size: .8125rem; color: var(--text-faint); }
html:not(.film) #s5 .s5-formats__frames { display: none; }
html:not(.film) #s5 .s5-foot__links { display: flex; gap: var(--s-4); }
html:not(.film) #s5 .s5-foot__logo { width: auto; height: 2.25rem; }
