/* ============================================================
   WOOPETS AI — demo-photos.css
   Photos d'animaux : grille album, tiles d'upload (progress ring),
   avatar photo (hero / chips / sidebar / carnet), bloc photo du
   formulaire, scan de race animé, lightbox plein écran.
   Chargé en lazy (cf. chat_head_css.twig). Variables de demo-core.css.
   ============================================================ */

/* ---------- Grille album (profil animal) ---------- */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    margin-top: 0.5rem;
}

.pet-album-count {
    color: var(--c-text-muted);
    font-weight: 500;
    font-size: 0.8rem;
}

.pet-album-empty {
    grid-column: 1 / -1;
    align-self: center;
    margin: 0;
    color: var(--c-text-muted);
    font-size: 0.82rem;
}

.pet-album-error {
    color: var(--c-text-muted);
    font-size: 0.82rem;
}

.photo-grid-skeleton {
    aspect-ratio: 1;
    border-radius: 12px;
    background: linear-gradient(100deg, var(--c-bg-warm) 40%, var(--c-bg-card) 50%, var(--c-bg-warm) 60%);
    background-size: 200% 100%;
    animation: photoSkeleton 1.2s ease-in-out infinite;
}

@keyframes photoSkeleton {
    from { background-position: 120% 0; }
    to { background-position: -20% 0; }
}

/* ---------- Tile photo ---------- */

.photo-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--c-bg-warm);
    border: 1px solid var(--c-border-light);
    padding: 0;
    cursor: pointer;
    animation: photoTileIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    contain: layout paint style;
}

@keyframes photoTileIn {
    from { opacity: 0; transform: scale(0.88); }
    to { opacity: 1; transform: scale(1); }
}

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

.photo-tile-done:hover .photo-tile-img { transform: scale(1.06); }
.photo-tile-done .photo-tile-img { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }

/* Tuile "+" (ajout) */
.photo-tile-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1.5px dashed var(--c-border);
    background: transparent;
    color: var(--c-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.photo-tile-add:hover {
    border-color: var(--c-primary-soft);
    color: var(--c-primary);
    background: var(--c-primary-light);
}

.photo-tile-small { width: 62px; height: 62px; flex: 0 0 62px; border-radius: 10px; }
.photo-tile-small span { display: none; }

/* Badges (⭐ profil, 🩺 santé) */
.photo-tile-badge {
    position: absolute;
    top: 4px;
    font-size: 0.7rem;
    line-height: 1;
    padding: 3px 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.photo-tile-badge-star { right: 4px; }
.photo-tile-badge-health { left: 4px; }

/* ---------- Upload : overlay + anneau de progression conique ---------- */

.photo-tile-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(19, 21, 22, 0.38);
    backdrop-filter: blur(1.5px);
}

.photo-tile-ring {
    --p: 0%;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--c-primary-soft) var(--p), rgba(255, 255, 255, 0.28) 0);
    transition: background 0.15s linear;
}

.photo-tile-ring::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(19, 21, 22, 0.55);
}

.photo-tile-pct {
    position: relative;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
}

/* Phase "optimisation serveur" : shimmer doux sur l'image */
.photo-tile-processing .photo-tile-img { filter: saturate(0.85); }
.photo-tile-processing::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.35) 50%, transparent 62%);
    background-size: 220% 100%;
    animation: photoShimmer 1.1s linear infinite;
    pointer-events: none;
}

@keyframes photoShimmer {
    from { background-position: 130% 0; }
    to { background-position: -30% 0; }
}

/* Arrivée du thumb final : petit pop de confirmation */
.photo-tile-done { animation: photoTilePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes photoTilePop {
    0% { transform: scale(0.94); }
    60% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Erreur + retry */
.photo-tile-error { border-color: var(--c-danger); }
.photo-tile-error .photo-tile-img { filter: grayscale(0.6) brightness(0.8); }

.photo-tile-retry {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.94);
    color: var(--c-danger);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Tile document PDF (facture, ordonnance…) */
.photo-tile-doc {
    display: block; /* les tiles doc peuvent être des <a> — l'aspect-ratio exige un bloc */
    background: var(--c-accent-light);
    border-color: var(--c-accent-soft);
    text-decoration: none;
}

.photo-tile-doc-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    color: var(--c-accent-hover);
}

.photo-tile-doc-name {
    max-width: 100%;
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--c-text-secondary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Chip document dans la timeline du carnet */
.health-event-doc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 220px;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--c-accent-soft);
    background: var(--c-accent-light);
    color: var(--c-text-secondary);
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.health-event-doc:hover { border-color: var(--c-accent); transform: scale(1.03); }
.health-event-doc svg { color: var(--c-accent-hover); flex-shrink: 0; }
.health-event-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Strip horizontal (formulaire carnet) */
.photo-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.health-photos-hint {
    font-weight: 400;
    color: var(--c-text-muted);
    font-size: 0.75rem;
}

/* ---------- Photos dans la timeline du carnet ---------- */

.health-event-photos {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0.5rem 0 0.25rem;
}

.health-event-photo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--c-border-light);
    padding: 0;
    background: var(--c-bg-warm);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.health-event-photo:hover { transform: scale(1.05); }

.health-event-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.health-event-photo-count {
    color: var(--c-text-muted);
    font-size: 0.72rem;
}

/* ---------- Avatars photo (hero profil / chips / sidebar / carnet) ---------- */

.pet-profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.pet-profile-avatar--photo {
    overflow: hidden;
    border-radius: 50%; /* doublé volontairement (la base l'a déjà) — le clipping rond ne doit JAMAIS sauter */
    cursor: pointer;
}

.pet-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    transition: opacity 0.25s ease;
}

/* Vignette pas encore décodée : on montre le cercle coloré du fond, la photo arrive en fondu */
.pet-avatar-img-loading { opacity: 0; }

.pet-avatar-cam {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--c-accent-vivid);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.pet-avatar-cam:hover {
    background: var(--c-accent-vivid-hover);
    transform: scale(1.12);
}

/* Upload de l'avatar en cours : pulsation douce */
.pet-avatar-uploading .pet-profile-avatar {
    animation: petAvatarPulse 1.1s ease-in-out infinite;
}

@keyframes petAvatarPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.pet-chip-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.sidebar-pet-avatar--photo {
    overflow: hidden;
    padding: 0;
}

.sidebar-pet-avatar--photo img,
.health-view-avatar--photo img,
.pet-list-card-avatar--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.health-view-avatar--photo { overflow: hidden; }

/* Liste « Animaux » (onglet) */
.pet-list-card-avatar--photo {
    overflow: hidden;
    border-radius: 50%;
    background: var(--c-bg-warm);
}

/* ---------- Bloc photo du formulaire animal ---------- */

.pet-form-photo-block {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--c-border-light);
    border-radius: 14px;
    background: var(--c-bg-card);
    margin-bottom: 14px;
}

.pet-form-photo-preview {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px dashed var(--c-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-muted);
    background: var(--c-bg-warm);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}

.pet-form-photo-preview:hover { border-color: var(--c-primary-soft); transform: scale(1.03); }
.pet-form-photo-preview.has-photo { border-style: solid; border-color: var(--c-border-light); }

.pet-form-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pet-form-photo-preview.uploading img { filter: saturate(0.7) brightness(0.85); }

.pet-form-photo-ring {
    --p: 0%;
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--c-accent-vivid) var(--p), rgba(255, 255, 255, 0.35) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    transition: background 0.15s linear;
}

.pet-form-photo-ring span { display: none; }

.pet-form-photo-meta {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* les 2 boutons prennent la même largeur (celle de la colonne) */
    gap: 8px;
    flex: 1;
    min-width: 0;
    max-width: 300px;
}

.pet-form-photo-btn,
.pet-form-detect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    border-radius: 9999px;
    padding: 9px 16px;
    font-size: 0.83rem;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
}

.pet-form-photo-btn {
    border: 1px solid var(--c-border);
    background: var(--c-bg-card);
    color: var(--c-text-secondary);
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s;
}

.pet-form-photo-btn:hover { border-color: var(--c-primary-soft); color: var(--c-primary); }
.pet-form-photo-btn:disabled { opacity: 0.6; cursor: default; }

.pet-form-detect-btn {
    border: none;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, var(--c-primary-soft), var(--c-primary));
    background-size: 160% 100%;
    box-shadow: 0 2px 10px rgba(27, 85, 92, 0.22);
    animation: breedCtaGlow 2.6s ease-in-out infinite;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.pet-form-detect-btn:hover { transform: scale(1.03); box-shadow: 0 3px 14px rgba(27, 85, 92, 0.3); }
.pet-form-detect-btn:disabled { opacity: 0.6; cursor: default; transform: none; animation: none; }

@keyframes breedCtaGlow {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}

/* Champ race rempli par la détection : pop de confirmation */
.breed-applied-pop {
    animation: breedApplied 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-color: var(--c-primary-soft) !important;
}

@keyframes breedApplied {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(72, 181, 168, 0.5); }
    45% { transform: scale(1.02); box-shadow: 0 0 0 7px rgba(72, 181, 168, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(72, 181, 168, 0); }
}

/* ---------- Scan de race (analyse + résultat) ---------- */

.pet-form-breed-scan { margin-bottom: 14px; }
.pet-form-breed-scan:empty { display: none; }

.breed-scan {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--c-border-light);
    background: linear-gradient(160deg, var(--c-primary-light), var(--c-bg-card) 70%);
    animation: photoTileIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.breed-scan-visual {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--c-bg-warm);
}

.breed-scan-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Faisceau de scan qui balaie la photo */
.breed-scan-beam {
    position: absolute;
    left: 0;
    right: 0;
    top: -30%;
    height: 34%;
    background: linear-gradient(to bottom, transparent, rgba(72, 181, 168, 0.55) 50%, transparent);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    animation: breedBeam 1.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes breedBeam {
    0% { transform: translateY(0); }
    50% { transform: translateY(320%); }
    100% { transform: translateY(0); }
}

.breed-scan-body { min-width: 0; flex: 1; }

.breed-scan-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--c-primary);
    margin-bottom: 3px;
}

.breed-scan-text {
    font-size: 0.82rem;
    color: var(--c-text-secondary);
    opacity: 0;
    transition: opacity 0.25s ease;
    min-height: 1.2em;
}

.breed-scan-text.in { opacity: 1; }

.breed-scan-dots {
    display: flex;
    gap: 4px;
    margin-top: 7px;
}

.breed-scan-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-primary-soft);
    animation: breedDot 1.1s ease-in-out infinite;
}
.breed-scan-dots span:nth-child(2) { animation-delay: 0.18s; }
.breed-scan-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes breedDot {
    0%, 100% { transform: translateY(0); opacity: 0.45; }
    50% { transform: translateY(-4px); opacity: 1; }
}

/* Résultat */
.breed-scan-result {
    display: block;
    animation: breedResultIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes breedResultIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.breed-result-head {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--c-primary-muted);
    margin-bottom: 4px;
}

.breed-result-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--c-text);
    margin-bottom: 8px;
}

.breed-result-mixed {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--c-accent-hover);
    background: var(--c-accent-light);
    border-radius: 8px;
    padding: 2px 7px;
    vertical-align: middle;
}

.breed-confidence {
    height: 7px;
    border-radius: 9999px;
    background: var(--c-border-light);
    overflow: hidden;
}

.breed-confidence-bar {
    --conf: 0%;
    width: var(--conf);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--c-primary-soft), var(--c-primary));
    animation: breedConfidenceGrow 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes breedConfidenceGrow {
    from { width: 0; }
    to { width: var(--conf); }
}

.breed-confidence-label {
    font-size: 0.75rem;
    color: var(--c-text-muted);
    margin-top: 4px;
}

.breed-result-warn {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--c-accent-hover);
    background: var(--c-accent-light);
    border-radius: 10px;
    padding: 7px 10px;
}

.breed-result-others {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--c-text-muted);
}

.breed-result-chip {
    border: 1px solid var(--c-border);
    background: var(--c-bg-card);
    border-radius: 9999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: var(--c-text-secondary);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.breed-result-chip:hover { border-color: var(--c-primary-soft); color: var(--c-primary); }
.breed-result-chip em { font-style: normal; color: var(--c-text-muted); }

.breed-result-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.breed-result-apply {
    border: none;
    border-radius: 9999px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: var(--c-accent-vivid);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.breed-result-apply:hover { background: var(--c-accent-vivid-hover); transform: scale(1.04); }
.breed-result-apply.applied,
.breed-result-apply:disabled { background: var(--c-success); transform: none; cursor: default; }

.breed-result-dismiss {
    border: none;
    background: transparent;
    color: var(--c-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 6px;
}

.breed-result-dismiss:hover { color: var(--c-text-secondary); }

.breed-result-msg {
    font-size: 0.88rem;
    color: var(--c-text-secondary);
}

.breed-result-emoji { font-size: 1.1rem; margin-right: 4px; }

.breed-result-nomatch {
    font-size: 0.78rem;
    color: var(--c-text-muted);
}

/* ---------- Lightbox plein écran ---------- */

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    background: rgba(10, 12, 13, 0.94);
    animation: photoLbIn 0.25s ease;
}

.photo-lightbox.active { display: block; }
body.photo-lb-open { overflow: hidden; }

@keyframes photoLbIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.photo-lb-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 52px 14px calc(88px + env(safe-area-inset-bottom, 0px));
}

.photo-lb-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    animation: photoLbImgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes photoLbImgIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.photo-lb-slide-left { animation: photoLbSlideLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.photo-lb-slide-right { animation: photoLbSlideRight 0.3s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes photoLbSlideLeft {
    from { opacity: 0.2; transform: translateX(46px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes photoLbSlideRight {
    from { opacity: 0.2; transform: translateX(-46px); }
    to { opacity: 1; transform: translateX(0); }
}

.photo-lb-close {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.photo-lb-close:hover { background: rgba(255, 255, 255, 0.26); }

.photo-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.photo-lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
.photo-lb-prev { left: 10px; }
.photo-lb-next { right: 10px; }

/* Mobile : les flèches gênent le swipe → masquées (le swipe fait le travail) */
@media (hover: none) and (pointer: coarse) {
    .photo-lb-nav { display: none !important; }
}

.photo-lb-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
}

.photo-lb-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    min-width: 0;
}

.photo-lb-counter { font-weight: 700; }
.photo-lb-badge { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.photo-lb-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.photo-lb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 9999px;
    padding: 8px 13px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    transition: background 0.2s;
}

.photo-lb-btn:hover { background: rgba(255, 255, 255, 0.28); }
.photo-lb-btn-danger { background: rgba(220, 38, 38, 0.55); }
.photo-lb-btn-danger:hover { background: rgba(220, 38, 38, 0.75); }

@media (max-width: 480px) {
    .photo-lb-btn span { display: none; }
    .photo-lb-btn { padding: 10px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

/* ---------- Accessibilité ---------- */

@media (prefers-reduced-motion: reduce) {
    .photo-tile,
    .photo-tile-done,
    .photo-grid-skeleton,
    .photo-tile-processing::after,
    .breed-scan,
    .breed-scan-beam,
    .breed-scan-dots span,
    .breed-scan-result,
    .breed-confidence-bar,
    .breed-applied-pop,
    .pet-form-detect-btn,
    .pet-avatar-uploading .pet-profile-avatar,
    .photo-lightbox,
    .photo-lb-img,
    .photo-lb-slide-left,
    .photo-lb-slide-right {
        animation: none !important;
        transition: none !important;
    }
}
