/* AnonyPhoto Cloud — la galerie (22/11/2026). Couleurs et boutons : ceux de
   la suite (commun/theme.css). */

.ph-page { width: 100%; max-width: 1100px; margin: 0 auto; padding: 14px 14px 40px; }
.ph-cadre { min-height: 40vh; }

.ph-entete h1 { margin: 6px 0 4px; font-size: 1.45rem; }
.ph-etat { margin: 0 0 10px; color: var(--doux); font-size: .95rem; }
.ph-alerte {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fbecea;
  color: var(--danger);
  font-size: .92rem;
}
.ph-outils { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ph-info { margin: 0 0 10px; color: var(--texte); font-size: .92rem; }

/* Ordinateur : la zone qui couvre la page pendant qu'on y glisse des photos (28/11). */
.ph-depot {
  position: fixed;
  inset: 12px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 3px dashed var(--vert);
  border-radius: 16px;
  background: rgba(231, 242, 233, .94);
  color: var(--texte);
  text-align: center;
  pointer-events: none;
}
.ph-depot[hidden] { display: none; }
.ph-depot p { margin: 0; padding: 0 16px; }
.ph-depot-titre { font-size: 1.4rem; font-weight: 600; color: var(--vert); }

.ph-bouton { background: #fff; color: var(--vert); border-color: #b9d4bd; min-height: 44px; }
.ph-bouton:disabled { opacity: .6; cursor: progress; }
.ph-principal { background: var(--vert); color: #fff; border-color: var(--vert); font-weight: 600; }
.ph-danger { color: var(--danger); border-color: #e7bdb9; }

.ph-vide p { margin: 6px 0; }
.ph-fermee h1 { margin: 0 0 8px; font-size: 1.3rem; color: var(--texte); }

.ph-jour { margin: 0 0 22px; }
.ph-jour h2 { margin: 0 0 8px; font-size: 1rem; color: var(--texte); }
.ph-jour h2::first-letter { text-transform: uppercase; }
.ph-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }

.ph-tuile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #d9e3dc;
}
.ph-tuile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .15s; }
.ph-tuile.ph-chargee img { opacity: 1; }
.ph-tuile.ph-manquante { background: repeating-linear-gradient(45deg, #d9e3dc, #d9e3dc 8px, #cbd8cf 8px, #cbd8cf 16px); }
.ph-tuile:focus-visible { outline: 3px solid var(--vert); outline-offset: 2px; }
.ph-pastille {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(28, 43, 33, .82);
  color: #fff;
  font-size: .72rem;
}

.ph-visionneuse {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: rgba(12, 18, 14, .96);
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
}
.ph-vue {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ph-grande { max-width: 100%; max-height: 100%; object-fit: contain; }
.ph-grande:not([src]) { display: none; }

/* Zoom de la visionneuse (28/11) : la photo agrandie ne déborde pas du cadre ;
   le cadre reçoit tous les gestes (pas de défilement ni de zoom de la page). */
.ph-vue { overflow: hidden; touch-action: none; }
.ph-grande { cursor: zoom-in; transform-origin: 50% 50%; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.ph-vue.ph-zoome .ph-grande { cursor: grab; }
.ph-vue.ph-glisse .ph-grande { cursor: grabbing; }
.ph-zoom { position: absolute; right: 8px; bottom: 8px; z-index: 1; display: flex; gap: 6px; }
.ph-zoom[hidden] { display: none; }
.ph-bouton.ph-zoom-bouton {
  min-width: 44px;
  padding: 0 12px;
  background: rgba(12, 18, 14, .72);
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}
.ph-bouton.ph-zoom-bouton:disabled { opacity: .35; cursor: default; }
.ph-bouton.ph-zoom-ajuster { font-size: .92rem; }
.ph-zoom-ajuster[hidden] { display: none; }
.ph-message { position: absolute; color: #e8f3ea; margin: 0; text-align: center; padding: 0 16px; }
.ph-message:empty { display: none; }
.ph-legende { margin: 8px 0; color: #cfdcd3; font-size: .88rem; text-align: center; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.ph-dialogue { border: 0; border-radius: 14px; padding: 20px; max-width: min(92vw, 420px); }
.ph-dialogue::backdrop { background: rgba(12, 18, 14, .55); }
.ph-dialogue p { margin: 0 0 16px; }

@media (min-width: 700px) {
  .ph-grille { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
}
