.action-sheet {
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
}

.action-sheet__view[hidden] {
  display: none;
}

/* Vue poussée dans la feuille (R8) */
.action-sheet__view.is-pushed {
  animation: action-push var(--ds-motion-glide) var(--ds-motion-ease);
}

@keyframes action-push {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: none; }
}

.action-sheet__ctx {
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text-subtle);
  font-size: var(--ds-font-size-xs);
  margin: 0 0 var(--space-2);
  overflow: hidden;
  padding: var(--space-2) var(--space-4);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-sheet__cancel {
  margin: var(--space-2) var(--space-4) 0;
}

/* Confirmation / Mèsi : gabarit d'état */
/* Rapòte */
.action-sheet__head {
  align-items: center;
  display: flex;
  gap: var(--space-1);
  padding: 0 var(--space-2) var(--space-2);
}

.action-sheet__back {
  align-items: center;
  background: none;
  border: 0;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.action-sheet__head-title {
  color: var(--color-text);
  flex: 1;
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  margin: 0 var(--ds-size-target) 0 0;
  text-align: center;
}

.action-sheet__lead {
  color: var(--color-text-muted);
  font-size: var(--ds-font-size-sm);
  line-height: var(--ds-line-height-body);
  margin: 0 var(--space-4) var(--space-3);
}

.reason {
  align-items: center;
  background: none;
  border: 0;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: var(--ds-font-size-sm);
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  width: 100%;
}

@media (hover: hover) {
  .reason:hover {
    background: var(--color-surface-soft);
  }
}

.reason__radio {
  align-items: center;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  display: flex;
  flex: 0 0 auto;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.reason[aria-checked="true"] .reason__radio {
  border-color: var(--color-accent);
}

.reason[aria-checked="true"] .reason__radio::after {
  background: var(--color-accent);
  border-radius: var(--radius-full);
  content: "";
  height: 10px;
  width: 10px;
}

.reason__text {
  flex: 1;
  min-width: 0;
}

.reason__hint {
  color: var(--color-text-subtle);
  display: block;
  font-size: var(--ds-font-size-xs);
  margin-top: 0;
}

.action-sheet__detail {
  margin: var(--space-1) var(--space-5) 0;
  min-height: 76px;
  resize: none;
  width: calc(100% - 2 * var(--space-5));
}

/* Bouton « … » d'une repons */
.comment-item__more {
  align-items: center;
  background: none;
  border: 0;
  border-radius: var(--radius-full);
  color: var(--color-text-subtle);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  margin: calc(var(--space-2) * -1) calc(var(--space-3) * -1) calc(var(--space-2) * -1) 0; /* cible de 44px sans décaler la ligne */
  width: 44px;
}

.post-detail-v2__actions .post-action--more {
  margin-left: auto;
}

.post-detail-v2__actions .post-action--more .post-action__icon {
  color: var(--color-text-subtle);
}

@media (prefers-reduced-motion: reduce) {
  .action-sheet__view.is-pushed {
    animation: none;
  }
}

/* ─── Feuille Paramèt (handoff : screens/settings.html) ─── */
.settings-sheet {
  max-height: 86vh;
}

.settings-sheet__title {
  color: var(--color-accent);
  font-size: var(--ds-font-size-lg);
  font-weight: var(--ds-font-weight-semibold);
  margin: 0;
  padding: 0 0 var(--space-2);
  text-align: center;
}

.settings-sheet__logout {
  margin: 0;
  padding: var(--space-3) var(--space-4) var(--space-1);
}

.settings-sheet__foot {
  color: var(--color-text-subtle);
  font-size: var(--ds-font-size-xs);
  margin: 0;
  padding: var(--space-2) 0 var(--space-1);
  text-align: center;
}

/* ─── Jere kont mwen ─── */
.manage-account {
  margin: 0 auto;
  max-width: var(--layout-reading-max);
  padding: var(--space-4);
}

.manage-account__intro {
  color: var(--color-text-muted);
  font-size: var(--ds-font-size-sm);
  line-height: var(--ds-line-height-prose);
  margin: 0 0 var(--space-4);
}

@media (hover: hover) {
  .option-card:hover {
    border-color: var(--color-border-strong);
  }
}

/* Feuilles de confirmation avec icône : centrées */

.manage-account__danger-title {
  color: var(--color-danger);
}

.manage-account__confirm-label {
  color: var(--color-text);
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-semibold);
}

.manage-account__confirm-input {
  margin-bottom: var(--space-2);
}

/* ─── Onglet Notifikasyon (handoff : screens/notifications.html) ─── */
.notifs {
  margin: 0 auto;
  max-width: var(--layout-reading-max);
}

.notifs__head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-1);
}

.notif-markall {
  margin: 0;
}

.notifs__group {
  color: var(--color-text-muted);
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-semibold);
  margin: 0;
  padding: var(--space-5) var(--space-4) var(--space-2);
}

.notifs__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notif {
  align-items: flex-start;
  color: var(--color-text);
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  position: relative;
  text-decoration: none;
}

/* Non lue : fond accent doux + point encre, jamais rouge */
.notif--unread {
  background: var(--color-accent-soft);
}

.notif__dot {
  background: var(--color-accent);
  border-radius: var(--radius-full);
  height: 7px;
  left: var(--space-1);
  position: absolute;
  top: calc(var(--space-3) + var(--space-4));
  width: 7px;
}

.notif__avatar,
.notif__icon {
  align-items: center;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  display: flex;
  flex: 0 0 auto;
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-semibold);
  height: 40px;
  justify-content: center;
  overflow: hidden;
  width: 40px;
}

.notif__avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.notif__icon--accent {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-border);
  color: var(--color-accent);
}

.notif__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.notif__text {
  font-size: var(--ds-font-size-sm);
  line-height: var(--ds-line-height-body);
}

.notif__text b {
  font-weight: var(--ds-font-weight-semibold);
}

.notif__quote {
  color: var(--color-text-muted);
  font-size: var(--ds-font-size-sm);
  font-style: italic;
  line-height: var(--ds-line-height-body);
  margin-top: var(--space-1);
  overflow-wrap: anywhere;
}

.notif__time {
  color: var(--color-text-subtle);
  font-size: var(--ds-font-size-xs);
  margin-top: var(--space-1);
}

.notif__meta {
  align-self: center;
  color: var(--color-text-subtle);
  flex: 0 0 auto;
}

@media (hover: hover) {
  .notif:hover {
    background: var(--color-surface-soft);
  }

  .notif--unread:hover {
    background: var(--color-accent-soft);
  }
}

.notifs__more {
  color: var(--color-accent);
  display: block;
  font-weight: var(--ds-font-weight-semibold);
  padding: var(--space-5);
  text-align: center;
  text-decoration: none;
}

/* ─── Réglages des notifications ─── */
.notif-settings {
  margin: 0 auto;
  max-width: var(--layout-reading-max);
  padding-bottom: var(--space-6);
}

.notif-settings__intro {
  color: var(--color-text-muted);
  font-size: var(--ds-font-size-sm);
  line-height: var(--ds-line-height-body);
  margin: 0;
  padding: var(--space-3) var(--space-4) 0;
}

.notif-settings__foot {
  margin: var(--space-2) var(--space-4) 0;
}

/* ─── R9 : menu « … » en popover ancré (≥ 600px) ─── */
.sheet-scrim--clear {
  background: transparent;
}

@media (min-width: 600px) {
  .sheet.sheet--popover {
    animation: none;
    border-radius: var(--radius-xl);
    bottom: auto;
    max-height: none;
    padding: var(--space-1) 0;
    position: fixed;
    right: auto;
    transform: none;
    width: 280px;
  }

  .sheet--popover .sheet__grip,
  .sheet--popover .action-sheet__cancel {
    display: none;
  }

  .sheet--popover .action-sheet__ctx {
    padding-top: var(--space-2);
  }
}

/* Suppression du compte : le champ de confirmation, entre le texte et les boutons */
.manage-account__confirm {
  margin-top: var(--space-4);
}

/* Jere kont mwen : les deux choix sont des lignes ; « Efase » porte la couleur du danger, avec le mot */
.manage-account__options {
  margin: var(--space-4) calc(var(--space-4) * -1);
}

.manage-account__danger .ds-row__title {
  color: var(--color-danger);
}

.manage-account__danger .ds-row__icon {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

/* ─── Menus dans les feuilles et le tiroir (ds-menu__item du système) ───
   Au téléphone, chaque élément prend la cible de 44 px (règle du système pour tout ce qui se touche). */
.action-sheet__list,
.hamburger-body {
  padding-inline: var(--space-2);
}

/* Éléments posés directement dans une feuille : même retrait (8 + 10 px), alignés sur le titre */
.sheet > .ds-menu__item {
  margin-inline: var(--space-2);
  width: calc(100% - 2 * var(--space-2));
}

.menu-item__label {
  flex: 1;
  min-width: 0;
}

.menu-item--soon,
.menu-item--toggle {
  cursor: default;
}

.menu-item--soon,
.menu-item--soon .icon {
  color: var(--color-text-subtle);
}

.menu-item--soon:hover,
.menu-item--toggle:hover {
  background: transparent;
}

/* Décider dans le menu « … » (effacer, bloquer, merci) : le contenu d'une fenêtre ds-dialog */
.action-sheet__decide {
  padding: var(--space-2) var(--space-6) var(--space-3);
}

.action-sheet__send {
  padding: 0 var(--space-5);
}

@media (max-width: 640px) {
  .ds-menu__item {
    min-height: var(--ds-size-target);
  }
}
