/*
 * Vitrine du back-office — /design-admin (layouts/design_admin, pages/design_admin.html.erb)
 * La page est elle-même un écran du back-office : ces règles ne font que poser les sections
 * et épingler dans le flux ce qui est collant ou fixe dans l'application (sidebar, toast).
 * Couleurs, rayons et espacements : ceux de layouts/admin.css, aucune valeur propre.
 */

.ds-admin-lead { display: block; max-width: 44rem; }
.admin-main code { font-family: var(--font-mono); font-size: var(--text-xs); }

/* gap, not --gap: the custom property would reach the examples' own .stack and .grid */
.ds-admin-section { gap: var(--space-6); margin-top: var(--space-16); scroll-margin-top: var(--space-6); }
.ds-admin-section > .grid { gap: var(--space-6); }
/* Example titles are <p> (one <h1> per page): they take the heading face of .admin h1 */
.ds-admin-section .page-title { font-weight: 600; letter-spacing: var(--tracking-tight); }
.ds-admin-section > h2 { font-size: var(--text-xl); }
.ds-admin-section > h2 code { margin-left: var(--space-2); color: var(--muted-foreground); font-weight: 400; }
.ds-admin-note { max-width: 44rem; color: var(--muted-foreground); }

/* Une variante : sa légende au-dessus du composant */
.ds-variant { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; }
.ds-variant > figcaption { color: var(--muted-foreground); font-size: var(--text-xs); }

/* Un écran en réduction : la sidebar n'est plus collante, l'écran se détache par l'ombre ambiante */
.ds-admin-frame {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.ds-admin-frame .admin-sidebar { position: static; height: auto; }
.ds-admin-frame-main { padding: var(--space-8); }
.ds-admin-demo .page-header:last-child { margin-bottom: 0; }

.ds-admin-section .search { margin: 0; }
.ds-admin-section .panel .search { margin: var(--space-4) var(--space-5) 0; }
.ds-admin-section .toast { position: static; display: inline-block; transform: none; }

@media (max-width: 1100px) {
  .ds-admin-frame { grid-template-columns: minmax(0, 1fr); }
}
