/* Champ photo : aperçu + boutons arabes + fenêtre de prise de vue.
   Voir static/js/photo_capture.js et templates/gestion/_photo_input.html. */

.photo-input-cache {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.photo-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.photo-apercu {
    width: 92px;
    height: 92px;
    flex-shrink: 0;
    border: 1px dashed #b9c2cf;
    border-radius: 10px;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-apercu img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-vide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #8a94a6;
    font-size: .72rem;
    text-align: center;
    padding: 4px;
}

.photo-vide i {
    font-size: 1.5rem;
}

.photo-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---- fenêtre de prise de vue ---- */
.photo-cam-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 36, .72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.photo-cam-backdrop.ouverte {
    display: flex;
}

.photo-cam-box {
    background: #fff;
    border-radius: 14px;
    width: min(560px, 100%);
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

.photo-cam-head {
    background: #1f2d3d;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.photo-cam-body {
    background: #0d1420;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.photo-cam-body video,
.photo-cam-body canvas {
    width: 100%;
    max-height: 62vh;
    display: block;
}

.photo-cam-msg {
    color: #ffd9d9;
    padding: 24px 18px;
    margin: 0;
    text-align: center;
}

.photo-cam-foot {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 16px;
    flex-wrap: wrap;
}
