/* ------------------------------------------------------------
   sheet.css — feuille du bas (lot 01)
   Référence : handoffs/01-composants/screenshots/09-feuille-bas.png
   ------------------------------------------------------------ */

.sheet-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 60;
}

.sheet {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 4px + 68px + 8px);
  max-height: 85vh;
  border-radius: var(--r-sheet);
  background: var(--surface);
  box-shadow: var(--shadow-sheet);
  z-index: 61;
  display: flex;
  flex-direction: column;
  animation: sheet-in .28s cubic-bezier(.2, .8, .2, 1);
}

/* Écran sans barre de navigation (ex. outil, lot 04) : posée 8px au-dessus
   de la zone de sécurité, pas d'une barre absente. */
.sheet.no-nav {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
}

@keyframes sheet-in {
  from { transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: sheet-fade .2s ease-out; }
  @keyframes sheet-fade { from { opacity: 0; } }
}

.sheet__handle {
  width: 36px;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--field);
  margin: 10px auto 0;
  flex: none;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
}
.sheet__head h2 {
  font-family: var(--font-display);
  font-size: 21px;
}
.sheet__close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--sp-4);
}

.sheet__action {
  flex: none;
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--line);
}
.sheet__action .btn { width: 100%; }
.sheet__action--stack { display: grid; gap: 8px; }

/* Aperçu réduit d'une création (ex. feuille de suppression). */
.sheet-preview { display: flex; align-items: center; gap: var(--sp-3); padding-bottom: var(--sp-3); }

/* Lignes d'une feuille « choisir un outil » */
.sheet-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  cursor: pointer;
}
.sheet-row[aria-selected="true"] { background: var(--tint); }
.sheet-row--soon { color: var(--muted); cursor: default; }
.sheet-row__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--tint);
  display: grid;
  place-items: center;
  flex: none;
}
.sheet-row--soon .sheet-row__icon { background: var(--surface-2); color: var(--muted); }
.sheet-row__name { font-size: 15px; font-weight: 600; }
.sheet-row__desc { font-size: 13px; color: var(--muted); }
