.empty-state {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-none);
  color: var(--color-text);
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  text-align: left;
}

.offline-banner {
  align-items: center;
  background: var(--color-accent-soft);
  border-bottom: 1px solid var(--color-accent-border);
  color: var(--color-accent);
  display: flex;
  font-size: var(--text-sm);
  justify-content: center;
  line-height: 1.45;
  padding: var(--space-2) var(--space-4);
  text-align: center;
}

@media (max-width: 640px) {
  .empty-state {
    padding: var(--space-5);
  }
}

/* ─── Gabarit d'état unique (handoff : screens/states.html) ─── */
.state {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 30px;
  text-align: center;
}

.state--page {
  min-height: calc(100vh - 160px);
  min-height: calc(100dvh - 160px);
}

.state--inline {
  padding: 32px 24px;
}

.state__icon {
  align-items: center;
  background: var(--color-surface-soft);
  border-radius: var(--radius-full);
  color: var(--color-text-subtle);
  display: flex;
  height: 58px;
  justify-content: center;
  margin-bottom: 18px;
  width: 58px;
}

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

.state__title {
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: 680;
  margin: 0 0 8px;
}

.state__text {
  color: var(--color-text-muted);
  font-size: 0.90625rem;
  line-height: 1.55;
  margin: 0;
  max-width: 270px;
}

.state__action {
  margin-top: 22px;
  min-width: 180px;
}

.state__link {
  color: var(--color-accent);
  font-weight: 650;
  margin-top: 6px;
  padding: 12px;
  text-decoration: none;
}

/* ─── Bannière hors ligne (au-dessus du contenu déjà chargé) ───
   Masquée par défaut : app.js l'affiche (style en ligne) seulement si la connexion tombe.
   Sinon elle apparaît une fraction de seconde au chargement, avant le script. */
.offline-banner--v2 {
  display: none;
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--color-snack-bg);
  border-bottom: 0;
  color: var(--color-snack-text);
  font-size: 0.8125rem;
  gap: var(--space-2);
  justify-content: flex-start;
  padding: 9px 14px;
}

.offline-banner--v2 .offline-banner__icon {
  color: var(--color-snack-warning);
  font-size: 17px;
}

.offline-banner--v2.is-online .offline-banner__icon {
  color: var(--color-snack-success);
}

.offline-banner--v2.is-online {
  background: var(--color-snack-bg);
  color: var(--color-snack-text);
}

/* ─── Page hors ligne (servie par le service worker) ─── */
.offline-page {
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.offline-page__brand {
  align-items: center;
  color: var(--color-text);
  display: flex;
  font-size: var(--text-lg);
  font-weight: 720;
  gap: 6px;
  justify-content: center;
  margin: 0;
  padding: 22px 0 0;
}

.offline-page .state {
  flex: 1;
}

.offline-page__foot {
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
  margin: 0;
  padding: 0 0 calc(18px + env(safe-area-inset-bottom));
  text-align: center;
}

/* ─── Snackbar (handoff : feedback.css) — « jamais d'action silencieuse » ───
   Sombre, non bloquant, jamais de rouge en aplat : la couleur vit dans l'icône. */
.snack-root {
  align-items: center;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: 0;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  pointer-events: none;
  position: fixed;
  right: 0;
  z-index: 1300;
}

/* 88px au-dessus d'une barre en bas (nav ou barre de réponse) */
body:has(.bottom-nav--v2) .snack-root,
body:has(.reply-bar) .snack-root {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.snack {
  align-items: center;
  background: var(--color-snack-bg);
  border-radius: 14px;
  box-shadow: var(--shadow-snack);
  color: var(--color-snack-text);
  display: flex;
  font-size: var(--text-sm);
  gap: 12px;
  line-height: 1.4;
  max-width: 360px;
  opacity: 0;
  padding: 13px 14px 13px 16px;
  pointer-events: auto;
  transform: translateY(14px);
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0.35, 1), opacity 0.2s ease;
  width: 100%;
}

.snack.is-in {
  opacity: 1;
  transform: translateY(0);
}

.snack.is-out {
  opacity: 0;
  transform: translateY(14px);
}

.snack__icon {
  flex: 0 0 auto;
  font-size: 20px;
}

.snack--success .snack__icon { color: var(--color-snack-success); }
.snack--info .snack__icon { color: var(--color-snack-info); }
.snack--error .snack__icon { color: var(--color-snack-error); }

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

.snack__action {
  background: none;
  border: 0;
  color: var(--color-snack-action);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-weight: 650;
  margin: -4px -2px -4px 0;
  min-height: 44px;
  padding: 4px 6px;
}

@media (prefers-reduced-motion: reduce) {
  .snack {
    transition: none;
  }
}

/* ─── Squelettes de chargement (handoff : screens/reply-loading.html) ───
   Posés par js/transitions.js par-dessus l'écran actuel quand la page suivante tarde.
   Position (haut / bas) calculée en JS : sous l'en-tête et au-dessus de la barre du bas pour un
   onglet racine, plein écran (avec sa propre barre) pour un écran poussé. */
.sk {
  animation: sk-pulse 1.4s ease-in-out infinite;
  background: var(--color-surface-soft);
  border-radius: 6px;
  display: block;
}

@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.sk--av {
  border-radius: var(--radius-full);
  flex: none;
  height: 32px;
  width: 32px;
}

.sk--av-sm {
  border-radius: var(--radius-full);
  flex: none;
  height: 28px;
  width: 28px;
}

.sk--media {
  aspect-ratio: 16 / 10;
  border-radius: 0;
  width: 100%;
}

.sk--card-media {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  width: 100%;
}

.sk-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.sk-row--actions {
  gap: 16px;
  margin-top: 2px;
}

.sk-stack {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
}

.sk-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.sk-block--text {
  gap: 9px;
}

.sk-block--comments {
  gap: 22px;
  padding: 8px 16px 20px;
}

.sk-block--comments .sk-stack {
  gap: 8px;
}

.sk-chips {
  display: flex;
  gap: 8px;
  overflow: hidden;
  padding: 10px 16px;
}

.sk-chips .sk {
  border-radius: var(--radius-full);
  flex: none;
  height: 38px;
}

.sk-post {
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
}

.nav-skeleton {
  background: var(--color-bg);
  bottom: 0;
  left: 0;
  overflow: hidden;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 105;
}

.nav-skeleton--push {
  animation: push-page-in 0.3s var(--ease-push) both;
  box-shadow: var(--shadow-push-edge);
}

.nav-skeleton__bar {
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 12px;
  height: 53px;
  padding: 0 var(--space-3);
}

.nav-skeleton__bar[hidden] {
  display: none;
}

.nav-skeleton__back {
  align-items: center;
  color: var(--color-text);
  display: flex;
  font-size: 22px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.nav-skeleton__title {
  font-size: var(--text-md, 1rem);
  font-weight: 700;
}

/* Colonne (R9) : le squelette remplace la colonne, le rail reste visible ; fondu court */
@media (min-width: 600px) {
  .v2-shell .nav-skeleton {
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    left: var(--col-left);
    right: auto;
    width: var(--col-w);
  }
}

@media (min-width: 768px) {
  .nav-skeleton--push {
    animation: fade-in 0.2s ease both;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk,
  .nav-skeleton--push {
    animation: none;
  }
}

/* ─── Bannière cookies (visiteurs dans l'UE seulement, base.html) ───
   Une carte calme au-dessus de la barre du bas ; centrée sur la colonne dès 600px (R9). */
.cookie-banner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  bottom: calc(76px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-dialog);
  display: none;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  position: fixed;
  text-align: center;
  transform: translateX(-50%);
  width: max-content;
  z-index: 150;
}

.cookie-banner__text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0 0 10px;
}

.cookie-banner__text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.cookie-banner__accept,
.cookie-banner__refuse {
  border-radius: var(--radius-full);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 650;
  min-height: 36px;
  padding: 0 16px;
}

.cookie-banner__accept {
  background: var(--color-accent);
  border: 0;
  color: var(--color-on-accent);
}

.cookie-banner__refuse {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

@media (min-width: 600px) {
  .v2-shell .cookie-banner {
    left: calc(var(--col-left) + var(--col-w) / 2);
  }
}

@media (min-width: 768px) {
  .cookie-banner {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* Étapes « Ajoute sou ekran » (iPhone) dans le hamburger */
.pwa-ios-steps__text {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.6;
  margin: 0;
}

.pwa-ios-steps__text strong {
  color: var(--color-text);
}

.pwa-ios-steps__text .material-icons {
  font-size: 14px;
  vertical-align: middle;
}

.hamburger-credit-link__icon {
  font-size: 10px;
  vertical-align: middle;
}
