.test-vehicle-photo-gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 76px;
    justify-content: start;
    gap: 0.55rem;
    overflow-x: auto;
    padding: 0.65rem;
    border-top: 1px solid var(--border);
    background: var(--surface-secondary, #f8fafc);
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
}

.test-vehicle-photo-thumbnail {
    width: 76px;
    height: 58px;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0.55rem;
    background: #e2e8f0;
    cursor: zoom-in;
}

.test-vehicle-photo-thumbnail.is-primary {
    border-color: var(--primary);
}

.test-vehicle-photo-thumbnail:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.test-vehicle-photo-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

@media (max-width: 900px) {
    .test-vehicle-photo-gallery {
        grid-auto-columns: 68px;
        padding: 0.55rem;
        scroll-snap-type: inline proximity;
    }

    .test-vehicle-photo-thumbnail {
        width: 68px;
        height: 52px;
        scroll-snap-align: start;
    }
}

/* Gestion des photos : sélection et déplacements directs. */
.photo-manager-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:16px 0; }
.photo-manager-toolbar label { display:flex; align-items:center; gap:6px; }
.photo-select { position:absolute; z-index:2; top:8px; left:8px; padding:6px; border-radius:6px; background:var(--bg-primary, white); }
.photo-select input { width:20px; height:20px; margin:0; }
.photo-direct-actions { position:absolute; top:44px; left:8px; display:flex; flex-wrap:wrap; gap:4px; }
[data-photo-move-handle] { touch-action:none; cursor:grab; min-width:36px; min-height:36px; }
#photos-container [data-primary-badge] { display:none; }
.photo-item:has([data-photo-select]:checked) { outline:3px solid var(--primary, #2563eb); outline-offset:2px; }
