/* P15 (Matisse 29/09, msg 1628) — selecteur de photos (templates/_partials/selecteur-photos.html.twig) */
.cm-photos { margin: 16px 0 8px; }
.cm-photos__grille {
    list-style: none; margin: 0 0 12px; padding: 0;
    display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.cm-photos__grille:empty { display: none; }
.cm-photos__tuile {
    position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
    background: #eef2ea; border: 2px solid transparent; touch-action: manipulation;
}
.cm-photos__tuile.is-glisse { opacity: .45; }
.cm-photos__tuile.is-cible { border-color: var(--cm-green-primary, #5a9a45); }
.cm-photos__tuile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cm-photos__tuile--sans-apercu { display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; color: #4a5a44; font-size: 13px; }
.cm-photos__principale {
    position: absolute; top: 6px; left: 6px; background: #1f3a17; color: #fff;
    font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.cm-photos__actions { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; }
.cm-photos__actions button, .cm-photos__suppr {
    width: 36px; height: 36px; border-radius: 50%; border: 0; display: inline-flex;
    align-items: center; justify-content: center; background: rgba(255,255,255,.94);
    color: #1f2a1b; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; font-size: 14px;
}
.cm-photos__actions button:disabled { opacity: .35; cursor: default; }
.cm-photos__suppr { position: absolute; top: 6px; right: 6px; }
.cm-photos__actions button:focus-visible, .cm-photos__suppr:focus-visible, .cm-photos__depot:focus-within {
    outline: 3px solid var(--cm-green-primary, #5a9a45); outline-offset: 2px;
}
.cm-photos__depot {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 120px; padding: 18px; border: 2px dashed #b9c9b0; border-radius: 14px;
    background: #f7faf5; cursor: pointer; text-align: center; transition: background .15s, border-color .15s;
}
.cm-photos__depot:hover, .cm-photos__depot.is-survol { background: #eaf3e4; border-color: var(--cm-green-primary, #5a9a45); }
.cm-photos__depot i { font-size: 26px; color: var(--cm-green-primary, #5a9a45); }
.cm-photos__depot-titre { font-weight: 700; color: #1f3a17; }
.cm-photos__depot-aide { font-size: 13px; color: #5d6b57; }
.cm-photos__depot.is-plein { display: none; }
/* le champ natif reste dans le formulaire (FormData) mais hors de la vue ;
   sans JS, la classe cm-photos--sans-js le rend visible (voir le script). */
.cm-photos__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cm-photos:not(.is-pret) .cm-photos__input { position: static; width: auto; height: auto; opacity: 1; pointer-events: auto; margin-top: 8px; }
.cm-photos__statut { margin: 8px 0 0; font-size: 14px; color: #3d4a38; min-height: 1.2em; }
.cm-photos__statut.is-erreur { color: #a4271b; font-weight: 600; }
.cm-photos__progression { height: 8px; background: #e3eadf; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.cm-photos__progression-barre { height: 100%; width: 0; background: var(--cm-green-primary, #5a9a45); transition: width .2s; }
.cm-photos__erreurs p { margin: 4px 0 0; }
@media (max-width: 575.98px) {
    .cm-photos__grille { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    /* cibles tactiles >= 44 px (meme seuil que la garde CM-61 de la carte) */
    .cm-photos__actions button, .cm-photos__suppr { width: 44px; height: 44px; font-size: 16px; }
    .cm-photos__depot { min-height: 96px; }
}
/* Refus 🎩 10:24 (1) : a 390 px, « Modifier les informations de mon annonce » debordait
   du bouton (texte sur une ligne). Le bouton du formulaire passe a la ligne. */
form[name="site"] .btn-creation {
    white-space: normal; max-width: 100%; height: auto; min-height: 48px;
    line-height: 1.3; text-align: center; padding-top: 12px; padding-bottom: 12px;
}
