/* ---- Photographies DP7 / DP8 (PCMI7 / PCMI8) et photo du point de vue de l'insertion (DP6) ---- */
.ph-guide-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 20px; align-items: start; }
.ph-guide .mp-bubble { margin-bottom: 14px; }
.ph-h { font-size: 1rem; margin: 2px 0 10px; }
.ph-tips li { font-size: .9rem; }
.ph-ex-col { display: flex; flex-direction: column; gap: 12px; }
.ph-ex { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.ph-ex img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #eef2f7; }
.ph-ex figcaption { font-size: .8rem; color: var(--ink-soft); padding: 8px 10px; line-height: 1.4; }
.ph-ex-badge { position: absolute; top: 8px; left: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }

/* capture : les boutons sont des <label> qui ouvrent l'appareil photo ou la galerie */
.ph-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-btns .btn { position: relative; }
.ph-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none; }
.ph-btns .btn:focus-within { box-shadow: 0 0 0 3px rgba(36, 112, 221, .3); }
@media (hover: hover) and (pointer: fine) { .ph-take { display: none; } }
.ph-msg { min-height: 1.3em; margin-top: 10px; font-size: .86rem; color: var(--ink-soft); line-height: 1.45; }
.ph-msg.err { color: var(--red-600); font-weight: 600; }
.ph-msg.ok { color: var(--green-600); font-weight: 600; }
#ph-capture.over { outline: 2px dashed var(--blue-500); outline-offset: -6px; background: var(--blue-050); }
.ph-empty { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: 10px; }
.ph-cur { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(200px, 1fr); gap: 16px; align-items: start; margin-top: 10px; }
.ph-cur-img { display: block; width: 100%; max-height: 380px; object-fit: contain; background: #1c2536; border-radius: 10px; }
.ph-cur-meta { font-size: .88rem; line-height: 1.65; }
.ph-cur-meta .btn-row { margin-top: 10px; }

/* point de vue */
.ph-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.ph-maphint { margin-bottom: 8px; font-size: .84rem; color: var(--ink-soft); line-height: 1.45; }
.ph-map { height: 460px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; background: #eef2f7; }
.ph-map .notice-banner { margin: 16px; }
.ph-map > .btn { margin: 0 16px 16px; }
.ph-src { margin-bottom: 10px; }
.ph-src .badge { white-space: normal; }
.ph-facts { list-style: none; margin: 0 0 14px; font-size: .9rem; line-height: 1.6; }
.ph-facts li::before { content: "›"; color: var(--blue-500); font-weight: 900; margin-right: 8px; }
.ph-panel .field { margin-bottom: 12px; }
#ph-panel p.hint, #ph-out p.hint { font-size: .85rem; color: var(--ink-soft); line-height: 1.45; }
.ph-panel .btn-row { margin-top: 8px; }
.ph-checks li { font-size: .9rem; }

/* marqueurs Leaflet : appareil (tourné dans la direction du regard) et cible */
.ph-cam-mk, .ph-tgt-mk { background: none; border: none; }
.ph-cam-ic { width: 34px; height: 34px; transform-origin: 50% 50%; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); cursor: move; }
.ph-cam-ic svg { display: block; }
.ph-tgt-ic { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--ph-c, #1d4ed8); background: rgba(255, 255, 255, .6); box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: move; }
.ph-tgt-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--ph-c, #1d4ed8); }

/* aperçu et actions */
.ph-actions { margin-bottom: 12px; }
.ph-svg svg { max-height: 78vh; }
.ph-insnote { margin-top: 10px; font-size: .85rem; color: var(--ink-soft); }
.ph-nav { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .ph-guide-grid, .ph-cur, .ph-wrap { grid-template-columns: 1fr; }
  .ph-ex-col { flex-direction: row; }
  .ph-ex-col .ph-ex { flex: 1 1 0; min-width: 0; }
  .ph-map { height: 380px; }
}
@media (max-width: 640px) {
  .ph-btns .btn { flex: 1 1 100%; padding: 14px 18px; font-size: 1rem; }
  .ph-ex-col { flex-direction: column; }
  .ph-ex-col .ph-ex { flex: none; }
  .ph-map { height: 330px; }
  .ph-cur-img { max-height: 280px; }
  .ph-actions .btn { flex: 1 1 100%; }
  .ph-nav { width: 100%; }
  .ph-nav .btn { flex: 1 1 100%; }
}
