/* Navigation de l'application connectée : groupes, outils repliés, onglets de réglages, barre mobile. */
.side-label { display: flex; flex-direction: column; min-width: 0; }
.side-note { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.3; color: var(--muted); font-weight: 450; }
.side-link.active .side-note { color: inherit; opacity: .8; }
.side-fold { margin: 4px 8px 2px; }
.side-fold-sum {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; font-weight: 650; color: var(--ink);
}
.side-fold-sum::-webkit-details-marker { display: none; }
.side-fold-sum::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.side-fold[open] > .side-fold-sum::before { transform: rotate(45deg); }
.side-fold-hint { margin: 0 10px 6px 28px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.side-fold .side-link { margin-left: 8px; }

.settings-tabs.subnav {
  display: flex; flex-direction: column; gap: 2px; align-items: stretch;
  position: sticky; top: 12px; margin: 0; padding: 8px; border-radius: 14px;
  background: var(--card, #fff); border: 1px solid var(--line);
}
.settings-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-tabs a {
  display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; font-weight: 550;
}
.settings-tabs a.active, .settings-tabs a[aria-current="page"] { background: var(--soft, #f3f2f8); color: var(--brand, #6c27d7); }
.settings-tabs a:focus-visible { outline: 2px solid var(--brand, #6c27d7); outline-offset: 2px; }

.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--card, #fff); border-top: 1px solid var(--line);
  justify-content: space-around; gap: 4px;
}
.tabbar a, .tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 44px; padding: 4px 2px; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 11px; text-decoration: none; border-radius: 10px;
}
.tabbar a[aria-current="page"], .tabbar a.active { color: var(--brand, #6c27d7); font-weight: 650; }
.tabbar .ic { width: 20px; height: 20px; }

.row-danger { display: inline-block; }
.row-danger > summary { list-style: none; cursor: pointer; }
.row-danger > summary::-webkit-details-marker { display: none; }
.opp-more { margin-top: 8px; }

@media (max-width: 900px) {
  .settings-shell { grid-template-columns: 1fr; }
  .settings-tabs.subnav {
    position: static; flex-direction: row; overflow-x: auto; gap: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .settings-tabs a { white-space: nowrap; }
  .tabbar { display: flex; }
  .is-app main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .side-fold-hint { margin-left: 12px; }
}
@media (forced-colors: active) {
  .tabbar { border-top: 1px solid CanvasText; }
  .settings-tabs a[aria-current="page"] { outline: 2px solid Highlight; }
}

/* Réglages : onglets en grille régulière sur mobile (jamais de défilement horizontal). */
@media (max-width: 900px) {
  .settings-tabs.subnav { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); overflow: visible; margin-bottom: 14px; }
  .settings-tabs a { white-space: normal; text-align: center; min-height: 44px; padding: 6px 4px; font-size: 13.5px; line-height: 1.2; display: flex; align-items: center; justify-content: center; }
}
/* Alertes : l'état des canaux d'envoi est replié ; une ligne suffit tant que tout va bien. */
.chan-fold > summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 550; min-height: 32px; display: flex; align-items: center; }
.chan-fold > summary:hover { color: var(--ink); }
/* Nouveau compte : le lien « connecter ma boutique » est discret mais jamais caché. */
.add-shop-hint { margin-top: 10px; }
.add-shop-hint a { display: inline-block; min-height: 44px; line-height: 44px; font-weight: 600; }

/* Pass 2 — repli « Options avancées » (jargon technique jamais visible par défaut). */
.chan-adv { margin: 14px 0; }
.chan-adv > summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 550; min-height: 32px; display: flex; align-items: center; }
.chan-adv > summary:hover { color: var(--ink); }
.chan-adv[open] > summary { margin-bottom: 8px; }
.fold-card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; min-height: 36px; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary h2 { display: inline; margin: 0; }
.fold-card > summary::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: 14px; }
.fold-card[open] > summary::after { content: "▴"; }

/* Barre d'onglets mobile : libellés courts, icônes alignées en haut, jamais de saut de ligne disgracieux. */
.tabbar a, .tabbar button { justify-content: flex-start; text-align: center; line-height: 1.15; font-size: 10.5px; letter-spacing: -0.01em; min-width: 0; padding: 5px 1px; }
.tabbar a > svg + *, .tabbar a { overflow-wrap: anywhere; hyphens: auto; }

/* Tableaux de bureau : colonnes resserrées, jamais de défilement horizontal dans la carte. */
table.fit th, table.fit td { padding-left: 8px; padding-right: 8px; }
table.fit th { white-space: normal; vertical-align: bottom; }
table.fit td { font-size: 13.5px; overflow-wrap: break-word; }
table.fit td:last-child > a, table.fit td:last-child > details > summary { white-space: nowrap; overflow-wrap: normal; }
table.fit details > form { min-width: 0 !important; max-width: 200px; }
table.fit details input, table.fit details select { max-width: 100%; }

/* Pied de page de l'application : une seule ligne discrète, mentions légales repliées. */
.footer.footer-app { padding: 12px 28px 16px; font-size: 12.5px; }
.footer-app .footer-inner { justify-content: flex-start; gap: 6px 16px; }
.footer-app .footer-more > summary { cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; min-height: 32px; }
.footer-app .footer-more > summary:hover { color: var(--ink); }
.footer-app .footer-legal { margin-top: 4px; }
@media (max-width: 900px) { .footer.footer-app { padding: 10px 16px 14px; } .footer-app .footer-inner { justify-content: center; } }
