Mode fond vert : choix du fond apres la photo

- Apres la capture, si chroma key active, une barre de fonds
  s'affiche avec des miniatures cliquables
- L'utilisateur choisit son fond parmi la liste
- Remplacement du fond vert en temps reel (OpenCV backend)
- Onglet "Fonds verts" dans le backoffice pour importer/supprimer
  des images de fond
- Miniatures visuelles dans l'admin et sur l'ecran de preview

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-21 23:45:45 +01:00
parent c10812b4c0
commit 32392d3ccd
6 changed files with 221 additions and 4 deletions

View File

@@ -294,6 +294,43 @@ html, body {
box-shadow: var(--ombre);
}
.barre-fonds {
display: flex;
gap: 0.8rem;
padding: 0.8rem;
overflow-x: auto;
width: 100%;
justify-content: center;
}
.btn-fond {
width: 80px;
height: 60px;
border-radius: 8px;
border: 3px solid transparent;
cursor: pointer;
transition: var(--transition);
overflow: hidden;
flex-shrink: 0;
padding: 0;
background: var(--fond-carte);
}
.btn-fond img {
width: 100%;
height: 100%;
object-fit: cover;
}
.btn-fond.actif {
border-color: var(--primaire);
box-shadow: 0 0 12px rgba(233, 30, 99, 0.5);
}
.btn-fond:active {
transform: scale(0.93);
}
.barre-filtres, .barre-overlays {
display: flex;
gap: 0.8rem;
@@ -828,6 +865,44 @@ h3 {
border-radius: 50%;
}
/* Liste fonds admin */
.liste-fonds {
display: flex;
flex-wrap: wrap;
gap: 0.8rem;
}
.fond-item {
position: relative;
width: 120px;
height: 80px;
border-radius: 8px;
overflow: hidden;
border: 2px solid #333;
}
.fond-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.fond-item .btn-supprimer {
position: absolute;
top: 2px; right: 2px;
background: rgba(0,0,0,0.6);
border: none;
color: var(--danger);
font-size: 1rem;
cursor: pointer;
border-radius: 50%;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
}
/* Liste cadres */
.liste-cadres {
display: flex;