/* « Mes photos » : feuille qui monte du bas depuis la pile. */

.sheet { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; visibility: hidden; transition: visibility 0s .42s; }
.sheet.is-open { visibility: visible; transition-delay: 0s; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(27, 21, 20, .55); opacity: 0; transition: opacity .35s ease; }
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet__panel {
  position: relative; width: 100%; max-height: 82%; display: flex; flex-direction: column; translate: 0 102%;
  padding: 10px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-radius: 28px 28px 0 0; background: linear-gradient(180deg, #f6eadf, #e9d3c3); box-shadow: 0 -18px 40px -16px rgba(27, 21, 20, .55);
  transition: translate .42s var(--ease-out);
}
.sheet__panel::before { content: ""; align-self: center; width: 44px; height: 5px; margin-bottom: 4px; border-radius: 99px; background: rgba(42, 35, 32, .25); }
.sheet.is-open .sheet__panel { translate: 0 0; }

.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.sheet__head h2 { font-size: 24px; font-weight: 600; color: var(--green); }
.sheet__close { width: 48px; height: 48px; margin-right: -8px; display: grid; place-items: center; border-radius: 50%; color: var(--green); cursor: pointer; }
.sheet__close:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.sheet__who { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.sheet__who #mine-name { font-weight: 700; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__who .link-btn { padding-left: 0; font-weight: 500; }
.sheet__note { margin: 2px 0 6px; padding: 8px 12px; border-radius: 12px; background: var(--peach); font-size: 13px; font-weight: 500; }
.sheet__note[hidden] { display: none; }

.sheet__scroll { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 4px 2px 10px; }
.sheet__empty { padding: 28px 10px; text-align: center; font-size: 16px; color: var(--ink); }
.sheet__empty[hidden] { display: none; }
.sheet__gallery { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin-top: 6px; border-radius: 99px; background: var(--green); color: #f6eadf; font-size: 16px; font-weight: 600; text-decoration: none; }
.sheet__gallery:focus-visible { outline: 3px solid var(--coral-deep); outline-offset: 3px; }

.mine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
@media (min-width: 520px) { .mine { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mine__item { display: flex; flex-direction: column; gap: 8px; padding: 6px 6px 8px; border-radius: 4px; background: var(--paper); box-shadow: 0 1px 1px rgba(0, 0, 0, .22), 0 8px 14px -8px rgba(58, 36, 32, .5); }
.mine__item:nth-child(odd) { rotate: -1deg; }
.mine__item:nth-child(even) { rotate: .8deg; }
.mine__photo { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: radial-gradient(circle at 40% 35%, #a9b29c, #8b9682); }
.mine__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mine__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(27, 21, 20, .45); }
.mine__bar[hidden] { display: none; }
.mine__bar i { display: block; height: 100%; width: 0; background: var(--peach); transition: width .2s linear; }
.mine__status { align-self: flex-start; padding: 4px 10px; border-radius: 14px; font-size: 12px; font-weight: 600; line-height: 1.25; background: var(--peach); color: var(--ink); }
.mine__item[data-state="approved"] .mine__status { background: var(--green); color: #f6eadf; }
.mine__item[data-state="rejected"] .mine__status { background: var(--sand); }
.mine__item[data-state="failed"] .mine__status { background: var(--ink); color: #fff; }
.mine__retry { align-self: flex-start; min-height: 48px; padding: 0 16px; border-radius: 99px; background: var(--coral-deep); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.mine__retry[hidden] { display: none; }
.mine__retry:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

@media (max-height: 700px) { .sheet__panel { max-height: 90%; } }
@media (prefers-reduced-motion: reduce) {
  .sheet__panel { transition: translate .01s, visibility 0s; }
  .sheet__backdrop { transition: opacity .15s linear; }
  .mine__item { rotate: none !important; }
}
