/* Scoped controls: compact visually, with a 44px minimum touch target. */
html[data-theme][lang] #app .bv-identity-logo img.bv-photo-framed{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
html[data-theme][lang] body .bd-page .bd-logo.bd-logo-framed{border-radius:50%;overflow:hidden}
html[data-theme][lang] body .bd-page .bd-logo.bd-logo-framed img{padding:0!important;border-radius:0;object-fit:contain;max-width:100%;max-height:100%}
/* The brand page panel (athlete side and « Aperçu athlète ») squares its logo with an #app rule: keep the framed portrait round there too. */
html[data-theme][lang] #app .bd-profile-panel .bp-identity .bp-logo.bd-logo-framed{border-radius:50%;overflow:hidden}
html[data-theme][lang] #app .bd-profile-panel .bp-identity .bp-logo.bd-logo-framed img{border-radius:0}
dialog.brand-photo-dialog{box-sizing:border-box;width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;scroll-padding-bottom:76px;border:1px solid var(--sg-line,var(--line,#777));border-radius:20px;padding:20px;color:var(--sg-text,var(--text,#23232a));background:var(--sg-surface,var(--card,#faf9fd));font-family:inherit}
dialog.brand-photo-dialog::backdrop{background:rgb(0 0 0 / .65)}
dialog.brand-photo-dialog header{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:start;gap:12px}
dialog.brand-photo-dialog h2{font-size:1.3rem;line-height:1.3;margin:8px 0}
dialog.brand-photo-dialog p{font-size:.875rem;line-height:1.5;margin:12px 0}
/* The native dialog lives under body, outside #app. Use the shared theme tokens
   explicitly: --soft is not an app token and its light fallback hid white labels. */
html[data-theme][lang] body dialog.brand-photo-dialog button,dialog.brand-photo-dialog .brand-photo-upload{box-sizing:border-box;min-height:44px;padding:8px 12px;border:1px solid var(--sg-control,var(--line2,#777));border-radius:10px;background:var(--sg-soft,var(--card2,#2c2935));color:var(--sg-text,var(--text,#f3f2f7));font-family:inherit;font-size:.875rem;font-weight:600;line-height:1.3;cursor:pointer;text-transform:none;letter-spacing:0}
html[data-theme][lang] body dialog.brand-photo-dialog header button{width:44px;height:44px;padding:0;border-radius:50%;font-size:24px}
dialog.brand-photo-dialog .brand-photo-upload{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
dialog.brand-photo-dialog .brand-photo-upload input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
dialog.brand-photo-dialog canvas{display:block;width:min(100%,260px);height:auto;aspect-ratio:1;border-radius:50%;margin:18px auto;background:var(--sg-soft,var(--card2,#2c2935));outline:1px solid var(--sg-line,var(--line,#999));cursor:grab;touch-action:none}
/* Zoom slider and « Recentrer » on one row; the theme draws the 44px slider (somagon-theme.css). */
dialog.brand-photo-dialog .brand-photo-adjust{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
dialog.brand-photo-dialog .brand-photo-zoom{display:flex;flex:1 1 170px;align-items:center;gap:12px;min-width:0;font-size:.875rem;font-weight:600}
dialog.brand-photo-dialog .brand-photo-zoom input{flex:1 1 auto;min-width:0;height:44px;min-height:44px;margin:0}
/* When a short screen (phone in landscape) makes the dialog scroll, the actions stay pinned to its bottom edge;
   the dialog's scroll-padding-bottom (footer 64px + 12px; brand-photo.js follows the footer when it wraps) brings a focused control or a message in above them. */
dialog.brand-photo-dialog footer{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;position:sticky;bottom:-20px;z-index:1;margin:12px -20px -20px;padding:0 20px 20px;background:var(--sg-surface,var(--card,#faf9fd))}
html[data-theme][lang] body dialog.brand-photo-dialog button[data-photo-save]{background:var(--sg-accent,var(--ice,#c0acf0));color:var(--sg-bg,var(--bg,#16161a));border-color:transparent}
dialog.brand-photo-dialog :disabled,dialog.brand-photo-dialog .brand-photo-upload:has(input:disabled){opacity:.5;cursor:wait}
dialog.brand-photo-dialog :focus-visible,dialog.brand-photo-dialog .brand-photo-upload:focus-within{outline:2px solid var(--sg-accent,var(--ice,#7958cc));outline-offset:3px}
dialog.brand-photo-dialog .brand-photo-status:empty{display:none}
@media(max-height:700px){dialog.brand-photo-dialog canvas{width:190px;margin:12px auto}}
@media(max-height:600px){dialog.brand-photo-dialog canvas{width:160px;margin:8px auto}}
dialog.brand-photo-dialog[data-photo-kind=cover] canvas{width:100%;aspect-ratio:3/1;border-radius:12px}
/* A photo of the brand (4:3) and a featured product (4:5) are framed in their own shape (brand page, 2026-10-19). */
dialog.brand-photo-dialog[data-photo-kind=photo] canvas{width:100%;aspect-ratio:4/3;border-radius:12px}
dialog.brand-photo-dialog[data-photo-kind=product] canvas{width:min(100%,280px);aspect-ratio:4/5;border-radius:12px}
@media(max-height:700px){dialog.brand-photo-dialog[data-photo-kind=product] canvas{width:200px}}
dialog.brand-photo-dialog p.brand-photo-step{margin:0;color:var(--sg-muted,#8b8796);font-weight:600}
