/* Collage de photos : styles propres à l'outil. */
.o-collage-photo-depot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px; border: 2px dashed var(--bord); border-radius: var(--rayon); background: var(--surface-2); text-align: center; transition: border-color .15s, background-color .15s; }
.o-collage-photo-depot.o-collage-photo-survol { border-color: var(--marque); background: var(--surface); }
.o-collage-photo-depot p { margin: 0; }
.o-collage-photo-depot.o-collage-photo-charge { flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding: 10px 14px; gap: 8px 14px; text-align: start; }
.o-collage-photo-depot-titre { font-size: 1.15rem; font-weight: 700; }
.o-collage-photo-compte { font-weight: 600; flex: 1 1 200px; }
.o-collage-photo-formats { color: var(--texte-2); font-size: .88rem; line-height: 1.45; max-width: 60ch; }
.o-collage-photo-local { color: var(--ok-texte); background: var(--ok-fond); padding: 6px 12px; border-radius: var(--rayon-petit); font-size: .9rem; }
.o-collage-photo-choisir { position: relative; min-height: 46px; padding-inline: 22px; cursor: pointer; }
.o-collage-photo-choisir input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.o-collage-photo-choisir:focus-within { outline: 3px solid var(--marque-fort); outline-offset: 2px; }
.o-collage-photo-choisir:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.o-collage-photo-message { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--rayon-petit); background: var(--erreur-fond); color: var(--erreur-texte); }

.o-collage-photo-editeur { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; margin-top: 16px; align-items: start; }
.o-collage-photo-editeur[hidden] { display: none; }
.o-collage-photo-gauche { min-width: 0; }
.o-collage-photo-scene { position: relative; padding: 14px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface-2); }
.o-collage-photo-plan { position: relative; margin: 0 auto; box-shadow: 0 1px 6px rgb(0 0 0 / 18%); }
.o-collage-photo-plan canvas { display: block; }
.o-collage-photo-calque { position: absolute; inset: 0; }
.o-collage-photo-zone { position: absolute; box-sizing: border-box; margin: 0; padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; }
.o-collage-photo-zone:active { cursor: grabbing; }
.o-collage-photo-zone:focus-visible { outline: 3px solid var(--marque); outline-offset: -3px; }
.o-collage-photo-choisie { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px rgb(0 0 0 / 55%); }
.o-collage-photo-vide { display: flex; align-items: center; justify-content: center; color: var(--texte-2); font-size: 2rem; font-weight: 300; cursor: pointer; border: 2px dashed var(--bord); }
.o-collage-photo-vide:hover { color: var(--marque); border-color: var(--marque); }
.o-collage-photo-num { position: absolute; top: 4px; left: 4px; min-width: 20px; padding: 1px 5px; border-radius: 999px; background: rgb(0 0 0 / 60%); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.4; text-align: center; pointer-events: none; }
.o-collage-photo .o-collage-photo-astuce { display: block; margin: 10px 0 0; text-align: start; }
.o-collage-photo-resume { display: block; margin: 8px 0 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.o-collage-photo-groupe { margin: 0 0 14px; padding: 10px 14px 14px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface); min-width: 0; }
.o-collage-photo-groupe legend { padding: 0 6px; font-weight: 700; }
.o-collage-photo-groupe .reglages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.o-collage-photo .reglages select, .o-collage-photo .reglages input[type="number"] { min-height: 42px; width: 100%; box-sizing: border-box; }
.o-collage-photo .reglages input:disabled, .o-collage-photo .reglages input[readonly] { opacity: .6; }
.o-collage-photo-boutons { display: flex; flex-wrap: wrap; gap: 6px; }
.o-collage-photo-boutons.large { grid-column: 1 / -1; }
.o-collage-photo .btn:disabled { opacity: .5; cursor: not-allowed; }

.o-collage-photo-modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.o-collage-photo .o-collage-photo-modele { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; padding: 8px 4px; font-size: .78rem; line-height: 1.2; text-align: center; }
.o-collage-photo-modele[aria-checked="true"] { border-color: var(--marque); box-shadow: inset 0 0 0 1px var(--marque); background: var(--surface-2); font-weight: 700; }
.o-collage-photo-icone { display: grid; gap: 2px; width: 36px; height: 36px; }
.o-collage-photo-icone i { background: var(--texte-2); border-radius: 2px; }
.o-collage-photo-modele[aria-checked="true"] .o-collage-photo-icone i { background: var(--marque); }

.o-collage-photo-aide { margin: 0 0 8px; color: var(--texte-2); font-size: .85rem; line-height: 1.45; }
.o-collage-photo-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.o-collage-photo-photo { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface); cursor: grab; }
.o-collage-photo-photo.o-collage-photo-cible { border-color: var(--marque); background: var(--surface-2); }
.o-collage-photo-photo.o-collage-photo-marquee { border-color: var(--marque); box-shadow: inset 0 0 0 1px var(--marque); }
.o-collage-photo-photo-num { flex: none; width: 22px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.o-collage-photo-vignette { flex: none; width: 44px; height: 44px; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.o-collage-photo-photo-nom { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.o-collage-photo-photo .btn { flex: none; min-width: 40px; min-height: 40px; padding: 0 8px; font-size: 1.05rem; }
.o-collage-photo-photo .btn[aria-pressed="true"] { background: var(--marque); border-color: var(--marque); color: var(--sur-marque); }

.o-collage-photo-telecharger { width: 100%; min-height: 48px; margin-top: 12px; }
.o-collage-photo-fait { display: block; margin-top: 8px; font-size: .9rem; overflow-wrap: anywhere; }
.o-collage-photo-vider { width: 100%; }

@media (max-width: 900px) {
  .o-collage-photo-editeur { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .o-collage-photo-scene { padding: 8px; }
  .o-collage-photo-modeles { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .o-collage-photo-depot { transition: none; } }
