.confirm-dialog[hidden] {
  display: none;
}

.confirm-dialog {
  align-items: center;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: var(--space-4);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1200;
}

.confirm-dialog__backdrop {
  background: color-mix(in srgb, var(--color-text) 42%, transparent);
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.confirm-dialog__panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dialog);
  max-width: min(100%, 420px);
  padding: var(--space-5);
  position: relative;
  width: 100%;
}

.confirm-dialog__title {
  color: var(--color-text);
  font-size: var(--text-lg);
  line-height: 1.25;
  margin: 0;
}

.confirm-dialog__description {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin: var(--space-3) 0 0;
}

.confirm-dialog__actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  margin-top: var(--space-5);
}

@media (max-width: 520px) {
  .confirm-dialog {
    align-items: flex-end;
    padding: var(--space-3);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  }

  .confirm-dialog__panel {
    border-radius: var(--radius-lg);
    padding: var(--space-4);
  }

  .confirm-dialog__actions {
    flex-direction: column-reverse;
  }

  .confirm-dialog__actions .btn {
    width: 100%;
  }
}

/* ─── Menu « … » (handoff : screens/actions.html) ─── */
.action-sheet {
  padding-bottom: calc(16px + 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 0.28s cubic-bezier(0.32, 0.72, 0.35, 1);
}

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

.action-sheet__ctx {
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-subtle);
  font-size: 0.8125rem;
  margin: 0 0 6px;
  overflow: hidden;
  padding: 6px 18px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* R7 : icône de tête soft-black + libellé + chevron si ça pousse un écran */
.list-row {
  align-items: center;
  background: none;
  border: 0;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.9375rem;
  gap: 14px;
  min-height: 52px;
  padding: 0 18px;
  text-align: left;
  width: 100%;
}

.list-row[hidden] {
  display: none;
}

.list-row__lead {
  color: var(--color-icon-lead);
  flex: 0 0 24px;
  font-size: 21px;
  width: 24px;
}

.list-row__label {
  flex: 1;
  min-width: 0;
}

.list-row__chev {
  color: var(--color-text-subtle);
  font-size: 20px;
}

.list-row--danger,
.list-row--danger .list-row__lead {
  color: var(--color-danger);
}

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

.action-sheet__cancel {
  margin: 10px 16px 0;
}

/* Confirmation / Mèsi : gabarit d'état */
.action-sheet__state {
  padding: 8px 22px 4px;
  text-align: center;
}

.action-sheet__icon {
  align-items: center;
  border-radius: var(--radius-full);
  display: inline-flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.action-sheet__icon .material-icons {
  font-size: 28px;
}

.action-sheet__icon--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.action-sheet__icon--success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.action-sheet__title {
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 14px 0 6px;
}

.action-sheet__text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.55;
  margin: 0;
}

.action-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 16px 16px 4px;
}

.action-sheet__actions .btn {
  width: 100%;
}

.action-sheet__text-btn {
  background: none;
  border: 0;
  color: var(--color-text-muted);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  min-height: 44px;
}

/* Rapòte */
.action-sheet__head {
  align-items: center;
  display: flex;
  gap: 6px;
  padding: 2px 10px 8px;
}

.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(--text-base);
  font-weight: 700;
  margin: 0 44px 0 0;
  text-align: center;
}

.action-sheet__lead {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 2px 18px 12px;
}

.reason {
  align-items: center;
  background: none;
  border: 0;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.9375rem;
  gap: 12px;
  min-height: 52px;
  padding: 10px 18px;
  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: 0.78125rem;
  margin-top: 1px;
}

.action-sheet__detail {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  display: block;
  font: inherit;
  font-size: var(--text-base);
  margin: 4px 18px 0;
  min-height: 76px;
  padding: 10px 12px;
  resize: none;
  width: calc(100% - 36px);
}

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

.action-sheet__detail:focus {
  background: var(--color-surface);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
  outline: none;
}

/* 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: -6px -10px -6px 0; /* cible de 44px sans décaler la ligne */
  width: 44px;
}

.comment-item__more .material-icons {
  font-size: 20px;
}

.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(--text-lg);
  font-weight: 700;
  margin: 0;
  padding: 2px 0 6px;
  text-align: center;
}

/* Les lignes peuvent être des liens ou des formulaires (bascule) */
a.list-row,
form.list-row {
  color: var(--color-text);
  margin: 0;
  text-decoration: none;
}

.list-row--soon {
  cursor: default;
}

.list-row--soon .list-row__lead,
.list-row--soon .list-row__label {
  color: var(--color-text-subtle);
}

@media (hover: hover) {
  .list-row--soon:hover,
  form.list-row:hover {
    background: none;
  }
}

.tag-soon {
  background: var(--color-surface-soft);
  border-radius: var(--radius-full);
  color: var(--color-text-subtle);
  font-size: 0.6875rem;
  font-weight: 650;
  padding: 3px 8px;
}

/* Bascule (switch) */
.toggle {
  background: var(--color-border-strong);
  border: 0;
  border-radius: var(--radius-full);
  cursor: pointer;
  flex: 0 0 auto;
  height: 26px;
  position: relative;
  transition: background 0.2s;
  width: 44px;
}

.toggle::after {
  background: var(--color-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-soft);
  content: "";
  height: 20px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 0.2s;
  width: 20px;
}

.toggle[aria-checked="true"] {
  background: var(--color-accent);
}

.toggle[aria-checked="true"]::after {
  transform: translateX(18px);
}

.settings-sheet__logout {
  margin: 0;
  padding: 14px 16px 4px;
}

.settings-sheet__foot {
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
  margin: 0;
  padding: 6px 0 4px;
  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: 0.90625rem;
  line-height: 1.55;
  margin: 0 0 var(--space-4);
}

.option-card {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 14px;
  margin-bottom: var(--space-3);
  padding: 16px;
  text-align: left;
  width: 100%;
}

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

.option-card__icon {
  align-items: center;
  background: var(--color-accent-soft);
  border-radius: var(--radius-full);
  color: var(--color-accent);
  display: flex;
  flex: 0 0 auto;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.option-card--danger .option-card__icon {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.option-card__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.option-card__title {
  font-size: 0.9375rem;
  font-weight: 650;
}

.option-card--danger .option-card__title {
  color: var(--color-danger);
}

.option-card__desc {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.option-card__chev {
  color: var(--color-text-subtle);
}

.manage-account__note {
  align-items: flex-start;
  color: var(--color-text-muted);
  display: flex;
  font-size: 0.8125rem;
  gap: var(--space-2);
  line-height: 1.5;
  margin-top: var(--space-5);
}

.manage-account__note .material-icons {
  color: var(--color-text-subtle);
  font-size: 18px;
}

.manage-account__note p {
  margin: 0;
}

/* Feuilles de confirmation avec icône : centrées */
.sheet--dialog .action-sheet__icon {
  display: flex;
  margin: 0 auto 12px;
}

.sheet--dialog:has(.action-sheet__icon) .sheet__title,
.sheet--dialog:has(.action-sheet__icon) .sheet__text {
  text-align: center;
}

.action-sheet__icon--ink {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

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

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

.manage-account__confirm-input {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-base);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
  padding: 11px 12px;
}

.manage-account__confirm-input:focus {
  background: var(--color-surface);
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px var(--color-danger-soft);
  outline: none;
}

.btn-danger:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ─── 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: 16px 16px 4px;
}

.notifs__title {
  color: var(--color-text);
  font-size: 1.625rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  margin: 0;
}

.notifs__settings {
  align-items: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.notif-markall {
  margin: 0;
}

.notif-markall__btn {
  background: none;
  border: 0;
  color: var(--color-accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.84375rem;
  font-weight: 650;
  min-height: 44px;
  padding: 0 8px;
}

.notifs__group {
  color: var(--color-text-subtle);
  font-size: 0.71875rem;
  font-weight: 680;
  letter-spacing: 0.05em;
  margin: 0;
  padding: 20px 16px 6px;
  text-transform: uppercase;
}

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

.notif {
  align-items: flex-start;
  color: var(--color-text);
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  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: 5px;
  position: absolute;
  top: 30px;
  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(--text-sm);
  font-weight: 650;
  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__icon .material-icons {
  font-size: 20px;
}

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

.notif__text {
  font-size: 0.90625rem;
  line-height: 1.45;
}

.notif__text b {
  font-weight: 650;
}

.notif__quote {
  color: var(--color-text-muted);
  font-size: 0.84375rem;
  font-style: italic;
  line-height: 1.4;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.notif__time {
  color: var(--color-text-subtle);
  font-size: 0.78125rem;
  margin-top: 4px;
}

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

@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: 600;
  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(--text-sm);
  line-height: 1.5;
  margin: 0;
  padding: 14px 18px 2px;
}

.notif-setting {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 13px 18px;
}

.notif-setting .list-row__lead {
  margin-top: 1px;
}

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

.notif-setting__title {
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 580;
  line-height: 1.3;
}

.notif-setting__desc {
  color: var(--color-text-muted);
  font-size: 0.78125rem;
  line-height: 1.45;
  margin-top: 3px;
}

.notif-setting .toggle {
  margin-top: 3px;
}

.notif-settings__foot {
  align-items: flex-start;
  background: var(--color-surface-soft);
  border-radius: var(--radius-md);
  display: flex;
  gap: 10px;
  margin: 8px 18px 0;
  padding: 13px 14px;
}

.notif-settings__foot .material-icons {
  color: var(--color-text-muted);
  flex: 0 0 auto;
  font-size: 19px;
}

.notif-settings__foot p {
  color: var(--color-text-muted);
  font-size: 0.78125rem;
  line-height: 1.5;
  margin: 0;
}

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

@media (min-width: 600px) {
  .sheet.sheet--popover {
    animation: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    bottom: auto;
    box-shadow: var(--shadow-dialog);
    max-height: none;
    padding: 6px 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: 8px;
  }
}
