/* ═══════════════════════════════════════════════════════
   SHUTTLESCORE DS — DOCUMENTATION GRID OVERLAY
   Overlay de debug visuel pour la zone de contenu de la doc.
   Il affiche la grille de référence sans inclure le menu latéral.
═══════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════
   TOGGLE
═══════════════════════════════════════════════════════ */

.app-debug-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  padding-inline: 0;
  white-space: nowrap;
}

.app-debug-toggle .app-icon {
  flex: 0 0 auto;
}

.app-debug-toggle .app-icon::before {
  font-size: 20px;
}


/* ═══════════════════════════════════════════════════════
   OVERLAY SHELL
═══════════════════════════════════════════════════════ */

.app-grid-debug-overlay {
  --app-grid-debug-left: 0px;
  --app-grid-debug-width: 100vw;
  --app-grid-debug-gap: var(--app-space-4);

  position: fixed;
  inset: 0;
  z-index: 99990;
  display: none;
  pointer-events: none;
}

body.has-grid-debug .app-grid-debug-overlay {
  display: block;
}


/* ═══════════════════════════════════════════════════════
   COLUMNS
═══════════════════════════════════════════════════════ */

.app-grid-debug-content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--app-grid-debug-left);
  width: var(--app-grid-debug-width);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--app-grid-debug-gap);
}

.app-grid-debug-column {
  position: relative;
  min-width: 0;
  background: color-mix(in srgb, var(--app-color-info) 7%, transparent);
  border-inline: 1px solid color-mix(in srgb, var(--app-color-info) 28%, transparent);
}

.app-grid-debug-column::before {
  content: attr(data-column);
  position: sticky;
  top: var(--app-space-3);
  display: inline-flex;
  margin: var(--app-space-3);
  padding: 2px 6px;
  border-radius: var(--app-radius-xs);
  background: var(--app-color-info);
  color: var(--app-color-surface);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE GRID
═══════════════════════════════════════════════════════ */

@media (max-width: 860px) {
  .app-grid-debug-content {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .app-grid-debug-column:nth-child(n + 7) {
    display: none;
  }

  .app-grid-debug-column::before {
    content: attr(data-tablet-column);
  }
}

@media (max-width: 640px) {
  .app-grid-debug-content {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--app-space-3);
  }

  .app-grid-debug-column:nth-child(n + 5) {
    display: none;
  }

  .app-grid-debug-column::before {
    content: attr(data-mobile-column);
  }
}
