/* ---------- 12/10 · « Je remplace… » (public/video.js › ouvrirRemplacer) ----------
   Une page en QUATRE étapes (12/10 soir, Lisa) : la vidéo, ce qui change, les réglages, la vidéo finale. 13/10 : les quatre passent par Seedance (modèle, qualité, IA qui rédige, prompt relisible). Au dessin de la vidéo cinématique : .ci-page,
   .ci-etapes (quatre cases, deux par ligne au téléphone), .ci-onglets, .ci-minis, .depot viennent de video-cinema.css et d'app.css. Ici, seulement ce qui
   est propre à cette page, sous .rp-page. Textes à 14 px au moins, graisse 600 au plus, jamais de noir (texte --bx). */
.rp-page { max-width: 860px; }
.rp-page .rp-bloc h2 { margin: 0 0 4px; }
.rp-page .rp-bloc > h2 + .rp-question, .rp-page .rp-bloc > h2 + .ph-titre-aide { margin-top: 18px; }
.rp-question { display: block; font-size: 15.5px; font-weight: 600; margin: 26px 0 10px; }
.rp-question .ci-opt { font-weight: 400; }
.rp-page .ci-onglets + .ci-note { margin: 10px 0 0; }
.rp-page .ph-depot-bloc { margin: 0; }
.rp-page .ph-combine { margin: 0 0 12px; }
.rp-page .ci-zone { min-height: 84px; }
.rp-page .ci-actions { margin-top: 22px; }
.rp-page #rp-msg:empty { display: none; }

/* Étape 1 : mes vidéos, ou le fichier choisi */
.rp-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.rp-video { padding: 0; border: 0; background: none; color: var(--bx); font: inherit; cursor: pointer; text-align: left; min-width: 0; }
.rp-video-img { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--surface); border: 2px solid rgba(23,70,63,.12); transition: border-color .2s, box-shadow .2s; }
.rp-video-img video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.rp-video:hover .rp-video-img { border-color: rgba(31,91,82,.45); }
.rp-video.on .rp-video-img { border-color: var(--bx2); box-shadow: 0 0 0 2px rgba(31,91,82,.18); }
.rp-video.on .ci-mini-coche { display: grid; }
.rp-video:focus-visible .rp-video-img { outline: 2px solid var(--or); outline-offset: 2px; }
.rp-video-nom { display: block; margin-top: 6px; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-choisie { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rp-choisie video { flex: none; width: 150px; max-height: 266px; border-radius: 14px; background: var(--surface); display: block; }
.rp-choisie-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.rp-choisie-txt b { font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; }
.rp-choisie-txt span { color: var(--encre2); font-size: 14.5px; }
.rp-autre { margin-top: 10px; cursor: pointer; }
.rp-page .depot.survol { border-color: var(--bx2); background: var(--ok-fond); }

/* ---------- 13/10 (Lisa) · le pied d'étape, commun à « Je remplace… » (.rp-page) et « Reproduire une vidéo » (.rv-page) ----------
   Les boutons « étape précédente / étape suivante » vivent EN DEHORS des encadrés blancs (.ci-pied-etapes est un frère de la .ci-bloc, jamais dedans).
   Ordinateur : côte à côte en bas, le retour à gauche, le bouton qui avance à droite. Téléphone : l'un sous l'autre, pleine largeur, celui qui avance en haut.
   Posé une seule fois ici (remplacer.css est relié dans index.html) ; la même règle vaudrait dans app.css pour la cinématique (.ci-pied). */
.ci-pied-etapes { margin: 4px 0 26px; }
.ci-pied-etapes .btn { white-space: nowrap; }
.ci-pied-etapes .btn:not(.second) { min-width: 0; }
@media (max-width: 760px) {
  .ci-pied-etapes { flex-direction: column-reverse; align-items: stretch; gap: 10px; margin-top: 16px; }
  .ci-pied-etapes .btn, .ci-pied-etapes a.btn { flex: none; width: 100%; justify-content: center; text-align: center; white-space: normal; padding: 13px 14px; }
  .ci-pied-etapes .droite { display: none; }
}

/* Étape 2 : les pastilles Pinterest · Importer (la tenue d'un personnage, la nouvelle tenue, le nouveau décor, chaque case du look ; 30/10 : plus de « Décrire », Genjutsu exige une image) */
.rp-voies { margin-top: 12px; }
/* 30/10 (Lisa) · « Je change de look » : trois cases à cocher, Coiffure · Tenue · Maquillage, au dessin des deux options de la tenue (.tn-opt) ; côte à côte sur ordinateur, l'une sous
   l'autre au téléphone. Le conseil pour la photo (.rp-conseil) se pose juste sous la question, en 14,5 px, jamais de noir. */
.rp-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rp-case { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 56px; padding: 12px 16px; border: 1px solid rgba(27,33,31,.18); border-radius: 14px; background: #fff; color: var(--bx); font-size: 15.5px; font-weight: 500; line-height: 1.3; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.rp-case:hover { border-color: rgba(31,91,82,.45); }
.rp-case:has(input:focus-visible) { outline: 2px solid var(--bx2); outline-offset: 2px; }
.rp-case.on { border-color: var(--bx2); background: var(--doux); box-shadow: 0 0 0 1px var(--bx2) inset; font-weight: 600; }
.rp-case input { width: 20px; height: 20px; margin: 0; accent-color: var(--bx2); flex: none; cursor: pointer; }
.rp-conseil { margin: -2px 0 10px; font-size: 14.5px; line-height: 1.45; color: var(--encre2); }
@media (max-width: 760px) { .rp-cases { grid-template-columns: minmax(0, 1fr); } }
.rp-voies .ph-pin { margin-top: 0; }
.rp-voies .ci-zone { min-height: 72px; }
.rp-voies .ph-combine { margin: 0 0 12px; }
.rp-page .ph-pin-msg:empty { display: none; }

/* 13/10 (Lisa) · le choix de la tenue (choixTenue, video.js), commun à « Je remplace un personnage » et à « Reproduire une vidéo » : deux options nettes, l'une OU l'autre.
   Deux cases côte à côte sur ordinateur, l'une sous l'autre au téléphone ; un rond plein dit laquelle est choisie. Elles ne ressemblent pas aux pastilles
   Pinterest · Importer · Décrire, qui n'apparaissent que sous « Remplacer la tenue ». */
.tn-choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-opt { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 56px; padding: 12px 16px; border: 1px solid rgba(27,33,31,.18); border-radius: 14px; background: #fff; color: var(--bx); font: inherit; font-size: 15.5px; font-weight: 500; line-height: 1.3; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.tn-opt:hover { border-color: rgba(31,91,82,.45); }
.tn-opt:focus-visible { outline: 2px solid var(--bx2); outline-offset: 2px; }
.tn-opt.on { border-color: var(--bx2); background: var(--doux); box-shadow: 0 0 0 1px var(--bx2) inset; font-weight: 600; }
.tn-rond { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(27,33,31,.28); background: #fff; }
.tn-opt.on .tn-rond { border-color: var(--bx2); background: radial-gradient(circle, var(--bx2) 0 5px, #fff 6px); }
.rp-page .rp-question.rp-sous-question { margin-top: 18px; }
@media (max-width: 760px) { .tn-choix { grid-template-columns: minmax(0, 1fr); } }

/* Étape 3 (13/10, Lisa) : un encadré par sujet, comme l'étape Réglages de « Reproduire » : le modèle, la qualité, la durée (celle de la vidéo), les indications, l'IA qui rédige */
.rp-page .rp-reglage h2 { margin: 0 0 12px; }
.rp-page .rp-reglage .vlb-tete h2 { font-size: 22px; margin: 0; }
.rp-page .rp-reglage .vlb-tete label { font: inherit; color: inherit; margin: 0; }
.rp-page .rp-reglage .cia-zone { margin-top: 0; }
.rp-duree { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.rp-duree b { font-size: 22px; font-weight: 600; }
.rp-duree span { font-size: 15px; color: var(--encre2); }
.rp-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--ok-fond); font-size: 14.5px; line-height: 1.45; color: var(--bx); }
.rp-page .vlb-aide.rp-sous { margin: 10px 0 0; }
.rp-page .cia-zone { margin-top: 8px; }
.rp-page #rp-ecrire-zone .vlb-valider { margin-top: 14px; }
.rp-page #rp-recap .vlb-recap { margin: 0; box-shadow: none; }
.rp-page #rp-recap .vlb-regen { margin-top: 0; }
.rp-page .vlb-modifs .ci-label { margin-top: 4px; }
.rp-page .vlb-rep dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rp-page .vlb-rep dd .vlb-vignettes img, .rp-page .vlb-rep dd .vlb-vignettes video { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface); display: block; }
.rp-page .vlb-rep dd small { margin-top: 0; }
/* Sous les encadrés de l'étape 3 : sans clé Higgsfield, le lien pour la brancher ; le mot quand une vidéo est déjà prête */
.rp-page #rp-pied-infos { margin: 0 0 16px; }
.rp-page #rp-pied-infos .ci-avert { margin: 0 0 8px; }
.rp-page #rp-pied-infos .ci-note { margin: 0; }
.rp-page #rp-pied-infos:empty, .rp-page #rp-pied-infos:not(:has(*)) { display: none; }

.rp-page .rp-bloc .ci-zone + .rp-question { margin-top: 22px; }
.rp-recap { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 22px; margin-top: 16px; }
.rp-question + .rp-recap { margin-top: 0; }
/* Le rappel (ancien dessin, gardé pour l'étape 4) et l'étape 4 : l'attente, le résultat, une autre version */
.rp-recap-nom { font-size: 15.5px; font-weight: 600; margin: 0 0 10px; }
.rp-recap-video { width: 100%; max-height: 340px; border-radius: 14px; background: var(--surface); display: block; }
.rp-recap-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-recap-photos img { width: 76px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--surface); display: block; }
.rp-phrase { margin: 20px 0 0; font-size: 16px; }
.rp-indic { margin: 8px 0 0; }
.rp-page #rp-action { margin-top: 20px; }
.rp-page #rp-action .ci-attente { padding: 6px 0 2px; }
.rp-page #rp-action .rp-generer { margin-top: 0; }
.rp-page #rp-action .ci-erreur { margin: 0 0 14px; }
.rp-resultat video { display: block; width: 100%; max-width: 320px; border-radius: 16px; background: var(--surface); }
.rp-ailleurs { margin-top: 4px; }
.rp-ailleurs-tete { border: 0; background: none; padding: 6px 0; color: var(--encre2); font: inherit; font-size: 14.5px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rp-ailleurs-tete:hover { color: var(--bx2); }
.rp-ailleurs #bloc-ranger { margin-top: 8px; max-width: 520px; }
.rp-ailleurs #rg-url { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; color: var(--bx); background: #fff; border: 1px solid rgba(27,33,31,.18); border-radius: 12px; padding: 9px 12px; }

@media (max-width: 760px) {
  .rp-recap { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .rp-recap-video { max-width: 190px; }
  .rp-choisie { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rp-page .ci-actions .btn { flex: 1 1 auto; justify-content: center; }
  .rp-videos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}

/* 13/10 (Lisa) : le message posé juste au-dessus du bouton « Générer ma vidéo » (étape 3, hors de la carte) ou de « Relancer » (étape 4) : une erreur, le motif d'un rendu raté */
.rp-msg-pied:empty { display: none; }
.rp-msg-pied { margin: 0 0 12px; }
.rp-page .rp-bloc .rp-msg-pied { margin: 16px 0 0; }
.rp-msg-pied .erreur { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.rp-page .rp-lancer[disabled] { opacity: .75; cursor: progress; }
/* Au téléphone, le message se glisse entre « ← retour » et le bouton qui génère : il reste collé au bouton (.ci-pied-zone entoure le message et le pied d'étape, ici et dans « Reproduire »). */
@media (max-width: 760px) {
  .ci-pied-zone { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin: 16px 0 26px; }
  .ci-pied-zone > .ci-pied-etapes { display: contents; }
  .ci-pied-zone .ci-pied-etapes > .btn.second { order: 1; }
  .ci-pied-zone > .rp-msg-pied, .ci-pied-zone > .rv-msg-pied { order: 2; margin: 0; }
  .ci-pied-zone .ci-pied-etapes > .btn:not(.second) { order: 3; }
}

/* ---------- 29/10 (Lisa) · Genjutsu : la photo de départ (motion transfer) et le prix estimé ----------
   La photo de départ : deux cases côte à côte (la première image de la vidéo, la photo créée), l'une sous l'autre au téléphone étroit. Le prix : une ligne par poste,
   le total en dernier. Textes à 14 px au moins, graisse 600 au plus, jamais de noir. */
.rp-depart { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0 4px; max-width: 460px; }
.rp-ia-photo { margin-top: 22px; }
.rp-depart-case { margin: 0; min-width: 0; }
.rp-depart-case figcaption { font-size: 14px; font-weight: 600; color: var(--encre2); margin: 0 0 8px; }
.rp-depart-neuve figcaption { color: var(--bx); }
.rp-depart-img { position: relative; width: 100%; max-height: 400px; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid rgba(23,70,63,.12); display: grid; place-items: center; }
.rp-depart-neuve .rp-depart-img { border: 2px solid rgba(163, 205, 185,.55); }
.rp-depart-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-depart-img .attente { padding: 14px; font-size: 14px; text-align: center; }
.rp-depart-vide { padding: 16px; font-size: 14px; color: var(--encre2); text-align: center; line-height: 1.4; }
.rp-valide { display: flex; align-items: center; gap: 6px; color: var(--bx2); }
.rp-page .vlb-tete.rp-question { display: flex; align-items: baseline; gap: 10px; }
.rp-page .vlb-tete.rp-question label { font-weight: 600; }
@media (max-width: 380px) { .rp-depart { gap: 10px; } }
.rp-prix { display: flex; flex-direction: column; gap: 8px; }
.rp-prix-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; font-size: 15px; }
.rp-prix-ligne span { color: var(--encre2); min-width: 0; }
.rp-prix-ligne b { font-weight: 600; white-space: nowrap; }
.rp-prix-total { margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(23,70,63,.12); font-size: 16.5px; }
.rp-prix-total span { color: var(--bx); font-weight: 600; }
#rp-pied-photo .ci-pied-etapes .btn + .btn { margin-left: 10px; }
@media (max-width: 760px) { #rp-pied-photo .ci-pied-etapes .btn + .btn { margin-left: 0; } }
/* 29/10 : le fil à cinq étapes (motion transfer) montre les mots courts partout, sur une seule ligne dès que la place le permet. */
.rp-etapes.ci-etapes-5 .ci-long { display: none; }
.rp-etapes.ci-etapes-5 .ci-court { display: inline; }
@media (min-width: 761px) { .rp-etapes.ci-etapes-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); } .rp-etapes.ci-etapes-5 .ci-etape { white-space: nowrap; } }

/* ---------- 05/11 (Tamya) · « Ta proposition » (swap), la préparation et l'inventaire des photos, « Retourner la photo » ----------
   Les panneaux .tf-prep et .sw-inv viennent de swap-commun.css ; ici, leur place sous les photos, la proposition à relire, la coiffure à ta couleur et l'aperçu de la
   première scène. Textes à 14 px au moins, graisse 600 au plus, jamais de noir. */
.rp-suivi { margin-top: 12px; }
.rp-suivi + .rp-suivi { margin-top: 16px; }
.rp-suivi-num { font-size: 14px; font-weight: 600; color: var(--encre2); margin: 0 0 6px; }
.rp-suivi .tf-prep, .rp-suivi .sw-inv { margin-top: 8px; }
.rp-suivi > .tf-prep:first-child, .rp-suivi > .sw-inv:first-child, .rp-suivi-num + .tf-prep, .rp-suivi-num + .sw-inv { margin-top: 0; }
.rp-miroir { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.rp-miroir span { font-size: 14px; color: var(--encre2); line-height: 1.4; }
.rp-prop .rp-prop-titre { margin: -2px 0 6px; }
.rp-prop .rp-ecrire { margin-top: 14px; }
.rp-prop .rp-prompt-en { font-size: 14.5px; color: var(--encre2); }
.rp-prop .ci-cout { font-weight: 400; opacity: .85; }
.rp-prop .rp-note + .ci-rc-boutons { margin-top: 10px; }
.rp-img-bloc { display: grid; gap: 10px; }
.rp-img-bloc + .rp-img-bloc { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(23,70,63,.12); }
.rp-img-bloc > b { font-size: 15.5px; font-weight: 600; }
.rp-img-bloc h2 { margin: 0; }
.rp-img-bloc .ci-note, .rp-img-bloc .ci-aide, .rp-img-bloc .rp-note { margin: 0; }
.rp-img-bloc .ci-slot-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-img { position: relative; justify-self: start; max-width: min(100%, 320px); border-radius: 14px; overflow: hidden; background: var(--surface); border: 2px solid rgba(163, 205, 185,.55); }
.rp-img img { display: block; width: 100%; height: 100%; max-height: 460px; object-fit: cover; }
.rp-apercu { width: 100%; }
.rp-prop-manque { margin-top: 0; margin-bottom: 10px; }
.rp-prop-manque a { font-weight: 600; white-space: nowrap; }
#rp-pied-prop .ci-pied-etapes { margin-top: 0; }
@media (max-width: 520px) { .rp-img { max-width: 100%; } .rp-img-bloc .ci-slot-actions .btn { flex: 1 1 auto; justify-content: center; } }
