/* ═══════════════════════════════════════════════════════════════════
   Randozone — Fiche photo (photo-bs5.php)
   Bootstrap 5. Seule autre source autorisée : rz-bs5.css.
   Inspiré de migration/Randozone-Photo-Pujols-BS5.html (maquette Claude Design),
   recoloré/adapté aux tokens rz-bs5.css. Icônes : sprite rz-icons.svg only
   (la maquette utilisait Bootstrap Icons — remplacées ici).
   Les helpers hv-*/.sb-card/.rz-comments vivent déjà dans rz-bs5.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Meta sous le H1 (auteur / date / id) — pastilles, façon V3 du
   styleguide « Blocs signature » (migration/claude/Randozone Blocs Signature
   Bootstrap.html, .sg-chip). Recoloré aux tokens rz-bs5.css. ──────────── */
.photo-meta-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.photo-meta-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .82rem; font-weight: 500; color: var(--rz-ink);
  background: var(--rz-surface); border: 1px solid var(--rz-border);
  border-radius: 999px; padding: .42rem .85rem; text-decoration: none;
}
.photo-meta-chip .rz-ico { width: .95rem; height: .95rem; color: var(--rz-primary); flex-shrink: 0; }
.photo-meta-chip .k { color: var(--rz-inksoft); }
.photo-meta-chip b { font-weight: 600; }
a.photo-meta-chip:hover {
  border-color: color-mix(in oklch, var(--rz-primary) 35%, white);
  background: color-mix(in oklch, var(--rz-primary) 5%, white);
}

/* ── Stage photo ──────────────────────────────────────────────────────
   Deux régimes selon la largeur réelle de l'image ($stageWide, voir
   photo-bs5.php + stage.php) :
   - .photo-stage-hd     : image > 750px, rendue dans $blocks['topband']
     (largeur du gabarit .rz-container). Centrée, jamais agrandie au-delà
     de sa taille native (max 1200px de large).
   - .photo-stage-native : image <= 750px (uploads anciens/portraits),
     rendue en tête de colonne principale. Jamais agrandie, alignée à
     gauche.
   .stage-figure épouse la largeur de .photo-stage (fit-content) pour que
   .stage-bar (le bandeau « Plein écran » sous l'image) suive la même
   largeur au lieu de s'étirer sur toute la colonne. ───────────────────── */
.stage-figure { width: fit-content; max-width: 100%; margin: 0; }
.stage-figure.stage-figure-hd { margin-inline: auto; }
.stage-figure.stage-figure-native { margin-bottom: 1.5rem; }

.photo-stage {
  position: relative; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 70px -34px rgba(10, 20, 40, .6);
}
.photo-stage img { display: block; width: 100%; height: auto; }

/* hd = 1 : bandeau pleine largeur (.rz-container) — contrainte à 1200px. */
.photo-stage-hd { max-width: min(100%, 1200px); }

/* hd = 0 : colonne principale — taille native, jamais agrandie. */
.photo-stage-native { max-width: 100%; }

.photo-stage-pays { width: 100%; height: auto; display: block; }

/* Boutons précédent/suivant flottants sur le stage (desktop) */
.stage-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(15, 22, 38, .42); border: 1px solid rgba(255, 255, 255, .28);
  color: #fff; display: grid; place-items: center;
  cursor: pointer; transition: background .2s; backdrop-filter: blur(6px); z-index: 2;
}
.stage-nav:hover, .stage-nav:focus-visible { background: rgba(15, 22, 38, .72); }
.stage-nav .rz-ico { width: 1.3rem; height: 1.3rem; }
.stage-nav.prev { left: 1rem; }
.stage-nav.next { right: 1rem; }

.stage-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: .75rem; padding: .7rem 1.1rem;
  background: var(--rz-surface); border: 1px solid var(--rz-border); border-top: 0;
  border-radius: 0 0 16px 16px; margin-top: -16px; padding-top: calc(.7rem + 16px);
}
.stage-tool {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .74rem; font-weight: 600; color: var(--rz-ink);
  background: var(--rz-surface-2); border: 1px solid var(--rz-border);
  border-radius: 999px; padding: .34rem .75rem; cursor: pointer;
  transition: border-color .18s, color .18s; text-decoration: none;
}
.stage-tool:hover { border-color: var(--rz-primary); color: var(--rz-primary); }
.stage-tool .rz-ico { width: .95rem; height: .95rem; }

@media (max-width: 575px) {
  .stage-nav { width: 42px; height: 42px; }
  .stage-nav .rz-ico { width: 1.1rem; height: 1.1rem; }
}

/* ── Carte « une photo de la page » (relations) ────────────────────── */
.photo-rel-list { display: flex; flex-direction: column; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.photo-rel-card {
  display: flex; align-items: center; gap: .85rem;
  background: var(--rz-surface); border: 1px solid var(--rz-border); border-radius: 14px;
  padding: .6rem 1rem .6rem .6rem; text-decoration: none; color: inherit; transition: border-color .15s;
}
.photo-rel-card:hover { border-color: var(--rz-primary); color: inherit; }
.photo-rel-card .rz-ico { color: var(--rz-primary); flex-shrink: 0; width: 1.15rem; height: 1.15rem; }
.photo-rel-thumb { width: 5rem; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.photo-rel-card .lbl { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rz-inksoft); }
.photo-rel-card .ttl { font-weight: 600; font-size: .92rem; color: var(--rz-ink); transition: color .15s; }
.photo-rel-card:hover .ttl { color: var(--rz-primary); }
.photo-rel-card .go-icon { color: var(--rz-inksoft); margin-left: auto; flex-shrink: 0; transition: color .15s; }
.photo-rel-card:hover .go-icon { color: var(--rz-primary); }
.photo-rel-none { font-size: .9rem; color: var(--rz-inksoft); }
.photo-rel-detach { font-size: .75rem; color: var(--rz-inksoft); }

/* ── Titres de sections (main) ─────────────────────────────────────── */
.photo-h2 {
  font-family: 'Work Sans', system-ui, sans-serif; font-weight: 600;
  font-size: 1.5rem; letter-spacing: -.01em; color: var(--rz-ink); margin: 0 0 1rem;
}
/* Variante compacte (ex. « Une photo de la page », au-dessus de la carte relations) */
.photo-h2--sub { font-size: 1.15rem; margin-bottom: .75rem; }

/* ── Bloc « à propos de cette photo » (commentaire) ────────────────── */
.photo-comment { font-size: 1rem; line-height: 1.7; color: var(--rz-ink); }
.photo-comment p:last-child { margin-bottom: 0; }

/* ── EXIF ───────────────────────────────────────────────────────────── */
.exif-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
@media (min-width: 560px) { .exif-grid { grid-template-columns: repeat(4, 1fr); } }
.exif { background: var(--rz-surface); border: 1px solid var(--rz-border); border-radius: 13px; padding: .85rem 1rem; }
.exif .k {
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rz-inksoft); display: flex; align-items: center; gap: .4rem;
}
.exif .k .rz-ico { color: var(--rz-primary); width: .95rem; height: .95rem; }
.exif .v { font-family: var(--rz-mono); font-weight: 600; font-size: .95rem; color: var(--rz-ink); margin-top: .3rem; }

/* ── Callout copyright ─────────────────────────────────────────────── */
.photo-callout {
  display: flex; gap: .85rem; align-items: flex-start;
  background: color-mix(in oklch, oklch(0.7 0.15 65) 8%, white);
  border: 1px solid color-mix(in oklch, oklch(0.7 0.15 65) 28%, white);
  border-radius: 14px; padding: .95rem 1.1rem;
}
.photo-callout .ci {
  flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%;
  background: color-mix(in oklch, oklch(0.7 0.15 65) 18%, white);
  color: oklch(0.52 0.18 55); display: grid; place-items: center;
}
.photo-callout .ci .rz-ico { width: 1.1rem; height: 1.1rem; }
.photo-callout .ct { font-weight: 700; font-size: .88rem; color: var(--rz-ink); margin-bottom: .2rem; }
.photo-callout .cb { font-size: .85rem; line-height: 1.6; color: var(--rz-inksoft); }

/* Bandeau d'avertissement « en cours de validation » */
.photo-alert-pending {
  background: color-mix(in oklch, oklch(0.62 0.2 25) 10%, white);
  border: 1px solid color-mix(in oklch, oklch(0.62 0.2 25) 30%, white);
  color: oklch(0.42 0.2 25);
  border-radius: 12px; padding: .85rem 1.05rem; font-size: .9rem; margin-bottom: 1.25rem;
}

/* ── Navigation photos (précédente / suivante, bas de colonne) ────── */
.photo-nav { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 576px) { .photo-nav { grid-template-columns: 1fr 1fr; } }
.photo-nav-card {
  display: flex; align-items: center; gap: .75rem;
  background: var(--rz-surface); border: 1px solid var(--rz-border); border-radius: 14px;
  padding: 1rem; text-decoration: none; transition: border-color .15s; color: inherit;
}
.photo-nav-card:hover { border-color: var(--rz-primary); color: inherit; }
.photo-nav-card.next { justify-content: flex-end; text-align: right; }
.photo-nav-card .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.photo-nav-card .nav-icon { color: var(--rz-inksoft); flex-shrink: 0; transition: color .15s; width: 1.2rem; height: 1.2rem; }
.photo-nav-card:hover .nav-icon { color: var(--rz-primary); }
.photo-nav-card .lbl { font-size: .7rem; color: var(--rz-inksoft); }
.photo-nav-card .ttl { font-weight: 600; font-size: .9rem; color: var(--rz-ink); transition: color .15s; }
.photo-nav-card:hover .ttl { color: var(--rz-primary); }

/* ── Sidebar : carte informations (sombre) ─────────────────────────── */
.sb-card-dark { background: var(--rz-ink); border-radius: 16px; padding: 1.25rem; color: #fff; }
.sb-info-lbl { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin-bottom: .75rem; }
.sb-info-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; font-size: .85rem; padding: .35rem 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.sb-info-row:first-child { border-top: none; padding-top: 0; }
.sb-info-row .k { color: rgba(255, 255, 255, .6); }
.sb-info-row .v, .sb-info-row a.v { font-weight: 600; color: #fff; text-decoration: none; font-family: var(--rz-mono); }
.sb-info-row a.v:hover { opacity: .8; }
.sb-info-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  background: #fff; color: var(--rz-ink); font-size: .82rem; font-weight: 600;
  border-radius: 999px; padding: .55rem 1rem; margin-top: .9rem; text-decoration: none;
}
.sb-info-btn .rz-ico { width: 1rem; height: 1rem; }
.sb-info-btn:hover { opacity: .88; color: var(--rz-ink); }

/* Avertissement suppression demandée (fond sombre .sb-card-dark) */
.sb-warning { margin-top: .9rem; font-size: .8rem; color: #ffb4b4; }

/* Sidebar « Explorer » : rendue avec .sb-card/.sb-head/.sb-links (rz-bs5.css) — pas de classe dédiée ici. */

/* Pub sidebar (non-admin) — marge basse pour l'écarter du bloc précédent/suivant */
.sb-pub { margin-bottom: 1.5rem; }

/* ── Bloc admin — zone de dépôt d'image (Dropzone) ──────────────────────
   Habille le plugin Dropzone (js/dzone/) aux couleurs du design system —
   ne touche pas au JS (previews, barre de progression au moment de l'upload
   restent gérés par dropzone.min.css). Classes génériques .rz-dz-* : voir
   styleguide/sidebar.php #s-sbdropzone. ──────────────────────────────── */
.photo-admin-upload { padding: .9rem 1.15rem 1.05rem; border-top: 1px solid var(--rz-border); }
.rz-dz {
  border: 1.5px dashed var(--rz-border); border-radius: 12px;
  background: var(--rz-surface-2); padding: .6rem .8rem;
  transition: border-color .15s, background .15s; cursor: pointer;
}
.rz-dz:hover, .rz-dz.dz-drag-hover {
  border-color: var(--rz-primary);
  background: color-mix(in oklch, var(--rz-primary) 6%, white);
}
.rz-dz .dz-message {
  display: flex; align-items: center; gap: .6rem; text-align: left;
}
.rz-dz .rz-dz-ico {
  width: 1.3rem; height: 1.3rem; color: var(--rz-primary); flex-shrink: 0; margin: 0;
}
.rz-dz .dz-button {
  background: none; border: 0; padding: 0; font: inherit;
  font-size: .82rem; font-weight: 600; color: var(--rz-ink); line-height: 1.3;
  cursor: pointer; text-align: left;
}
.rz-dz .dz-button:hover { color: var(--rz-primary); }
.rz-dz-hint { display: block; margin-top: .1rem; font-size: .7rem; color: var(--rz-inksoft); font-weight: 400; }
.rz-dz-calc {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: .75rem; padding: .5rem .9rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; text-decoration: none;
  background: var(--rz-surface); border: 1px solid var(--rz-border); color: var(--rz-ink);
}
.rz-dz-calc:hover { border-color: var(--rz-primary); color: var(--rz-primary); }
