/* Page Photo, retours du 12/10 (Lisa). Posée par photo.js. Rien ici ne restyle l'ordinateur : on affine. */

/* B. Zones de dépôt : « Glisse ou clique … » à l'ordinateur, « Touche pour choisir … » au téléphone. */
.ph-dp-tel { display: none; }
@media (max-width: 640px) { .ph-dp-ordi { display: none; } .ph-dp-tel { display: inline; } }

/* C. Le bouton Pinterest, le même que dans la vidéo cinématique (video-cinema.css), à côté de « Valider ». */
.ph-pin { align-items: center; flex-wrap: nowrap; }
.ph-pin input { flex: 1 1 0; min-width: 0; }
.ph-pin .btn { flex: none; }
.ph-pin a.ph-pin-chercher { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: #fff; border: 1px solid rgba(27,33,31,.18); color: #BD081C !important; text-decoration: none; transition: border-color .2s, transform .2s; }
.ph-pin a.ph-pin-chercher:hover { border-color: #BD081C; transform: translateY(-1px); }
.ph-pin a.ph-pin-chercher:focus-visible { outline: 2px solid var(--bx2); outline-offset: 2px; }
@media (max-width: 640px) {
  .ph-pin { gap: 6px; }
  .ph-pin input { padding-left: 10px; padding-right: 10px; }
  .ph-pin .btn { min-height: 44px; padding-left: 12px; padding-right: 12px; }
  .ph-pin a.ph-pin-chercher { width: 44px; height: 44px; }
}

/* E. Le numéro de chaque photo importée : « Photo 1 », cliquable, il cite la photo dans le texte. */
.ph-num { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; display: flex; align-items: flex-end; justify-content: flex-start; padding: 0 0 5px 5px; border: 0; background: linear-gradient(rgba(15,35,32,0), rgba(15,35,32,.42)); cursor: pointer; font: inherit; }
.ph-num span { background: var(--bx2); color: #fff; font-size: 14px; font-weight: 500; line-height: 1; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.ph-num:hover span, .ph-num:focus-visible span { background: #fff; color: var(--bx2); }
.ph-num:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.section .ph-tag.ph-tag-titre { pointer-events: auto; border: 0; cursor: pointer; font-family: inherit; padding: 4px 9px; }

/* Le petit « i » à côté du titre du champ, et son explication (au clic, donc au doigt aussi). */
.ph-titre-aide { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ph-aide-btn { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--bx2); background: transparent; color: var(--bx2); font: inherit; font-size: 14px; font-weight: 600; font-style: normal; line-height: 1; text-transform: none; letter-spacing: 0; padding: 0; cursor: pointer; }
.ph-aide-btn::after { content: ""; position: absolute; inset: -10px; }
.ph-aide-btn[aria-expanded="true"] { background: var(--bx2); color: #fff; }
.ph-aide-btn:focus-visible { outline: 2px solid var(--bx2); outline-offset: 2px; }
.ph-aide-txt { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: var(--ok-fond); color: var(--bx); font-size: 14px; line-height: 1.5; }
.ph-aide-txt[hidden], .ph-orphelins[hidden] { display: none; }
.ph-orphelins { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: #A1302A; }
@media (max-width: 640px) {
  .ph-tags { gap: 8px; }
  .ph-tag-btn { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .section .ph-tag.ph-tag-titre { min-height: 32px; padding: 0 12px; }
}

/* A. Une photo générée ouverte en grand : au téléphone, les actions se rangent deux par deux, lisibles et faciles à toucher. */
@media (max-width: 640px) {
  .ph-zoom-photo { gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .ph-zoom-photo img { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
  .ph-zoom-photo .ph-zoom-act { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 8px; width: 100%; max-width: 420px; }
  .ph-zoom-photo .ph-zoom-act .btn { min-width: 0; min-height: 48px; padding: 8px 10px; justify-content: center; text-align: center; font-size: 15px; line-height: 1.25; white-space: normal; }
}

/* G. Le menu des catégories de la bibliothèque : des pastilles légères qui passent à la ligne ; au téléphone, un bouton « Catégorie : … » qui déplie la grille. */
.ph-cats { margin: 0 0 20px; }
.ph-cats-btn { display: none; }
.ph-cats-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-cat { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(27,33,31,.16); background: var(--carte); color: var(--bx); font: inherit; font-size: 14.5px; font-weight: 500; line-height: 1.2; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.ph-cat:hover { border-color: var(--bx2); }
.ph-cat:focus-visible, .ph-cats-btn:focus-visible { outline: 2px solid var(--bx2); outline-offset: 2px; }
.ph-cat .n { font-size: 14px; font-weight: 400; color: var(--encre2); }
.ph-cat.on { background: var(--bx2); border-color: var(--bx2); color: #fff; }
.ph-cat.on .n { color: rgba(255,255,255,.78); }
.ph-cat.ph-cat-mes:not(.on) { border-color: rgba(201,162,74,.6); color: var(--or-texte); }
.ph-cat.ph-cat-mes:not(.on) .n { color: var(--or-texte); }
@media (max-width: 640px) {
  .ph-cats-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid rgba(27,33,31,.16); background: var(--carte); color: var(--bx); font: inherit; font-size: 15px; font-weight: 400; text-align: left; cursor: pointer; }
  .ph-cats-btn b { font-weight: 600; }
  .ph-cats-btn svg { flex: none; transition: transform .2s; }
  .ph-cats.ouvert .ph-cats-btn svg { transform: rotate(180deg); }
  .ph-cats-liste { display: none; }
  .ph-cats.ouvert .ph-cats-liste { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
  .ph-cat { min-height: 44px; padding: 6px 10px; text-align: center; }
}

/* F. Un prompt de la bibliothèque : on choisit le personnage, l'ajence choisit ses photos. */
.ph-un-note { margin: 8px 0 0; font-size: 14px; color: var(--encre2); }
.ph-page .num-etape { font-size: 14px; }
